Question: [0/1 Knapsack] Consider the knapsack problem discussed in class. We now add the requirement that xl or 0, V i. That is, an object is
![[0/1 Knapsack] Consider the knapsack problem discussed in class. We now](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f308492b766_40066f308488a5a0.jpg)
[0/1 Knapsack] Consider the knapsack problem discussed in class. We now add the requirement that xl or 0, V i. That is, an object is either completely included or not included into the knapsack. We call this new version of knapsack problem as 0/ Knapsack problem, and we still want to maximize the profit subject to the total weight M. (a) One greedy strategy is: consider the objects in order of nonincreasing profit p; add the object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal solutions. (b) One greedy strategy is: consider the objects in order of nondecreasing weight w; add the object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal solutions. (c) One greedy strategy is: consider the objects in order of nonincreasing density p/w; add the object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal solutions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
