In: Math
use the two-phase method and big.M method to solve the LPP: min z=x1-2x2 st: x1+x2>=2 -x1+x2>=1 x2<=3 x1,x2>=0 (two method!)
Given primal problem is :
Min z = x1-2x2
St : x1+x2 2
-x1+x2 1
x2 3
x1,x2 0
TWO PHASE METHOD
After introducing x3,x4 as surplus variables and x5 as slack variable and x6, x7 as artificial variables, the constraint equations become,
x1+x2-x3+0x4+0x5+x6+0x7 = 2
-x1+x2+0x3-x4+0x5+0x6+x7 = 1
x2+0x3+0x4+x5+0x6+0x7 = 3
x1,x2,x3,x4,x5,x6,x7 0
The auxiliary objective function to be minimized is given by
z' = 0x1+0x2+0x3+0x4+0x5-x6-x7
Subject to the above system of equations.
Here x1,x2,x3,x4,x5 are the legitimatevariables and x6,x7 are the artificial variables.
We then construct the simplex tableaux successively and obtain
Phase I :
cj | 0 | 0 | 0 | 0 | 0 | -1 | -1 | |||
cB | B | xB | b | a1 | a2 | a3 | a4 | a5 | a6 | a7 |
-1 | a6 | x6 | 2 | 1 | 1 | -1 | 0 | 0 | 1 | 0 |
-1 | a7 | x7 | 1 | -1 | 1 | 0 | -1 | 0 | 0 | 1 |
0 | a5 | x5 | 3 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
0 | -2 | 1 | 1 | 0 | 0 | 0 | ||||
-1 | a6 | x6 | 1 | 2 | 0 | -1 | 1 | 0 | 1 | |
0 | a2 | x2 | 1 | -1 | 1 | 0 | -1 | 0 | 0 | |
0 | a5 | x5 | 2 | 1 | 0 | 0 | 1 | 1 | 0 | |
-2 | 0 | 1 | -1 | 0 | 0 | |||||
0 | a1 | x1 | 1/2 | 1 | 0 | -1/2 | 1/2 | 0 | ||
0 | a2 | x2 | 3/2 | 0 | 1 | -1/2 | -1/2 | 0 | ||
0 | a5 | x5 | 3/2 | 0 | -1 | 1/2 | 1/2 | 1 | ||
0 | 0 | 0 | 0 | 0 |
Here zj-cj 0 in this iteration and Min z' = 0. No artificial variable appears in the final tableau of phase I. We then pass on to the phase II where the objective function to be minimized is z = x1-2x2+0x3+0x4+0x5.
The last basis of phase I will be the starting basis for phase II and the last tableau of phase I will act as the initial tableau of phase II with a change only in the objective row containing the prices. cB column being changed accordingly, there will be a new index row showing zj-cj in the initial tableau of phase II. As there is no artificial vector in the basis of the last tableau of phase I, we forget about it and delete this column.
Phase II :
cj | 1 | -2 | 0 | 0 | 0 | |||
cB | B | xB | b | a1 | a2 | a3 | a4 | a5 |
1 | a1 | x1 | 1/2 | 1 | 0 | -1/2 | 1/2 | 0 |
-2 | a2 | x2 | 3/2 | 0 | 1 | -1/2 | -1/2 | 0 |
0 | a5 | x5 | 3/2 | 0 | -1 | 1/2 | 1/2 | 1 |
0 | 0 | 1/2 | 3/2 | 0 |
Here zj-cj 0, for all j. The optimality condition has been satisfied. The optimal solution is :
x1 = 1/2, x2 = 3/2 and zmin = (1/2)-2*(3/2) = -5/2.