Question: 3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the following weights (w = 18, W = 15,

3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the following weights (w =

3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the following weights (w = 18, W = 15, W3 = 10, W4 = 11) and profits (p = 25, P = 26, P3= 15, P4 = 17). a) (10 pts) Use the greedy algorithm with a strategy to choose in non-increasing order of Profit/Weight. b) (10 pts) Is this optimal/correct? Explain why.

Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Greedy Algorithm with ProfitWeight Strategy Calculate the ProfitWeight ratio for each object Objec... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!