Question: 3 . Consider 0 - 1 knapsack problem with the capacity M = 3 5 and four objects with the following weights ( 1 =

3. Consider 0-1 knapsack problem with the capacity M =35 and four objects with the
following weights (1=18,2=15,3=10,4=11) and profits (1=25,2=26,3=
15,4=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

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!