Question: THE QUESTION: Prove that the smart-greedy algorithm 1/2-approximates KNAPSACK. (Hint: What would the optimal value be if we were allowed to take a fraction of

THE QUESTION: Prove that the smart-greedy algorithm 1/2-approximates KNAPSACK. (Hint: What would the optimal value be if we were allowed to take a fraction of each item?)

Background information:

Relatively-greedy algorithm for knapsack: As long as possible to add an item to the KNAPSACK, take the item with the largest relative value: value/weight.

Dumb-greedy algorithm for knapsack: Take the single item with the largest value.

Smart-greedy algorithm for knapsack: Run relatively-greedy and dumb-greedy and pick the best solution among the two.

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!