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` |
| Tableau-1 | `C_j` | `0` | `0` | `0` | `0` | `0` | `1` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` | `"Ratio"=(RHS)/(x_2)` |
| `R_1` `0` | `S_1` | `1` | `0` | `-1` | `1` | `0` | `0` | `10` | `(10)/(0)` (ignore, denominator is 0) |
| `R_2` `1` | `A_1` | `0` | `(1)` | `1` | `0` | `-1` | `1` | `10` | `(10)/(1)=10``->` |
| | `Z_j` | `0` | `1` | `1` | `0` | `-1` | `1` | `Z=10` | |
| | `C_j-Z_j` | `0` | `-1``uarr` | `-1` | `0` | `1` | `0` | | |
Most Negative `C_j-Z_j` 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_2`(new)`= R_2`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_2`(old) = | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
| `R_2`(new)`= R_2`(old) | `0` | `1` | `1` | `0` | `-1` | `1` | `10` |
`R_1`(new)`= R_1`(old)
| `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` |
| `R_1`(old) = | `1` | `0` | `-1` | `1` | `0` | `0` | `10` |
| `R_1`(new)`= R_1`(old) | `1` | `0` | `-1` | `1` | `0` | `0` | `10` |
| Tableau-2 | `C_j` | `0` | `0` | `0` | `0` | `0` | `1` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `A_1` | `RHS` | `"Ratio"` |
| `R_1` `0` | `S_1` | `1` | `0` | `-1` | `1` | `0` | `0` | `10` | |
| `R_2` `0` | `x_2` | `0` | `1` | `1` | `0` | `-1` | `1` | `10` | |
| | `Z_j` | `0` | `0` | `0` | `0` | `0` | `0` | `Z=0` | |
| | `C_j-Z_j` | `0` | `0` | `0` | `0` | `0` | `1` | | |
Since all `C_j-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,
Min `Z=5x_1 + 2x_2 + 10x_3 + 0S_1 + 0S_2`
| Tableau-1 | `C_j` | `5` | `2` | `10` | `0` | `0` | | |
| `C_B` | `"Basis"` | `x_1` | `x_2` | `x_3` | `S_1` | `S_2` | `RHS` | `"Ratio"` |
| `R_1` `0` | `S_1` | `1` | `0` | `-1` | `1` | `0` | `10` | |
| `R_2` `2` | `x_2` | `0` | `1` | `1` | `0` | `-1` | `10` | |
| | `Z_j` | `0` | `2` | `2` | `0` | `-2` | `Z=20` | |
| | `C_j-Z_j` | `5` | `0` | `8` | `0` | `2` | | |
Since all `C_j-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