Branch and Bound Method

Size: px
Start display at page:

Download "Branch and Bound Method"

Transcription

1 Branch and Bound Method The Branch and Bound (B&B) is a strategy to eplore the solution space based on the implicit enumeration of the solutions : B&B eamines disjoint subsets of solutions (branching) Evaluates such subsets on the basis of an estimation of the objective function (bounding) and eliminates the subsets that cannot contain the optimal solution The eploration is performed by solving a sequence of relaed problem (RL) associated with the disjoint subsets of solutions The idea is to subdivide the whole problem into a set of subproblems of progressively decreasing dimensions that can be more easily solved (Divide and Conquer)

2 Branch and Bound Method Different from Cutting Planes: B&B solves not a sequence of increasingly constrained problems but a set of problems that do not share solutions The problems are generated with a recursive hierarchical relation: A parent problem is divided into two (or more) disjoint child problems The solution for the parent problem corresponds to the optimal solution for one of the child problems Dividing (separating) problems branching phase B&B eploration represented by a tree graph Enumeration Tree: Nodes = subproblems Branches (links) = problem subdivisions hierarchical relations

3 Branch and Bound Method Eample RL is the parent of RL Binary tree and RL (successors nodes) RL Tree root: RL of original IP problem RL has non integer solution RL RL RL RL RL 5 RL 6 Root descendants: two RLs obtained dividing RL into two disjont problems RL RL 7 8 RL RL RL RL 9 RL RL Leaf: node without descendants RL RL

4 Branch and Bound Method Pure branching ends when added constraints fi all variables Binary tree as elimination tree for - LP problem: branching = fiing the value of a variable to or Eample with binary variables RL Tree with += levels =8 leaves -=7 intermediate nodes = = RL RL RL RL = = = = RL 5 RL 6 A tree generated by n binary variables: n+ levels n leaves n - intermediate nodes n+ - nodes RL RL 7 8 RL RL RL RL 9 RL RL = = = = = = = =

5 Branch and Bound Method Pure branching not an effective algorithm (total number of nodes greater than the number of solutions) Effectiveness relies on Bounding: A bound estimates the best objective value for all subproblems generated from a parent node Bounding eploit information on bounds to avoid a complete tree eploration Bounding allows eliminating (pruning) parts of the tree without eploring them B&B is an implicit enumeration method The B&B approach is a general purpose strategy that can be applied any combinatorial optimization problem

6 Branch and Bound Method Consider the IP problem (IP) ma Z First B&B steps: Solve RL of (IP) associating the solution to root node (RL ) Z objective value and optimal solution to (RL ) Assume not integer (at least a component is fractional) Choose a not integer solution component Partition the feasibility region of (RL) P into two disjoint regions adding to P one of the following constraints j = c n + T A = b n = { R : A = b, j } j j j +

7 Branch and Bound Method The elimination tree: two disjoint relaed problems are created j j RL Z not integer j j + RL RL Net steps: iterate for the child nodes RL and RL solve the relaed problem (e.g., RL ) If a not integer solution is found then branch the tree by selecting a fractional component of the solution (branching)

8 Branch and Bound Method The elimination tree not integer k k j j Z RL Z RL RL k RL RL k + not integer j j + Z not integer Active nodes: generated nodes that are not solved or solved but with not integer solution Integer nodes: not eplored anymore (node fathomed for integrality) Unfeasible nodes: not eplored anymore (node fathomed for unfeasibility)

9 Branch and Bound Method The elimination tree: fathomed nodes are closed (not active) integer not integer k k Z j j Z RL Z RL RL k RL RL k + not integer j unfeasible j + Z not integer Fathomed for integrality Fathomed for unfeasibility Integer solution is the first new current solution (incumbent solution) Objective Z is a Lower Bound (LB): since the problem is a maimization, we never accept an inferior solution

10 Branch and Bound Method Bounding LB is fundamental for bounding Objective values associated with solved active nodes are Upper Bound (UB) In general, given: (RL i ) associated with node i (A i =b i set of original constraints plus constraints added for branching) (RL) i ma i A R n + i = b = c T lb the best integer solution found so far ub the not integer solution of (RL i )

11 Branch and Bound Method T ub T lb T i* T ub If c c since c c i* where is solution to the integer problem for node i (IP ) i ma A i Z then the best integer solution to (IP i ) cannot never be better than current incumbent solution lb c T i* c T n + i = b ub = c c T T lb Denoting with Z LB the current LB, if for active node i it holds then node i is fathomed for bounding (and closed) Zi Z LB

12 Branch and Bound Method Whenever an integer solution h for node h is found If Z h >Z LB h becomes the new incumbent solution LB is updated Z LB =Z h Each active node UB is compared with the new LB to verify if any node can be fathomed for bounding Whenever a non integer solution is found for a node, UB for the node is compared to the current LB to verify if the node can be fathomed per bounding

