Branch and Bound NOV 2021
Branch and Bound NOV 2021
Branch and Bound NOV 2021
Dinesh Kumar
Branch and Bound
Branch and Bound is a technique used for solving
Integer Programming (IP) problems.
Maximize Z = 40X1 + 90 X 2
Subject to :
9X1 + 7 X 2 56
7 X 1 + 20 X 2 70
X 1 , X 2 = non negative integers
Relaxed Problem (Pure and Mixed Integer)
Maximize Z = 40X1 + 90 X 2
Subject to :
9X1 + 7 X 2 56
Relaxed constraint
7 X1 + 20 X 2 70
X1, X 2 = 0
Relaxed Problem (in Binary IP)
Original Problem Relaxed Problem
Min 3x1 + 4x2 + 9x3 Min 3x1 + 4x2 + 9x3
S.t. S.t.
9x1 + 7x2 + 8x3 >= 15 9x1 + 7x2 + 8x3 >= 15
Relaxed constraint
Branch and Bound Steps
Initiation: Identify the appropriate relaxed problem. Solve the
LP relaxation. Stop if the optimal solution is integer.
Maximize Z = 40X1 + 90 X 2
Subject to :
9X1 + 7 X 2 56
7 X 1 + 20 X 2 70
X 1 , X 2 = non negative integers
X2
Feasible region to
Problem 1
4
Z = 355.890
X1 = 4.809, X2 = 1.817
2
2 4 6 X1 8 10
X2
Sub-problem 2
Max Z = 40 X1 + 90 X2
6
9X1 + 7X2 56
7X1 + 20 X2 70
X1 4
Z = 349.00
X1 = 4.0, X2 = 2.10
2
2 4 6 X1 8 10
X2
Sub-problem 3
Max Z = 40 X1 + 90 X2
9X1 + 7X2 56
2
Z = 341.390 7X1 + 20 X2 70
X1 = 5, X2 = 1.571 X1 5
2 4 6 X1 8 10
B and B Tree
Problem 1
Max 40x1 + 90x2
S.t. 9x1 + 7x2 <= 56 Z = 355.890 UB = 355.890
7x1 + 20x2 <= 70
X1 = 4.809
x1, x2 >= 0
X2 = 1.817
X1 4 X1 5
Problem 2 Problem 3
This is an
UB = 349 Z = 349.000 UB since Z = 341.000 UB = 341.890
the
X1 = 4.0 X1 = 5.0
solution is
X2 = 2.100 not integer X2 = 1.571
Max 40x1 + 90x2 Max 40x1 + 90x2
S.t. 9x1 + 7x2 <= 56 S.t. 9x1 + 7x2 <= 56
7x1 + 20x2 <= 70 7x1 + 20x2 <= 70
X1 <= 4 X1 >= 5
x1, x2 >= 0 x1, x2 >= 0
Problem 2 Problem 3
no integer so branch it
Z = 349.000 Z = 341.428 UB = 341.428
UB = 349.0 342 means
X1 = 4.0 X1 = 5.0 dont branch
X2 = 2.100 X2 = 1.571
X2 2 X2 3 X2 1 X2 2
n
Max ci x i
i =1
subject to
n
w i xi c, x i = 0 or 1, i = 1, 2, ..., n
i =1
B and B Knapsack Example
Min Z= 4X1 + 3X 2 + 4X 3 + 9X 4
Subject to :
6X1 + 2X 2 + 5X 3 + 12X 4 10
X i = 0 or 1, i = 1, 2, 3, 4
What is the relaxation Problem?
Min Z= 4X1 + 3X 2 + 4X 3 + 9X 4
Subject to :
6X1 + 2X 2 + 5X 3 + 12X 4 10
0 = X i = 1 For i = 1, 2, 3, 4
B and B Tree
Problem 1 Min 4x1 + 3x2 + 4x3 + 9x4
s.t. 6x1 + 2x2 + 5x3 + 12x4 >= 10
Z=7
0 <= Xi <= 1, i = 1, 2, 3 and 4
X1 = 1, X2 = 0
X3 = 0, X4 = 1/3
X4 = 0 X4 = 1
Problem 2 Problem 3
Z = 7.2 Z=9
X1 = 1.0, X2 = 0 X1 = X2 = X3 = 0.0
X3 = 0.8 X4 = 1.0
Max 4x1 + 3x2 + 4x3 + 9x4 Max 4x1 + 3x2 + 4x3 + 9x4
s.t. 6x1 + 2x2 + 5x3 + 12x4 >= 10 s.t. 6x1 + 2x2 + 5x3 + 12x4 >= 10
X4 = 0 X4 = 1
0 <= Xi <= 1 ( i = 1, 2 and 3) 0 <= Xi <= 1 ( i = 1, 2 and 3)
B and B Tree
Problem 1
Z=7
X1 = 1
X4 = 1/3
X4 = 0 X4 = 1
Problem 2 Problem 3
LB = 7.2 UB = 9
Z = 7.2 Z=9
UB = 9.0
X1 = 1.0 X1 = 0.0 cs & ub
X3 = 0.8 X4 = 1.0
Fathomed:
Candidate
solution
Problem 2
Z = 7.2
X1 = 1.0
X3 = 0.8
X3 = 0 X3 = 1
Problem 4 Problem 5
Fathomed Z = 7.33
Infeasible X1 = 0.833
Solution X3 = 1.00
X1 = 0 X1 = 1
Problem 6 Problem 7
Fathomed Z=8
Infeasible Fathomed
Solution
Candidate
Optimal Solution Solution
Branch and Bound for MIP
B & B for MIP
To solve MIP using B & B, we branch only on those
variables that are required to be integers.
Max Z = 2x1 + x 2
Subject to
5x1 + 2x 2 8
x1 + x 2 3
x1, x2 0; x1 integer
Branch and Bound for MIP
Sub-problem 1
Z = 11/3 Level 1
X1 = 2/3
X2 = 7/3
X1 <= 0 X1 >= 1
Sub-problem 2 Sub-problem 3
Z=3 Z = 7/2
X1 = 0 X1 = 1
X2 = 3 X2 = 3/2
Candidate solution Candidate solution
Optimal solution best due to max z value
Which sub-problem to solve first?