Download Simplex Method Examples: Solving Linear Programming Problems and more Exercises Calculus in PDF only on Docsity! Name: February 27, 2008 Some Simplex Method Examples Example 1: (from class) Maximize: P = 3x + 4y subject to: x + y ≤ 4 2x + y ≤ 5 x ≥ 0, y ≥ 0 Our first step is to classify the problem. Clearly, we are going to maximize our objec- tive function, all are variables are nonnegative, and our constraints are written with our variable combinations less than or equal to a constant. So this is a standard max- imization problem and we know how to use the simplex method to solve it. We need to write our initial simplex tableau. Since we have two constraints, we need to introduce the two slack variables u and v. This gives us the equalities x + y + u = 4 2x + y = 5 We rewrite our objective function as −3x−4y+P = 0 and from here obtain the system of equations: x + y + u = 4 2x + y = 5 −3x− 4y + P = 0 This gives us our initial simplex tableau: x y u v P 1 1 1 0 0 4 2 1 0 1 0 5 -3 -4 0 0 1 0 To find the column, locate the most negative entry to the left of the vertical line (here this is −4). To find the pivot row, divide each entry in the constant column by the entry in the corresponding in the pivot column. In this case, we’ll get 4 1 as the ratio for the first row and 5 1 for the ratio in the second row. The pivot row is the row corresponding to the smallest ratio, in this case 4. So our pivot element is the in the second column, first row, hence is 1. Now we perform the following row operations to get convert the pivot column to a unit column: R2 → R2 −R1 R3 → R3 + 4R1 Our simplex tableau has transformed into: x y u v P 1 1 1 0 0 4 1 0 -1 1 0 1 1 0 4 0 1 16 Notice that all of the entries to the left of the vertical line in the last row are non- negative. We must stop here! To read off the solution from the table, first find the unit columns in the table. The variables above the unit columns are assigned the value in the constant column in the row where the 1 is in the unit column. Every variable above a non-unit column is set to 0. So here y = 4, v = 1, P = 16, x = 0, and u = 0. Thus, our maximum occurs when x = 0, y = 4 and the maximum value is 16. Example 2 (from class) Minimize: C = −2x + y subject to: x + 2y ≤ 6 3x + 2y ≤ 12 x ≥ 0, y ≥ 0 Classify the problem. Clearly, this is a minimization problem...but it’s not the standard problem since our constraints involve linear expressions with the variables less than or equal to a constant. We use the trick that minimizing this function C is the same as maximizing the function P = −C. This problem is then equivalent to: Maximize P = 2x− y subject to: x + 2y ≤ 6 3x + 2y ≤ 12 x ≥ 0, y ≥ 0 Introducing the slack variable u and v, our initial simplex tableau is: x y u v P 1 2 1 0 0 6 3 2 0 1 0 12 -2 1 0 0 1 0