Chapter 4 The Simplex Method Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Outline 4.1 Slack Variables and the Simplex Tableau 4.2 The Simplex Method I: Maximum Problems 4.3 The Simplex Method II: Minimum Problems 4.4 Sensitivity Analysis and Matrix Formulations of Linear Programming Problems 4.5 Duality Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
4.1 Slack Variables and the Simplex Tableau Standard Form Slack Variable Solutions Using Slack Variables Group I and Group II Variables Simplex Tableau Solution Corresponding to Simplex Tableau Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
[linear polynomial] < [nonnegative constant]. Standard Form A linear programming problem is in standard form if: The objective function is to be maximized; Each variable is constrained to be greater than or equal to 0; All other constraints are of the form [linear polynomial] < [nonnegative constant]. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Standard Form The following is in standard form: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Slack Variable A nonnegative variable that “takes up the slack” between the left-hand side of an inequality and the right-hand side is called a slack variable. The slack variable changes an inequality into an equation. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Slack Variable Use slack variables to change the following into a system of equations. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Slack Variable - Answer For u, v, w > 0 and M as large as possible: 6x + 3y < 96 becomes 6x + 3y + u = 96, x + y < 18 becomes x + y + v = 18, 2x + 6y < 72 becomes 2x + 6y + w = 72, and Maximize 80x + 70y becomes -80x - 70y + M = 0 for M as large as possible. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Infinite Number of Solutions The system of equations using the slack variables have an infinite number of solutions since there are more variables than equations. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Infinite Number of Solutions Find two solutions to the following system of equations with u, v, and w > 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Solutions - Answer (1) Write the augmented matrix for the system If x = y = 0, then a solution is u = 96, v = 18, w = 72 and M = 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Solutions - Answer (2) If we pivot about a11, we have If y = u = 0, then another solution is x = 16, v = 2, w = 40 and M = 1280. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Group I and Group II Variables In the preceding solutions, two of the variables were chosen to be 0 and the other 4 were solved for using the equations. The variables chosen to be 0 are Group I variables. The variables solved for once the Group I variables were chosen are called Group II variables. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Group I & II Variables In the two solutions from the previous example, identify the Group I and Group II variables. Chosen 0 Solved for Group I Group 2 x = y = 0 u = 96, v = 18, w = 72, M = 0 x, y u, v, w, M y = u = 0 x = 16, v = 2, w = 40, M = 1280 y, u x, v, w, M Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Simplex Tableau You will notice that both matrices from which a solution was obtained in the previous example had the columns of the identity matrix present in some order. Such a matrix is called a simplex tableau. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Tableau Find the columns of the identity matrix in the following two simplex tableaux. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Solution Corresponding to Simplex Tableau The solution corresponding to a given simplex tableau is obtained by choosing those variables whose columns correspond to the columns of the identity matrix as Group II variables. The other variables are Group I variables. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Solution from Simplex Tableau Find the solution corresponding to Suppose the columns correspond to x, y, u, v, w and M. Choose u = w = 0, then x = 8, y = 9, v = 0 and M = 7. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.1 - Part 1 A linear programming problem is in standard form if the linear objective function is to be maximized, every variable is constrained to be nonnegative, and all other constraints are of the form [linear polynomial] < [nonnegative constant]. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.1 - Part 2 To form the initial simplex tableau corresponding to a linear programming problem in standard form: Step 1: For each constraint of the form [linear polynomial] < [nonnegative constant], introduce a slack variable and write the constraint as an equation. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.1 - Part 3 Step 2: Introduce a variable M to represent the quantity to be maximized, and form the equation -[objective function] + M = 0. Form the augmented matrix corresponding to the system of linear equations from steps 1 and 2, with the equation from step 2 at the bottom. This matrix is the initial simplex tableau. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
4.2 The Simplex Method I: Maximum Problems The Simplex Method for Problems in Standard Form Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
The Simplex Method I: Maximum Problems (1) The Simplex Method for Problems in Standard Form: Introduce slack variables and state the problem in terms of a system of linear equations. Construct the simplex tableau corresponding to the system. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
The Simplex Method I: Maximum Problems (2) Determine if the left part of the bottom row contains negative entries. If none are present, the solution corresponding to the tableau yields a maximum and the problem is solved. If the left part of the bottom row contains negative entries, construct a new simplex tableau. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
The Simplex Method I: Maximum Problems (3) Choose the pivot column by inspecting the entries of the last row of the current tableau, excluding the right-hand entry. The pivot column is the one containing the most-negative of these entries. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
The Simplex Method I: Maximum Problems (4) Choose the pivot element by computing ratios associated with the positive entries of the pivot column. The pivot element is the one corresponding to the smallest nonnegative ratio. Construct the new simplex tableau by pivoting around the selected element. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
The Simplex Method I: Maximum Problems (5) Return to step 3. Steps 3 and 4 are repeated as many times as necessary to find a maximum. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Step 1 Let u, v and w be the slack variables. The corresponding linear system is Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Step 2 Set up the initial simplex tableau. x y u v w M u v w M Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Step 3 Determine if maximum has been reached. At least one negative entry. Maximum has not been reached. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Steps 4a,b Choose the pivot element 96/6 = 16 18/1 = 18 72/2 = 36 Smallest positive ratio Most negative entry Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Step 4c Pivot. x y u v w M x v w M Group II variables Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - Step 5 Determine if maximum has been reached. x y u v w M x v w M Group II variables At least one negative entry. Maximum has not been reached. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - continued Choose pivot. 16/(1/2) = 32 2/(1/2) = 4 40/5 = 8 pivot row pivot column Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Simplex Method I - continued New tableau: x y u v w M x y w M Group II variables No negative entries Solution: x = 14, y = 4 and Maximum = 1400 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.2 The simplex method entails pivoting around entries in the simplex tableau until the bottom row contains no negative entries except perhaps the entry in the last column. The solution can be read off the final tableau by letting the variables heading columns with 0 entries in every row but the ith row take on the value in the ith row of the right-most column, and setting the other variables equal to 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
4.3 The Simplex Method II: Minimum Problems Simplex Method for Problems in Nonstandard Form Negative Constants Minimization Problem Further Comments Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Simplex Method for Problems in Nonstandard Form (1) If necessary, convert all inequalities (except the nonnegative inequalities) into the form [linear polynomial] < [constant] where the constant can be negative. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Simplex Method for Problems in Nonstandard Form (2) If a negative number appears in the upper part of the last column of the simplex tableau, remove it by pivoting. Select one of the negative entries in its row. The column containing the entry will be the pivot column. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Simplex Method for Problems in Nonstandard Form (3) Select the pivot element by determining the least of the positive ratios associated with entries in the pivot column (except the bottom entry). Pivot. Repeat step 2 until there are no negative entries in the upper part of the right-hand column of the simplex tableau. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Simplex Method for Problems in Nonstandard Form (4) Proceed to apply the simplex method for tableaux in standard form. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Nonstandard Constraints Maximize the objective function 5x + 10y subject to Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Nonstandard Constraints (2) The second inequality is in nonstandard form. Multiply by -1 to reverse the inequality. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Nonstandard Constraints (3) Form the tableau. 20/1 = 20 Negative entry in selected row -10/(-2) = 5 Negative entry Pivot column Pivot about –2. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Nonstandard Constraints (4) 15/(3/2) = 10 Most negative entry Pivot about 3/2. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Nonstandard Constraints (5) x y u v M y x M Solution: y = 10, x = 10, Maximum = 150 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Minimum Problem Minimize the objective function 3x + 2y subject to Multiply the objective function by -1 to change it to a maximum problem: Maximize the objective function -3x - 2y. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Minimum Problem (2) The first inequality is in nonstandard form. Multiply by -1 to reverse the inequality. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Minimum Problem (3) Form the tableau. -10/(-1) = 10 Negative entries in selected row Negative entry We’ll choose the 2nd column as Pivot column. Pivot about –1. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Minimum Problem (4) x y u v M y v M Solution: y = 10, x = 0 Maximum of -3x - 2y = -20 Minimum of 3x + 2y = 20 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Further Comments (1) It is possible that a given linear programming problem has more than one solution. This often shows up where there is a tie for the choice of the pivot column. Different choices can result in different solutions but the maximum (or minimum) will be the same. A linear programming problem may have no solution. The simplex method will break down at some point in this case. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Further Comments (2) When there is a tie for the pivot column and one is arbitrarily chosen, it is possible to create a loop in which the simplex algorithm leads back to the previously encountered tableau. If this occurs, a different pivot should be chosen at this point. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.3 - Part 1 The simplex method can be used to solve a linear programming problem in nonstandard form as follows: If the problem is a minimization problem, convert it to a maximization problem by multiplying the objective function by –1. Form the initial tableau, and eliminate any negative entries in the upper part of the last column by pivoting. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.3 - Part 2 Apply the pivoting process for problems in standard form to the resulting tableau. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
4.4 Sensitivity Analysis and Matrix Formulations of Linear Programming Problems Range of Feasibility Shadow Price or Marginal Value Matrix Inequalities Matrix Formulations of Linear Programming Problems Transpose of a Matrix Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Sensitivity Analysis Each number appearing in the final simplex tableau has an interpretation that not only sheds light on the current situation but also can be used to analyze the benefits of small changes in the available resources. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Range of Feasibility Take the simplex tableau from the manufacturing example already solved and change the carpentry constraint by h: x y u v w M u v w M Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Range of Feasibility (2) Perform the same steps to the maximum solution that were executed on the original tableau. x y u v w M x y w M Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Range of Feasibility (3) For all solutions to be nonnegative, all the constants to the right of the vertical bar and above the horizontal bar must be nonnegative. This leads to three inequalities 14 + h / 3 > 0, 4 - h/3 > 0, 20 + 4h/3 > 0 The solution to the above system of inequalities is -15 < h < 12. In turn this makes the carpentry constraint 81 < 96 + h < 108. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Range of Feasibility (4) The interval [81,108] is called the range of feasibility for the carpentry constraint. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Shadow Price or Marginal Value x y u v w M x y w M Notice also that if the labor-hours available for carpentry were increased by 1 hour (h = 1), then x is increased by 1/3, y is decreased by 1/3, w is increased by 4/3 and M is increased by 10/3 . Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Shadow Price or Marginal Value (2) The increase in M due to a unit increase in the constant in the constraint is called the shadow price or marginal value of the constraint associated with that variable. This corresponds to the bottom entry in the slack variable’s column in the final tableau. There is a shadow price for every slack variable. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Shadow Price or Marginal Value (3) x y u v w M x y w M The final values in each of the slack variable columns are the shadow prices or marginal values of the three factors of production - carpentry, finishing, and upholstery. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Matrix Inequalities Let A and B be two matrices of the same size. Then A < B if each entry of A is less than or equal to the corresponding entry of B. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Matrix Inequalities For which of following is A < B? Yes No Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Matrix Formulations of Linear Programming Problems Let Carry out the indicated matrix multiplications in the statement: Maximize CX subject to the constraints AX < B, X > 0 where 0 is the zero matrix. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Matrix Formulations of Linear Programming Problems (2) So maximize CX means maximize 80x + 70y. which means x > 0 and y > 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Matrix Formulations of Linear Programming Problems (3) So AX < B means 6x + 3y < 96 x + y < 18 2x + 6y < 72. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Transpose of a Matrix If A is an mxn matrix, then the matrix AT (read “A transpose”) is the nxm matrix whose ijth entry is the jith entry of A. The rows of AT are the columns of A, and vice versa. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Transpose of a Matrix Determine the following. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.4 - Part 1 The constraints in a linear programming problem usually represent limitations in the availability of resources. Sensitivity analysis is the analysis of the effects of small changes in the constraints. The shadow price of a resource is the change in the optimal value of the objective function resulting from a unit increase in the availability of that resource. In the final simplex tableau, the bottom entry in each slack variable’s column gives the shadow price of the resource associated with that variable. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.4 - Part 2 A linear programming problem in the standard form can be expressed in terms of matrices: Maximize CX subject to constraints AX < B and X > 0, where A is the matrix of coefficients of the linear polynomials, B is the column vector of the right-hand constants, and C is a row vector of the coefficients in the objective function. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
4.5 Duality Dual of Linear Programming Problem Fundamental Theorem of Duality Principle of Complementary Slackness Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Dual of Linear Programming Problem - 1 1. If the original (primal) problem has the form Maximize CX subject to the constraints AX < B, X > 0, then the dual problem is Minimize BTU subject to the constraints ATU > CT, U > 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Dual of Linear Programming Problem - 2 2. If the original (primal) problem has the form Minimize CX subject to the constraints AX > B, X > 0, then the dual problem is Maximize BTU subject to the constraints ATU < CT, U > 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Dual Determine the dual of Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Dual (2) Write the problem in standard minimization form by multiplying the first inequality by (-1). Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Dual (3) Write the problem in matrix form. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Dual (4) Write the dual in matrix form. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Fundamental Theorem of Duality - 1 If either the primal problem or the dual problem has an optimal solution, then they both have an optimal solution and their objective functions have the same values at these optimal points. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Fundamental Theorem of Duality - 2 & 3 If both the primal and the dual problems have a feasible solution, then they both have optimal solutions and their objective functions have the same value at these optimal points. The solution of one of these problems by the simplex method yields the solution of the other problem as the final entries in the columns associated with the slack variables. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Fundamental Theorem of Duality Solve the following problem by applying the simplex method to its dual problem. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Fundamental Theorem (2) The dual problem is: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Fundamental Theorem (3) The initial tableau for the dual problem is u v x y z M x y z M Perform the first pivot. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Fundamental Theorem (4) The resulting tableau is u v x y z M v y z M Perform the second pivot. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Fundamental Theorem (5) The resulting tableau is u v x y z M v u z M The solution to the primal problem is x = 3/2, y = 1/10, z = 0 and minimum = 29. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
An Economic Interpretation of the Dual Problem The solution of Maximize CX subject to AX < B & X > 0 is an activity matrix in which each entry gives the optimal level of each activity. The matrix B is the capacity or resources matrix, where each entry represents the available amount of a resource. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
An Economic Interpretation of the Dual Problem (2) The matrix C is the profit matrix whose entries are the unit profits for each activity represented in X. The dual solution matrix U is the imputed value matrix, which gives the imputed value of each of the resources in the production process. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
An Economic Interpretation of the Dual Problem (3) The solution of Minimize CX subject to AX > B & X > 0 is an activity matrix in which each entry gives the optimal level of an activity. B is the requirements matrix in which each entry is a minimum required level of production for some commodity. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
An Economic Interpretation of the Dual Problem (4) C is the cost matrix, where each entry is the unit cost of the corresponding activity in X. The dual solution matrix U is the imputed cost matrix whose entries are the costs imputed to the required commodities. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Principle of Complementary Slackness Principle of Complementary Slackness Each variable that has a positive value in the solution of the primal problem has the value 0 in the solution of the dual. Similarly, if a variable has a positive value in the solution to the dual problem, then it has the value 0 in the solution of the primal problem. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Using the Dual Problem Consider the furniture manufacturing problem again. Suppose the manufacturer has the same resources but is considering adding a new product, love seats. The manufacture of a love seat requires 3 hours of carpentry, 2 hours of finishing, and 4 hours of upholstery. What profit must be made per love seat in order to justify adding love seats to the product line? Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Using the Dual Problem (2) If p is the profit for a love seat, the primal problem is Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Using the Dual Problem (3) The dual problem is Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Using the Dual Problem (4) The manufacturing of love seats is not justified if the maximum profit does not increase. This would mean that the optimal solution is still x = 14, y = 4 and z = 0. The dual problem would also have the same minimum so its solution would still be u = 10/3, v = 60 and w = 0. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Example Using the Dual Problem (5) Substituting the optimal solution into the third equation of the dual problem gives 3(10/3) + 2(60) + 4(0) > p 130 > p. Therefore, if p > $130, the introduction of the love seat into the line is justified. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.5 - Part 1 Given a linear programming problem in standard form, its dual problem is “Minimize BTU subject to ATU > CT, U > 0”, where U is the column matrix consisting of the slack variables of the original problem. The original problem is called the primal problem. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e
Summary Section 4.5 - Part 2 The fundamental theorem of duality states that if either the primal problem or the dual problem has an optimal feasible solution, then they both have optimal feasible solutions and their objective functions have the same optimal value. Furthermore, the final simplex tableau for either of these problems yields the solution of the other as the final entries in the columns associated with the slack variables. Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e