In the context of optimization, what is the primary difference between the items in the Fractional Knapsack problem versus the 0/1 Knapsack problem?
Show answer
Divisibility
In Fractional Knapsack, items can be broken into smaller pieces, allowing a greedy strategy (sorting by value/weight) to be optimal. In 0/1 Knapsack, items are indivisible, necessitating a Dynamic Programming approach.
Also asked as:
- What characteristic of items allows the Fractional Knapsack problem to be solved greedily, unlike the 0/1 Knapsack problem?