guess the next step: 0/1 knapsack
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 1 of 10
Question 1 of 8
Step 1 of 10
Step 2 of 10
Step 3 of 10
Step 4 of 10
Step 5 of 10
Step 6 of 10
Step 7 of 10
Question 1 of 8
Question 1 of 8
Right.
You guessed: Item A weighs more than the room of 1, so it cannot go in.
What the run did:
Item A weighs 5, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 1 of 8
Not this time.
You guessed: With room 1, taking item A is better, so take it.
What the run did:
Item A weighs 5, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 1 of 8
Not this time.
You guessed: With room 1, taking item A is no better, so leave it.
What the run did:
Item A weighs 5, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 2 of 8
Question 2 of 8
Right.
You guessed: Item A weighs more than the room of 2, so it cannot go in.
What the run did:
Item A weighs 5, more than the room of 2, so it cannot go in. Keep 0 from the cell above.
Question 2 of 8
Not this time.
You guessed: With room 2, taking item A is better, so take it.
What the run did:
Item A weighs 5, more than the room of 2, so it cannot go in. Keep 0 from the cell above.
Question 2 of 8
Not this time.
You guessed: With room 2, taking item A is no better, so leave it.
What the run did:
Item A weighs 5, more than the room of 2, so it cannot go in. Keep 0 from the cell above.
Question 3 of 8
Question 3 of 8
Right.
You guessed: Item A weighs more than the room of 3, so it cannot go in.
What the run did:
Item A weighs 5, more than the room of 3, so it cannot go in. Keep 0 from the cell above.
Question 3 of 8
Not this time.
You guessed: With room 3, taking item A is better, so take it.
What the run did:
Item A weighs 5, more than the room of 3, so it cannot go in. Keep 0 from the cell above.
Question 3 of 8
Not this time.
You guessed: With room 3, taking item A is no better, so leave it.
What the run did:
Item A weighs 5, more than the room of 3, so it cannot go in. Keep 0 from the cell above.
Question 4 of 8
Question 4 of 8
Right.
You guessed: Item A weighs more than the room of 4, so it cannot go in.
What the run did:
Item A weighs 5, more than the room of 4, so it cannot go in. Keep 0 from the cell above.
Question 4 of 8
Not this time.
You guessed: With room 4, taking item A is better, so take it.
What the run did:
Item A weighs 5, more than the room of 4, so it cannot go in. Keep 0 from the cell above.
Question 4 of 8
Not this time.
You guessed: With room 4, taking item A is no better, so leave it.
What the run did:
Item A weighs 5, more than the room of 4, so it cannot go in. Keep 0 from the cell above.
Question 5 of 8
Question 5 of 8
Right.
You guessed: Item B weighs more than the room of 1, so it cannot go in.
What the run did:
Item B weighs 6, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 5 of 8
Not this time.
You guessed: With room 1, taking item B is better, so take it.
What the run did:
Item B weighs 6, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 5 of 8
Not this time.
You guessed: With room 1, taking item B is no better, so leave it.
What the run did:
Item B weighs 6, more than the room of 1, so it cannot go in. Keep 0 from the cell above.
Question 6 of 8
Question 6 of 8
Right.
You guessed: Item B weighs more than the room of 2, so it cannot go in.
What the run did:
Item B weighs 6, more than the room of 2, so it cannot go in. Keep 0 from the cell above.
Question 6 of 8
Not this time.
You guessed: With room 2, taking item B is better, so take it.
What the run did:
Item B weighs 6, more than the room of 2, so it cannot go in. Keep 0 from the cell above.
Question 6 of 8
Not this time.
You guessed: With room 2, taking item B is no better, so leave it.
What the run did:
Item B weighs 6, more than the room of 2, so it cannot go in. Keep 0 from the cell above.