Application of Knapsack Algorithm
Application of Knapsack Algorithm
Author
: S Ramarajan
Year
: III BE CSE
The capacity of
stomach is taken as a constraint
for this problem. The capacity of
calories
3) Cabbage curry = 36 calories
4) Baked eggs = 211 calories
5) Butter milk gravy =98 calories
= 158 ml
= 473 ml
in calories.
Wi = (590, 354, 79, 158, 237, 473)
WiXi
Xi
PiXi
(Objective Solutions)
(Feasible Solutions)
1) (1,1 ,1,1,1,0)
2) 1,200/354,1,1,0,1)
3) 1,0,1,1,,200/237,1)
4)
(1,100/354,1,1,100/237)
5) 1,1,0,1,1,161/473)
6) 1,1,1,1,1, 82/473
7) (1,1,0, 83/158,0,1)
590+354+79+158+237+473
800+224+36+211+98
1418
1369
590+200+79+158+0+473
800+126.5+36+211+300
1500
590+0+79+158+200+473
1429.7
800+36+211+82.7+300
1500
590+100+79+158+100+473
1429.7
800+63.276+36+211+41.35+300
1500
590+354+158+237+161
1451.266
800+224+211+98+102.114
1500
590+354+79+158+237+82
1435.114
1500
590+354+0+83+0+473
800+224+36+211+98+300x82/473
1421
800+224+0+110.84+0+300
1500
590+354+79+0+4+473
1434.841
800+224+36+0+1.654+300
1500
1361.654
590+354+0+0+83+473
800+224+0+0+83/237x98+300
1500
1358.32
10)
590+354+61+158+237+100
800+224+61/79x36+211+98+10/473x300
(1,1,61/79,1,1,100/473)
150
1424.22
8) (1,1,1,0,4/237,1)
9) (1,1,0,0,83/237,1)
exactly.
Conclusion: