next up previous
Next: Up: Previous:

Question:

How much of which items should the thief take to maximize the value of the loot?



Greedy Algorithm: Take as much of the item with the highest value per pound (vi/wi) as you can. If you run out of that item, take from the next highest (vi/wi) item. Continue until knapsack is full.

Knapsack Problem Variant


next up previous
Next: Up: Previous: