Home > Operation Research > Two-Phase method example

3. Two-Phase method example ( Enter your problem )
  1. Algorithm & Example-1 (using `Z`-row method)
  2. Example-2 (using `Z`-row method)
  3. Example-3 (using `Z`-row method)
  4. Infeasible solution example (using `Z`-row method)
  5. Algorithm & Example-1 (using `Z_j-C_j` method)
  6. Example-2 (using `Z_j-C_j` method)
  7. Example-3 (using `Z_j-C_j` method)
  8. Infeasible solution example (using `Z_j-C_j` method)
  9. Algorithm & Example-1 (using `C_j-Z_j`method)
  10. Example-2 (using `C_j-Z_j`method)
  11. Example-3 (using `C_j-Z_j`method)
  12. Infeasible solution example (using `C_j-Z_j`method)
Other related methods
  1. Formulate linear programming model
  2. Graphical method
  3. Simplex method (BigM method)
  4. Two-Phase method
  5. Primal to dual conversion
  6. Dual simplex method
  7. Integer simplex method
  8. Branch and Bound method
  9. 0-1 Integer programming problem
  10. Revised Simplex method

3. Example-3 (using `Z`-row method)
(Previous example)
5. Algorithm & Example-1 (using `Z_j-C_j` method)
(Next example)

4. Infeasible solution example (using `Z`-row method)





Infeasible solution
If there is no any solution that satifies all the constraints, then it is called Infeasible solution

In the final simplex table when all `c_j - z_j` imply optimal solution but at least one artificial variable present in the basis with positive value. Then the problem has no feasible solution.
Example
Find solution using Two-Phase method
MIN Z = X1 - 2X2 - 3X3
subject to
-2X1 + X2 + 3X3 = 2
2X1 + 3X2 + 4X3 = 1
and X1,X2,X3 >= 0;


Solution:
Problem is
Min `Z``=``````X_1`` - ``2``X_2`` - ``3``X_3`
subject to
` - ``2``X_1`` + ````X_2`` + ``3``X_3`=`2`
```2``X_1`` + ``3``X_2`` + ``4``X_3`=`1`
and `X_1,X_2,X_3 >= 0; `


-->Phase-1<--

The problem is converted to canonical form by adding slack, surplus and artificial variables as appropiate

1. As the constraint-1 is of type '`=`' we should add artificial variable `A_1`

2. As the constraint-2 is of type '`=`' we should add artificial variable `A_2`

After introducing artificial variables
Min `Z``=``````A_1`` + ````A_2`
subject to
` - ``2``X_1`` + ````X_2`` + ``3``X_3`` + ````A_1`=`2`
```2``X_1`` + ``3``X_2`` + ``4``X_3`` + ````A_2`=`1`
and `X_1,X_2,X_3,A_1,A_2 >= 0`


`Z`` - ````A_1`` - ````A_2`=`0`
` - ``2``X_1`` + ````X_2`` + ``3``X_3`` + ````A_1`=`2`
```2``X_1`` + ``3``X_2`` + ``4``X_3`` + ````A_2`=`1`


Simplex tableau is
Tableau-0
`"Basis"``X_1``X_2``X_3``A_1``A_2``RHS`
`R_1` `Z``0``0``0``-1``-1``0`
`R_2` `A_1``-2``1``3``1``0``2`
`R_3` `A_2``2``3``4``0``1``1`


Make the Z-row consistent with the rest of the table (set coefficient of basis variables to 0 in Z-row)
`R_1`(new)`= R_1`(old) + `R_2`(old)
`X_1``X_2``X_3``A_1``A_2``RHS`
`R_1`(old) = `0``0``0``-1``-1``0`
`R_2`(old) = `-2``1``3``1``0``2`
`R_1`(new)`= R_1`(old) + `R_2`(old)`-2``1``3``0``-1``2`
`R_1`(new)`= R_1`(old) + `R_3`(old)
`X_1``X_2``X_3``A_1``A_2``RHS`
`R_1`(old) = `-2``1``3``0``-1``2`
`R_3`(old) = `2``3``4``0``1``1`
`R_1`(new)`= R_1`(old) + `R_3`(old)`0``4``7``0``0``3`


Tableau-1
`"Basis"``X_1``X_2``X_3``darr``A_1``A_2``RHS``"Ratio"=(RHS)/(X_3)`
`R_1` `Z``0``4``7``0``0``3`
`R_2` `A_1``-2``1``3``1``0``2``(2)/(3)=0.6667`
`R_3` `A_2``2``3``(4)``0``1``1``(1)/(4)=0.25``->`


Most Positive `Z` is `7`. So, the entering variable is `X_3`.

Minimum ratio is `0.25`. So, the leaving basis variable is `A_2`.

`:.` The pivot element is `4`.

Entering `=X_3`, Departing `=A_2`, Key Element `=4`
`R_3`(new)`= R_3`(old) `-: 4`
`X_1``X_2``X_3``A_1``A_2``RHS`
`R_3`(old) = `2``3``4``0``1``1`
`R_3`(new)`= R_3`(old) `-: 4``0.5``0.75``1``0``0.25``0.25`
`R_2`(new)`= R_2`(old) - `3 R_3`(new)
`X_1``X_2``X_3``A_1``A_2``RHS`
`R_2`(old) = `-2``1``3``1``0``2`
`R_3`(new) = `0.5``0.75``1``0``0.25``0.25`
`3 xx R_3`(new) = `1.5``2.25``3``0``0.75``0.75`
`R_2`(new)`= R_2`(old) - `3 R_3`(new)`-3.5``-1.25``0``1``-0.75``1.25`
`R_1`(new)`= R_1`(old) - `7 R_3`(new)
`X_1``X_2``X_3``A_1``A_2``RHS`
`R_1`(old) = `0``4``7``0``0``3`
`R_3`(new) = `0.5``0.75``1``0``0.25``0.25`
`7 xx R_3`(new) = `3.5``5.25``7``0``1.75``1.75`
`R_1`(new)`= R_1`(old) - `7 R_3`(new)`-3.5``-1.25``0``0``-1.75``1.25`


Tableau-2
`"Basis"``X_1``X_2``X_3``A_1``A_2``RHS`
`R_1` `Z``-3.5``-1.25``0``0``-1.75``1.25`
`R_2` `A_1``-3.5``-1.25``0``1``-0.75``1.25`
`R_3` `X_3``0.5``0.75``1``0``0.25``0.25`


Since all `Z_j <= 0`

Hence, optimal solution is arrived with value of variables as :
`X_1=0,X_2=0,X_3=0.25`

Min `Z=0`

But this solution is not feasible (and also not optimal)
because the solution violates the `1^(st)` constraint  ` - ` `2` `X_1` ` + ` `` `X_2` ` + ` `3` `X_3` = `2`.

and the artificial variable `A_1` appears in the basis with positive value `1.25`

So phase-2 is not possbile.




This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



3. Example-3 (using `Z`-row method)
(Previous example)
5. Algorithm & Example-1 (using `Z_j-C_j` method)
(Next example)





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.