Professional Documents
Culture Documents
0/1 Knapsack Problem Using FIFO-BB
0/1 Knapsack Problem Using FIFO-BB
0/1 Knapsack Problem Using FIFO-BB
N=4 m=15
1
(P1,p2,p3,p4)=(10,10,12,18)
C^ =38
U=32
(w1,w2,w3,w4)=(2,4,6,9)
C^ ,U, Upper are the 3 terms sum of wts=12
Let root node as E node
Total wt-sum of wts=3
(0,0,0,15) is Ubound
4th object=3/9*18=6
Include 1,2,3
C^ =38,U=32
Scan from left to right
sum of wts=10
Total wt-sum of wts=5
4th object=5/9*18=10
C^ =32,U=22
C^ =38
U=32
C^ =38
U=32
3
C^ =32
U=22
First object
sum of wts=10
C^ =38
U=32
Total wt-sum of wts=5
4th object=5/9*18=10
C^ =32,U=22
2
sum of wts=8
C^ =38
Total wt-sum of wts=7 U=32
4th object=7/9*18=14
4
C^ =36,U=22
5
C^ =38
U=32
Second object
C^ =36
U=22
1
C^ =32
U=22
6
C^ =32
U=22
sum of wts=6
Total wt-sum of wts=9
4th object=9/9*18
C^ =30,U=30
C^ =38
U=32
1
C^ =32
U=22
C^ =38
U=32
4
C^ =38
U=32
No fraction part for fourth object
5
C^ =36
U=22
6
C^ =32
U=22
7
C^ =30
U=30
1
3
10
11
12
C^ =38
U=38
X1=1
X2=1
X3=0
X4=1
13