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
Get step-by-step solutions from verified subject matter experts
