0% found this document useful (0 votes)
98 views9 pages

Two Phase Matrix Method

The two phase method is used when artificial variables are present in the initial solution to a linear programming problem. It involves decomposing the last row of the initial simplex tableau into two rows, one containing terms without the penalty cost M and one containing terms with M. The simplex method is then applied to each row separately to remove negative elements. When an artificial variable is removed from the basis, its column is deleted. The last row is deleted once it contains all zeros. Nonzero artificial variables remaining in the final basis indicate no solution exists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views9 pages

Two Phase Matrix Method

The two phase method is used when artificial variables are present in the initial solution to a linear programming problem. It involves decomposing the last row of the initial simplex tableau into two rows, one containing terms without the penalty cost M and one containing terms with M. The simplex method is then applied to each row separately to remove negative elements. When an artificial variable is removed from the basis, its column is deleted. The last row is deleted once it contains all zeros. Nonzero artificial variables remaining in the final basis indicate no solution exists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Two Phase Method (Matrix)

Whenever artificial variables are part of the initial solution, the last row (i.e. the (cj – zj) row) of the Initial
Simplex tableau will contain the penalty cost M. Then, the following modifications are incorporated into the Simplex
method; the resulting algorithm is the two-phase method.

Ex: (cj – zj) row of an initial tableau 1 is: [- 9 - 8M 0 - 9 – 8M 0 M 0 - 14 - 2M]

Change 1: The last row of Tableau 1 is decomposed into two rows, the first of which involves those terms not
containing M, while the second involves the coefficients of M in the remaining terms.

[ -9 0 -9 0 0 0 -14
-8 0 -9 0 1 0 -2 ]

Change 2: Step 1 of the simplex algorithm method is applied to the last row in change 1 (followed by steps 2, 3 and 4)
until this row contains no negative elements. Then step 1 is applied to those elements in the next-to-last row that are
positioned over zeros in the last row.

Change 3: Whenever an artificial variable ceases to be basic – i.e. is removed from the first column of the tableau as a
result of step 4 – it is deleted from the top row of the tableau, as is the entire column under it.
Change 4: The last row can be deleted from the tableau whenever it contains all zeros.

Change 5: If nonzero artificial variables are present in the final basic set, then the program has no solution. (In contrast,
zero-valued artificial variable may appear as basic variables in the final solution when one or more of the original
constraint equations is redundant).

Ex: Minimize, Z = 80 X1 + 60 X2
Subject to: 0.20 X1 + 0.32 X2 <= 0.25
X1 + X2 = 1
With: X1 and X2 non-negative.

Ans: Solution by Two-phase method. Adding a slack variable x3 and an artificial variable x4 to the first and second
constraints, respectively, we convert the LPP to standard matrix form as follows;

Minimize, Z = 80 X1 + 60 X2 + 0 X3 + M X4

Subject to: 0.20 X1 + 0.32 X2 + 1 X3 + 0 X4 = 0.25


1 X1 + 1 X2 + 0 X3 + 1 x4 = 1.00
And X1 and X2 non-negative.

For Minimization LPP


Simplex Tableau 1 (Identical with the big M Method up to this tableau)

xj x1 x2 x3 x4 B

cj 80 60 0 M i.e. Ratio

Co RHS

x3 0 0.20 0.32 1 0 0.25

x4 M 1 1 0 1 1

1
CoT A =
M M 0 M
zj CoT B =
-M
(cj – zj) 80 - M 60 - M 0 0

Simplex Tableau 2 (Initial Tableau for the Two Phase Method)

xj x1 x2 x3 x4

cj 80 60 0 M B Ratio

Co

x3 0 0.20 0.32 1 0 0.25 1.25

x4 M 1* 1 0 1 1 1.00

80 60 0 0 0
(cj – zj)
-1 -1 0 0 -1

1. Arbitrarily selecting the x1 column as the work column, we form the ratios. Since the element 1 starred in
Tableau 2, yields the smallest ratio, it becomes the pivot element. Then, applying steps 3 and 4 and change 3
to Tableau 2, we generate tableau 3. Important, for minimization problem, we have to maintain the B
element in the last row i.e. the row of (cj – zj) in negative values.
Simplex Tableau 3

xj x1 x2 x3 x4

cj 80 60 0 M B Ratio

Co

x3 0 0 0.12 1 -0.20 0.05

x1 80 1 1 0 1 1

0 -20 0 -80 -80


(cj – zj)
0 0 0 1 0

Observe that x1 replaces the artificial variable x4 in the first column of tableau 3, so that the entire x4 column is
absent in tableau 4 (Whenever an artificial variable ceases to be basic – i.e. is removed from the first column of
the tableau…….).

Simplex Tableau 4

xj x1 x2 x3 B Ratio

2
cj 80 60 0

Co

x3 0 0 0.12 1 0.05

x1 80 1 1 0 1

0 - 20 0 - 80
(cj – zj)
0 0 0 0

Now, with no artificial variables in the first column and with change 3 implemented, the last row of the tableau
should be all zeros. It is: and by change 4 this row may be deleted.

