Math 2 Finite Mathematics Chapter 4.2 Linear Programming Problems Minimization - The Dual Problem Richard Blecksmith Dept. of Mathematical Sciences Northern Illinois University Math 2 Website: http://math.niu.edu/courses/math2. An Example Minimize C = x+y subject to x+y 6 x+2y y. Solving the Problem The corner points of the feasible set are: (,2), (6,), and (,) x y C = x+y 2 2 6 92 2 Minimum value of C is 92 and occurs at the point (6,) Note: There is no maximum since the feasible set is infinite. (,2) (,6) (,) 2. Feasible Set Feasible Set Line 2: x+2y= (6,) Line : x+y=6 (,) Line : y= (,) (,) (6,) 4. Slack variables for Minimization When an inequality involves, the slack variable should be subtracted. For example, we rewrite the inequality x+y 6 as x+y u = 6 Really, u should perhaps be called an excess variable, rather than a slack variable, since u represents the amount that x + y exceeds the minimum allowable requirement of 6. Mathematically, x + y u = 6 means u = x+y 6 and so, u is equivalent to x+y 6 or x+y 6
2. Slack Variables for System The system of inequalities () x+y 6 (2) x+2y () y can be rewritten as () x+y u = 6 (2) x+2y v = () y w =. An Example Minimize C = x+y subject to x+y 6 x+2y y Reversing the rows and columns of the data table: x y const 6 2 C = u v w const 2 6 F Dual: Maximize F = 6u+v +w subject to u+v u+2v +w 6. The Dual Problem A standard minimization problem (where inequalities involve ) can be transformed into a standard maximization problem (where inequalities involve ) by the following method: Write the table of data for the original problem (not the tableau with slack variables) Put the objective function at the bottom (without the minus signs) Now reverse the rows and columns to obtain a new data table Make the inequalities involve Use u, v,... for the standard variables. 8. What s the Point? A linear programming problem and its dual problem are related in the following important way: The maxiumum of the original (or primal) problem is the minimum of the dual problem, and conversely. Moreover, the values of the variables for the solution of the dual problem can be read off the final tableau of the dual problem.
9. Example Revisited Solving the problem Minimize C = x+y subject to x+y 6 x+2y y x,y is equivalent to solving the dual problem Maximize F = 6u+v +w subject to u+v u+2v +w u,v,w The point is: we can solve the dual problem by the Simplex Method.. The Initial Tableau 2 6 Since we are only using the dual to solve our original minimization problem, we are not really interested in the values of these variables in terms of the dual maximazation problem, which we could obtain by setting the non-basic variables (u, v, and w) to zero and solving for the basic variables (x =, y =, F = ).. Finding the pivot The pivot column is 2 since the most negative value of the bottom row is in the second column. To find the pivot row, we compare ratios: The Simplex Tableau: ratio =.2 2 = 2. 2 6 The minimum ratio of.2 occurs in row, so the pivot row is. Pivot at row, col 2.. Simplex Tableau Maximize F = 6u+v +w subject to u+v u+2v +w u,v,w Introduce the slack variables x and y Note the change in letters! u+v +x = u+2v +w +y = u,v,w,x,y The Simplex Tableau: 2 6 2. The Initial Tableau 2 6 We can obtain the values of the variables relating to the original minimization problem by reading off the variables on the bottom row of the tableau: (It is not so surprising that we use the bottom row instead of the right side of the tableau, since switching rows and columns turns the original right side into the bottom.) u = 6 v = w = x = y =
4 4. Pivot at row, col 2 Step. The Initial Tableau. Step 2. 2 2 6 6 Step Step 4 Pivot at row col 2 2 2 6 6 Step Multiply row by Step 6 2 2 6 6 Add 2 row to row 2 2 + = 2 + 2 = 2 + = 2 2 + =
Step Step 8 2 2 6 6 Add row to row + 6 = 6 + = + = + =. The Second Tableau 2 6 We obtain the values of the variables relating to the original minimization problem by reading off the variables on the bottom row of the tableau: u = 6 v = w = x = y = 6. The Second Pivot The pivot column is since the most negative value of the bottom row is 6 in the first column. ratio / = 2 6 The minimum ratio of the pivot row is 2. Pivot at row 2, col. / = occurs in row 2, so
6. Pivot at row 2, col Step. The Initial Tableau. Step 2. 2 2 6 6 Step Step 4 Pivot at row 2 col 2 2 6 6 Step Multiply row 2 by Step 6 2 2 2 6 6 Add row 2 to row + = + = 2 + = + = + = 2
Step Step 8 2 2 2 2 6 6 92 Add 6 row 2 to row 6 + 6 = 6 + = 6 2 + = 6 6 + = 6 + = 92 8. The Third Tableau - Dual Look 2 2 6 92 Look at the colored values at the bottom of the tableau. These give the values of x, y, and P which solve the original minimization problem: x = 6 y = F = 92 Since the maximum of the dual equals the minimum of the original problem, the minimum value of C in the original problem is: minc = maxf = 92 The slack variables are: u = v = w = Pure Magic
8 9. The Nutrition Problem Minimize C = 2x+4y subject to 2x+y 2 x+y 6 x+y 9 x,y To obtain the dual problem, we reverse the rows and columns of the data table. 2. Simplex Tableau Maximize F = 2u+6v +9w subject to 2u+v +w 2 u+v +w 4 u,v,w Introduce the slack variables x and y Note the change in letters! 2u+v +w+x = 2 u+v +w +y = 4 u,v,w,x,y The Simplex Tableau: 2 2 4 2 6 9 2. Dual of the Nutrition Problem Minimize C = 2x+4y subject to 2x+y 2 x+y 6 x+y 9 x y const 2 2 6 9 2 4 C = u v w const 2 2 4 2 6 9 F Dual: Maximize F = 2u+6v+9w subject to 2u+v +w 2 +v +w 4 22. Finding the pivot The pivot column is since the most negative value of the bottom row is 2 in the first column. To find the pivot row, we compare ratios: The Simplex Tableau: ratio 2 2 2 2 =. 4 4 = 42 2 6 9 The minimum ratio of 4 2 occurs in row 2, so the pivot row is 2. Pivot at row 2, col. 2. Pivot at row 2, col Step. The Initial Tableau. 2 2 Step 2. 2 2 4 4 2 6 9 2 6 9 Pivot at row 2 col
9 Step 2 2 Step 4 2 2 4 4 2 6 9 2 6 9 Step Multiply row 2 by Step 6 2 2 2 4 4 2 6 9 2 6 9 Add 2 row 2 to row 2 + 2 = 2 + = 2 + = 2 + = 2 2 4 + 2 =
Step Step 8 2 2 4 4 2 6 9 2 4 6 Add 2 row 2 to row 2 + 2 = 2 + 6 = 2 2 + 9 = 2 + = 4 2 4 + = 6 24. The Second Tableau 2 4 2 4 6 We obtain the values of the variables relating to the original minimization problem by reading off the variables on the bottom row of the tableau: u = v = 2 w = x = y = 4 2. Finding the second pivot The pivot column is 2 since the most negative value of the bottom row is 2 in the second column. To find the pivot row, we compare ratios: The Simplex Tableau: ratio 2 / = 4 4 / = 4 2 4 6 The minimum ratio of occurs in row, so the pivot row is. Pivot at row, col 2.
26. Pivot at row, col 2 Step. The Initial Tableau. Step 2. 2 2 4 4 2 4 6 2 4 6 Step. Step 4. Pivot at row col 2 2 2 4 4 2 4 6 2 4 6 Step. Multiply row by Step 6. 2 2 4 8 2 4 6 2 4 6 Add row to row 2 + = + = 8 + = 2 + = + 4 =
2 Step. Step 8. 2 2 8 8 2 4 6 6 24 66 Add 2 row to row 2 + 2 = 2 + = 2 + = 6 2 2 + 4 = 24 2 + 6 = 66 2. The Third Tableau 2 8 6 24 66 The values of x, y, and C which solve the original minimization problem can be read from the bottom row: x = 6 y = 24 Since this is the final tableau, the minimum value of C of the original minimization problem is the maximum value of F for the dual problem: C = 66 6 2 (,) Line 2: x+y = 6 4 2 ( 6, ) 2 24 ( 9, 2 ) 8 8 28. Feasible Region Feasible Region Line : 2x+y = 2 2 (, 2) Line : x+y = 9 6 9