Knapsack problem/Bounded: Difference between revisions

m
no edit summary
mNo edit summary
Line 1:
{{task|Classic CS problems and programs}}
 
See also: [[Knapsack problem/unboundedUnbounded]], [[Knapsack problem/0-1]]
 
A tourist wants to make a good trip at the weekend with his friends. They will go to the mountains to see the wonders of nature. So he needs some items during the trip. Food, clothing, etc. He has a good knapsack for carrying the things, but he knows that he can carry only 4 kg weight in his knapsack, because they will make the trip from morning to evening. He creates a list of what he wants to bring for the trip, but the total weight of all items is too much. He adds a value to each item. The value represents how important the thing for the tourist. The list contains which items are the wanted things for the trip, what is the weight and value of an item, and how many units does he have from each items.
Anonymous user