edited by
360 views

1 Answer

0 votes
0 votes
you can use backtracking approach try each possible combination.

As knapsack problem can be solved dynamic programming which is nohting but a recursive backtracking. approch but it save some step from recalculation.

Related questions

0 votes
0 votes
0 answers
1
karan25gupta asked Apr 17, 2019
703 views
In 0/1 knapsack problem ,suppose if maximum weight is given as W and we are asked to find out max profit then * IS IT NECESSARY THAT THE TOTAL WEIGHT SHOULD BE EXACTLY EQ...
2 votes
2 votes
1 answer
2
0 votes
0 votes
1 answer
3
Syedabbas110 asked Oct 30, 2017
2,833 views
5.Consider the Knapsack instance with 5 objects and a capacity M=11, profit P=(5,4,7,2,3) andweight W=(4,3,6,2,2.). Solve it using dynamic programming approach.
1 votes
1 votes
1 answer
4
LavTheRawkstar asked Mar 25, 2017
2,640 views
Number of Cateogires are 5, Thier total weights are w1,w2,w3,w4,w5={7,2,4,8,6}b1,b2,b3,b4,b5={5,6,4,3,2}M=6=Maximum Capacity= WI am having confusion How to solve using dy...