Branch & Bound Branch & Bound: A General Framework for ILPs - - PowerPoint PPT Presentation

branch bound branch bound a general framework for ilps
SMART_READER_LITE
LIVE PREVIEW

Branch & Bound Branch & Bound: A General Framework for ILPs - - PowerPoint PPT Presentation

Hands-on Tutorial on Optimization F. Eberle, R. Hoeksma, and N. Megow September 25, 2019 Branch & Bound Branch & Bound: A General Framework for ILPs Introduced in the 1960s by Land and Doig Based on two principle ideas 1.


slide-1
SLIDE 1

Hands-on Tutorial on Optimization

  • F. Eberle, R. Hoeksma, and N. Megow

September 25, 2019

Branch & Bound

slide-2
SLIDE 2

Branch & Bound: A General Framework for ILPs

◮ Introduced in the 1960’s by Land and Doig ◮ Based on two principle ideas

  • 1. Branching
  • 2. Bounding

◮ Complete enumeration might be performed

slide-3
SLIDE 3

A First Glance

max cTx s.t. Ax ≤ b x ≥ 0 x ∈ Zn Branching:

◮ Compute a solution x′ of the current subproblem ◮ If x′ ∈ Zn, compare to the current lower bound.

◮ If better, store it as the new current best solution. ◮ If worse, prune the current branch.

◮ If x′ /

∈ Zn, choose x′

i /

∈ Z and create two subproblems

◮ Add xi ≤ ⌊x′

i ⌋.

◮ Add xi ≥ ⌈x′

i ⌉.

slide-4
SLIDE 4

A First Glance

max cTx s.t. Ax ≤ b x ≥ 0 x ∈ Zn Branching:

◮ Compute a solution x′ of the current subproblem ◮ If x′ ∈ Zn, compare to the current lower bound.

◮ If better, store it as the new current best solution. ◮ If worse, prune the current branch.

◮ If x′ /

∈ Zn, choose x′

i /

∈ Z and create two subproblems

◮ Add xi ≤ ⌊x′

i ⌋.

◮ Add xi ≥ ⌈x′

i ⌉.

Bounding: If cTx′ ≤ L, where x′ is the LP solution of the current subproblem and L the current lower bound, the current branch can be pruned.

slide-5
SLIDE 5

Example: Integer LP

max x1 + x2 s.t. x2 ≥

1 2

2x1 + x2 ≤

11 2

−2x1 + x2 ≤ −1

2

x1 x2

1 1 2 2 3 3

P c

slide-6
SLIDE 6

Example: Integer LP

max x1 + x2 s.t. x2 ≥

1 2

2x1 + x2 ≤

11 2

−2x1 + x2 ≤ −1

2

x ∈ Z2 x1 x2

1 1 2 2 3 3

P c PI

slide-7
SLIDE 7

Example: Branching

  • 1. solve LP relaxation

x1 x2

1 1 2 2 3 3

c PI x(0)

slide-8
SLIDE 8

Example: Branching

  • 1. solve LP relaxation
  • 2. x(0)

i

/ ∈ Z → branching xi ≤ ⌊x(0)

i

⌋ xi ≥ ⌈x(0)

i

⌉ x1 x2

1 1 2 2 3 3

c PI x(0)

x1 ≥ 2 x1 ≤ 1

slide-9
SLIDE 9

Example: Branching

  • 1. solve LP relaxation
  • 2. x(0)

i

/ ∈ Z → branching xi ≤ ⌊x(0)

i

⌋ xi ≥ ⌈x(0)

i

  • 3. two subproblems

x1 x2

1 1 2 2 3 3

P(1) P(2)

slide-10
SLIDE 10

Example: Branch & Bound Tree

1

x1 ≤ 1

2

x1 ≥ 2

x1 x2

1 1 2 2 3 3

c x(0)

slide-11
SLIDE 11

Example: Branch & Bound Tree

1

x1 ≤ 1

2

x1 ≥ 2

x1 x2

1 1 2 2 3 3

c P(1) P(2)

slide-12
SLIDE 12

Example: Branch & Bound Tree

1

x1 ≤ 1

2

x1 ≥ 2

x1 x2

1 1 2 2 3 3

c P(2)

slide-13
SLIDE 13

Example: Branch & Bound Tree

1

x1 ≤ 1

2

x1 ≥ 2

x1 x2

1 1 2 2 3 3

c P(2) x(1)

slide-14
SLIDE 14

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3

x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

x1 x2

1 1 2 2 3 3

c P(2) x(1)

slide-15
SLIDE 15

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3

x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

