ex-.-. Foundations of Operations Research Prof. E. Amaldi. Dual simplex algorithm Given the linear program minx + x + x x + x + x 6 x + x + x x, x, x. solve it via the dual simplex algorithm. Describe the advantages of the algorithm when compared to the primal simplex algorithm.. Branch-and-Bound Given the integer linear program max z = x + x x + x 6 x + x 9 x, x, integer solve it via the Branch-and-Bound method (solving graphically the continuous relaxation of each subproblem encountered in the enumeration tree). Branch on the fractional variable with fractional value closest to. Among the set of active nodes, pick that with the most promising bound.. Branch-and-Bound for - knapsack A bank has million Euro, which can be invested into stocks of four companies (,,, and ). The table reports, for each company, the net revenue and the amount of money that must be invested into it. Company Revenue 6 8 Money 7 Given an integer linear programming formulation for the probelm of choosing a set of companies that maximizes the total revenue. Observe that no partial investment can be done, i.e., for each company we can either invest into it or not. Solve the problem with the Branch-and-Bound algorithm. Show that the solution to each continuous relaxation can be found with a greedy algorithm. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi. Cutting plane algorithm Given the integer linear program min x x x + 6x 9 x + x x, x solve it via Gomory s cutting plane method., integer Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi Solution. Dual simplex algorithm We reduce the problem to its canonical form, by changing the direction of the constraints (so that they become constraints) and introducing the nonnegative slack variables x e x. We obtain the tableau x x x x x z x -6 - - - x - - - - which basic solution is x = (,,, 6, ). Observe that, since all the variables must be nonnegative, this solution is not feasible. Since the reduced costs are also nonnegative, the dual solution associated to this tableau is dual feasible. We apply the dual simplex algorithm. Both basic variables x and x have a negative value. By Bland s rule, we let x leave the basis (since it has smaller index). To choose the variable x s that enters the basis, we consider the ratio between the reduced costs c j for nonbasic variables x j s and the respective coefficient a ij in row i (where x i is the variable that is leaving the basis, which is x in this example), only considering the columns where a ij <. The varible to chose is that which minimizes the absolute value of such ratio, i.e. that of index { } cj s = arg min j n ā rj : ā rj <. In our example, the ratios are /, / and /. Therefore, x enters the basis. Pivot is performed in the highlighted element x x x x x z x -6 - - - x - - - - We obtain the tableau x x x x x z -9 7/ / x / -/ x - - -/ -/ Observe that the objective function value has increased (we are considering a minimization problem). This is due to the fact that we are considering a sequence, decreasing in objective function value, of superoptimal solutions, which are dual feasible but not primal feasible. When primal feasibility is achieved, the algorithm halts. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi Variable x leaves the basis (as it s the only variable with negative value). Variable x, which minimized the ratios /, (7/)/(/), and (/)/(/), enters the basis. We obtain the tableau x x x x x z - x - - x / / - The associated basic solution is both primal and dual feasible, and therefore optimal for both problems.. Branch-and-Bound The enumeration tree is reported in Figure. The graphical solution of each subproblem is reported. The subproblems are solved in the following order: P, P, P, P, P, P6, P7. Note that when the optimal value z of a subproblem is fractional, we can round the upper bound given by the subproblem to z. For instance, in P we obtain the bound =. After solving P7, we observe that P6 yields an integer solution which is worse than that of P7, which is therefore discarded. We also observe that P yields an upper bound which is smaller than the value of the best feasible solution found (in P7). The node is therefore pruned. The optimal solution (found in P7) is x = (, ), of value z =. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi () () P: x = () () { x = x + 6 x = x + x = ( 9, ), z =. x x () () () () () () P: x = () () { x = x + 6 x = x = (, ), z =.. < : stop P: x = () () { x = x + x = x = (, ), z =. x x () () () () () P: x = () () { x = x + () P: infeasible () () x = x = (, ) 7, z = 7. x x () () () () () P6: x = () () x = (, ), z =. () () () P7: x = () () x = (, ), z =. Figure : Enumeration tree for problem. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi. Branch-and-Bound for - knapsack The integer linear programming formulation for the problem is max6x + x + x + 8x x + 7x + x + x x, x, x, x {, }. An optimal solution to its linear relaxation can be found as follows. First, sort the ratios between revenues and costs, obtaining (6/, /7, /, 8/) = (.,.,,.66) Then, put to all the variables according to the ordering, until variable i : i<i c i B, and i<i c i + c i > B. Let x i =, and let all the other variables be equivalent to zero. c i B P i<i c i For instance, at node we have: x =, (it uses units), x = (7 units), x = (/=/ units). Since, at each branching iteration, we set a variable either to or, this method can be applied in any node of the enumeration tree, by fixing the approriate variables. The enumeration tree is given in Figure. Some observations: The index t indicates the order by which the subproblems are solved. l ordine di risoluzione dei problemi. Since all variables are integer, whenever a subproblem yields a solution with fractional value, we round it to z. The lower bounds (LB) is not computed at each node (to do this, a heuristic should be applied). We update it whenever a subproblem yields a feasible solution. Note that this value is NOT related to the specific subproblem, as it depends only on the iteration. Indeed, at each iteration t, LB corresponds to the value of the best feasible solution found in any part of the enumeration tree. For instance, in subproblem we find a feasible solution of value z = 6. Since it is the first that is found and LB still has the initial value of +, we set LB to 6. In subproblem 6 an integer solution is found and the node is pruned by feasibility. Subproblem 7 is infeasible, since x = x = x = require a budget of 6 >. The node is pruned by infeasibility. Subproblem 8 yields an upper bound of z = 8 which is strictly smaller than the current LB of. The node is pruned by bound. The same happens for subproblem 9, where z = + 6 7. The upper bound is z =, which is strictly smaller than the current LB of value. Node 9 is pruned by bound. The final optimal solution, which is found in node 9, is x = (,,, ), of value. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio 6
ex-.-. Foundations of Operations Research Prof. E. Amaldi t = z = x = (,,,) UB= LB= t = 7 x = x = z = + z = + x = (,,, ) 7 x = (, t = 7,,) UB= UB= LB= LB=+ 8 z = 8 x = (,,,) UB=8 LB= x = x = x = x = 9 z = + 6 7 x = (, 6 7,,) UB= LB= t = 8 t = 9 z = 6 x = (,,,) UB=6 LB=6 6 7 z = x = (,,,) UB= LB=, Ottimo z = + x = (,,,) UB= LB=6 t = t = x = x = Not feasible t = t = 6 Figure : Enumeration tree for problem.. Cutting plane algorithm The continuous relaxation of the the problem at hand, reduced to standard form, reads min x x x + 6x + x = 9 x + x + x = x, x, x, x, were x, x are slack variables. We solve it via the primal simplex method. The initial feasible basic solution is x B = (x, x ). We obtain the following sequence of tableaus, where the pivot element is denoted by the symbol. Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio 7
ex-.-. Foundations of Operations Research Prof. E. Amaldi x x x x - 9-6 x x x x 6 6 x x x x 7 The optimal solution to the relaxation is x = (, ), where x = x = (see Figure ). x () () Figure : Graphical solution to problem. We derive a Gomory cut from the first row of the optimal tableau x + x + x =. The cut is defined as x i + j F ā ij x j b i, () where F is the set of the indices of the nonbasic variables and i is the index of the basic variable corresponding to the tableau row that is chosen. We obtain the cut x (see Figure (constraint ()). The cut is to be added to the tableau. Note that, in the current form, it is not a function of the nonbasic variables x, x. Instead of adding it to the tableau and performing some pivot operations to restore the correct for of the tableau, we can write the fractional form of the cut. We obtain by taking the ith row of the optimal tableau x i + j F ā ij x j = b i and subtracting from it the cut (), obtaining (ā ij ā ij )x j ( b i b i ). j F In our case, we have x + x Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio 8
ex-.-. Foundations of Operations Research Prof. E. Amaldi which, by introducing a surplus variable x becomes x + x x =. Observe that x only occurs in the new row. Therefore, it is directly added to the set of basic variables. We multiply the cut by -, obtaining x x + x =. We obtain the new tableau x x x x x 7 x x () () () Figure : First Gomory cut for problem. We reoptimize the tableau via the dual simplex algorithm. We perform pivoting on the highlighted element x x x x x 7 obtaining the tableau Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio 9
ex-.-. Foundations of Operations Research Prof. E. Amaldi x x x x x with a solution x = (, ). Since it is not integer, we perform another iteration of the cutting plane method. We pick the second row x x + x =, from which we deduce the Gomory cut x x + x which, in the space of the original variable, amounts to x, x è x + x 7. Its fractional version is x + x. x () () x x () () Figure : Last Gomory cut for problem. We obtain the tableau x x x x x x 6 Performing the pivot operation Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio
ex-.-. Foundations of Operations Research Prof. E. Amaldi x x x x x x 6 we obtain the tableau x x x x x x 6 8 which yields the integer solution x = (, ), shown in Figure (together with the last Gomory cut that was added). Document prepared by L. Liberti, S. Bosio, S. Coniglio, and C. Iuliano. Translation to English by S. Coniglio