Simplex Tableau 5

xj x1 x2 x3

cj 80 60 0 B Ratio

Co

x3 0 0 0.12* 1 0.05 5/12

x1 80 1 1 0 1.00 1

(cj – zj) 0 -20 0 -80

Simplex Tableau 6

xj x1 x2 x3

cj 80 60 0 B Ratio

Co

x2 60 0 1 25/3 5/12

x1 80 1 0 -25/3 7/12

(cj – zj) 0 0 500/3 -860/12

Solution is x1* = 7/12; x2* = 5/12 and Z* = 860/12.

Ex: Minimize, Z = 1 X1 + 2 X2
Subject to: 1 X1 + 3 X2 >= 11
2 X1 + 1 X2 >= 9
With: X1 and X2 non-negative.

Ans: Solution by Two-phase method. The program is put into standard form by introducing surplus variables X3 and
X4 respectively, in the constraints inequalities, and then artificial variables X5 and X6 respectively, in the resulting
equations. We get the standard form as follows

3
Minimize, Z = 1 X1 + 2 X2 + 0 X3 + 0 X4 + M X5 + M X6
Subject to: 1 X1 + 3 X2 - 1 X3 + 0 X4 + 1 X5 + 0 X6 = 11
2 X1 + 1 X2 + 0 X3 - 1 X4 + 0 X5 + 1 X6 = 9
And X1, X2, X3, X4, X4, X5 and X6 are non-negative.
For Minimization LPP
Simplex Tableau 0 (Identical with the big M Method up to this tableau)

xj x1 x2 x3 x4 x5 x6 B

cj 1 3 0 0 M M i.e. Ratio

Co RHS

x5 M 1 3 -1 0 1 0 11

x6 M 2 1 0 -1 0 1 9

CoT A =
3M 4M -M -M M M
zj -CoT B
= -20M
(cj – zj) 1- 3M 2-4M M M 0 0

Simplex Tableau 1 (Initial Tableau for the Two Phase Method)

xj x1 x2 x3 x4 x5 x6

cj 1 3 0 0 M M B Ratio

Co

x5 M 1 3* -1 0 1 0 11 11/3

x6 M 2 1 0 -1 0 1 9 9

1 2 0 0 0 0 0
(cj – zj)
-3 -4 1 1 0 0 -20

1. The last row of Tableau 0 is decomposed into two rows, the first of which involves only those terms not
containing M, while the second one involves the coefficients of M in the remaining terms.
2. Then we consider only the last row of tableau 1 i.e. the second row of (cj – zj) involving only the
coefficients of M and select that variable as the next entering variable for which the negative element is
highest in this row.
3. Next, the variable to go is selected by usual procedure of lowest positive value of the ratio. Then we find the
pivot element.
4. Once the pivot element is found, then by usual row manipulation method, we transform the pivot element
into 1 and rest all other elements of the pivot column as zeros. This will include all elements of the pivot
column including the last row of the tableau1 i.e. the second row of (cj – zj).
5. Whenever an artificial variable ceases to be basic – i.e. is removed from the first column of the tableau as a
result of above operations, it is deleted from the top row of the tableau, as is the entire column under it.
6. Thus we form Tableau 2 as follows.
Simplex Tableau 2

xj x1 x2 x3 x4 x6 B Ratio

4
cj 1 2 0 0 M

Co

x2 2 1/3 1 -1/3 0 0 11/3 11

x6 M 5/3* 0 1/3 -1 0 16/3 16/5

1/3 0 2/3 0 0 -22/3


(cj – zj)
-5/3 0 -1/3 1 0 -16/3

2. Important, for minimization problem, we have to maintain the B element in the last row i.e. the row of (cj –
zj) in negative values.
3. We repeat the procedure and get tableau 3.
Simplex Tableau 3

xj x1 x2 x3 x4

cj 1 2 0 0 B Ratio

Co

x2 2 0 1 -2/5 1/5 13/5

x1 1 1 0 1/5 -3/5 16/5

0 0 3/5 1/5 -42/5


(cj – zj)
0 0 0 0 0 0

1. Important, for minimization problem, we have to maintain the elements in the last two rows i.e. the rows of
(cj – zj) in negative values.
2. The last row is deleted from the tableau whenever it contains all zeros. We get tableau 4.
Simplex Tableau 4

xj x1 x2 x3 x4

cj 1 2 0 0 B Ratio

Co

x2 2 0 1 -2/5 1/5 13/5

x1 1 1 0 1/5 -3/5 16/5

(cj – zj) 0 0 3/5 1/5 -42/5

Since in tableau 4, the (cj – zj) row does not contain any negative element, we have reached the optimality. The
optimum solution is :- X1* = 16/5; X2* = 13/5 and Z* = (-) (-42/5) = 42/5.

Ex: Maximize, Z = 5 X1 + 2 X2
Subject to: 6 X1 + 1 X2 >= 6

