49
OptIntro 1 / 37 Integer Programming: Branch-&-Bound Algorithm Eduardo Camponogara Department of Automation and Systems Engineering Federal University of Santa Catarina October 2016

Integer Programming: Branch-&-Bound Algorithm

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Integer Programming: Branch-&-Bound Algorithm

OptIntro 1 / 37

Integer Programming: Branch-&-BoundAlgorithm

Eduardo Camponogara

Department of Automation and Systems EngineeringFederal University of Santa Catarina

October 2016

Page 2: Integer Programming: Branch-&-Bound Algorithm

OptIntro 2 / 37

Summary

Introduction

Branch-and-Bound Algorithm

Branch-&-Bound Example

Page 3: Integer Programming: Branch-&-Bound Algorithm

OptIntro 3 / 37

Introduction

Summary

Introduction

Branch-and-Bound Algorithm

Branch-&-Bound Example

Page 4: Integer Programming: Branch-&-Bound Algorithm

OptIntro 4 / 37

Branch-and-Bound Algorithm

Summary

Introduction

Branch-and-Bound Algorithm

Branch-&-Bound Example

Page 5: Integer Programming: Branch-&-Bound Algorithm

OptIntro 5 / 37

Branch-and-Bound Algorithm

Branch-and-Bound Algorithm

“Branch-and-bound” (B&B) is a kind of divide and conquerstrategy for mixed-integer linear programming:

1. Divide P in an equivalent set of subproblems {SPk}.

2. Solve the subproblems.

3. Obtain a solution for P from the solutions for {SPk}.

Page 6: Integer Programming: Branch-&-Bound Algorithm

OptIntro 5 / 37

Branch-and-Bound Algorithm

Branch-and-Bound Algorithm

“Branch-and-bound” (B&B) is a kind of divide and conquerstrategy for mixed-integer linear programming:

1. Divide P in an equivalent set of subproblems {SPk}.

2. Solve the subproblems.

3. Obtain a solution for P from the solutions for {SPk}.

Page 7: Integer Programming: Branch-&-Bound Algorithm

OptIntro 5 / 37

Branch-and-Bound Algorithm

Branch-and-Bound Algorithm

“Branch-and-bound” (B&B) is a kind of divide and conquerstrategy for mixed-integer linear programming:

1. Divide P in an equivalent set of subproblems {SPk}.

2. Solve the subproblems.

3. Obtain a solution for P from the solutions for {SPk}.

Page 8: Integer Programming: Branch-&-Bound Algorithm

OptIntro 5 / 37

Branch-and-Bound Algorithm

Branch-and-Bound Algorithm

“Branch-and-bound” (B&B) is a kind of divide and conquerstrategy for mixed-integer linear programming:

1. Divide P in an equivalent set of subproblems {SPk}.

2. Solve the subproblems.

3. Obtain a solution for P from the solutions for {SPk}.

Page 9: Integer Programming: Branch-&-Bound Algorithm

OptIntro 6 / 37

Branch-and-Bound Algorithm

Branch-and-Bound Algorithm

I The divisions are performed iteratively, such that thesubproblems are easier to solve.

I Eliminate/Discard subproblems by implicit enumeration.I That is, a subproblem is discarded if it can be proven that it

cannot produce the optimal solution.

Page 10: Integer Programming: Branch-&-Bound Algorithm

OptIntro 7 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Divide and Conquer

Consider the problem:

P : z = max {cTx : x ∈ S}

How do we “break”P in small subproblems, and then recombinetheir solutions into a solution for the original problem?

Page 11: Integer Programming: Branch-&-Bound Algorithm

OptIntro 7 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Divide and Conquer

Consider the problem:

P : z = max {cTx : x ∈ S}

How do we “break”P in small subproblems, and then recombinetheir solutions into a solution for the original problem?

Page 12: Integer Programming: Branch-&-Bound Algorithm

OptIntro 8 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Divide and Conquer

Proposition

I Let S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I Let also zk = max{cTx : x ∈ Sk} for k = 1, . . . ,K .

I Then, z = max{zk : k = 1, . . . ,K}.

