zero one knapsack
TRANSCRIPT
Knapsack
Presentation
Talha ZubaerDept. of CSE, Daffodil International University.
Presented By:
0/1 Knapsack
A Choice Unsplittable Doesn’t care if capacity remainsUses 2 Cases : P( i,w ) =vi + P( i-1, w-wi ). P( i,w ) = P ( i-1, w ).
Lets Say…
15 KgObject 1 2 3 4 5 6
Weight 1 2 3 5 6 8
Value 3 6 7 9 11 18
Clarification
1 2 3 4 5 6 = Object Number1 1 1 0 0 1 If we add values for those objects we’ll get,3+6+7+0+0+18 = 34And in the table ,our Maximum Value is also 34.
On Compiler