0
7.5kviews
Let n=4 Profit={1, 2, 5, 6} Weight= {2, 3, 4, 5} M=8 Find solution to 0/1 Knapsack Problem using Dynamic Programming.

Let n=4 Profit={1, 2, 5, 6} Weight= {2, 3, 4, 5} M=8 Find a solution to 0/1 Knapsack Problem using Dynamic Programming.

1 Answer
2
675views

0/1 Knapsack Problem using Dynamic Programming

The given data -

n = 4

Profit = {1, 2, 5, 6} = {p1, p2, p3, p4}

Weight = {2, 3, 4, 5} = {w1, w2, w3, w4}

M = 8


Step 1 -

  • Arrange the weights in the ascending order along with …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.