0/1 Knapsack Problem
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Knapsack problem is maximization problem but branch and bound technique is applicable for only minimization problems. In order to convert maximization problem into minimization problem we have to take negative sign for upper bound and lower bound. Therefore, Upper bound (U) = -32 Lower bound (L) = -38
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Consider the path from
1-> 2 ->4 -> 7 -> 8
X1 = 1 ,X2 = 1, X3 = 0, X4 = 1
The solution for 0/1 Knapsack problem is (x1, x2, x3, x4) = (1, 1, 0, 1)
Maximum profit is: = 10 x 1 + 10 x 1 + 12 x 0 + 18 x 1 = 10 + 10 + 18 = 38.
Amity School of Engineering & Technology