You are on page 1of 22

WK  SOLUTION APPROACHES TO LP PROBLEMS

8 ▪ TWO-PHASE METHOD
B. TWO-PHASE METHOD

In the Big-M technique, the use of the penalty M,


which by definition must be large relative to the
actual objective coefficients of the model, can
result in round-off errors that may impair the
accuracy of the calculations.
The Two-Phase Method alleviates this difficulty by
eliminating the constant M altogether.
B. TWO-PHASE METHOD

Summary of the Two-Phase Method:

Phase I Put the problem in equation form, and add the


necessary artificial variables (exactly as in the Big-M
Technique) to secure a starting basic solution. Next,
find a basic solution of the resulting equations that,
regardless of whether the LP is maximization or
minimization, always minimizes the sum of the
artificial variables.
B. TWO-PHASE METHOD

Summary of the Two-Phase Method:

Phase I If the minimum value of the sum is positive, the LP


has no feasible solution, which ends the process
(recall that a positive artificial variable signifies that
an original constraint is not satisfied). Otherwise,
proceed to Phase II.
B. TWO-PHASE METHOD

Summary of the Two-Phase Method:

Phase II Use the feasible solution from Phase I as a starting


basic feasible solution for the original problem.
B. TWO-PHASE METHOD

PRIMAL FORM STANDARD FORM

Min Z = 2X1 + 3X2


ST: ST:
1/2X1 + 1/4X2 ≤ 4 1/2X1 + 1/4X2 + S1 = 4
X1 + 3X2 ≥ 20 X1 + 3X2 – S2 + R1 = 20
X1 + X2 = 10 X1 + X2 + R2 = 10
X1, X2 ≥ 0 X1, X2, S1, S2, R1, R2 ≥ 0
B. TWO-PHASE METHOD

Summary of the Two-Phase Method:

Phase I Put the problem in equation form, and add the


necessary artificial variables (exactly as in the Big-M
Technique) to secure a starting basic solution. Next,
find a basic solution of the resulting equations that,
regardless of whether the LP is maximization or
minimization, always minimizes the sum of the
artificial variables.
B. TWO-PHASE METHOD

PRIMAL FORM STANDARD FORM

Min Z = 2X1 + 3X2 Min R = R1 + R2


ST: ST:
1/2X1 + 1/4X2 ≤ 4 1/2X1 + 1/4X2 + S1 = 4
X1 + 3X2 ≥ 20 X1 + 3X2 – S2 + R1 = 20
X1 + X2 = 10 X1 + X2 + R2 = 10
X1, X2 ≥ 0 X1, X2, S1, S2, R1, R2 ≥ 0
B. TWO-PHASE METHOD

PRIMAL FORM STANDARD FORM


Min R = R1 + R2

Min Z = 2X1 + 3X2 R – R1 – R2 = 0


ST: ST:
1/2X1 + 1/4X2 ≤ 4 1/2X1 + 1/4X2 + S1 = 4
X1 + 3X2 ≥ 20 X1 + 3X2 – S2 + R1 = 20
X1 + X2 = 10 X1 + X2 + R2 = 10
X1, X2 ≥ 0 X1, X2, S1, S2, R1, R2 ≥ 0
B. TWO-PHASE METHOD

Initial Tableau:
PHASE I
Basic X1 X2 S1 S2 R1 R2 RHS
R – R1 – R2 = 0 R 0 0 0 0 -1 -1 0
ST: 1/2X1 + 1/4X2 + S1 = 4 S1 1/2 1/4 1 0 0 0 44
X1 + 3X2 – S2 + R1 = 20 R1 1 3 0 -1 1 0 20
X1 + X2 + R2 = 10 R2 1 1 0 0 0 1 10
X1, X2, S1, S2, R1, R2 ≥ 0
B. TWO-PHASE METHOD

Similar to Big-M Technique, a new initial tableau


must be constructed first before proceeding with
the usual iterations using Gauss-Jordan
computations.

𝑁𝑒𝑤 𝑅 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡


= 𝑜𝑙𝑑 𝑅 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 + ෍(𝑅𝑛 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 ∗ 1)
Initial Tableau:
Basic X1 X2 S1 S2 R1 R2 RHS
𝑁𝑒𝑤 𝑅 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
R 0 0 0 0 -1 -1 0 = 𝑜𝑙𝑑 𝑅 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
+ ෍(𝑅𝑛 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 ∗ 1)
S1 1/2 1/4 1 0 0 0 4
R1 1 3 0 -1 1 0 20
R2 1 1 0 0 0 1 10
0+[ 1∗1 + 1∗1 ]
New Initial Tableau:
0+[ 3∗1 + 1∗1 ]
Basic X1 X2 S1 S2 R1 R2 RHS
−1 + [ 1 ∗ 1 + 0 ∗ 1 ]
R 2 4 0 -1 0 0 30 0 + [ 20 ∗ 1 + 10 ∗ 1 ]

S1 1/2 1/4 1 0 0 0 4 −1 + [ 0 ∗ 1 + 1 ∗ 1 ]
0 + [ −1 ∗ 1 + 0 ∗ 1 ]
R1 1 3 0 -1 1 0 20 0+[ 0∗1 + 0∗1 ]