5
4 X1 + 3 X2 >= 12
1 X1 + 2 X2 >= 4
With: X1 and X2 non-negative.
Ans: Solution by Two-phase method. The program is put into standard form by introducing surplus variables X3, X4
and X5 respectively, in the constraints inequalities, and then artificial variables X6, X7 and X8 respectively, in the
resulting equations. We get the standard form as follows: -

Maximize, Z = 5 X1 + 2 X2 + 0 X3 + 0 X4 + 0 X5 - M X6 – M X7 – M X8
Subject to: 6 X1 + 1 X2 - 1 X3 + 0 X4 + 0 X5 + 1 X6 + 0 X7 + 0 X8 = 6
4 X1 + 3 X2 + 0 X3 - 1 X4 + 0 X5 + 0 X6 + 1 X7 + 0 X8 = 12
1 X1 + 2 X2 + 0 X3 + 0 X4 - 1 X5 + 0 X6 + 0 X7 + 1 X8 = 4
And X1, X2, X3, X4, X4, X5, X6, X7 and X8 are non-negative.
For Maximization LPP
Simplex Tableau 0 (Identical with the big M Method up to this tableau)

xj x1 x2 x3 x4 x5 x6 x7 x8 B

cj 5 2 0 0 0 -M -M -M i.e. Ratio

Co RHS

x6 -M 6 1 -1 0 0 1 0 0 6

x7 -M 4 3 0 -1 0 0 1 0 12

x8 -M 1 2 0 0 -1 0 0 1 4

CoT A =
-11M -6M M M M -M -M -M
zj CoT B =
-22M
(zj– cj) -5 -2 –
M M M 0 0 0
-11M 6M

Simplex Tableau 1 (Initial Tableau for the Two Phase Method)

xj x1 x2 x3 x4 x5 x6 x7 x8 B

cj 5 2 0 0 0 -M -M -M i.e. Ratio

Co RHS

x6 -M 6* 1 -1 0 0 1 0 0 6 1

x7 -M 4 3 0 -1 0 0 1 0 12 3

x8 -M 1 2 0 0 -1 0 0 1 4 4

-5 -2 0 0 0 0 0 0 0
(zj– cj)
-11 -6 1 1 1 0 0 0 -22

6
1. The last row of Tableau 0 is decomposed into two rows, the first of which involves only those terms not
containing M, while the second one involves the coefficients of M in the remaining terms.
2. Then we consider only the last row of tableau 1 i.e. the second row of (zj– cj) involving only the coefficients
of M and select that variable as the next entering variable for which the negative element is highest in this
row.
3. Next, the variable to go is selected by usual procedure of lowest positive value of the ratio. Then we find the
pivot element.
4. Once the pivot element is found, then by usual row manipulation method, we transform the pivot element
into 1 and rest all other elements of the pivot column as zeros. This will include all elements of the pivot
column including the last row of the tableau1 i.e. the second row of (zj– cj).
5. Whenever an artificial variable ceases to be basic – i.e. is removed from the first column of the tableau as a
result of above operations, it is deleted from the top row of the tableau, as is the entire column under it.
6. Thus we form Tableau 2 as follows.

Simplex Tableau 2

xj x1 x2 x3 x4 x5 x7 x8 B

cj 5 2 0 0 0 -M -M i.e. Ratio

Co RHS

x1 5 1 1/6 -1/6 0 0 0 0 1 6

x7 -M 0 5/3 2/3 -1 0 1 0 8 24/5

x8 -M 0 11/6* 1/6 0 -1 0 1 3 18/11

0 -7/6 -5/6 0 0 0 0 5
(zj– cj)
0 -25/6 -5/6 1 1 0 0 -11

Simplex Tableau 3

xj x1 x2 x3 x4 x5 x7 B

cj 5 2 0 0 0 -M i.e. Ratio

Co RHS

x1 5 1 0 -0.18 0 0.091 0 0.77 8.46

x7 -M 0 0 0454 -1 1.273 1 4.181 3.284

x2 2 0 1 0.091 0 -0.55 0 1.637 -

0 0 -0.73 0 -0.64 0 6.910


(zj– cj)
0 0 -0.46 1 -1.27 0 -4.180

7
Simplex Tableau 4

xj x1 x2 x3 x4 x5 B

cj 5 2 0 0 0 i.e. Ratio

Co RHS

x1 5 1 0 -0.21 0.71* 0 0.428 0.6

x5 0 0 1 0.36 -0.79 1 3.284 -

x2 2 0 1 0.29 -0.43 0 3.429 -

0 0 -0.50 -0.50 0 9
(zj– cj)
0 0 0.00 0 0 0

Simplex Tableau 5

xj x1 x2 x3 x4 x5 B

cj 5 2 0 0 0 i.e. Ratio

Co RHS

x4 0 14 0 -3 1 0 6

x5 0 11 0 -2 0 1 8

x2 2 6 1 -1 0 0 6

(zj– cj) 7 0 -2 0 0 12

Tableau 5 presents a problem that cannot be ignored; the work column is the x3 column and all the elements in
that column are negative. It means that the original program has no solution.

Graphical Solution:

8
9

You might also like