A divide-and-conquer strategy can be illustrated with anenumeration tree (explicit).

Page 13: Integer Programming: Branch-&-Bound Algorithm

OptIntro 8 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Divide and Conquer

Proposition

I Let S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I Let also zk = max{cTx : x ∈ Sk} for k = 1, . . . ,K .

I Then, z = max{zk : k = 1, . . . ,K}.

A divide-and-conquer strategy can be illustrated with anenumeration tree (explicit).

Page 14: Integer Programming: Branch-&-Bound Algorithm

OptIntro 8 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Divide and Conquer

Proposition

I Let S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I Let also zk = max{cTx : x ∈ Sk} for k = 1, . . . ,K .

I Then, z = max{zk : k = 1, . . . ,K}.

A divide-and-conquer strategy can be illustrated with anenumeration tree (explicit).

Page 15: Integer Programming: Branch-&-Bound Algorithm

OptIntro 9 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration

For S ⊆ {0, 1}3 the enumeration tree is build as follows.

S0

S

x1=0 x1=1

S1

Page 16: Integer Programming: Branch-&-Bound Algorithm

OptIntro 10 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration Tree

I Clearly S = S0 ∪ S1, such that:I S0 = {x ∈ S : x1 = 0} eI S1 = {x ∈ S : x1 = 1}.

I Divide each subproblem in even smaller subproblems:I S0 = S00 ∪ S01 andI S1 = S10 ∪ S11,

where Si1i2 = {x ∈ Si1 : x2 = i2}.

Page 17: Integer Programming: Branch-&-Bound Algorithm

OptIntro 10 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration Tree

I Clearly S = S0 ∪ S1, such that:I S0 = {x ∈ S : x1 = 0} eI S1 = {x ∈ S : x1 = 1}.

I Divide each subproblem in even smaller subproblems:I S0 = S00 ∪ S01 andI S1 = S10 ∪ S11,

where Si1i2 = {x ∈ Si1 : x2 = i2}.

Page 18: Integer Programming: Branch-&-Bound Algorithm

OptIntro 11 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration

S0 S1

S

S00 S01 S10 S11

x2=1x2=0 x2=1 x2=0

x1=0 x1=1

Page 19: Integer Programming: Branch-&-Bound Algorithm

OptIntro 12 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration

S0 S1

S

S00 S01 S10 S11

x2=1x2=0 x2=1 x2=0

x1=1

S000 S001 S010 S011 S100 S101 S110 S111

x3=0 x3=1

x1=0

Page 20: Integer Programming: Branch-&-Bound Algorithm

OptIntro 13 / 37

Branch-and-Bound Algorithm

Divide and Conquer

Explicit Enumeration

I The above figure shows a complete enumeration tree.

I A leaf of the tree Si1i2i3 is nonempty if, and only if,x = (i1, i2, i3) ∈ S .

I The leaves correspond to the candidate solutions.

Page 21: Integer Programming: Branch-&-Bound Algorithm

OptIntro 14 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

I Complete enumeration is not viable for practical problems.

I We should use bounds for {zk} in an effective way, upperbounds (dual) and lower bounds (primal).

Page 22: Integer Programming: Branch-&-Bound Algorithm

OptIntro 14 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

I Complete enumeration is not viable for practical problems.

I We should use bounds for {zk} in an effective way, upperbounds (dual) and lower bounds (primal).

Page 23: Integer Programming: Branch-&-Bound Algorithm

OptIntro 15 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

PropositionLet:

I S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I zk = max{cTx : x ∈ Sk} are optimal values for k = 1, . . . ,K .

Let:

I zk be an upper bound for zk .

I zk be a lower bound for zk .

Then:

a) z = max{zk : k = 1, . . . ,K} defines an upper bound for z .

b) z = max{zk : k = 1, . . . ,K} defines a lower bound for z .

Page 24: Integer Programming: Branch-&-Bound Algorithm

OptIntro 15 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

PropositionLet:

I S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I zk = max{cTx : x ∈ Sk} are optimal values for k = 1, . . . ,K .

Let:

I zk be an upper bound for zk .