R2 1 1 0 0 0 1 10
B. TWO-PHASE METHOD

Entering Variable (EV) = most positive value from the z-row

Leaving Variable (LV) = Least positive ratio (RHS values /


corresponding values from the pivot
column). The entire row containing
the least positive ratio will be
regarded as the pivot row.
EV = most positive
value in the z-row
New Initial Tableau:

Basic X1 X2 S1 S2 R1 R2 RHS Ratio

R 2 4 0 -1 0 0 30 ~

4
S1 1/2 1/4 1 0 0 0 4 1/4
= 16

20
R1 1 3 0 -1 1 0 20 3
= 6.67

10
R2 1 1 0 0 0 1 10 1
= 10

LV = least positive
ratio
EV = most positive
value in the z-row
Iteration 1:

Basic X1 X2 S1 S2 R1 R2 RHS Ratio

R 2/3 0 0 1/3 - 4/3 0 10/3 ~

7/3
S1 5/12 0 1 1/12 -1/12 0 7/3 5/12
= 5.6

20/3
X2 1/3 1 0 -1/3 1/3 0 20/3 1/3
= 20

10/3
R2 2/3 0 0 1/3 -1/3 1 10/3 2/3
=5

LV = least positive
ratio
No positive values in Sum of artificial variables is not
the R-row positive.
Iteration 2:

Basic X1 X2 S1 S2 R1 R2 RHS

R 0 0 0 0 -1 -1 0

S1 0 0 1 -1/8 1/8 -5/8 1/4

X2 0 1 0 -1/2 1/2 -1/2 5

X1 1 0 0 1/2 -1/2 3/2 5

PHASE I ENDS!
B. TWO-PHASE METHOD

To proceed with Phase II, eliminate the columns


of the artificial variables in the last iteration and then
use the original objective function.
Iteration 2:
Basic X1 X2 S1 S2 R1 R2 RHS
R 0 0 0 0 -1 -1 0
S1 0 0 1 -1/8 1/8 -5/8 1/4
X2 0 1 0 -1/2 1/2 -1/2 5
X1 1 0 0 1/2 -1/2 3/2 5

Initial Tableau:
PHASE II
Basic X1 X2 S1 S2 RHS
Min Z = 2X1 + 3X2 Z -2 -3 0 0 0

Z – 2X1 – 3X2 = 0 S1 0 0 1 -1/8 1/4


X2 0 1 0 -1/2 5
X1 1 0 0 1/2 5
B. TWO-PHASE METHOD

For Phase II, another new initial tableau must be


constructed before proceeding with the usual
iterations using Gauss-Jordan computations.

𝑁𝑒𝑤 𝑍 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡


= 𝑜𝑙𝑑 𝑍 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 + 2 ∗ 𝑋1 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
+ (3 ∗ 𝑋2 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡)

Min Z = 2X1 + 3X2 Min Z = 2X1 + 3X2


Initial Tableau:
Basic X1 X2 S1 S2 RHS
𝑁𝑒𝑤 𝑍 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
Z -2 -3 0 0 0 = 𝑜𝑙𝑑 𝑍 𝑟𝑜𝑤 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
+ 2 ∗ 𝑋1 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
S1 0 0 1 -1/8 1/4 + (3 ∗ 𝑋2 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡)

X2 0 1 0 -1/2 5
X1 1 0 0 1/2 5
−2 + [ 2 ∗ 1 + 3 ∗ 0 ]
New Initial Tableau:
−3 + [ 2 ∗ 0 + 3 ∗ 1 ]
Basic X1 X2 S1 S2 RHS
0+[ 2∗5 + 3∗5 ]
Z 0 0 0 -1/2 25

S1 0 0 1 -1/8 1/4
0 + [ 2 ∗ 1/2 + 3 ∗ −1/2 ]
X2 0 1 0 -1/2 5 0+[ 2∗0 + 3∗0 ]

X1 1 0 0 1/2 5
B. TWO-PHASE METHOD
No positive values in
New Initial Tableau: the Z-row
Optimal Solution:
Basic X1 X2 S1 S2 RHS X1 = 5
Z 0 0 0 -1/2 25 X2 = 5
S1 = 1/4
S1 0 0 1 -1/8 1/4
S2 = 0
X2 0 1 0 -1/2 5 R1 = 0
X1 1 0 0 1/2 5 R2 = 0
Z = 25
PHASE II ENDS!
B. TWO-PHASE METHOD
CHECKING:
Optimal Solution: 1/2X1 + 1/4X2 + S1 = 4 X1 + 3X2 – S2 + R1 = 20
X1 = 5 1/2(5) + 1/4(5) + 1/4 = 4 5 + 3(5) – 0 + 0 = 20
X2 = 5 5/2 + 5/4 + 1/4 = 4 5 + 15 – 0 + 0 = 20
S1 = 1/4
4✓4 20 ✓ 20
S2 = 0
X1 + X2 + R2 = 10 Z – 2X1 – 3X2 – MR1 – MR2 = 0
R1 = 0
5 + 5 + 0 = 10 25 – 2(5) – 3(5) – 0 – 0 = 0
R2 = 0 10 + 0 = 10 25 – 10 – 15 = 0
Z = 25 10 ✓ 10 0✓0

You might also like