0% found this document useful (0 votes)
37 views10 pages

CO350 Linear Programming Chapter 7: The Two-Phase Method: 13th June 2005

The two-phase method solves a linear programming problem (P) in two phases: 1. In phase 1, it constructs and solves an auxiliary problem (A) by introducing artificial variables. If (A) is feasible, it provides a feasible basis for (P). 2. In phase 2, it solves the original problem (P) starting from the feasible basis found in phase 1. This guarantees finding an optimal solution to (P) if it is feasible. The example illustrates both phases of the two-phase method.

Uploaded by

Makida Amare
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)
37 views10 pages

CO350 Linear Programming Chapter 7: The Two-Phase Method: 13th June 2005

The two-phase method solves a linear programming problem (P) in two phases: 1. In phase 1, it constructs and solves an auxiliary problem (A) by introducing artificial variables. If (A) is feasible, it provides a feasible basis for (P). 2. In phase 2, it solves the original problem (P) starting from the feasible basis found in phase 1. This guarantees finding an optimal solution to (P) if it is feasible. The example illustrates both phases of the two-phase method.

Uploaded by

Makida Amare
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/ 10

CO350 Linear Programming

Chapter 7: The Two-Phase


Method

13th June 2005


Chapter 7: The Two-Phase Method 1

Recap
In the past week and a half, we learned the simplex method
and its relation with duality.

By now, you should know how to

• solve an LP problem given an initial feasible basis;

• give a proof of optimality/unboundedness from the


final tableau;

• compute/read a dual optimal solution from an optimal


tableau;

• relate dual optimal solution with shadow prices in the


case of nondegeneracy.
Chapter 7: The Two-Phase Method 2

Motivation
Consider the LP
max cT x
(P ) s.t. Ax = b
x ≥ 0
We have assumed that a feasible basis is always given.
But in practice, it is usually not easy to spot a feasible
basis.

Duality theory says: optimal solutions to (P ) and its dual


are solutions to Ax = b, x ≥ 0
AT y ≥ c
cT x − bT y = 0
So, finding feasible solution is as hard as solving LP.

Two-phase method: an algorithm that solves (P ) in two


phases, where
• in Phase 1, we solve an auxiliary LP problem to either
get a feasible basis or conclude that (P ) is infeasible.
• in Phase 2, we solve (P ) starting from the feasible
basis found in Phase 1.
Remark: from Phase 1, we see that finding feasible basis
is as easy as solving LP.
Chapter 7: The Two-Phase Method 3

The Two-Phase Method (§7.1)


Artificial variables and auxiliary problem
Consider the LP
max cT x
(P ) s.t. Ax = b
x ≥ 0

Assumption: b ≥ 0. (This is without loss of generality.)

Suppose we relax the equality constraints to inequalities,


and add slack variables u1 , u2 , . . . , um .
max cT x
s.t. Ax + u = b
x , u ≥ 0
The basis having u1 , u2 , . . . , um as basic variables is feasible;
it determines the bfs (x∗ , u∗ ) = (0, b).

These “slack” variables are called artificial variables.

This new LP problem is NOT equivalent to (P ).


BUT, if we can force all artificial variables to be zero, then
the resulting solution gives a feasible solution to (P ).
Chapter 7: The Two-Phase Method 4

X
So, we change the objective function!
m
max − ui
i=1
(A)
s.t. Ax + u = b
x , u ≥ 0

This is called an auxiliary problem.

Example
Given the LP problem

max (z =) −x1 − x3 + 2x4


s.t. x1 + 2x2 + x4 = 4
(P )
−x2 + x3 − x4 = −1
x1 , x2 , x3 , x4 ≥ 0

First we make sure the right hand side is nonnegative.

max (z =) −x1 − x3 + 2x4


s.t. x1 + 2x2 + x4 = 4
(P )
x 2 − x3 + x 4 = 1
x1 , x2 , x3 , x4 ≥ 0
Chapter 7: The Two-Phase Method 5

Adding artificial variables u1 , u2 gives the auxiliary problem

max (w =) − u1 − u2
s.t. x1 + 2x2 + x4 + u 1 = 4
(A)
x 2 − x3 + x4 + u2 = 1
x1 , x2 , x3 , x4 , u1 , u2 ≥ 0

