Lecture 6 Simplex Method: Artifical Starting Solution and Some Special Cases September 4, 2009 Lecture 6 Outline: • Initial table vs initial simplex table • Artificial start: Two-phase method • Special cases: • Degeneracy • Multiple optimal solutions • Infinite optimal value • Infeasibility of the problem Operations Research Methods 1 Lecture 6 Simplex method: started at a feasible basic solution Illustrated on the Reddy Mikks problem Original LP formulation Standard LP form maximize z = 5x1 + 4x2 subject to 6x1 + 4x2 ≤ 24 x1 + 2x2 ≤ 6 x1 , x 2 ≥ 0 Operations Research Methods maximize z = 5x1 + 4x2 subject to 6x1 + 4x2 + x3 = 24 x1 + 2x2 + x4 = 6 x1 , x 2 , x 3 , x 4 ≥ 0 2 Lecture 6 Initial table vs Initial simplex table Basis z ?? ?? x1 −5 6 1 x2 −4 4 2 x3 0 1 0 x4 0 0 1 RHS Values = 0 = 24 = 6 x1 −5 6 1 x2 −4 4 2 x3 0 1 0 x4 0 0 1 RHS Values = 0 = 24 = 6 Basis: x3 and x4 Basis z x3 x4 Initial table can be used as initial simplex table Operations Research Methods 3 Lecture 6 Basis: x1 and x4 Basis z x1 x4 x1 −5 6 1 x2 −4 4 2 x3 0 1 0 x4 0 0 1 RHS Values 0 24 6 This table cannot be used as the initial simplex table! We have to transform the table (Gauss-Jordan elimination using x1-column elements) Basis z x1 0 x2 − 23 x3 x4 0 RHS Values 20 x1 1 2 3 1 6 0 4 x4 0 4 3 − 61 1 2 5 6 This table is an initial simplex table, i.e., the simplex method can start. Operations Research Methods 4 Lecture 6 Artificial Start: Two-phase method • Sometimes, it is not easy to find an initial feasible solution (i.e., to choose initial bases yielding a feasible point) • Two-phase method is used in such situations • In first phase, a feasibility problem associated with the LP is solved by a simplex method • In the second phase, the solution from the first phase is used to start running the simplex method Operations Research Methods 5 Lecture 6 Two-phase Method: Example Original LP formulation Standard LP form minimize z = 4x1 + x2 minimize z = 4x1 + x2 subject to 3x1 + x2 =3 subject to 3x1 + x2 = 3 4x1 + 3x2 − x3 =6 4x1 + 3x2 ≥ 6 x1 + 2x2 + x4 = 4 x1 + 2x2 ≤ 4 x1 , x 2 , x 3 , x 4 ≥ 0 x1 , x 2 ≥ 0 It is not easy to find a basis yielding a basic feasible solution! Phase I: we first solve a feasibility problem associated with the LP: introduce new variables R1 and R2 minimize r = R1 + R2 subject to 3x1 + x2 + R1 =3 4x1 + 3x2 − x3 + R2 = 6 x1 + 2x2 + x4 =4 x1 , x 2 , x 3 , x 4 , R 1 , R 2 ≥ 0 Operations Research Methods 6 Lecture 6 Phase I: Initial table Basis r R1 R2 x4 x1 0 3 4 1 x2 0 1 3 2 x3 0 0 −1 0 x4 0 0 0 1 R1 −1 1 0 0 R2 −1 0 1 0 RHS Values 0 3 6 4 R1 0 1 0 0 R2 0 0 1 0 RHS Values 9 3 6 4 Initial simplex table Basis r R1 R2 x4 x1 7 3 4 1 Operations Research Methods x2 4 1 3 2 x3 −1 0 −1 0 x4 0 0 0 1 7 Lecture 6 Applying the simplex method, we will obtain an optimal solution Basis r x1 x2 x4 x1 0 1 0 0 x2 0 0 1 0 x3 0 1 5 − 53 1 x4 0 0 0 1 R1 −1 3 5 4 −5 1 R2 −1 − 15 RHS Values 0 3 5 3 5 6 5 −1 1 Q: How do we know this is optimal solution to the feasibility problem? What is the solution? What is the optimal value for r? Use the solution of Phase I to start Phase II (solving the original LP) Basis z x1 x2 x4 x1 −4 1 0 0 Operations Research Methods x2 −1 0 1 0 x3 0 1 5 3 −5 1 x4 0 0 0 1 RHS Values 0 3 5 6 5 1 8 Lecture 6 The initial table of Phase II Basis z x1 x2 x4 x1 0 1 0 0 x2 0 0 1 0 x3 1 5 1 5 3 −5 1 x4 0 0 0 1 RHS Values 18 5 3 5 6 5 1 We continue with simplex iterations until we find an optimal solution. Operations Research Methods 9 Lecture 6 Special Case: Degeneracy Degeneracy is a term used for a basic feasible solution having one or more basic variables at value 0 Original LP formulation Standard LP form maximize z = 3x1 + 9x2 maximize z = 3x1 + 9x2 subject to x1 + 4x2 ≤ 8 subject to x1 + 4x2 + x3 =8 x1 + 2x2 ≤ 4 x1 + 2x2 + x4 = 4 x1 , x 2 ≥ 0 x1 , x 2 , x 3 , x 4 ≥ 0 At the end of the simplex method, (started with basis x3 and x4), we have Basis z x2 x1 x1 0 0 1 x2 0 1 0 x3 x4 3 2 1 2 3 2 1 −2 −1 2 RHS Values 18 2 0 There is another basis corresponding to the same solution! Operations Research Methods 10 Lecture 6 Special Case: Multiple Solutions Original LP formulation Standard LP form maximize z = 2x1 + 4x2 maximize z = 2x1 + 4x2 subject to x1 + 2x2 ≤ 5 subject to x1 + 2x2 + x3 =5 x1 + 2x2 ≤ 4 x1 + x2 + x4 = 4 x1 , x 2 ≥ 0 x1 , x 2 , x 3 , x 4 ≥ 0 At the end of the simplex method, (started with basis x3 and x4), we have Basis z x2 x4 x1 0 1 2 1 2 x2 0 1 0 x3 2 1 2 − 12 x4 0 0 1 RHS Values 10 5 2 3 2 There is a nonbasic variable with 0 coefficient in the optimal table. This means we can bring that variable in the basis without changing the z -value. Operations Research Methods 11 Lecture 6 Choosing x1 to enter the basis, we perform another simplex iteration and find an alternative optimal solution Basis z x2 x4 x1 0 0 1 Operations Research Methods x2 0 1 0 x3 2 1 −1 x4 0 −1 2 RHS Values 10 1 3 12 Lecture 6 Special Case: Unbounded Optimal Value Original LP formulation Standard LP form maximize z = 2x1 + x2 maximize z = 2x1 + x2 subject to x1 − x2 ≤ 10 subject to x1 − x2 + x3 = 10 2x1 ≤ 40 2x1 + x4 = 40 x1 , x 2 ≥ 0 x1 , x 2 , x 3 , x 4 ≥ 0 At some iteration of the simplex method, (in this example, it happened to be the initial iteration) a nonbasic variable with negative coefficient can enter the basis without a bound on its value (maximization) Basis x1 x2 x3 x4 RHS Values z −2 −1 0 0 0 1 0 10 x3 1 −1 x4 2 0 0 1 40 This means we can bring that variable in the basis and increase the z -value to +∞ (since the variable can be increased to +∞). Operations Research Methods 13 Lecture 6 Special Case: Infeasibility Original LP formulation Standard LP form maximize z = 3x1 + 2x2 maximize subject to 2x1 + x2 ≤ 2 subject to 3x1 + 4x2 ≥ 12 x1 , x 2 ≥ 0 None of the basic solutions is feasible! z = 3x1 + 2x2 2x1 + x2 + x3 =2 3x1 + 4x2 − x4 = 12 x1 , x 2 , x 3 , x 4 ≥ 0 Here, it is not as easy to read off a feasible basis -apply Two phase method Phase I Solve the feasibility problem minimize r = R subject to 2x1 + x2 + x3 =2 3x1 + 4x2 − x4 + R = 12 x1 , x 2 , x 3 , x 4 , R ≥ 0 Operations Research Methods 14 Lecture 6 Initial table for feasibility problem Basis r x3 R x1 0 2 3 x2 0 1 4 x3 0 1 0 x4 R 0 −1 0 0 −1 1 RHS Values 0 2 12 Initial simplex table for feasibility problem Basis r x3 R x1 3 2 3 x2 4 1 4 x3 0 1 0 x4 −1 0 −1 R 0 0 1 RHS Values 12 2 12 The table is not optimal. Choose a nonbasic variable with positive r-coefficient (minimization), say choose x2 Operations Research Methods 15 Lecture 6 In the next simplex iteration, we have Basis r x2 R x1 −5 2 3 x2 0 1 4 x3 −4 1 0 x4 −1 0 −1 R 0 0 1 RHS Values 4 2 12 This table is optimal (the feasibility problem involves minimization) Indication of infeasibility: In the optimal (phase I) table, • The optimal value is positive • The basis solution contains an artificial variable with a positive value The material is in Sections 3.4.2 and 3.5 Operations Research Methods 16