In class, we studied the fractional [0, 1]-knapsackproblem using a greedy approach. In this assignment, we work on the{0, 1}-knapsack problem using dynamic programming.
You are given n objects which cannot be broken into smaller pieces.Moreover, you have exactly one copy of each object. Each object i(where 1 ≤ i ≤ n) has weight wi > 0 and value vi > 0. Youhave a knapsack that can carry a total weight not exceeding W. Yourgoal is to fill the knapsack in a way that maximizes the totalvalue of the included objects,
while respecting the capacity constraint. For each object i (where1
PayPal Gateway not configured
PayPal Gateway not configured