Dynamic Programming21 sections · 916 units
Open in Course

0/1 to Unbounded

Items repeat

So far, each item could be taken at most once. What if you can take each item unlimited times? This is unbounded knapsack (also called complete knapsack).

You have infinite copies of each item type. A vending machine problem: you can buy as many of each snack as you want, limited only by your budget. The transition changes slightly, but the idea is the same. Let me show you.