I zk be a lower bound for zk .

Then:

a) z = max{zk : k = 1, . . . ,K} defines an upper bound for z .

b) z = max{zk : k = 1, . . . ,K} defines a lower bound for z .

Page 25: Integer Programming: Branch-&-Bound Algorithm

OptIntro 15 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

PropositionLet:

I S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I zk = max{cTx : x ∈ Sk} are optimal values for k = 1, . . . ,K .

Let:

I zk be an upper bound for zk .

I zk be a lower bound for zk .

Then:

a) z = max{zk : k = 1, . . . ,K} defines an upper bound for z .

b) z = max{zk : k = 1, . . . ,K} defines a lower bound for z .

Page 26: Integer Programming: Branch-&-Bound Algorithm

OptIntro 15 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

PropositionLet:

I S = S1 ∪ . . . ∪ SK be a decomposition of S in K subsets.

I zk = max{cTx : x ∈ Sk} are optimal values for k = 1, . . . ,K .

Let:

I zk be an upper bound for zk .

I zk be a lower bound for zk .

Then:

a) z = max{zk : k = 1, . . . ,K} defines an upper bound for z .

b) z = max{zk : k = 1, . . . ,K} defines a lower bound for z .

Page 27: Integer Programming: Branch-&-Bound Algorithm

OptIntro 16 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Branch-and-Bound Algorithm

I Let S be the initial set containing all problem solutions.

I Assume that lb = 13 is the lower bound and ub = 27 is theupper bound.

Page 28: Integer Programming: Branch-&-Bound Algorithm

OptIntro 17 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Cut Node by Optimality

S

ub=27

lb=13

S1 S2

S 13

27

20

20

25

15

eliminado por otimalidade

S1 S2

S 13

27

20

20

25

15

Page 29: Integer Programming: Branch-&-Bound Algorithm

OptIntro 18 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Node Cannot Be Fathomed

S1 S2

S 13

S1 S2

S

40

24

13

37 24

13

37

37

Nenhum ramo da arvore pode ser eliminado

Page 30: Integer Programming: Branch-&-Bound Algorithm

OptIntro 19 / 37

Branch-and-Bound Algorithm

Implicit Enumeration

Implicit Enumeration

Three rules for cutting tree branches:

i) By optimality: zt = max{cTx : x ∈ St} has been solved.

ii) By bounding: z t < z .

iii) By infeasibility: St = ∅.

Page 31: Integer Programming: Branch-&-Bound Algorithm

OptIntro 20 / 37

Branch-&-Bound Example

Summary

Introduction

Branch-and-Bound Algorithm

Branch-&-Bound Example

Page 32: Integer Programming: Branch-&-Bound Algorithm

OptIntro 21 / 37

Branch-&-Bound Example

Branch-&-Bound Application

The branch-and-bound search will be illustrated in the followingproblem:

S : z = max 4x1 −x2s.t. : 7x1 −2x2 6 14

x2 6 32x1 −2x2 6 3

onde x ∈ Z2+.

Page 33: Integer Programming: Branch-&-Bound Algorithm

OptIntro 22 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

The first upper bound is obtained by solving the linear relaxation,R(S).

I It produces z = 597 at (x1, x2) = (207 , 3).

I We assume that z = −∞.

Page 34: Integer Programming: Branch-&-Bound Algorithm

OptIntro 23 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Branching

If z < z , S is broken in two subproblems.

I Break S according with one fractional variable:

S1 = S ∩ {x : xj 6 bx jc}S2 = S ∩ {x : xj > dx je}

I Clearly, S = S1 ∪ S2.

I The list of active nodes becomes L = {S1, S2}.

Page 35: Integer Programming: Branch-&-Bound Algorithm

OptIntro 24 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Branching

S1 S2

S

59/7

x1>=3x1<=2

−inf

Page 36: Integer Programming: Branch-&-Bound Algorithm

OptIntro 25 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Choosing a Node

I The list of active nodes L = {S1, S2} contains two subsets.

I Arbitrarily, node S1 is chosen.

Page 37: Integer Programming: Branch-&-Bound Algorithm

