Outline The LP Relaxation The Branch-and-Bound Method Example 2 Solving Integer Optimization Problems Mustafa Ç. Pınar Bilkent University IE 303, Chapter 2: Lecture 1 October 2021 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation The Branch-and-Bound Method Example 2 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Introduction I In IE202, you have studied linear optimization problems and the simplex method for solving the linear optimization problems. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Introduction I In IE202, you have studied linear optimization problems and the simplex method for solving the linear optimization problems. I Unfortunately, the simplex method cannot always solve integer optimization problems! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Introduction I In IE202, you have studied linear optimization problems and the simplex method for solving the linear optimization problems. I Unfortunately, the simplex method cannot always solve integer optimization problems! I Let us look at the following example: z IP = max z = 3x + 4y subject to 5x + 8y ≤ 24 x, y ≥ 0, integer. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Introduction I In IE202, you have studied linear optimization problems and the simplex method for solving the linear optimization problems. I Unfortunately, the simplex method cannot always solve integer optimization problems! I Let us look at the following example: z IP = max z = 3x + 4y subject to 5x + 8y ≤ 24 x, y ≥ 0, integer. I We can solve the LP relaxation (ignoring the integer requirement) graphically to get the solution x = 24/5, y = 0 with z = 14.4. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Introduction I In IE202, you have studied linear optimization problems and the simplex method for solving the linear optimization problems. I Unfortunately, the simplex method cannot always solve integer optimization problems! I Let us look at the following example: z IP = max z = 3x + 4y subject to 5x + 8y ≤ 24 x, y ≥ 0, integer. I We can solve the LP relaxation (ignoring the integer requirement) graphically to get the solution x = 24/5, y = 0 with z = 14.4. I This is obviously notM. something Ç. Pınar IE303 Models Integer Variables weSolving want! x with is fractional. Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Example LP Figure: LP relaxation of example. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! I Can we round it to the nearest integer? (5, 0) is not feasible! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! I Can we round it to the nearest integer? (5, 0) is not feasible! I Can we round it down? (4, 0) is feasible with value z = 12. Is it optimal, i.e. is it the best integer feasible point? M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! I Can we round it to the nearest integer? (5, 0) is not feasible! I Can we round it down? (4, 0) is feasible with value z = 12. Is it optimal, i.e. is it the best integer feasible point? I The answer is no as we can see by trial and error that (3, 1) is a better integer feasible point with value z = 13. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! I Can we round it to the nearest integer? (5, 0) is not feasible! I Can we round it down? (4, 0) is feasible with value z = 12. Is it optimal, i.e. is it the best integer feasible point? I The answer is no as we can see by trial and error that (3, 1) is a better integer feasible point with value z = 13. I In fact (3, 1) is the optimal integer solution as we shall prove later. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation I In general, ignoring the integer value requirement gives us a linear optimization problem called the LP Relaxation. I We have obtained a fractional solution by solving the LP relaxation! I Can we round it to the nearest integer? (5, 0) is not feasible! I Can we round it down? (4, 0) is feasible with value z = 12. Is it optimal, i.e. is it the best integer feasible point? I The answer is no as we can see by trial and error that (3, 1) is a better integer feasible point with value z = 13. I In fact (3, 1) is the optimal integer solution as we shall prove later. I But there is no way to guess (3, 1) from (24/5, 0). M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! I Else, the optimal value of the LP relaxation gives us an upper bound on the integer optimal value z IP . M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! I Else, the optimal value of the LP relaxation gives us an upper bound on the integer optimal value z IP . I We have obtained 14.4 as the optimal value of the LP relaxation. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! I Else, the optimal value of the LP relaxation gives us an upper bound on the integer optimal value z IP . I We have obtained 14.4 as the optimal value of the LP relaxation. I This means that in the entire LP feasible region, the best integer feasible solution cannot have a value bigger than 14.4! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! I Else, the optimal value of the LP relaxation gives us an upper bound on the integer optimal value z IP . I We have obtained 14.4 as the optimal value of the LP relaxation. I This means that in the entire LP feasible region, the best integer feasible solution cannot have a value bigger than 14.4! I Since objective function coefficients are integer numbers, we can conclude that the optimal integer solution cannot have a value bigger than 14! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation: is it useless? I The answer is absolutely no! It is the most valuable tool. If the answer is integer we stop! I Else, the optimal value of the LP relaxation gives us an upper bound on the integer optimal value z IP . I We have obtained 14.4 as the optimal value of the LP relaxation. I This means that in the entire LP feasible region, the best integer feasible solution cannot have a value bigger than 14.4! I Since objective function coefficients are integer numbers, we can conclude that the optimal integer solution cannot have a value bigger than 14! I Hence, we know that z IP ≤ 14. This is our first upper bound! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Introduction I We shall now see a method that will give us the integer optimal solution. Better than trying all feasible integer points! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Introduction I We shall now see a method that will give us the integer optimal solution. Better than trying all feasible integer points! I The method proceeds by dividing recursively the LP relaxation feasible region into sub-regions, and searching for the best integer solution in each sub-region. Some sub-regions will then be eliminated because they may not contain a “promising” integer point or for other reasons! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Introduction I We shall now see a method that will give us the integer optimal solution. Better than trying all feasible integer points! I The method proceeds by dividing recursively the LP relaxation feasible region into sub-regions, and searching for the best integer solution in each sub-region. Some sub-regions will then be eliminated because they may not contain a “promising” integer point or for other reasons! I Therefore, two important steps are used: 1. Branching, i.e. dividing a problem into two sub-problems and solving the LP 2. Bounding, i.e., updating upper and lower bounds on the optimal integer value z IP . M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Introduction I We shall now see a method that will give us the integer optimal solution. Better than trying all feasible integer points! I The method proceeds by dividing recursively the LP relaxation feasible region into sub-regions, and searching for the best integer solution in each sub-region. Some sub-regions will then be eliminated because they may not contain a “promising” integer point or for other reasons! I Therefore, two important steps are used: 1. Branching, i.e. dividing a problem into two sub-problems and solving the LP 2. Bounding, i.e., updating upper and lower bounds on the optimal integer value z IP . I The method will stop if the lower and upper bounds become equal or no more sub-regions to search remain. We shall first see the method with the example above. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching I When a (sub)-problem has a fractional LP solution, if the method continues from that subproblem then we create two subproblems by picking a fractional variable, say x = f , and create two new subproblems by adding x ≤ bf c and x ≥ df e. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching I When a (sub)-problem has a fractional LP solution, if the method continues from that subproblem then we create two subproblems by picking a fractional variable, say x = f , and create two new subproblems by adding x ≤ bf c and x ≥ df e. I In our example, we first create two subproblems: P1 max z = 3x + 4y subject to 5x + 8y ≤ 24, x ≥ 5 x, y ≥ 0, integer which is infeasible, hence discarded. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching II I and P2 max z = 3x + 4y subject to 5x + 8y ≤ 24, x ≤ 4 x, y ≥ 0, integer which is feasible. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching II I and P2 max z = 3x + 4y subject to 5x + 8y ≤ 24, x ≤ 4 x, y ≥ 0, integer which is feasible. I Since P1 is eliminated, we are going to look for the best integer point in P2. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching II I and P2 max z = 3x + 4y subject to 5x + 8y ≤ 24, x ≤ 4 x, y ≥ 0, integer which is feasible. I Since P1 is eliminated, we are going to look for the best integer point in P2. I We do this by solving again the LP relaxation of P2 (hence recursion!). See the figure on the next slide. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Branching II I and P2 max z = 3x + 4y subject to 5x + 8y ≤ 24, x ≤ 4 x, y ≥ 0, integer which is feasible. I Since P1 is eliminated, we are going to look for the best integer point in P2. I We do this by solving again the LP relaxation of P2 (hence recursion!). See the figure on the next slide. I The solution is (4, 1/2) still not integer with value exactly 14! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Subproblem P2 Figure: LP relaxation of P2 solved. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Creating the B & B Tree I Now, we shall pause for a moment, and start creating the so-called Branch-and-Bound Tree to help visualise things better. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Creating the B & B Tree I Now, we shall pause for a moment, and start creating the so-called Branch-and-Bound Tree to help visualise things better. I The root node of the tree or Node 0 is the LP relaxation of the original integer problem. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Creating the B & B Tree I Now, we shall pause for a moment, and start creating the so-called Branch-and-Bound Tree to help visualise things better. I The root node of the tree or Node 0 is the LP relaxation of the original integer problem. I Node 1 corresponds to P1, Node 2 corresponds to P2. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Creating the B & B Tree I Now, we shall pause for a moment, and start creating the so-called Branch-and-Bound Tree to help visualise things better. I The root node of the tree or Node 0 is the LP relaxation of the original integer problem. I Node 1 corresponds to P1, Node 2 corresponds to P2. I We write next to each node the LP relaxation solution and the objective function value, see next slide. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Creating the B & B Tree I Now, we shall pause for a moment, and start creating the so-called Branch-and-Bound Tree to help visualise things better. I The root node of the tree or Node 0 is the LP relaxation of the original integer problem. I Node 1 corresponds to P1, Node 2 corresponds to P2. I We write next to each node the LP relaxation solution and the objective function value, see next slide. I In our example, Node 1 is “pruned” by infeasibility of P1. The only node “alive” is Node 2 now. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree so far Figure: B & B tree at this point. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree I Still we do not have any integer feasible solution M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree I Still we do not have any integer feasible solution I We continue by branching from the only node alive: Node 2. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree I Still we do not have any integer feasible solution I We continue by branching from the only node alive: Node 2. I We create two subproblems by adding to P2 the constraints y ≤ 0 and y ≥ 1 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree I Still we do not have any integer feasible solution I We continue by branching from the only node alive: Node 2. I We create two subproblems by adding to P2 the constraints y ≤ 0 and y ≥ 1 I We shall name these two problems P3 and P4. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree I Still we do not have any integer feasible solution I We continue by branching from the only node alive: Node 2. I We create two subproblems by adding to P2 the constraints y ≤ 0 and y ≥ 1 I We shall name these two problems P3 and P4. I It is easy to see that for P3 where y ≤ 0 the feasible region is the segment from (0, 0) to (4, 0) because this new constraint along with y ≥ 0 fixes y to zero! Therefore, the optimal point of P3 is (4, 0). But this is an integer feasible point! It gives us a lower bound on the optimal integer value 12. So we have now 12 ≤ z IP ≤ 14. This Node 3 is “pruned” by integer solution now! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree II I Now let us solve the LP relaxation P4 at Node 4 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree II I Now let us solve the LP relaxation P4 at Node 4 I The solution is (3.2, 1) with value 13.6! But this is great because Node 4 is the only node alive where we can continue the search, and it says that it cannot yield an integer point with value bigger than 13! So we can update our upper bound to 13: 12 ≤ z IP ≤ 13 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree II I Now let us solve the LP relaxation P4 at Node 4 I The solution is (3.2, 1) with value 13.6! But this is great because Node 4 is the only node alive where we can continue the search, and it says that it cannot yield an integer point with value bigger than 13! So we can update our upper bound to 13: 12 ≤ z IP ≤ 13 I Check out P4 and the B & B tree now in the next two slides. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Subproblem P4 Figure: LP relaxation of P4 solved. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree so far Figure: B & B tree at this point. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree III I Now, we branch from Node 4, we add x ≤ 3 and x ≥ 4 to create sub-problems P5 and P6. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree III I Now, we branch from Node 4, we add x ≤ 3 and x ≥ 4 to create sub-problems P5 and P6. I We notice immediately that P6 is infeasible since x at least 4 and y at least 1 will not do! So Node 6 is discarded (“pruned by infeasibility”) M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree III I Now, we branch from Node 4, we add x ≤ 3 and x ≥ 4 to create sub-problems P5 and P6. I We notice immediately that P6 is infeasible since x at least 4 and y at least 1 will not do! So Node 6 is discarded (“pruned by infeasibility”) I Now, the only node alive is Node 5 with problem P5. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree III I Now, we branch from Node 4, we add x ≤ 3 and x ≥ 4 to create sub-problems P5 and P6. I We notice immediately that P6 is infeasible since x at least 4 and y at least 1 will not do! So Node 6 is discarded (“pruned by infeasibility”) I Now, the only node alive is Node 5 with problem P5. I Its optimal solution is x = 3, y = 9/8 with z = 13.5. (verify this graphically!) The upper bound does not change since we still hope for 13. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Subproblem P5 Figure: LP relaxation of P5 solved. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree so far Figure: B & B tree at this point with 7 nodes. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. I Only node alive is Node 5 which did not give an integer solution, and it can still give us a 13 perhaps! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. I Only node alive is Node 5 which did not give an integer solution, and it can still give us a 13 perhaps! I Our bounds are 12 ≤ z IP ≤ 13. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. I Only node alive is Node 5 which did not give an integer solution, and it can still give us a 13 perhaps! I Our bounds are 12 ≤ z IP ≤ 13. I We branch from node 5 by adding he constraints y ≤ 1 and y ≥ 2. Let us name the subproblems P7 and P8, respectively. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. I Only node alive is Node 5 which did not give an integer solution, and it can still give us a 13 perhaps! I Our bounds are 12 ≤ z IP ≤ 13. I We branch from node 5 by adding he constraints y ≤ 1 and y ≥ 2. Let us name the subproblems P7 and P8, respectively. I Solving the LP at P7, we find the optimal point (3, 1) which is integer with value 13. So lower bound becomes 13, and now upper and lower bounds are equal. We can stop. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The Branch-and-Bound Method: Continuing the Search on the B & B Tree IV I Let us take stock of what we have achieved so far. I Only node alive is Node 5 which did not give an integer solution, and it can still give us a 13 perhaps! I Our bounds are 12 ≤ z IP ≤ 13. I We branch from node 5 by adding he constraints y ≤ 1 and y ≥ 2. Let us name the subproblems P7 and P8, respectively. I Solving the LP at P7, we find the optimal point (3, 1) which is integer with value 13. So lower bound becomes 13, and now upper and lower bounds are equal. We can stop. I We have reached our upper bound with an integer feasible point. This is provably optimal! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree Final Figure: Final B & B tree. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 I Consider the problem z IP = max z = −x1 + 4x2 subject to −10x1 + 20x2 ≤ 22 5x1 + 10x2 ≤ 49 x1 , x2 ≥ 0, integer. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 I Consider the problem z IP = max z = −x1 + 4x2 subject to −10x1 + 20x2 ≤ 22 5x1 + 10x2 ≤ 49 x1 , x2 ≥ 0, integer. I Let us solve the LP relaxation graphically (see figure in the next slide) M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 I Consider the problem z IP = max z = −x1 + 4x2 subject to −10x1 + 20x2 ≤ 22 5x1 + 10x2 ≤ 49 x1 , x2 ≥ 0, integer. I Let us solve the LP relaxation graphically (see figure in the next slide) I The LP solution is fractional: x1 = 19/5, x2 = 3. The optimal value is z = 41/5. Therefore, the upper bound on optimal integer value is 8! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 I Consider the problem z IP = max z = −x1 + 4x2 subject to −10x1 + 20x2 ≤ 22 5x1 + 10x2 ≤ 49 x1 , x2 ≥ 0, integer. I Let us solve the LP relaxation graphically (see figure in the next slide) I The LP solution is fractional: x1 = 19/5, x2 = 3. The optimal value is z = 41/5. Therefore, the upper bound on optimal integer value is 8! I We shall solve by Branch-and-Bound. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The LP Relaxation of Example 2 Figure: LP relaxation of Example 2. LP feasible region in black. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. I The subproblem with x1 ≤ 3 becomes Node 1, the other one Node 2 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. I The subproblem with x1 ≤ 3 becomes Node 1, the other one Node 2 I See Figure in the next slide. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. I The subproblem with x1 ≤ 3 becomes Node 1, the other one Node 2 I See Figure in the next slide. I The black region on the left corresponds to the feasible set of Subproblem 1; the one on the left to Subproblem 2 M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. I The subproblem with x1 ≤ 3 becomes Node 1, the other one Node 2 I See Figure in the next slide. I The black region on the left corresponds to the feasible set of Subproblem 1; the one on the left to Subproblem 2 I Notice that the blank slab in the middle has been discarded since it cannot contain an integer point! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound I Let us create two subproblems by branching on x1 : we add x1 ≤ 3 and x1 ≥ 4. The initial LP relaxation becomes Node 0 in the search tree as usual. I The subproblem with x1 ≤ 3 becomes Node 1, the other one Node 2 I See Figure in the next slide. I The black region on the left corresponds to the feasible set of Subproblem 1; the one on the left to Subproblem 2 I Notice that the blank slab in the middle has been discarded since it cannot contain an integer point! I Subproblem 1 has optimal solution (3, 2.6); Subproblem 2 (4, 2.9), none of them integer! M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 after the first branching Figure: LP feasible regions of the two subproblems after the first branching. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree after the first branching Figure: B & B tree after the first branching. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound II I Now, let us take stock of the situation. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound II I Now, let us take stock of the situation. I We have Node 1 and Node 2 that gave an optimal value of 7+ both. This means that in both regions there can be an integer point with value 7 or less. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound II I Now, let us take stock of the situation. I We have Node 1 and Node 2 that gave an optimal value of 7+ both. This means that in both regions there can be an integer point with value 7 or less. I Now the previous upper bound was 8. But after the first branching there is no possibility of finding an integer point with value 8. So the upper bound must be lowered to 7. z IP ≤ 7. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound II I Now, let us take stock of the situation. I We have Node 1 and Node 2 that gave an optimal value of 7+ both. This means that in both regions there can be an integer point with value 7 or less. I Now the previous upper bound was 8. But after the first branching there is no possibility of finding an integer point with value 8. So the upper bound must be lowered to 7. z IP ≤ 7. I Both nodes are alive since both may give 7. Therefore, we should choose the node to continue branching. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound II I Now, let us take stock of the situation. I We have Node 1 and Node 2 that gave an optimal value of 7+ both. This means that in both regions there can be an integer point with value 7 or less. I Now the previous upper bound was 8. But after the first branching there is no possibility of finding an integer point with value 8. So the upper bound must be lowered to 7. z IP ≤ 7. I Both nodes are alive since both may give 7. Therefore, we should choose the node to continue branching. I Let us choose the node 2 on the right. Arbitrarily. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound III I We branch from node 2 by adding x2 ≤ 2 (Subproblem 3 )and x2 ≥ 3 (Subproblem 4), resp. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound III I We branch from node 2 by adding x2 ≤ 2 (Subproblem 3 )and x2 ≥ 3 (Subproblem 4), resp. I We notice immediately that Subproblem 4 is infeasible. Therefore Node 4 is discarded (pruned by infeasibility) M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound III I We branch from node 2 by adding x2 ≤ 2 (Subproblem 3 )and x2 ≥ 3 (Subproblem 4), resp. I We notice immediately that Subproblem 4 is infeasible. Therefore Node 4 is discarded (pruned by infeasibility) I Node 3 gives an LP optimal point which is integer: (4, 2)! This provides a lower bound on the optimal value equal to 4. Hence, we have now 4 ≤ z IP ≤ 7. Node 3 is also pruned by integer solution. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound III I We branch from node 2 by adding x2 ≤ 2 (Subproblem 3 )and x2 ≥ 3 (Subproblem 4), resp. I We notice immediately that Subproblem 4 is infeasible. Therefore Node 4 is discarded (pruned by infeasibility) I Node 3 gives an LP optimal point which is integer: (4, 2)! This provides a lower bound on the optimal value equal to 4. Hence, we have now 4 ≤ z IP ≤ 7. Node 3 is also pruned by integer solution. I Node 1 is still alive and it has value 7.4. Therefore, we must back up to Node 1 continue branching from there. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 after the second branching Figure: LP feasible regions of the two subproblems after the second branching. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 The B & B Tree after the second branching Figure: B & B tree after the 2nd branching. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound IV I We branch from node 1 by adding x2 ≤ 2 (Subproblem 5 and Node 5 )and x2 ≥ 3 (Subproblem 6 and Node 6), resp. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound IV I We branch from node 1 by adding x2 ≤ 2 (Subproblem 5 and Node 5 )and x2 ≥ 3 (Subproblem 6 and Node 6), resp. I Subproblem 6 is infeasible, node 6 is pruned. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound IV I We branch from node 1 by adding x2 ≤ 2 (Subproblem 5 and Node 5 )and x2 ≥ 3 (Subproblem 6 and Node 6), resp. I Subproblem 6 is infeasible, node 6 is pruned. I Subproblem 5 gives an LP optimal point (1.8, 2) with optimal value equal 6.2. Since Node 5 is the only node alive, the upper bound becomes 6: 4 ≤ z IP ≤ 6. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound IV I We branch from node 1 by adding x2 ≤ 2 (Subproblem 5 and Node 5 )and x2 ≥ 3 (Subproblem 6 and Node 6), resp. I Subproblem 6 is infeasible, node 6 is pruned. I Subproblem 5 gives an LP optimal point (1.8, 2) with optimal value equal 6.2. Since Node 5 is the only node alive, the upper bound becomes 6: 4 ≤ z IP ≤ 6. I Node 5 is still alive, upper and lower bounds still differ. We continue by branching from Node 5: add x1 ≤ 1 (Subproblem 7 and Node 7) and x1 ≥ 2 (Subproblem 8 and Node 8). M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 by Branch-and-Bound IV I We branch from node 1 by adding x2 ≤ 2 (Subproblem 5 and Node 5 )and x2 ≥ 3 (Subproblem 6 and Node 6), resp. I Subproblem 6 is infeasible, node 6 is pruned. I Subproblem 5 gives an LP optimal point (1.8, 2) with optimal value equal 6.2. Since Node 5 is the only node alive, the upper bound becomes 6: 4 ≤ z IP ≤ 6. I Node 5 is still alive, upper and lower bounds still differ. We continue by branching from Node 5: add x1 ≤ 1 (Subproblem 7 and Node 7) and x1 ≥ 2 (Subproblem 8 and Node 8). I But Node 8 Lp soultion is integer (2, 2) with optimal value 6, which is a new lower bound equal to the upper bound. We stop. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Example 2 after backing up to Node 1 Figure: After backing up to Node 1. M. Ç. Pınar IE303 Solving Models with Integer Variables Outline The LP Relaxation The Branch-and-Bound Method Example 2 Final B & B Tree Figure: Final B & B tree. M. Ç. Pınar IE303 Solving Models with Integer Variables