• edited by
616 views

1 Answer

0 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.
Position:
Show:

Related questions

0 0 votes
0 0 answers
1.0k
1.0k views
karan25gupta asked Apr 17, 2019
1,036 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 2 votes
1 answers 1 answer
1.6k
1.6k views
sumit goyal 1 asked Nov 7, 2017
1,619 views
Example 2.2 : Consider that there are three items. Weight and profit value of each item is as given below,\begin{tabular}{|c|c|c|}\hline $\mathbf{i}$ & $\mathbf{W}_{\math...
1 1 vote
1 1 answer
3.4k
3.4k views
Syedabbas110 asked Oct 30, 2017
3,397 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 1 vote
2 2 answers
3.8k
3.8k views
LavTheRawkstar asked Mar 25, 2017
3,843 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...