math models of or: branch-and-bound

29
Math Models of OR: Branch-and-Bound John E. Mitchell Department of Mathematical Sciences RPI, Troy, NY 12180 USA November 2018 Mitchell Branch-and-Bound 1 / 15

Upload: others

Post on 24-Oct-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math Models of OR: Branch-and-Bound

Math Models of OR:Branch-and-Bound

John E. Mitchell

Department of Mathematical SciencesRPI, Troy, NY 12180 USA

November 2018

Mitchell Branch-and-Bound 1 / 15

Page 2: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Outline

1 Branch-and-Bound

2 Statement of the algorithm

3 An example

Mitchell Branch-and-Bound 2 / 15

Page 3: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Integer optimization problems

We have an integer optimization problem

minx∈Rn cT xsubject to Ax = b (IOP)

x ≥ 0x integer

To simplify the presentation, we’ve constrained all the variables to beintegral. The branch-and-bound algorithm can be readily generalizedto mixed integer optimization problems where only some of thevariables are constrained to be integral.

Mitchell Branch-and-Bound 3 / 15

Page 4: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Linear optimization relaxationWe have a linear optimization relaxation obtained by dropping theintegrality restriction:

minx∈Rn cT xsubject to Ax = b

x ≥ 0

The feasible region of the relaxation is denoted F , so

F = {x ∈ Rn : Ax = b, x ≥ 0}.

The progress of branch-and-bound can be regarded as a tree: we startoff with a root problem, which we repeatedly subdivide. Each problemis called a node of the tree. Each subdivision can be pictured asbranches coming off the current node, leading to two or more childnodes.

Mitchell Branch-and-Bound 4 / 15

Page 5: Math Models of OR: Branch-and-Bound

Branch-and-Bound

A branch-and-bound tree

Root node:min{cT x : x ∈ F}

min{cT x : x ∈ F ,x2 ≤ 1}

min{cT x : x ∈ F ,x2 ≥ 2}

min{cT x : x ∈ F ,x2 ≤ 1, x3 ≥ 4}

min{cT x : x ∈ F ,x2 ≤ 1, x3 ≤ 3}

x2 ≤ 1

x2 ≥ 2

x3 ≥ 4

x3 ≤ 3

Mitchell Branch-and-Bound 5 / 15

Page 6: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Fathoming

We do not need to branch further at a particular node if one of threethings happens:

The relaxation is infeasible, in which case the underlying integeroptimization problem at that node is also infeasible.The optimal solution to the relaxation is integral, in which case thissolution also solves the underlying integer optimization problem atthat node.The optimal value of the relaxation is at least as large as that ofthe best known integer feasible solution to the original problem. Inthis case, no integer feasible solution at the node can be betterthan this already-known solution.

Mitchell Branch-and-Bound 6 / 15

Page 7: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Fathoming

We do not need to branch further at a particular node if one of threethings happens:

The relaxation is infeasible, in which case the underlying integeroptimization problem at that node is also infeasible.The optimal solution to the relaxation is integral, in which case thissolution also solves the underlying integer optimization problem atthat node.The optimal value of the relaxation is at least as large as that ofthe best known integer feasible solution to the original problem. Inthis case, no integer feasible solution at the node can be betterthan this already-known solution.

Mitchell Branch-and-Bound 6 / 15

Page 8: Math Models of OR: Branch-and-Bound

Branch-and-Bound

Fathoming

We do not need to branch further at a particular node if one of threethings happens:

The relaxation is infeasible, in which case the underlying integeroptimization problem at that node is also infeasible.The optimal solution to the relaxation is integral, in which case thissolution also solves the underlying integer optimization problem atthat node.The optimal value of the relaxation is at least as large as that ofthe best known integer feasible solution to the original problem. Inthis case, no integer feasible solution at the node can be betterthan this already-known solution.

Mitchell Branch-and-Bound 6 / 15

Page 9: Math Models of OR: Branch-and-Bound