Any feasible solution of (A) has objective value ≤ 0.


=⇒ (A) has optimal value ≤ 0.

[x∗1 , x∗2 , x∗3 , x∗4 ]T is feasible for (P ),


=⇒ [x∗1 , x∗2 , x∗3 , x∗4 , 0, 0]T is feasible for (A).
=⇒ [x∗1 , x∗2 , x∗3 , x∗4 , 0, 0]T is optimal for (A) with value 0.

[x∗1 , x∗2 , x∗3 , x∗4 , u∗1 , u∗2 ]T is optimal for (A) with value 0
=⇒ u∗1 = u∗2 = 0
=⇒ [x∗1 , x∗2 , x∗3 , x∗4 ]T is feasible for (P ).
So
(P ) has a feasible solution ⇐⇒ (A) has optimal value 0.
Chapter 7: The Two-Phase Method 6

In general, the auxiliary problem is never unbounded;


Its optimal value is ≤ 0.

Using the same argument as before, we can prove


Theorem 7.1 (Pg 91).
An LP problem (P ) has a feasible solution
⇐⇒ its auxiliary problem (A) has an optimal value 0.

The two-phase method constructs and solves the auxiliary


problem (A) in the first phase.

• if (A) has optimal value < 0, we conclude that (P ) is


infeasible.

• if (A) has optimal value = 0, we construct a feasible


basis for (P ) and solve it in the second phase.
Chapter 7: The Two-Phase Method 7

Example (cont’d)

max (z =) −x1 − x3 + 2x4


(P ) s.t. x1 + 2x2 + x4 = 4
x2 − x 3 + x4 = 1
x1 , x2 , x3 , x4 ≥ 0

max (w =) − x5 − x 6
(A) s.t. x1 + 2x2 + x4 + x5 = 4
x2 − x 3 + x4 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 ≥ 0
[We let x5 = u1 and x6 = u2 .]
We solve the auxiliary problem starting from the obvious
feasible basis B = {5, 6}.
The corresponding tableau is
w − x1 − 3x2 + x3 − 2x4 = −5
x1 + 2x2 + x 4 + x5 = 4
x2 − x 3 + x4 + x6 = 1
Note: the w-row is obtained by subtracting x5 -row and
x6 -row from w = −x5 − x6 .
Chapter 7: The Two-Phase Method 8

Example (cont’d)
c̄1 = 1 > 0, so x1 enters. t = min{4/1, −} = 4, so x5 leaves.
Pivot on (5, 1) gives the tableau
w − x2 + x 3 − x4 + x 5 = −1
x1 + 2x2 + x4 + x 5 = 4
x2 − x 3 + x4 + x6 = 1

c̄2 = 1 > 0, so x2 enters. t = min{4/2, 1/1} = 1, so x6 leaves.


Pivot on (6, 2) gives the tableau
w x5 + x6 = 0
x1 + 2x3 − x4 + x5 − 2x6 = 2
x2 − x3 + x4 + x6 = 1
This tableau is optimal, and B = {1, 2} is an optimal basis.

B = {1, 2} does not contain artificial variable


=⇒ B = {1, 2} is a feasible basis for (P ).
The tableau for (P ) corresponding to B = {1, 2} is
z − x3 − x4 = −2
x1 + 2x3 − x4 = 2
x2 − x3 + x 4 = 1
Note: the z-row is obtained by eliminating the basic vari-
ables x1 and x2 from z = −x1 − x3 + 2x4 .
Chapter 7: The Two-Phase Method 9

Example (cont’d)
c̄3 = 1 > 0, so x3 enters. t = min{2/2, −} = 1, so x1 leaves.
Pivot on (1, 3) gives the tableau
1 3
z + x
2 1
− x
2 4
= −1
1 1
x
2 1
+ x3 − x
2 4
= 1
1 1
x
2 1
+ x2 + x
2 4
= 2

c̄4 = 32 > 0, so x4 enters. t = min{−, 2/1} = 2, so x2 leaves.


Pivot on (2, 4) gives the tableau
z + 2x1 + 3x2 = 5
x1 + x2 + x 3 = 3
x1 + 2x2 + x4 = 4
This tableau is optimal. The corresponding optimal solu-
tion is x∗ = [0, 0, 3, 4]T with optimal value 5.

You might also like