Q4. (24 points) Consider the following 4 objects: Object index i Value Weight w 4 4 12 4 Solve the knapsack problem for knapsack weights up to 7 using a dynamic programming approach a . Fil in the table of OPT(, ), defined as: OPT(i, w) = OPT(i-1, w) max(OPTi-1, ),vi OPTi-1, -otherwise Each row represents the subset of items… , i, and each column represents the total knapsack weight limit w 0
OR
OR