Statement of the algorithm

Outline

1 Branch-and-Bound

2 Statement of the algorithm

3 An example

Mitchell Branch-and-Bound 7 / 15

Page 10: Math Models of OR: Branch-and-Bound

Statement of the algorithm

Active nodes

The algorithm maintains a list of active nodes that have not yet beenfathomed and are candidates for branching.

At each iteration, a node is selected from the list, its relaxation issolved, and the node is either fathomed or it is subdivided creating twonew active nodes.

Mitchell Branch-and-Bound 8 / 15

Page 11: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

1 Initialize: The initial set L of active nodes consists of just oneproblem, L = {(IOP)}. If a feasible solution x̄ is known, the initialupper bound on the optimal value of (IOP) is set to zu = cT x̄ ;else, we initialize zu =∞.

2 Termination: If L = ∅ then the feasible integral point thatprovided the incumbent upper bound zu is optimal for (IOP).

3 Relaxation: Remove a node IOP l from the set of active nodes.Solve the linear optimization relaxation of IOP l . Let z l be theoptimal value of the relaxation (we allow z l =∞ if the relaxation isinfeasible, and z l = −∞ if the relaxation is unbounded). Let x l bean optimal solution to this relaxation, if the relaxation has anoptimal solution. If the relaxation has an unbounded optimal valuethen let x l either be a fractional extreme ray or a feasible point forthe relaxation with value smaller than zu.

Mitchell Branch-and-Bound 9 / 15

Page 12: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

1 Initialize: The initial set L of active nodes consists of just oneproblem, L = {(IOP)}. If a feasible solution x̄ is known, the initialupper bound on the optimal value of (IOP) is set to zu = cT x̄ ;else, we initialize zu =∞.

2 Termination: If L = ∅ then the feasible integral point thatprovided the incumbent upper bound zu is optimal for (IOP).

3 Relaxation: Remove a node IOP l from the set of active nodes.Solve the linear optimization relaxation of IOP l . Let z l be theoptimal value of the relaxation (we allow z l =∞ if the relaxation isinfeasible, and z l = −∞ if the relaxation is unbounded). Let x l bean optimal solution to this relaxation, if the relaxation has anoptimal solution. If the relaxation has an unbounded optimal valuethen let x l either be a fractional extreme ray or a feasible point forthe relaxation with value smaller than zu.

Mitchell Branch-and-Bound 9 / 15

Page 13: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

1 Initialize: The initial set L of active nodes consists of just oneproblem, L = {(IOP)}. If a feasible solution x̄ is known, the initialupper bound on the optimal value of (IOP) is set to zu = cT x̄ ;else, we initialize zu =∞.

2 Termination: If L = ∅ then the feasible integral point thatprovided the incumbent upper bound zu is optimal for (IOP).

3 Relaxation: Remove a node IOP l from the set of active nodes.Solve the linear optimization relaxation of IOP l . Let z l be theoptimal value of the relaxation (we allow z l =∞ if the relaxation isinfeasible, and z l = −∞ if the relaxation is unbounded). Let x l bean optimal solution to this relaxation, if the relaxation has anoptimal solution. If the relaxation has an unbounded optimal valuethen let x l either be a fractional extreme ray or a feasible point forthe relaxation with value smaller than zu.

Mitchell Branch-and-Bound 9 / 15

Page 14: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

4 Fathom by infeasibility: If the relaxation is infeasible then IOP l isfathomed. Return to Step 2.

5 Fathom by integrality: If x l is integral then IOP l is fathomed.Update zu ← min{cT x l , zu}. Return to Step 2.

6 Fathom by bounds: If cT x l ≥ zu then IOP l is fathomed. Returnto Step 2.

7 Subdivide: Choose a component i with x li fractional. Create two

new nodes and add them to the set of active nodes:(a) x feasible in (IOP l) with xi ≤ bx l

i c, and(b) x feasible in (IOP l) with xi ≥ dx l

