Home > Operation Research > Simplex method example

2. Simplex method example ( Enter your problem )
  1. Structure of Linear programming problem
  2. Algorithm (using `Z`-row method)
  3. Maximization example-1 (using `Z`-row method)
  4. Maximization example-2 (using `Z`-row method)
  5. Maximization example-3 (using `Z`-row method)
  6. BigM method Algorithm (using `Z`-row method)
  7. Minimization example-1 (using `Z`-row method)
  8. Minimization example-2 (using `Z`-row method)
  9. Minimization example-3 (using `Z`-row method)
  10. Degeneracy example-1 (Tie for leaving basic variable) (using `Z`-row method)
  11. Degeneracy example-2 (Tie first Artificial variable removed) (using `Z`-row method)
  12. Unrestricted variable example (using `Z`-row method)
  13. Multiple optimal solution example (using `Z`-row method)
  14. Infeasible solution example (using `Z`-row method)
  15. Unbounded solution example (using `Z`-row method)
  16. Algorithm (using `Z_j-C_j` method)
  17. Maximization example-1 (using `Z_j-C_j` method)
  18. Maximization example-2 (using `Z_j-C_j` method)
  19. Maximization example-3 (using `Z_j-C_j` method)
  20. BigM method Algorithm (using `Z_j-C_j` method)
  21. Minimization example-1 (using `Z_j-C_j` method)
  22. Minimization example-2 (using `Z_j-C_j` method)
  23. Minimization example-3 (using `Z_j-C_j` method)
  24. Degeneracy example-1 (Tie for leaving basic variable) (using `Z_j-C_j` method)
  25. Degeneracy example-2 (Tie first Artificial variable removed) (using `Z_j-C_j` method)
  26. Unrestricted variable example (using `Z_j-C_j` method)
  27. Multiple optimal solution example (using `Z_j-C_j` method)
  28. Infeasible solution example (using `Z_j-C_j` method)
  29. Unbounded solution example (using `Z_j-C_j` method)
  30. Algorithm (using `C_j-Z_j`method)
  31. Maximization example-1 (using `C_j-Z_j`method)
  32. Maximization example-2 (using `C_j-Z_j`method)
  33. Maximization example-3 (using `C_j-Z_j`method)
  34. BigM method Algorithm (using `C_j-Z_j`method)
  35. Minimization example-1 (using `C_j-Z_j`method)
  36. Minimization example-2 (using `C_j-Z_j`method)
  37. Minimization example-3 (using `C_j-Z_j`method)
  38. Degeneracy example-1 (Tie for leaving basic variable) (using `C_j-Z_j`method)
  39. Degeneracy example-2 (Tie first Artificial variable removed) (using `C_j-Z_j`method)
  40. Unrestricted variable example (using `C_j-Z_j`method)
  41. Multiple optimal solution example (using `C_j-Z_j`method)
  42. Infeasible solution example (using `C_j-Z_j`method)
  43. Unbounded 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

11. Degeneracy example-2 (Tie first Artificial variable removed) (using `Z`-row method)
(Previous example)
13. Multiple optimal solution example (using `Z`-row method)
(Next example)

12. Unrestricted variable example (using `Z`-row method)





Unrestricted variable
Sometimes decision variables are positive, negative or zero values, then they are called unrestricted variables.
In all such cases, the decision variables can be expressed as the difference between two non-negative variables.

For example, if `x_r` is unrestricted in sign, then
`x_r = x_r' - x_r''` ; `x_r' - x_r'' >= 0`
Example
Find solution using Simplex method (BigM method)
MAX Z = 3x1 + 2x2 + x3
subject to
2x1 + 5x2 + x3 = 12
3x1 + 4x2 = 11
and x2,x3 >= 0; x1 unrestricted in sign


Solution:
Problem is
Max `Z``=````3``x_1`` + ``2``x_2`` + ````x_3`
subject to
```2``x_1`` + ``5``x_2`` + ````x_3`=`12`
```3``x_1`` + ``4``x_2`=`11`
and `x_2,x_3 >= 0; ``x_1` unrestricted in sign;


Since `x_1` is unrestricted in sign, introduce the non-negative variables `x_1',x_1''`

So that `x_1=x_1'-x_1''; x_1',x_1''>=0`

The standard form of the LP problem becomes
Problem is
Max `Z``=````3``x_1'`` - ``3``x_1''`` + ``2``x_2`` + ````x_3`
subject to
```2``x_1'`` - ``2``x_1''`` + ``5``x_2`` + ````x_3`=`12`
```3``x_1'`` - ``3``x_1''`` + ``4``x_2`=`11`
and `x_1',x_1'',x_2,x_3 >= 0; `


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
Max `Z``=````3``x_1'`` - ``3``x_1''`` + ``2``x_2`` + ````x_3`` - ``M``A_1`` - ``M``A_2`
subject to
```2``x_1'`` - ``2``x_1''`` + ``5``x_2`` + ````x_3`` + ````A_1`=`12`
```3``x_1'`` - ``3``x_1''`` + ``4``x_2`` + ````A_2`=`11`
and `x_1',x_1'',x_2,x_3,A_1,A_2 >= 0`