OptIntro 26 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

We solve the relaxation R(S1), meaning the LP:

S1 : z1 = max 4x1 −x2s.t. : 7x1 −2x2 6 14

x2 6 32x1 −2x2 6 3x1 6 2

x ∈ Z2+

for which the optimal solution is (x11 , x12 ) = (2, 12), thus inducing

an upper bound z = 152 .

Page 38: Integer Programming: Branch-&-Bound Algorithm

OptIntro 27 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Branching

I Breaking S1 in two sets:

S11 = S1 ∩ {x : x2 6 0}S12 = S1 ∩ {x : x2 > 1}

renders the active-node list L = {S2,S11, S12}.

Page 39: Integer Programming: Branch-&-Bound Algorithm

OptIntro 28 / 37

Branch-&-Bound Example

Branch-&-Bound Application

S1 S2

S

59/7

x1>=3x1<=2

S11 S12

x2<=0 x2>=1

15/2

−inf

Page 40: Integer Programming: Branch-&-Bound Algorithm

OptIntro 29 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Branching

Arbitrarily we choose node S2 from the active listL = {S11,S12,S2}.

Page 41: Integer Programming: Branch-&-Bound Algorithm

OptIntro 30 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

Solving the linear relaxation R(S2):

S2 : z2 = max 4x1 −x2s.t. : 7x1 −2x2 6 14

x2 6 32x1 −2x2 6 3x1 > 3

x ∈ Z2+

Since R(S2) is infeasible (z2 = −∞), node S2 is cut off.

Page 42: Integer Programming: Branch-&-Bound Algorithm

OptIntro 31 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Choosing a node

The list of active nodes has now become L = {S11,S12}.I Arbitrarily we chose node S12.

Page 43: Integer Programming: Branch-&-Bound Algorithm

OptIntro 32 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

I We solve the relaxation R(S12) with feasible spaceS12 = S ∩ {x : x1 6 2 and x2 > 1}.

I The solution x12 = (2, 1) is obtained, producing the upperbound z12 = 7.

I This solution R(S12) is integer, thus a lower bound wasobtained:

I The value z12 = 7 can be propagated throughout thebranch-and-bound tree.

I Consequently S12 is cut off by optimality.

Page 44: Integer Programming: Branch-&-Bound Algorithm

OptIntro 32 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

I We solve the relaxation R(S12) with feasible spaceS12 = S ∩ {x : x1 6 2 and x2 > 1}.

I The solution x12 = (2, 1) is obtained, producing the upperbound z12 = 7.

I This solution R(S12) is integer, thus a lower bound wasobtained:

I The value z12 = 7 can be propagated throughout thebranch-and-bound tree.

I Consequently S12 is cut off by optimality.

Page 45: Integer Programming: Branch-&-Bound Algorithm

OptIntro 33 / 37

Branch-&-Bound Example

Branch-&-Bound Application

S1 S2

S

59/7

x1<=2

S11 S12

x2<=0 x2>=1

15/2

7

7

7

7

cortado devido a infactibilidade

cortado por otimalidade

x1>=3

−inf

Page 46: Integer Programming: Branch-&-Bound Algorithm

OptIntro 34 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Choose a nodeOnly S11 is an active node.

Page 47: Integer Programming: Branch-&-Bound Algorithm

OptIntro 35 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Bounding

I Notice that S11 = S ∩ {x : x1 6 2, x2 = 0}.I The solution to the relaxation R(S11) is x11 = (32 , 0), which

produces an upper bound z11 = 6.

I Since z11 = 6 < 7 = z , this node is cutt off.

Page 48: Integer Programming: Branch-&-Bound Algorithm

OptIntro 36 / 37

Branch-&-Bound Example

Branch-&-Bound Application

Choosing a node

The list of active nodes is empty, thus we conclude that thesolution x? = (2, 1) is optimal with objective z? = 7.

Page 49: Integer Programming: Branch-&-Bound Algorithm

OptIntro 37 / 37

Branch-&-Bound Example

Integer Programming: Branch-and-Bound Algorithm

I Thank you for attending this lecture!!!