Be the first in your neighborhood to master this delightful little algorithm. Integer Programming Part II The Branch and Bound Algorithm learn about fathoming, bounding, branching, pruning, and much more! a divide and conquer strategy Don t be caught out on a limb learn to branch and bound with ease and impunity! 1
Why not just round the LP solution? x 2 2 max z = x 1 + 5x 2 subj to: x 1 + 10x 2 <= 20 x 1 <= 2 x 1, x 2 are integers.. LP solution x 1 = 2, x 2 = 9/5 z * = 11 1.. Animated 1 2 x 1 2
Why not just round the LP solution? x 2 2 round infeasible max z = x 1 + 5x 2 subj to: x 1 + 10x 2 <= 20 x 1 <= 2 x 1, x 2 are integers.. LP solution x 1 = 2, x 2 = 9/5 z * = 11 1.. Animated 1 2 x 1 3
Why not just round the LP solution? x 2 2 round infeasible max z = x 1 + 5x 2 subj to: x 1 + 10x 2 <= 20 x 1 <= 2 x 1, x 2 are integers.. LP solution x 1 = 2, x 2 = 9/5 z * = 11 1.. feasible rounded solution x 1 = 2, x 2 = 1 z = 7 Animated 1 2 x 1 4
Why not just round the LP solution? x 2 2 optimal IP solution x 1 = 0, x 2 = 2 z = 10. round infeasible. max z = x 1 + 5x 2 subj to: x 1 + 10x 2 <= 20 x 1 <= 2 x 1, x 2 are integers LP solution x 1 = 2, x 2 = 9/5 z * = 11 1.. feasible rounded solution x 1 = 2, x 2 = 1 z = 7 Animated 1 2 x 1 5
Why not just round the LP solution? infeasible rounded solutions x 2 2. (1.5,2). 1.. optimal LP solution z = 10 Animated 1 2 x 1 6
Complexity Theory The search for fundamental distinctions in the tractability of problems. Classify problems in order of computational resources required to solve using digital computer algorithms. Number of computations expressed as O(n k ). Mainly concerned if computations grow with size: logarithmically (or slower). polynomially (tractable/easy). exponentially (intractable/hard). 7
Classifying Problems NP (Non-deterministic Polynomial time ) = set of all problems that can be solved by total enumeration P = subset of NP consisting of all problems having (known) efficient algorithms (bounded by a polynomial) NP-hard = subset of NP bounded exponentially at least as hard as any NP problem Open = problems in NP but not in P or NP-hard (unknown complexity) P Linear Programs Shortest path Min spanning tree Single machine scheduling sorting Open NP-hard Binary programs Traveling salesman job scheduling NP problems 9
Solution times n = 10 n = 100 O(log n) 1 sec 2 sec O(n 5 ) 1 sec 10 10 / 10 5 sec = 27.78 hr. O(2 n ) 1 sec? O(2 10 ) = 1 sec O(2 100 ) = 2 100 / 2 10 sec x 1 min/60 sec x 1 hr/60 min x 1 day/24 hr x 1 yr/365 day x 1 century/ 100 yr = 3.925 x 10 17 centuries What do you mean the problem is unsolvable. I have here a Pentium XX. 10
Branch and Bound Concepts 1. Relaxation relax conditions of original problem a. drop integer conditions b. omit some constraints c. omit non-negativity conditions 2. Separation (Branching) Separate problem into subproblems a. every feasible solution of the original problem is a feasible solution of exactly one subproblem. b. a feasible solution to any subproblem is a feasible solution to the original problem. 3. Fathoming (Bounding) comprehend or solve a subproblem a. test 1: relaxed solution z-value is less than (for maximization) a current integer solution b. test 2: relaxed solution is infeasible c. test 3: relaxed solution is integer 11
The Example Problem max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 x 1, x 2 >=0 and integer A very interesting problem. 12
x 2 4 The LP Solution problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 3 (2.9,2.77) 2 1 1 2 z 3 4 5 6 x 1 13
problem 2 x 1 <= 2 x 1 = x 2 = z = The Tree problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 problem 3 x 1 >= 3 x 1 = x 2 = z = Animated 14
x 2 4 x 1 <= 2 Problem 2 problem 2 x 1 <= 2 x 1 = 2.0 x 2 = 3.0 z = 28 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 3 2 1 1 2 z 3 4 5 6 x 1 15
problem 2 x 1 <= 2 x 1 = 2.0 x 2 = 3.0 z = 28 The Tree problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 problem 3 x 1 >= 3 x 1 = x 2 = z = fathomed by integer solution 16
x 2 4 3 Problem 3 problem 3 x 1 >= 3 x 1 = 3.0 x 2 = 2.67 z = 31.0 x 1 >= 3 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 2 1 1 2 z 3 4 5 6 x 1 17
The Tree problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 problem 2 x 1 <= 2 x 1 = 2.0 x 2 = 3.0 z = 28 problem 3 x 1 >= 3 x 1 = 3.0 x 2 = 2.67 z = 31.0 problem 4 x 2 <= 2 x 1 = x 2 = z = problem 5 x 2 >= 3 x 1 = x 2 = z = Animated 18
x 2 4 3 Problem 4 problem 4 x 2 <= 2 x 1 = 3.5 x 2 = 2.0 z = 29.5 x 1 >= 3 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 2 1 x 2 <= 2 1 2 z 3 4 5 6 3.5 x 1 19
x 2 4 3 Problem 5 problem 5 x 2 >= 3 infeasible x 2 >= 3 x 1 >= 3 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 2 1 1 2 z 3 4 5 6 3.5 x 1 20
The Tree problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 problem 2 x 1 <= 2 x 1 = 2.0 x 2 = 3.0 z = 28 problem 3 x 1 >= 3 x 1 = 3.0 x 2 = 2.67 z = 31.0 problem 4 x 2 <= 2 x 1 = 3.5 x 2 = 2.0 z = 29.5 problem 5 x 2 >= 3 infeasible problem 6 x 1 <= 3 x 1 = x 2 = z = problem 7 x 1 >= 4 x 1 = x 2 = z = fathomed by infeasibility Animated 21
x 2 4 Problem 6 problem 6 x 1 <= 3 x 1 = 3.0 x 2 = 2.0 z = 27.0 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 3 x 1 >= 3 2 1 x 2 <= 2 x 1 <= 3 1 2 z 3 4 5 6 x 1 22
x 2 4 Problem 7 problem 7 x 1 >= 4 x 1 = 4.0 x 2 = 1.33 z = 28.0 max z = 5x 1 + 6x 2 subj. to: x 1 + 4x 2 <= 14 4x 1 + 3x 2 <= 20 3 x 1 >= 3 2 1.33 1 x 2 <= 2 x 1 >= 4 1 2 z 3 4 5 6 x 1 23
The Tree problem 1 x 1 = 2.923, x 2 = 2.769 z = 31.2308 problem 2 x 1 <= 2 x 1 = 2.0 x 2 = 3.0 z = 28 problem 3 x 1 >= 3 x 1 = 3.0 x 2 = 2.67 z = 31.0 problem 4 x 2 <= 2 x 1 = 3.5 x 2 = 2.0 z = 29.5 problem 5 x 2 >= 3 infeasible problem 6 x 1 <= 3 x 1 = 3.0 x 2 = 2.0 z = 27.0 fathomed by integer solution problem 7 x 1 >= 4 x 1 = 4.0 x 2 = 1.33 z = 28.0 fathomed by bounding 24
What about the computer? Why can t Solver handle this? 25
Some Final Comments on B&B Order of solving subproblems can affect solution time breadth search - attempt to solve all problems on current level before solving any descendants depth search solve a subproblem and any descendants created before solving next subproblem Other search techniques LIFO Solve descendants of subproblem having largest z value (best bound) Choice of branching variable greatest fractional value Mixed integer problems create subproblems from integer variables only (continue to relax continuous variables) Find near optimal solution where z LP - z current best integer < e 26
Laws of Engineering Law #1: In any calculation, any error which can creep in will do so. Law #2: Any error in any calculation will be in the direction of most harm. Law #3: If only one bid can be secured on any project, the price will be unreasonable. Law #4: If a test installation functions perfectly, all subsequent production units will malfunction. Law #5: All delivery promises must be multiplied by a factor of 2.0. Law #6: Any device requiring service or adjustment will be the least accessible. Law #7: If more than one person is responsible for a miscalculation, no one will be at fault. Law #8: The rule for engineers: "Change the data to fit the curve." 27
Integer Programming Part II The Branch and Bound Algorithm What significant, meaningful, and highly insightful questions do you have? 28