i e.Return to Step 2.

Mitchell Branch-and-Bound 10 / 15

Page 15: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

4 Fathom by infeasibility: If the relaxation is infeasible then IOP l isfathomed. Return to Step 2.

5 Fathom by integrality: If x l is integral then IOP l is fathomed.Update zu ← min{cT x l , zu}. Return to Step 2.

6 Fathom by bounds: If cT x l ≥ zu then IOP l is fathomed. Returnto Step 2.

7 Subdivide: Choose a component i with x li fractional. Create two

new nodes and add them to the set of active nodes:(a) x feasible in (IOP l) with xi ≤ bx l

i c, and(b) x feasible in (IOP l) with xi ≥ dx l

i e.Return to Step 2.

Mitchell Branch-and-Bound 10 / 15

Page 16: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

4 Fathom by infeasibility: If the relaxation is infeasible then IOP l isfathomed. Return to Step 2.

5 Fathom by integrality: If x l is integral then IOP l is fathomed.Update zu ← min{cT x l , zu}. Return to Step 2.

6 Fathom by bounds: If cT x l ≥ zu then IOP l is fathomed. Returnto Step 2.

7 Subdivide: Choose a component i with x li fractional. Create two

new nodes and add them to the set of active nodes:(a) x feasible in (IOP l) with xi ≤ bx l

i c, and(b) x feasible in (IOP l) with xi ≥ dx l

i e.Return to Step 2.

Mitchell Branch-and-Bound 10 / 15

Page 17: Math Models of OR: Branch-and-Bound

Statement of the algorithm

The algorithm

4 Fathom by infeasibility: If the relaxation is infeasible then IOP l isfathomed. Return to Step 2.

5 Fathom by integrality: If x l is integral then IOP l is fathomed.Update zu ← min{cT x l , zu}. Return to Step 2.

6 Fathom by bounds: If cT x l ≥ zu then IOP l is fathomed. Returnto Step 2.

7 Subdivide: Choose a component i with x li fractional. Create two

new nodes and add them to the set of active nodes:(a) x feasible in (IOP l) with xi ≤ bx l

i c, and(b) x feasible in (IOP l) with xi ≥ dx l

i e.Return to Step 2.

Mitchell Branch-and-Bound 10 / 15

Page 18: Math Models of OR: Branch-and-Bound

An example

Outline

1 Branch-and-Bound

2 Statement of the algorithm

3 An example

Mitchell Branch-and-Bound 11 / 15

Page 19: Math Models of OR: Branch-and-Bound

An example

An exampleWe look at the integer optimization problem

minx∈R3 5x1 + 5x2 − 13x3subject to x1 + x2 + x3 ≤ 6

10x1 − 8x2 ≤ 15 (IOP)−6x1 − x2 + 9x3 ≤ 9

xi ≥ 0, xi integer, i = 1,2,3

It’s easy to find a feasible solution for this problem: x = (0,0,0).

Hence we can initialize with zu = 0.

We let

F = {x ∈ R3 : x1 + x2 + x3 ≤ 6,10x1 − 8x2 ≤ 15,−6x1 − x2 + 9x3 ≤ 9,

x1, x2, x3 ≥ 0}.

Mitchell Branch-and-Bound 12 / 15

Page 20: Math Models of OR: Branch-and-Bound

An example

The tree for the example

Root node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

Mitchell Branch-and-Bound 13 / 15

Page 21: Math Models of OR: Branch-and-Bound

An example

The tree for the example

Root node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x1 ≤ 1

x1 ≥ 2

Mitchell Branch-and-Bound 13 / 15

Page 22: Math Models of OR: Branch-and-Bound

An example

The tree for the example

Root node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x1 ≤ 1

x1 ≥ 2

Mitchell Branch-and-Bound 13 / 15

Page 23: Math Models of OR: Branch-and-Bound

An example

The tree for the exampleRoot node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

