Degeneracy example-2 (Tie - first Artificial variable removed)
During solving LP problem, a situation may arise in which there is a tie between, 2 or more basic variables for leaving the basis. (means minimum ratios are same).
It is called degeneracy and to resolve this we can select any of them arbitrarily.
But if artificial variable is present then it must be removed first.
Example
Find solution using Simplex method (BigM method)
MAX z = 750x1 + 900x2 - 450x3
subject to
x1 + 2x2 <= 70
2x1 + 3x2 - x3 <= 100
x1 >= 20
x2 >= 25
and x1,x2,x3 >= 0; Solution:Problem is | Max `z` | `=` | `` | `750` | `x_1` | ` + ` | `900` | `x_2` | ` - ` | `450` | `x_3` |
|
| subject to |
| `` | `` | `x_1` | ` + ` | `2` | `x_2` | | | | ≤ | `70` | | `` | `2` | `x_1` | ` + ` | `3` | `x_2` | ` - ` | `` | `x_3` | ≤ | `100` | | `` | `` | `x_1` | | | | | | | ≥ | `20` | | | | `` | `` | `x_2` | | | | ≥ | `25` |
|
| and `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 slack variable `S_1`
2. As the constraint-2 is of type '`<=`' we should add slack variable `S_2`
3. As the constraint-3 is of type '`>=`' we should subtract surplus variable `S_3` and add artificial variable `A_1`
4. As the constraint-4 is of type '`>=`' we should subtract surplus variable `S_4` and add artificial variable `A_2`
After introducing slack,surplus,artificial variables| Max `z` | `=` | `` | `750` | `x_1` | ` + ` | `900` | `x_2` | ` - ` | `450` | `x_3` | ` + ` | `0` | `S_1` | ` + ` | `0` | `S_2` | ` + ` | `0` | `S_3` | ` + ` | `0` | `S_4` | ` - ` | `M` | `A_1` | ` - ` | `M` | `A_2` |
|
| subject to |
| `` | `` | `x_1` | ` + ` | `2` | `x_2` | | | | ` + ` | `` | `S_1` | | | | | | | | | | | | | | | | = | `70` | | `` | `2` | `x_1` | ` + ` | `3` | `x_2` | ` - ` | `` | `x_3` | | | | ` + ` | `` | `S_2` | | | | | | | | | | | | | = | `100` | | `` | `` | `x_1` | | | | | | | | | | | | | ` - ` | `` | `S_3` | | | | ` + ` | `` | `A_1` | | | | = | `20` | | | | `` | `` | `x_2` | | | | | | | | | | | | | ` - ` | `` | `S_4` | | | | ` + ` | `` | `A_2` | = | `25` |
|
| and `x_1,x_2,x_3,S_1,S_2,S_3,S_4,A_1,A_2 >= 0` |
| Tableau-1 | `C_j` | `750` | `900` | `-450` | `0` | `0` | `0` | `0` | `-M` | `-M` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` | `"Ratio"=(RHS)/(x_2)` |
| `R_1` `0` | `S_1` | `1` | `2` | `0` | `1` | `0` | `0` | `0` | `0` | `0` | `70` | `(70)/(2)=35` |
| `R_2` `0` | `S_2` | `2` | `3` | `-1` | `0` | `1` | `0` | `0` | `0` | `0` | `100` | `(100)/(3)=33.3333` |
| `R_3` `-M` | `A_1` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` | `(20)/(0)` (ignore, denominator is 0) |
| `R_4` `-M` | `A_2` | `0` | `(1)` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` | `(25)/(1)=25``->` |
| | `Z_j` | `-M` | `-M` | `0` | `0` | `0` | `M` | `M` | `-M` | `-M` | `z=-45M` | |
| | `C_j-Z_j` | `M+750` | `M+900``uarr` | `-450` | `0` | `0` | `-M` | `-M` | `0` | `0` | | |
Most Positive `C_j-Z_j` is `M+900`. So,
the entering variable is `x_2`.
Minimum ratio is `25`. So,
the leaving basis variable is `A_2`.
`:.`
The pivot element is `1`.
Entering `=x_2`, Departing `=A_2`, Key Element `=1`
`R_4`(new)`= R_4`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_4`(old) = | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| `R_4`(new)`= R_4`(old) | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
`R_1`(new)`= R_1`(old) - `2 R_4`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_1`(old) = | `1` | `2` | `0` | `1` | `0` | `0` | `0` | `0` | `0` | `70` |
| `R_4`(new) = | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| `2 xx R_4`(new) = | `0` | `2` | `0` | `0` | `0` | `0` | `-2` | `0` | `2` | `50` |
| `R_1`(new)`= R_1`(old) - `2 R_4`(new) | `1` | `0` | `0` | `1` | `0` | `0` | `2` | `0` | `-2` | `20` |
`R_2`(new)`= R_2`(old) - `3 R_4`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_2`(old) = | `2` | `3` | `-1` | `0` | `1` | `0` | `0` | `0` | `0` | `100` |
| `R_4`(new) = | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| `3 xx R_4`(new) = | `0` | `3` | `0` | `0` | `0` | `0` | `-3` | `0` | `3` | `75` |
| `R_2`(new)`= R_2`(old) - `3 R_4`(new) | `2` | `0` | `-1` | `0` | `1` | `0` | `3` | `0` | `-3` | `25` |
`R_3`(new)`= R_3`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_3`(old) = | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` |
| `R_3`(new)`= R_3`(old) | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` |
| Tableau-2 | `C_j` | `750` | `900` | `-450` | `0` | `0` | `0` | `0` | `-M` | `-M` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` | `"Ratio"=(RHS)/(x_1)` |
| `R_1` `0` | `S_1` | `1` | `0` | `0` | `1` | `0` | `0` | `2` | `0` | `-2` | `20` | `(20)/(1)=20` |
| `R_2` `0` | `S_2` | `(2)` | `0` | `-1` | `0` | `1` | `0` | `3` | `0` | `-3` | `25` | `(25)/(2)=12.5``->` |
| `R_3` `-M` | `A_1` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` | `(20)/(1)=20` |
| `R_4` `900` | `x_2` | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` | `(25)/(0)` (ignore, denominator is 0) |
| | `Z_j` | `-M` | `900` | `0` | `0` | `0` | `M` | `-900` | `-M` | `900` | `z=-20M+22500` | |
| | `C_j-Z_j` | `M+750``uarr` | `0` | `-450` | `0` | `0` | `-M` | `900` | `0` | `-M-900` | | |
Most Positive `C_j-Z_j` is `M+750`. So,
the entering variable is `x_1`.
Minimum ratio is `12.5`. So,
the leaving basis variable is `S_2`.
`:.`
The pivot element is `2`.
Entering `=x_1`, Departing `=S_2`, Key Element `=2`
`R_2`(new)`= R_2`(old) `-: 2`
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_2`(old) = | `2` | `0` | `-1` | `0` | `1` | `0` | `3` | `0` | `-3` | `25` |
| `R_2`(new)`= R_2`(old) `-: 2` | `1` | `0` | `-0.5` | `0` | `0.5` | `0` | `1.5` | `0` | `-1.5` | `12.5` |
`R_1`(new)`= R_1`(old) - `R_2`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_1`(old) = | `1` | `0` | `0` | `1` | `0` | `0` | `2` | `0` | `-2` | `20` |
| `R_2`(new) = | `1` | `0` | `-0.5` | `0` | `0.5` | `0` | `1.5` | `0` | `-1.5` | `12.5` |
| `R_1`(new)`= R_1`(old) - `R_2`(new) | `0` | `0` | `0.5` | `1` | `-0.5` | `0` | `0.5` | `0` | `-0.5` | `7.5` |
`R_3`(new)`= R_3`(old) - `R_2`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_3`(old) = | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` |
| `R_2`(new) = | `1` | `0` | `-0.5` | `0` | `0.5` | `0` | `1.5` | `0` | `-1.5` | `12.5` |
| `R_3`(new)`= R_3`(old) - `R_2`(new) | `0` | `0` | `0.5` | `0` | `-0.5` | `-1` | `-1.5` | `1` | `1.5` | `7.5` |
`R_4`(new)`= R_4`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_4`(old) = | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| `R_4`(new)`= R_4`(old) | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| Tableau-3 | `C_j` | `750` | `900` | `-450` | `0` | `0` | `0` | `0` | `-M` | `-M` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` | `"Ratio"=(RHS)/(x_3)` |
| `R_1` `0` | `S_1` | `0` | `0` | `0.5` | `1` | `-0.5` | `0` | `0.5` | `0` | `-0.5` | `7.5` | `(7.5)/(0.5)=15` |
| `R_2` `750` | `x_1` | `1` | `0` | `-0.5` | `0` | `0.5` | `0` | `1.5` | `0` | `-1.5` | `12.5` | `(12.5)/(-0.5)` (ignore, denominator is -ve) |
| `R_3` `-M` | `A_1` | `0` | `0` | `(0.5)` | `0` | `-0.5` | `-1` | `-1.5` | `1` | `1.5` | `7.5` | `(7.5)/(0.5)=15``->` |
| `R_4` `900` | `x_2` | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` | `(25)/(0)` (ignore, denominator is 0) |
| | `Z_j` | `750` | `900` | `-0.5M-375` | `0` | `0.5M+375` | `M` | `1.5M+225` | `-M` | `-1.5M-225` | `z=-7.5M+31875` | |
| | `C_j-Z_j` | `0` | `0` | `0.5M-75``uarr` | `0` | `-0.5M-375` | `-M` | `-1.5M-225` | `0` | `0.5M+225` | | |
Most Positive `C_j-Z_j` is `0.5M-75`. So,
the entering variable is `x_3`.
Minimum ratio is `15`. So,
the leaving basis variable is `A_1`.
`:.`
The pivot element is `0.5`.
Entering `=x_3`, Departing `=A_1`, Key Element `=0.5`
`R_3`(new)`= R_3`(old) `-: 0.5`
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_3`(old) = | `0` | `0` | `0.5` | `0` | `-0.5` | `-1` | `-1.5` | `1` | `1.5` | `7.5` |
| `R_3`(new)`= R_3`(old) `-: 0.5` | `0` | `0` | `1` | `0` | `-1` | `-2` | `-3` | `2` | `3` | `15` |
`R_1`(new)`= R_1`(old) - `0.5 R_3`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_1`(old) = | `0` | `0` | `0.5` | `1` | `-0.5` | `0` | `0.5` | `0` | `-0.5` | `7.5` |
| `R_3`(new) = | `0` | `0` | `1` | `0` | `-1` | `-2` | `-3` | `2` | `3` | `15` |
| `0.5 xx R_3`(new) = | `0` | `0` | `0.5` | `0` | `-0.5` | `-1` | `-1.5` | `1` | `1.5` | `7.5` |
| `R_1`(new)`= R_1`(old) - `0.5 R_3`(new) | `0` | `0` | `0` | `1` | `0` | `1` | `2` | `-1` | `-2` | `0` |
`R_2`(new)`= R_2`(old) + `0.5 R_3`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_2`(old) = | `1` | `0` | `-0.5` | `0` | `0.5` | `0` | `1.5` | `0` | `-1.5` | `12.5` |
| `R_3`(new) = | `0` | `0` | `1` | `0` | `-1` | `-2` | `-3` | `2` | `3` | `15` |
| `0.5 xx R_3`(new) = | `0` | `0` | `0.5` | `0` | `-0.5` | `-1` | `-1.5` | `1` | `1.5` | `7.5` |
| `R_2`(new)`= R_2`(old) + `0.5 R_3`(new) | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` |
`R_4`(new)`= R_4`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` |
| `R_4`(old) = | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| `R_4`(new)`= R_4`(old) | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` |
| Tableau-4 | `C_j` | `750` | `900` | `-450` | `0` | `0` | `0` | `0` | `-M` | `-M` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `S_3` | `S_4` | `A_1` | `A_2` | `RHS` | `"Ratio"` |
| `R_1` `0` | `S_1` | `0` | `0` | `0` | `1` | `0` | `1` | `2` | `-1` | `-2` | `0` | |
| `R_2` `750` | `x_1` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `0` | `20` | |
| `R_3` `-450` | `x_3` | `0` | `0` | `1` | `0` | `-1` | `-2` | `-3` | `2` | `3` | `15` | |
| `R_4` `900` | `x_2` | `0` | `1` | `0` | `0` | `0` | `0` | `-1` | `0` | `1` | `25` | |
| | `Z_j` | `750` | `900` | `-450` | `0` | `450` | `150` | `450` | `-150` | `-450` | `z=30750` | |
| | `C_j-Z_j` | `0` | `0` | `0` | `0` | `-450` | `-150` | `-450` | `-M+150` | `-M+450` | | |
Since all `C_j-Z_j <= 0`
Hence, optimal solution is arrived with value of variables as :
`x_1=20,x_2=25,x_3=15`
Max `z=30750`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then