x1 x2

1 1 2 2 3 3

c P(3)

slide-16
SLIDE 16

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3

x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 x1 x2

1 1 2 2 3 3

c P(3)

slide-17
SLIDE 17

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3

x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 x1 x2

1 1 2 2 3 3

c P(3)

slide-18
SLIDE 18

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3

x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 x1 x2

1 1 2 2 3 3

c P(3) x(2)

slide-19
SLIDE 19

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 x1 x2

1 1 2 2 3 3

c P(3) x(2)

slide-20
SLIDE 20

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 x1 x2

1 1 2 2 3 3

c P(5)

slide-21
SLIDE 21

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 6 x1 x2

1 1 2 2 3 3

c P(5)

slide-22
SLIDE 22

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 6 x1 x2

1 1 2 2 3 3

c P(5)

slide-23
SLIDE 23

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 6 x1 x2

1 1 2 2 3 3

c P(5) x(3)

slide-24
SLIDE 24

Example: Branch & Bound Tree

1

x1 ≤ 1

2 3 5

x1 ≤ 2

6

x1 ≥ 3 x2 ≤ 1

4

x2 ≥ 2 x1 ≥ 2

4 6 integral x1 x2

1 1 2 2 3 3

c P(5) x(3) x(3) = (2, 1)T, cTx(3) = 3

slide-25
SLIDE 25

Bounding and Pruning

◮ problem: large branch & bound tree

slide-26
SLIDE 26

Bounding and Pruning

◮ problem: large branch & bound tree ◮ idea: prune nodes

slide-27
SLIDE 27

Bounding and Pruning

◮ problem: large branch & bound tree ◮ idea: prune nodes

◮ for each node: determine upper bound S ◮ S ≤ cTx∗ for best known solution x∗

→ prune node

slide-28
SLIDE 28

Bounding and Pruning

◮ problem: large branch & bound tree ◮ idea: prune nodes

◮ for each node: determine upper bound S ◮ S ≤ cTx∗ for best known solution x∗

→ prune node

◮ for min-ILP:

◮ upper bound U for the problem (current best solution) ◮ lower bound S for each node ◮ if S ≥ U → prune node

slide-29
SLIDE 29

Example: Bounding and Pruning

1 x1 ≤ 1 2 3 5 x1 ≤ 2 6 x

1

≥ 3 x2 ≤ 1 4 x

2

≥ 2 x1 ≥ 2 cTx∗ = 3

x1 x2

1 1 2 2 3 3

c

slide-30
SLIDE 30

Example: Bounding and Pruning

1 x1 ≤ 1 2 3 5 x1 ≤ 2 6 x

1

≥ 3 x2 ≤ 1 4 x

2

≥ 2 x1 ≥ 2 cTx∗ = 3

x1 x2

1 1 2 2 3 3

c cTx(1) = 2.5

slide-31
SLIDE 31

Example: Bounding and Pruning

1 x1 ≤ 1 2 3 5 x1 ≤ 2 6 x

1

≥ 3 x2 ≤ 1 4 x

2

≥ 2 x1 ≥ 2 cTx∗ = 3 1

x1 x2

1 1 2 2 3 3

c cTx(1) = 2.5

slide-32
SLIDE 32

Example: Bounding and Pruning

1 x1 ≤ 1 2 3 5 x1 ≤ 2 6 x

1

≥ 3 x2 ≤ 1 4 x

2

≥ 2 x1 ≥ 2 Optimum! 1

x1 x2

1 1 2 2 3 3

c cTx(1) = 2.5

slide-33
SLIDE 33

Interactive: Knapsack

Problem: Knapsack

Given: n ∈ N items with values vi ∈ N and weights wi ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity

slide-34
SLIDE 34

Interactive: Knapsack

Problem: Knapsack

Given: n ∈ N items with values vi ∈ N and weights wi ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity max

n

i=1 vixi

s.t.

n

i=1 wixi

≤ W x ∈ {0, 1}n

slide-35
SLIDE 35

Interactive: Knapsack (Multiple Copies)

Problem: Knapsack (Multiple Copies)

Given: n ∈ N items with values vi ∈ N, weights wi ∈ N, and number of copies pi ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity

slide-36
SLIDE 36

Interactive: Knapsack (Multiple Copies)

Problem: Knapsack (Multiple Copies)

Given: n ∈ N items with values vi ∈ N, weights wi ∈ N, and number of copies pi ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity max

n

i=1 viyi

s.t.

n

i=1 wiyi

≤ W yi ≤ pi for all i ∈ [n] y ∈ Nn