`Z`` - ``3``x_1'`` + ``3``x_1''`` - ``2``x_2`` - ````x_3`` + ``M``A_1`` + ``M``A_2`=`0`
```2``x_1'`` - ``2``x_1''`` + ``5``x_2`` + ````x_3`` + ````A_1`=`12`
```3``x_1'`` - ``3``x_1''`` + ``4``x_2`` + ````A_2`=`11`


Simplex tableau is
Tableau-0
`"Basis"``x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1` `Z``-3``3``-2``-1``M``M``0`
`R_2` `A_1``2``-2``5``1``1``0``12`
`R_3` `A_2``3``-3``4``0``0``1``11`


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) - `M R_2`(old)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1`(old) = `-3``3``-2``-1``M``M``0`
`R_2`(old) = `2``-2``5``1``1``0``12`
`M xx R_2`(new) = `-2M``2M``-5M``-M``-M``0``-12M`
`R_1`(new)`= R_1`(old) - `M R_2`(old)`-2M-3``2M+3``-5M-2``-M-1``0``M``-12M`
`R_1`(new)`= R_1`(old) - `M R_3`(old)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1`(old) = `-2M-3``2M+3``-5M-2``-M-1``0``M``-12M`
`R_3`(old) = `3``-3``4``0``0``1``11`
`M xx R_3`(new) = `-3M``3M``-4M``0``0``-M``-11M`
`R_1`(new)`= R_1`(old) - `M R_3`(old)`-5M-3``5M+3``-9M-2``-M-1``0``0``-23M`


Tableau-1
`"Basis"``x_1'``x_1''``x_2``darr``x_3``A_1``A_2``RHS``"Ratio"=(RHS)/(x_2)`
`R_1` `Z``-5M-3``5M+3``-9M-2``-M-1``0``0``-23M`
`R_2` `A_1``2``-2``(5)``1``1``0``12``(12)/(5)=2.4``->`
`R_3` `A_2``3``-3``4``0``0``1``11``(11)/(4)=2.75`


Most Negative `Z` is `-9M-2`. So, the entering variable is `x_2`.

Minimum ratio is `2.4`. So, the leaving basis variable is `A_1`.

`:.` The pivot element is `5`.

Entering `=x_2`, Departing `=A_1`, Key Element `=5`
`R_2`(new)`= R_2`(old) `-: 5`
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_2`(old) = `2``-2``5``1``1``0``12`
`R_2`(new)`= R_2`(old) `-: 5``0.4``-0.4``1``0.2``0.2``0``2.4`
`R_3`(new)`= R_3`(old) - `4 R_2`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_3`(old) = `3``-3``4``0``0``1``11`
`R_2`(new) = `0.4``-0.4``1``0.2``0.2``0``2.4`
`4 xx R_2`(new) = `1.6``-1.6``4``0.8``0.8``0``9.6`
`R_3`(new)`= R_3`(old) - `4 R_2`(new)`1.4``-1.4``0``-0.8``-0.8``1``1.4`
`R_1`(new)`= R_1`(old) - `(-9M-2) R_2`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1`(old) = `-5M-3``5M+3``-9M-2``-M-1``0``0``-23M`
`R_2`(new) = `0.4``-0.4``1``0.2``0.2``0``2.4`
`(-9M-2) xx R_2`(new) = `-3.6M-0.8``3.6M+0.8``-9M-2``-1.8M-0.4``-1.8M-0.4``0``-21.6M-4.8`
`R_1`(new)`= R_1`(old) - `(-9M-2) R_2`(new)`-1.4M-2.2``1.4M+2.2``0``0.8M-0.6``1.8M+0.4``0``-1.4M+4.8`


Tableau-2
`"Basis"``x_1'``darr``x_1''``x_2``x_3``A_1``A_2``RHS``"Ratio"=(RHS)/(x_1')`
`R_1` `Z``-1.4M-2.2``1.4M+2.2``0``0.8M-0.6``1.8M+0.4``0``-1.4M+4.8`
`R_2` `x_2``0.4``-0.4``1``0.2``0.2``0``2.4``(2.4)/(0.4)=6`
`R_3` `A_2``(1.4)``-1.4``0``-0.8``-0.8``1``1.4``(1.4)/(1.4)=1``->`


Most Negative `Z` is `-1.4M-2.2`. So, the entering variable is `x_1'`.

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

