Download Simplex Algorithm: Solving Linear Programming Problems with Matrices - Prof. A. M. Sathaye and more Study notes Mathematics in PDF only on Docsity! Lecture Simplex algorithm I Ma 162 Spring 2009 Ma 162 Spring 2009 February 2009 Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 1 / 14 Old problem with a new method. We recall the problem we solved using the graphic method. Maximize P = 2x+1.5y s.t. 3x+4y ≤ 1000, 6x+3y ≤ 1200, x , y ≥ 0. This was the sketch of the feasible region. The corner points were O(0, 0),A(200, 0),B(120, 160) and C (0, 250). By checking the function values at the four corner points we found the maximum value at B. Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 2 / 14 Basic Solution. The simplex tableaux always has a set of unit columns (columns of the Identity matrix) which exactly fill up an identity matrix after possible rearrangement. The corresponding variables on top of these columns are said to be basic variables and form a basis for the current tableaux. The number of basic variables must be the same as the total number of rows. Corresponding to the basis, we have a basic solution to the current tableaux. It is obtained by setting the non basic variables to zero value and reading off the solutions of the basic variables from all the equations. Thus, for our first tableaux above, the basis is u, v,P and the basic solution is: (x , y, u, v,P) = (0, 0, 1000, 1200, 0). Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 5 / 14 Modification of the Simplex tableaux. Note that our original variables (x , y) have values (0, 0) and thus„ this corresponds to the corner point O of our original feasible region. If we solve the last equation for its basic variable P, then we have: P = 2x + 1.5y and this says that increasing the values of x or y will increase the value of P. Note that this is signified by the negative numbers −2,−1.5 in the tableaux. So we try to make one of them, say x as a basic variable. This means the x column has to become a unit column. Where shall it have its 1? Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 6 / 14 Choosing a Pivot. You may try and make the pivot at any available non zero entry in the x column. However, some choices will produce negative entries in the last column. This would mean that the new basic solution will have negative values for some basic variables. This is not allowed, since by our set up all the variables have non negative values. There is a simple test which will guarantee that we won’t get in trouble. Check the ratios obtained by dividing non zero entries in the x-column into the corresponding entries in RHS and choosing the one which gives a minimum value. In our example, the choices are 10003 and 1200 6 = 200 respectively. Note that we do not use negative entry −2. The smallest ratio is 200 in the second row. Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 7 / 14 Cleanup and end. The pivot operations are R2− 15R1 and R3 + 1 5R1 and produce: x y u v P RHS 0 1 2/5 −1/5 0 160 1 0 −1/5 415 0 120 0 0 1/5 730 1 480 The new basic is clearly x , y,P and the new basic solution is: (x , y, u, v,P) = (120, 160, 0, 0, 480). Note that this matches our point B in the graph of feasible points. Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 10 / 14 Conclusion. Note that the last equation is now P = −u5 − 7v 30 + 480 so the non basic variables u, v will not increase its value if they enter the basis. This is visible since the last row has only non negative coefficients under the variable columns. So, we are done!!! Thus we have a clear strategy called the Simplex algorithm which we outline next. Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 11 / 14 The Simplex Algorithm. We only consider a simplified set up outlined in the book. Further complications are reserved for higher level courses. Thus, we assume that the starting tableaux has a basis of slack variables and the function P with the RHS entries all non negative. This, in turn means that our maximization problem has all inequalities of the form ≤, except for the assumption that all variables are non negative. If there are no negative entries in the last equation (function row), then we are done and the current basic solution is the optimal solution. Our basis always has the function variable P. If there is some negative entry in the function row then we call its column the pivot column. We turn it into a unit column as described below. Avinash Sathaye (Ma 162 Spring 2009) Matrices February 2009 12 / 14