Knapsack problem/Bounded: Difference between revisions
Content deleted Content added
m moved Knapsack problem/bounded to Knapsack problem/Bounded: Capitalization |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{task|Classic CS problems and programs}} |
{{task|Classic CS problems and programs}} |
||
See also: [[Knapsack problem/ |
See also: [[Knapsack problem/Unbounded]], [[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. |
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. |