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 1960’s by Land and Doig ◮ Based on two principle ideas 1. Branching 2. Bounding ◮ Complete enumeration might be performed
A First Glance max c T x s.t. Ax ≤ b x ≥ 0 x ∈ Z n Branching: ◮ Compute a solution x ′ of the current subproblem ◮ If x ′ ∈ Z n , compare to the current lower bound. ◮ If better, store it as the new current best solution. ◮ If worse, prune the current branch. ◮ If x ′ / ∈ Z n , choose x ′ i / ∈ Z and create two subproblems ◮ Add x i ≤ ⌊ x ′ i ⌋ . ◮ Add x i ≥ ⌈ x ′ i ⌉ .
A First Glance max c T x s.t. Ax ≤ b x ≥ 0 x ∈ Z n Branching: ◮ Compute a solution x ′ of the current subproblem ◮ If x ′ ∈ Z n , compare to the current lower bound. ◮ If better, store it as the new current best solution. ◮ If worse, prune the current branch. ◮ If x ′ / ∈ Z n , choose x ′ i / ∈ Z and create two subproblems ◮ Add x i ≤ ⌊ x ′ i ⌋ . ◮ Add x i ≥ ⌈ x ′ i ⌉ . Bounding: If c T x ′ ≤ L , where x ′ is the LP solution of the current subproblem and L the current lower bound, the current branch can be pruned.
Example: Integer LP c x 2 3 P max x 1 + x 2 2 1 s.t. x 2 ≥ 2 11 2 x 1 + ≤ x 2 2 − 1 − 2 x 1 + x 2 ≤ 2 1 0 x 1 0 1 2 3
Example: Integer LP c x 2 3 P max x 1 + x 2 2 1 s.t. x 2 ≥ 2 11 2 x 1 + ≤ x 2 2 − 1 P I − 2 x 1 + x 2 ≤ 2 1 Z 2 ∈ x 0 x 1 0 1 2 3
Example: Branching c x 2 3 x (0) 1. solve LP relaxation 2 P I 1 0 x 1 0 1 2 3
Example: Branching c x 2 3 x (0) 1. solve LP relaxation 2. x (0) ∈ Z → branching / i 2 x i ≤ ⌊ x (0) ⌋ i P I x i ≥ ⌈ x (0) ⌉ 1 i 0 x 1 x 1 ≤ 1 x 1 ≥ 2 0 1 2 3
Example: Branching x 2 3 1. solve LP relaxation 2. x (0) ∈ Z → branching / i 2 x i ≤ ⌊ x (0) ⌋ i x i ≥ ⌈ x (0) ⌉ 1 i P (1) P (2) 3. two subproblems 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 x (0) 1 2 2 1 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 2 1 P (1) P (2) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 2 1 P (2) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 2 x (1) 1 P (2) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 x (1) 3 4 1 P (2) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 1 P (3) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 4 1 P (3) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 4 1 P (3) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 x (2) 3 4 4 1 P (3) 0 x 1 0 1 2 3
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 x (2) 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (3) 0 x 1 0 1 2 3 5 6
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (5) 0 x 1 0 1 2 3 5 6
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (5) 0 x 1 0 1 2 3 5 6 6
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (5) 0 x 1 0 1 2 3 5 6 6
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x 2 ≤ 1 x 2 ≥ 2 2 x (3) 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (5) 0 x 1 0 1 2 3 5 6 6
Example: Branch & Bound Tree 0 c x 2 x 1 ≤ 1 x 1 ≥ 2 3 1 2 x (3) = (2 , 1) T , c T x (3) = 3 x 2 ≤ 1 x 2 ≥ 2 2 x (3) 3 4 4 1 x 1 ≤ 2 x 1 ≥ 3 P (5) 0 x 1 integral 0 1 2 3 5 6 6
Bounding and Pruning ◮ problem: large branch & bound tree
Bounding and Pruning ◮ problem: large branch & bound tree ◮ idea: prune nodes
Bounding and Pruning ◮ problem: large branch & bound tree ◮ idea: prune nodes ◮ for each node: determine upper bound S ◮ S ≤ c T x ∗ for best known solution x ∗ → prune node
Bounding and Pruning ◮ problem: large branch & bound tree ◮ idea: prune nodes ◮ for each node: determine upper bound S ◮ S ≤ c T x ∗ 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
Example: Bounding and Pruning 0 c x 1 ≤ 1 x 1 ≥ 2 x 2 3 1 2 x 2 ≤ 1 x 2 2 ≥ 2 3 4 1 x 1 ≤ 2 x 1 ≥ 3 0 x 1 c T x ∗ = 3 0 1 2 3 5 6
Example: Bounding and Pruning 0 c x 1 ≤ 1 x 1 ≥ 2 x 2 3 1 2 x 2 ≤ 1 x 2 2 c T x (1) = 2 . 5 ≥ 2 3 4 1 x 1 ≤ 2 x 1 ≥ 3 0 x 1 c T x ∗ = 3 0 1 2 3 5 6
Example: Bounding and Pruning 0 c x 1 ≤ 1 x 1 ≥ 2 x 2 3 1 1 2 x 2 ≤ 1 x 2 2 c T x (1) = 2 . 5 ≥ 2 3 4 1 x 1 ≤ 2 x 1 ≥ 3 0 x 1 c T x ∗ = 3 0 1 2 3 5 6
Example: Bounding and Pruning 0 c x 1 ≤ 1 x 1 ≥ 2 x 2 3 1 1 2 x 2 ≤ 1 x 2 2 c T x (1) = 2 . 5 ≥ 2 3 4 1 x 1 ≤ 2 x 1 ≥ 3 0 x 1 Optimum! 0 1 2 3 5 6
Interactive: Knapsack Problem: Knapsack Given: n ∈ N items with values v i ∈ N and weights w i ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity
Interactive: Knapsack Problem: Knapsack Given: n ∈ N items with values v i ∈ N and weights w i ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity � n max i =1 v i x i � n s.t. ≤ i =1 w i x i W { 0 , 1 } n x ∈
Interactive: Knapsack (Multiple Copies) Problem: Knapsack (Multiple Copies) Given: n ∈ N items with values v i ∈ N , weights w i ∈ N , and number of copies p i ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity
Interactive: Knapsack (Multiple Copies) Problem: Knapsack (Multiple Copies) Given: n ∈ N items with values v i ∈ N , weights w i ∈ N , and number of copies p i ∈ N knapsack capacity W ∈ N Task: Maximize the total value of the knapsack while not exceeding the capacity � n max i =1 v i y i � n s.t. i =1 w i y i ≤ W ≤ for all i ∈ [ n ] y i p i N n y ∈
Recommend
More recommend