13 Branch and Bound Method The elimination tree (eample) RL Z not integer integer not integer Z RL RL Z RL RL Fathomed for integrality Fathomed for unfeasibility Z LB = Z F() unfeasible Z not integer Z Z Fathomed for bounding No active nodes: B&B terminates The current incumbent solution is optimal

14 Branch and Bound Method If B&B terminates without founding any feasible solution (IP) is not feasible In general B&B tree is not completely eplored since branching is stopped when : (RL) for a node is unfeasible the solution to a (RL) for a node is integer the solution to a (RL) for a node is not integer but bounding guarantees that branching from that node cannot lead to the optimal solution NB: in case of minimization the terms UB and LB must be echanged and the condition for fathoming for bounding must be reversed

15 Branch and Bound Algorithm Algorithm steps:. Initialization Let (RL ) the root active node and P the polyhedron associated with RL Initialize Z LB =- as current LB and Z = as objective value (UB) for node (RL ). Branching If no active node eists the go to step 7 otherwise select an active node j If (RL j ) has already been solved go to step otherwise go to step. Separation j Select a basic fractional variable = y and partition P j as P j Bi i j j y i } Pj { : B y i + } { : B i generating two new nodes with the same UB of node j Go to step i

16 Branch and Bound Algorithm Algorithm steps:. Solution of (RL j ) Solve problem (RL j ) If no feasible solution eists the node is fathomed for unfeasibility (no more active); go to step If an optimal solution j j eists set = and go to step 5 Z j 5. Fathoming for integrality If j is not integer go to step 6 otherwise prune the node j and set Z LB = ma{z LB, Z j } If LB is updated then the new incumbent solution is the one associated with node j Go to step 6

17 Branch and Bound Algorithm Algorithm steps: 6. Fathoming for bounding Prune any active node k such that Z k Z LB Go to step 7. Termination The algorithm stops If Z LB =- then (IP) is not feasible If Z LB >- then the incumbent solution is optimal and the associated optimal objective value is Z LB

18 Branch and Bound Algorithm Remarks: B&B convergence in a finite number of steps is guaranteed if the problem has optimal finite solutions The algorithm performance depends on the different branching strategies adopted at step Two possible opposite branching strategies: Depth First Breadth First

19 Branch and Bound Algorithm Depth First (eploration in depth): Whenever the current node is not fathomed, generate the two child nodes and continue by eploring one of them at the net level Purpose: fi many variables to quickly reach an integer solution as LB Reduced number of active nodes

20 Branch and Bound Algorithm Breadth First (eploration in breadth): All nodes at a given level are eplored before moving to the net level Purpose: compute UB for many nodes hoping to prune many branches by bounding as soon as an integer solution is found Memory usage is larger than depth first strategy

21 Branch and Bound Algorithm The two strategies are etreme cases: composed strategies may eists (eplore in breadth only a subset of nodes) Selection strategies may be used at step The given eamples use binary trees; more child nodes at a same level can be generated in case of integers (e.g.: nodes i, i 5, i 6) Whenever breadth first is not used, another decision influencing B&B is the choice of the node to eplore net A strategy can be choose the node with the greatest UB (the most promising) Bounding is facilitated by the availability of good quality solutions: heuristic algorithms can be used to complete the partial solutions associated with B&B intermediate nodes

22 Branch and Bound: an eample Consider the IP problem ma 5 + +, () () () P () () objective () At node RL the linear relaation is solved Z =6.6 =.65 =.75 Not integer solution

23 Branch and Bound: an eample Choose for branching RL Z = 6.6 P RL RL

24 Branch and Bound: an eample Solving RL Z = Q RL P Z = RL RL 6.6 Q ma +, () () () () Z = = =.6 Not integer solution

25 Branch and Bound: an eample Solving RL Z = Q RL P Z = 6.6 RL N RL Z = 5. 5 Z = 5.5 = =.5 Not integer solution ma +, () () () () N

26 Branch and Bound: an eample Branching for RL (the largest UB) separating with RL Z = 6.6 P Q Z RL N RL Z = 5. 5 = RL RL Not feasible solution

27 Branch and Bound: an eample Solving RL Q RL P Z = 6.6 Z RL N RL Z = 5. 5 R = RL RL Z = R integer Z = = = ma +, () () () () Integer solution (5)

28 Branch and Bound: an eample RL is fathomed for bounding RL Z = 6.6 Q P Z RL N RL Z = 5. 5 = RL fathomed for bounding ( UB ) Z Z ( LB ) RL RL Z = R integer

29 Branch and Bound: an eample Solving RL Q RL P Z = 6.6 Z RL N RL Z = 5. 5 = RL fathomed RL RL R integer Optimal Z = ma RL fathomed for unfeasibility +, () Not feasible solution No more active nodes: the incumbent solution associated with RL is optimal () () () (5)