Suppose a thief finds himself in a vault containing several valuables. He realizes however that he brough a knapsack of capacity . The vault has items, where item weighs pounds and is worth dollars. The thief must choose the items so that that he’ll make as much money as possible after selling the items. . He creates an array where is the maximum value obtained by using items which weigh at most pounds.
Having never been in computer-science in college, the thief quickly scribbles four recurrence relationships for his problem. He knows only one is right. Help him find the right one.
1: 2: 3: 4:
Give a set of eight items with a corresponding weight and value:
You want to carry as many items as you can without exceeding your knapsack's weight limit. What's the maximum possible value you can get knowing that the knapsack's weight limit is ?
A table of eight items with their corresponding weights and values is given below.
Suppose that the knapsack's weight limit is , and our goal is to store the greatest possible total value inside of it. If we can only use items from the table, and we only have one of each item, what combination of items can be stored inside the bag to achieve our goal?