Find solution using Two-Phase method
MIN Z = 5x1 + 2x2 + 10x3
subject to
x1 - x3 <= 10
x2 + x3 >= 10
and x1,x2,x3 >= 0; Solution:Problem is | Min `Z` | `=` | `` | `5` | `x_1` | ` + ` | `2` | `x_2` | ` + ` | `10` | `x_3` |
|
| subject to |
| `` | `` | `x_1` | | | | ` - ` | `` | `x_3` | ≤ | `10` | | | | `` | `` | `x_2` | ` + ` | `` | `x_3` | ≥ | `10` |
|
| 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 slack variable `S_1`
2. As the constraint-2 is of type '`>=`' we should subtract surplus variable `S_2` and add artificial variable `A_1`
After introducing slack,surplus,artificial variables |
| subject to |
| `` | `` | `x_1` | | | | ` - ` | `` | `x_3` | ` + ` | `` | `S_1` | | | | | | | = | `10` | | | | `` | `` | `x_2` | ` + ` | `` | `x_3` | | | | ` - ` | `` | `S_2` | ` + ` | `` | `A_1` | = | `10` |
|
| and `x_1,x_2,x_3,S_1,S_2,A_1 >= 0` |
|
| `` | `` | `x_1` | | | | ` - ` | `` | `x_3` | ` + ` | `` | `S_1` | | | | | | | = | `10` | | | | `` | `` | `x_2` | ` + ` | `` | `x_3` | | | | ` - ` | `` | `S_2` | ` + ` | `` | `A_1` | = | `10` |
|
Simplex tableau is
Tableau-0
| `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` | |
| `R_1` `Z` | `0` | `0` | `0` | `0` | `0` | `-1` | `0` | |
| `R_2` `S_1` | `1` | `0` | `-1` | `1` | `0` | `0` | `10` | |
| `R_3` `A_1` | `0` | `1` | `1` | `0` | `-1` | `1` | `10` | |
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_3`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_1`(old) = | `0` | `0` | `0` | `0` | `0` | `-1` | `0` |
| `R_3`(old) = | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
| `R_1`(new)`= R_1`(old) + `R_3`(old) | `0` | `1` | `1` | `0` | `-1` | `0` | `10` |
Tableau-1
| `"Basis"` | `x_1` | `x_2``darr` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` | `"Ratio"=(RHS)/(x_2)` |
| `R_1` `Z` | `0` | `1` | `1` | `0` | `-1` | `0` | `10` | |
| `R_2` `S_1` | `1` | `0` | `-1` | `1` | `0` | `0` | `10` | `(10)/(0)` (ignore, denominator is 0) |
| `R_3` `A_1` | `0` | `(1)` | `1` | `0` | `-1` | `1` | `10` | `(10)/(1)=10``->` |
Most Positive `Z` is `1`. So,
the entering variable is `x_2`.
Minimum ratio is `10`. So,
the leaving basis variable is `A_1`.
`:.`
The pivot element is `1`.
Entering `=x_2`, Departing `=A_1`, Key Element `=1`
`R_3`(new)`= R_3`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_3`(old) = | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
| `R_3`(new)`= R_3`(old) | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
`R_2`(new)`= R_2`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_2`(old) = | `1` | `0` | `-1` | `1` | `0` | `0` | `10` |
| `R_2`(new)`= R_2`(old) | `1` | `0` | `-1` | `1` | `0` | `0` | `10` |
`R_1`(new)`= R_1`(old) - `R_3`(new)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_1`(old) = | `0` | `1` | `1` | `0` | `-1` | `0` | `10` |
| `R_3`(new) = | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
| `R_1`(new)`= R_1`(old) - `R_3`(new) | `0` | `0` | `0` | `0` | `0` | `-1` | `0` |
Tableau-2
| `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` | |
| `R_1` `Z` | `0` | `0` | `0` | `0` | `0` | `-1` | `0` | |
| `R_2` `S_1` | `1` | `0` | `-1` | `1` | `0` | `0` | `10` | |
| `R_3` `x_2` | `0` | `1` | `1` | `0` | `-1` | `1` | `10` | |
Since all `Z_j <= 0`
Hence, optimal solution is arrived with value of variables as :
`x_1=0,x_2=10,x_3=0`
Min `Z=0`
-->Phase-2<--
we eliminate the artificial variables and change the objective function for the original,
`Z - 5x_1 - 2x_2 - 10x_3=0`
Simplex tableau is
Tableau-0
| `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `RHS` | |
| `R_1` `Z` | `-5` | `-2` | `-10` | `0` | `0` | `0` | |
| `R_2` `S_1` | `1` | `0` | `-1` | `1` | `0` | `10` | |
| `R_3` `x_2` | `0` | `1` | `1` | `0` | `-1` | `10` | |
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) + `2 R_3`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `RHS` |
| `R_1`(old) = | `-5` | `-2` | `-10` | `0` | `0` | `0` |
| `R_3`(old) = | `0` | `1` | `1` | `0` | `-1` | `10` |
| `2 xx R_3`(new) = | `0` | `2` | `2` | `0` | `-2` | `20` |
| `R_1`(new)`= R_1`(old) + `2 R_3`(old) | `-5` | `0` | `-8` | `0` | `-2` | `20` |
Tableau-1
| `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `RHS` | |
| `R_1` `Z` | `-5` | `0` | `-8` | `0` | `-2` | `20` | |
| `R_2` `S_1` | `1` | `0` | `-1` | `1` | `0` | `10` | |
| `R_3` `x_2` | `0` | `1` | `1` | `0` | `-1` | `10` | |
Since all `Z_j <= 0`
Hence, optimal solution is arrived with value of variables as :
`x_1=0,x_2=10,x_3=0`
Min `Z=20`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then