Professional Documents
Culture Documents
Exact Methods: Branch & Bound
Exact Methods: Branch & Bound
Exact Methods: Branch & Bound
Michel Bierlaire
In the absence of optimality conditions, enumeration is the only way to find the
optimal solution.
However, it is most of the time impossible to perform explicitly due to the curse
of dimensionality.
The branch & bound method is some sort of implicit enumeration technique, that
attacks the huge set of feasible solutions using a “divide and conquer” strategy.
Combinatorial optimization
min f (x)
x
subject to
x ∈ F,
where F is a large set containing a finite number of elements.
Divide
F
Divide
F1 F2 ··· FK −1 FK
Divide
Problem P Problem Pk
min f (x) min f (x)
x x
subject to subject to
x ∈ F, x ∈ Fk ,
Solution: x .∗
Solution: xk∗ .
Conquer
Theorem 26.1
Consider i such that
f (x ∗ ) ≤ f (xi∗ )
f (xi∗ ) ≤f (xk∗ ), k = 1, . . . , K . ∃j such that x ∗ ∈ Fj
Optimality of xj∗ : f (xj∗ ) ≤ f (x)∀x ∈ Fj
Then, x ∗ ∈ Fj ⇒ f (xj∗ ) ≤ f (x ∗ )
f (x ∗ ) ≤ f (xi∗ ) ≤ f (xj∗ ) ≤ f (x ∗ )
f (x ∗ ) = f (xi∗ ),
x ∈ F. x ∈ Fk . x ∈ Fk .
f (xi∗ ) ≤ f (xk∗ ), k = 1, . . . , M,
f (x ∗ ) = f (xi∗ ),
When the feasible set is large, one way to solve the problem is to partition it into
smaller subsets
Solve each problem independently. The best solution found is the optimal
solution of the original problem.
The most important result says that it is not necessary to solve all problems.
If good lower bounds can be found, it is sufficient to prove the optimality.
And for MILP, we know how to calculate lower bound: by solving the relaxation
problem.
Exact methods
Branch & Bound for integer optimization
Michel Bierlaire
We illustrate the idea of the B&B method in the context of integer optimization.
Example
Problem P
min x1 − 2x2
subject to
−4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥ 0
x1 , x2 ∈ N.
Upper bound
(0,0) is feasible: U=0
Example
0
0 1 2 3 4
Lower bound
Solve the relaxation. Erase the integrality constraints and call the problem R(P).
Lower bound
min x1 − 2x2
subject to
−4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥ 0
x1 , x2 ∈ N.
Lower bound
0
0 1 2 3 4
Divide
P1 P2
min x1 − 2x2 min x1 − 2x2
s.c. s.c.
−4x1 + 6x2 ≤ 9 −4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4 x1 + x2 ≤ 4
x1 , x2 ≥ 0 x1 , x2 ≥ 0
x1 , x2 ∈ N x1 , x2 ∈ N
x2 ≤ 2 x2 ≥ 3
Divide
0
0 1 2 3 4
Tree representation
Upper bound
U =0
Tree
P[−3.5]
P1 [?] P2 [?]
P2 is infeasible.
P1
0
0 1 2 3 4
P1: lower bound
min x1 − 2x2
subject to
−4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥ 0
x2 ≤ 2
x1 , x2 ∈ N.
P1: lower bound
0
0 1 2 3 4
P1: divide
◮ Optimal solution of R(P1 ) : (0.75, 2)
◮ ℓ(P1 ) : −3.25
P11 P12
min x1 − 2x2 min x1 − 2x2
s.c. s.c.
−4x1 + 6x2 ≤ 9 −4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4 x1 + x2 ≤ 4
x1 , x2 ≥ 0 x1 , x2 ≥ 0
x1 , x2 ∈ N x1 , x2 ∈ N
x2 ≤ 2 x2 ≤ 2
x1 ≤ 0 x1 ≥ 1
P1: divide
0
0 1 2 3 4
Tree representation
U =0
P[−3.5]
P1 [−3.25] P2 [?]
min x1 − 2x2
subject to
−4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥ 0
x2 ≤ 2
x1 ≤ 0
x1 , x2 ∈ N.
P11: lower bound
0
0 1 2 3 4
P11: lower bound
min x1 − 2x2
subject to
−4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥ 0
x2 ≤ 2
x1 ≥ 1
x1 , x2 ∈ N.
P12: lower bound
0
0 1 2 3 4
P12: lower bound
Clean the tree by removing subproblem P1 because its lower bound is not better
than the upper bound.
Then show that we have found any optimal solution
Tree representation
U = −3
P[−3.5]
P1 [−3.25] P2 [?]
The branch & bound method for integer optimization applies the divide and
conquer concept progressively.
Branching: taking a fractional variable, and branch on it.
Lower Bound: solving the relaxation
Upper bound: best feasible solution found so far.
Exact methods
Gomory cuts
Michel Bierlaire
It is possible to shrink the constraint polyhedron so that its vertices are integer
In that case, the simplex algorithm will solve the problem.
In practice, additional constraints must be added.
They must shrink the feasible set of the relaxation, but not of the original
discrete optimization problem.
These constraints are called “valid inequalities” when they are designed by the
modeler, and “cutting planes” or “cuts” when they are generated by an
algorithm.
Feasible set of integer optimization
3 3
2 2
1 1
0 0
0 1 2 3 4 5 0 1 2 3 4 5
Feasible set of integer optimization
3 3
2 2
1 1
0 0
0 1 2 3 4 5 0 1 2 3 4 5
Simplex tableau
B −1 A B −1 b
c T − cBT B −1 A −cBT B −1 b
We have an optimal tableau for the relaxed problem.
Upper part: a modified version of the constraints
Decompose the upper part into basic and non basic variables
B −1 Ax = B −1 b,
B −1 BxB + B −1 NxN = B −1 b,
xB + B −1 NxN = B −1 b.
Basic variables are first, so that xi = (xB )i , i ≤ m. Consider row i and call αij
the element of the tableau
X
xi + αij xj = (xB∗ )i .
j non basic
Rounding the constraint
X
xi + αij xj = (xB∗ )i .
j non basic
X
xi + ⌊αij ⌋xj ≤ (xB∗ )i .
j non basic
$ %
X
xi + ⌊αij ⌋xj ≤ ⌊(xB∗ )i ⌋.
j non basic
x is integer
$ %
X
xi + ⌊αij ⌋xj ≤ ⌊(xB∗ )i ⌋.
j non basic
$ %
X X
xi + ⌊αij ⌋xj = xi + ⌊αij ⌋xj
j non basic j non basic
X
xi + ⌊αij ⌋xj ≤ ⌊(xB∗ )i ⌋,
j non basic
Valid inequality for all feasible solution of the integer problem: it is called a
Gomory cut
Solution of the relaxation
X
xi + ⌊αij ⌋xj ≤ ⌊(xB∗ )i ⌋.
j non basic
3 3
2 2
1 1
0 0
0 1 2 3 4 5 0 1 2 3 4 5
Examples
3 3
2 2
1 1
0 0
0 1 2 3 4 5 0 1 2 3 4 5
Summary
The branch & bound was cutting the constraint polyhedron along the axes of
coordinates.
Gomory cuts exploit the structure of the simplex tableau to generate valid
inequalities, that exclude (if well chosen) the optimal solution of the relaxation.
It means that, at each iteration, the polyhedron is made strictly smaller.
Eventually, all the vertices will be integer.