infeasible,z6 = +∞

fathom byinfeasibility

x1 ≤ 1

x1 ≥ 2

x3 ≥ 3

Mitchell Branch-and-Bound 13 / 15

Page 24: Math Models of OR: Branch-and-Bound

An example

The tree for the exampleRoot node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x5 = (2, 58 , 2),

z5 = −12 78

infeasible,z6 = +∞

fathom byinfeasibility

x1 ≤ 1

x1 ≥ 2

x3 ≤ 2

x3 ≥ 3

Mitchell Branch-and-Bound 13 / 15

Page 25: Math Models of OR: Branch-and-Bound

An example

The tree for the exampleRoot node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x3 = (0, 0, 1),z3 = −13

fathom byintegrality

x5 = (2, 58 , 2),

z5 = −12 78

fathom bybounds

infeasible,z6 = +∞

fathom byinfeasibility

x1 ≤ 1

x1 ≥ 2

x3 ≤ 1 x3 ≤ 2

x3 ≥ 3

Mitchell Branch-and-Bound 13 / 15

Page 26: Math Models of OR: Branch-and-Bound

An example

The tree for the exampleRoot node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x3 = (0, 0, 1),z3 = −13

fathom byintegrality

x4 = (1, 3, 2),z4 = −6

fathom bybounds

x5 = (2, 58 , 2),

z5 = −12 78

fathom bybounds

infeasible,z6 = +∞

fathom byinfeasibility

x1 ≤ 1

x1 ≥ 2

x3 ≤ 1

x3 ≥ 2

x3 ≤ 2

x3 ≥ 3

Mitchell Branch-and-Bound 13 / 15

Page 27: Math Models of OR: Branch-and-Bound

An example

The tree for the exampleRoot node:min{cT x :x ∈ F}

x0 = (1.5, 0, 2),z0 = −18.5

x1 = (1, 0, 1 23 ),

z1 = −16 23

x2 = (2, 58 , 2

2972 ),

z2 = −18 19

x3 = (0, 0, 1),z3 = −13

fathom byintegrality

x4 = (1, 3, 2),z4 = −6

fathom bybounds

x5 = (2, 58 , 2),

z5 = −12 78

fathom bybounds

infeasible,z6 = +∞

fathom byinfeasibility

x1 ≤ 1

x1 ≥ 2

x3 ≤ 1

x3 ≥ 2

x3 ≤ 2

x3 ≥ 3

The optimal solution to (IOP) is x∗ = (0,0,1), with value z∗ = −13.Mitchell Branch-and-Bound 13 / 15

Page 28: Math Models of OR: Branch-and-Bound

An example

Choosing the branching variable

Many rules have been proposed for making choices inbranch-and-bound. In the worst case, the algorithm can generated anexponential number of nodes. So heuristics are needed to try to shrinkthe number of explored nodes.

Performing some sort of look-ahead appears to be the best way tomanage the size of the tree: we examine several different choices forbranching variable and choose the one that gives the children with thebest bounds. However, this requires a lot of work at each node. Onevariant of this approach is known as strong branching.

Another approach is to try to learn from earlier branching decisions:how much progress did we make when we branched on x7 before?This leads to something called pseudocosts, which are estimates ofthe progress we could make.

Mitchell Branch-and-Bound 14 / 15

Page 29: Math Models of OR: Branch-and-Bound

An example

Choosing the next node

In the formal statement of the algorithm, we construct the child nodesas soon as we determine the node cannot be immediately fathomed. Itmay save time to not make this decision immediately, but to wait: itmay be possible to fathom this node later by bounds, if another goodfeasible solution arises. Formally, we could define another set of nodeswhose relaxations have been solved but which are neither fathomednor yet subdivided.

A common choice for the next node is to choose the one whose parenthas the smallest value. The reason is that we will have to examine thisnode at some point: it can never be fathomed by bounds.

Mitchell Branch-and-Bound 15 / 15