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