Search for question
Question

Question 3 - 15 points 0/1 Knapsack Problem: Given 10 items with the follow weight table and profit table and a knapsack with weight capacity K = 10. Use dynamic programming

to find a set of items to put in the knapsack that yields the maximum total profit. You should show both what is the maximum profit and which items are selected. You must show how you fill the memorization tables. For this question, you need to show two tables: one for finding the maximum profit and another one for finding the actual items selected. weight = [1, 4, 2, 3, 2, 5, 2, 6, 1,6] profit = [20, 50, 30, 30, 40, 20, 10, 40, 10, 30]

Fig: 1