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

6. BigM method Algorithm (using `Z`-row method)
(Previous example)
8. Minimization example-2 (using `Z`-row method)
(Next example)

7. Minimization example-1 (using `Z`-row method)





Find solution using Simplex method (BigM method)
MIN Z = x1 + x2
subject to
2x1 + 4x2 >= 4
x1 + 7x2 >= 7
and x1,x2 >= 0;


Solution:
Problem is
Min `Z``=``````x_1`` + ````x_2`
subject to
```2``x_1`` + ``4``x_2``4`
`````x_1`` + ``7``x_2``7`
and `x_1,x_2 >= 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 subtract surplus variable `S_1` and add artificial variable `A_1`

2. As the constraint-2 is of type '`>=`' we should subtract surplus variable `S_2` and add artificial variable `A_2`

After introducing surplus,artificial variables
Min `Z``=``````x_1`` + ````x_2`` + ``0``S_1`` + ``0``S_2`` + ``M``A_1`` + ``M``A_2`
subject to
```2``x_1`` + ``4``x_2`` - ````S_1`` + ````A_1`=`4`
`````x_1`` + ``7``x_2`` - ````S_2`` + ````A_2`=`7`
and `x_1,x_2,S_1,S_2,A_1,A_2 >= 0`


`Z`` - ````x_1`` - ````x_2`` - ``M``A_1`` - ``M``A_2`=`0`
```2``x_1`` + ``4``x_2`` - ````S_1`` + ````A_1`=`4`
`````x_1`` + ``7``x_2`` - ````S_2`` + ````A_2`=`7`


Simplex tableau is
Tableau-0
`"Basis"``x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_1` `Z``-1``-1``0``0``-M``-M``0`
`R_2` `A_1``2``4``-1``0``1``0``4`
`R_3` `A_2``1``7``0``-1``0``1``7`


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_2``S_1``S_2``A_1``A_2``RHS`
`R_1`(old) = `-1``-1``0``0``-M``-M``0`
`R_2`(old) = `2``4``-1``0``1``0``4`
`M xx R_2`(new) = `2M``4M``-M``0``M``0``4M`
`R_1`(new)`= R_1`(old) + `M R_2`(old)`2M-1``4M-1``-M``0``0``-M``4M`
`R_1`(new)`= R_1`(old) + `M R_3`(old)
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_1`(old) = `2M-1``4M-1``-M``0``0``-M``4M`
`R_3`(old) = `1``7``0``-1``0``1``7`
`M xx R_3`(new) = `M``7M``0``-M``0``M``7M`
`R_1`(new)`= R_1`(old) + `M R_3`(old)`3M-1``11M-1``-M``-M``0``0``11M`


Tableau-1
`"Basis"``x_1``x_2``darr``S_1``S_2``A_1``A_2``RHS``"Ratio"=(RHS)/(x_2)`
`R_1` `Z``3M-1``11M-1``-M``-M``0``0``11M`
`R_2` `A_1``2``(4)``-1``0``1``0``4``(4)/(4)=1``->`
`R_3` `A_2``1``7``0``-1``0``1``7``(7)/(7)=1`


Most Positive `Z` is `11M-1`. So, the entering variable is `x_2`.

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

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

Entering `=x_2`, Departing `=A_1`, Key Element `=4`
`R_2`(new)`= R_2`(old) `-: 4`
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_2`(old) = `2``4``-1``0``1``0``4`
`R_2`(new)`= R_2`(old) `-: 4``0.5``1``-0.25``0``0.25``0``1`
`R_3`(new)`= R_3`(old) - `7 R_2`(new)
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_3`(old) = `1``7``0``-1``0``1``7`
`R_2`(new) = `0.5``1``-0.25``0``0.25``0``1`
`7 xx R_2`(new) = `3.5``7``-1.75``0``1.75``0``7`
`R_3`(new)`= R_3`(old) - `7 R_2`(new)`-2.5``0``1.75``-1``-1.75``1``0`
`R_1`(new)`= R_1`(old) - `(11M-1) R_2`(new)
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_1`(old) = `3M-1``11M-1``-M``-M``0``0``11M`
`R_2`(new) = `0.5``1``-0.25``0``0.25``0``1`
`(11M-1) xx R_2`(new) = `5.5M-0.5``11M-1``-2.75M+0.25``0``2.75M-0.25``0``11M-1`
`R_1`(new)`= R_1`(old) - `(11M-1) R_2`(new)`-2.5M-0.5``0``1.75M-0.25``-M``-2.75M+0.25``0``1`


Tableau-2
`"Basis"``x_1``x_2``S_1``darr``S_2``A_1``A_2``RHS``"Ratio"=(RHS)/(S_1)`
`R_1` `Z``-2.5M-0.5``0``1.75M-0.25``-M``-2.75M+0.25``0``1`
`R_2` `x_2``0.5``1``-0.25``0``0.25``0``1``(1)/(-0.25)` (ignore, denominator is -ve)
`R_3` `A_2``-2.5``0``(1.75)``-1``-1.75``1``0``(0)/(1.75)=0``->`


Most Positive `Z` is `1.75M-0.25`. So, the entering variable is `S_1`.

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

`:.` The pivot element is `1.75`.

Entering `=S_1`, Departing `=A_2`, Key Element `=1.75`
`R_3`(new)`= R_3`(old) `-: 1.75`
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_3`(old) = `-2.5``0``1.75``-1``-1.75``1``0`
`R_3`(new)`= R_3`(old) `-: 1.75``-1.4286``0``1``-0.5714``-1``0.5714``0`
`R_2`(new)`= R_2`(old) + `0.25 R_3`(new)
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_2`(old) = `0.5``1``-0.25``0``0.25``0``1`
`R_3`(new) = `-1.4286``0``1``-0.5714``-1``0.5714``0`
`0.25 xx R_3`(new) = `-0.3571``0``0.25``-0.1429``-0.25``0.1429``0`
`R_2`(new)`= R_2`(old) + `0.25 R_3`(new)`0.1429``1``0``-0.1429``0``0.1429``1`
`R_1`(new)`= R_1`(old) - `(1.75M-0.25) R_3`(new)
`x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_1`(old) = `-2.5M-0.5``0``1.75M-0.25``-M``-2.75M+0.25``0``1`
`R_3`(new) = `-1.4286``0``1``-0.5714``-1``0.5714``0`
`(1.75M-0.25) xx R_3`(new) = `-2.5M+0.3571``0``1.75M-0.25``-M+0.1429``-1.75M+0.25``M-0.1429``0`
`R_1`(new)`= R_1`(old) - `(1.75M-0.25) R_3`(new)`-0.8571``0``0``-0.1429``-M``-M+0.1429``1`


Tableau-3
`"Basis"``x_1``x_2``S_1``S_2``A_1``A_2``RHS`
`R_1` `Z``-0.8571``0``0``-0.1429``-M``-M+0.1429``1`
`R_2` `x_2``0.1429``1``0``-0.1429``0``0.1429``1`
`R_3` `S_1``-1.4286``0``1``-0.5714``-1``0.5714``0`


Since all `Z_j <= 0`

Hence, optimal solution is arrived with value of variables as :
`x_1=0,x_2=1`

Min `Z=1`




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



6. BigM method Algorithm (using `Z`-row method)
(Previous example)
8. Minimization example-2 (using `Z`-row method)
(Next example)





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

.