Question: (a) Give an example that shows the greedy algorithm that picks the item with largest profit first (and continues in that fashion) does not solve

(a) Give an example that shows the greedy algorithm that picks the item with largest profit first (and continues in that fashion) does not solve the 0 1 Knapsack problem.

(b) Give an example that shows the greedy algorithms that picks the object with largest profit first (and continues in that fashion), does not solve the Fractional Knapsack problem.

(c) Give an example that shows the greedy algorithm for activity selection that picks the activity with the smallest start time first (and continues in that fashion) does not solve the activity selection problems correctly.

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 Databases Questions!