`:.` The pivot element is `1.4`.

Entering `=x_1'`, Departing `=A_2`, Key Element `=1.4`
`R_3`(new)`= R_3`(old) `-: 1.4`
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_3`(old) = `1.4``-1.4``0``-0.8``-0.8``1``1.4`
`R_3`(new)`= R_3`(old) `-: 1.4``1``-1``0``-0.5714``-0.5714``0.7143``1`
`R_2`(new)`= R_2`(old) - `0.4 R_3`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_2`(old) = `0.4``-0.4``1``0.2``0.2``0``2.4`
`R_3`(new) = `1``-1``0``-0.5714``-0.5714``0.7143``1`
`0.4 xx R_3`(new) = `0.4``-0.4``0``-0.2286``-0.2286``0.2857``0.4`
`R_2`(new)`= R_2`(old) - `0.4 R_3`(new)`0``0``1``0.4286``0.4286``-0.2857``2`
`R_1`(new)`= R_1`(old) - `(-1.4M-2.2) R_3`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1`(old) = `-1.4M-2.2``1.4M+2.2``0``0.8M-0.6``1.8M+0.4``0``-1.4M+4.8`
`R_3`(new) = `1``-1``0``-0.5714``-0.5714``0.7143``1`
`(-1.4M-2.2) xx R_3`(new) = `-1.4M-2.2``1.4M+2.2``0``0.8M+1.2571``0.8M+1.2571``-M-1.5714``-1.4M-2.2`
`R_1`(new)`= R_1`(old) - `(-1.4M-2.2) R_3`(new)`0``0``0``-1.8571``M-0.8571``M+1.5714``7`


Tableau-3
`"Basis"``x_1'``x_1''``x_2``x_3``darr``A_1``A_2``RHS``"Ratio"=(RHS)/(x_3)`
`R_1` `Z``0``0``0``-1.8571``M-0.8571``M+1.5714``7`
`R_2` `x_2``0``0``1``(0.4286)``0.4286``-0.2857``2``(2)/(0.4286)=4.6667``->`
`R_3` `x_1'``1``-1``0``-0.5714``-0.5714``0.7143``1``(1)/(-0.5714)` (ignore, denominator is -ve)


Most Negative `Z` is `-1.8571`. So, the entering variable is `x_3`.

Minimum ratio is `4.6667`. So, the leaving basis variable is `x_2`.

`:.` The pivot element is `0.4286`.

Entering `=x_3`, Departing `=x_2`, Key Element `=0.4286`
`R_2`(new)`= R_2`(old) `-: 0.4286`
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_2`(old) = `0``0``1``0.4286``0.4286``-0.2857``2`
`R_2`(new)`= R_2`(old) `-: 0.4286``0``0``2.3333``1``1``-0.6667``4.6667`
`R_3`(new)`= R_3`(old) + `0.5714 R_2`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_3`(old) = `1``-1``0``-0.5714``-0.5714``0.7143``1`
`R_2`(new) = `0``0``2.3333``1``1``-0.6667``4.6667`
`0.5714 xx R_2`(new) = `0``0``1.3333``0.5714``0.5714``-0.381``2.6667`
`R_3`(new)`= R_3`(old) + `0.5714 R_2`(new)`1``-1``1.3333``0``0``0.3333``3.6667`
`R_1`(new)`= R_1`(old) - `-1.8571 R_2`(new)
`x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1`(old) = `0``0``0``-1.8571``M-0.8571``M+1.5714``7`
`R_2`(new) = `0``0``2.3333``1``1``-0.6667``4.6667`
`-1.8571 xx R_2`(new) = `0``0``-4.3333``-1.8571``-1.8571``1.2381``-8.6667`
`R_1`(new)`= R_1`(old) - `-1.8571 R_2`(new)`0``0``4.3333``0``M+1``M+0.3333``15.6667`


Tableau-4
`"Basis"``x_1'``x_1''``x_2``x_3``A_1``A_2``RHS`
`R_1` `Z``0``0``4.3333``0``M+1``M+0.3333``15.6667`
`R_2` `x_3``0``0``2.3333``1``1``-0.6667``4.6667`
`R_3` `x_1'``1``-1``1.3333``0``0``0.3333``3.6667`


Since all `Z_j >= 0`

Hence, optimal solution is arrived with value of variables as :
`x_1'=3.6667,x_1''=0,x_2=0,x_3=4.6667`

Max `Z=15.6667`




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



11. Degeneracy example-2 (Tie first Artificial variable removed) (using `Z`-row method)
(Previous example)
13. Multiple optimal solution example (using `Z`-row method)
(Next example)





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

.