Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Simplex

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Chapter 3

SIMPLEX METHOD
In this chapter, we put the theory developed in the last to practice. We develop the simplex method
algorithm for LP problems given in feasible canonical form and standard form. We also discuss two
methods, the M-Method and the Two-Phase Method, that deal with the situation that we have an
infeasible starting basic solution.
3.1 Simplex Method for Problems in Feasible Canonical Form
The Simplex method is a method that proceeds from one BFS or extreme point of the feasible region
of an LP problem expressed in tableau form to another BFS, in such a way as to continually increase
(or decrease) the value of the objective function until optimality is reached. The simplex method
moves from one extreme point to one of its neighboring extreme point. Consider the following LP
in feasible canonical form, i.e. its right hand side vector b 000:
max x
0
= c
T
x
subject to

Ax b,
x 000.
Its initial tableau is
x
1
x
2
x
s
x
n
x
n+1
x
n+r
x
n+m
b
x
n+1
a
11
a
12
a
1s
a
1n
1 0 0 b
1
x
n+2
a
21
a
22
a
2s
a
2n
0 0 0 b
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
x
n+r
a
r1
a
r2
a
rs
a
rn
0 1 0 b
r
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
x
n+m
a
m1
a
m2
a
ms
a
mn
0 0 1 b
r
x
0
c
1
c
2
c
s
c
n
0 0 0 0
Here x
n+i
, i = 1 , m are the slack variables. The original variables x
i
, i = 1, , n are called the
structural or decision variables. Since all b
i
0, we can read o directly from the tableau a starting
1
2 Chapter 3. SIMPLEX METHOD
BFS given by [0, 0, , 0, b
1
, b
2
, , b
m
]
T
, i.e. all structural variables x
j
are set to zero. Note that
this corresponds to the origin of the n-dimensional subspace R
n
of R
n+m
.
In matrix form, the original constraint Ax b has be augmented to
[A I]

x
x
s

= Ax + Ix
s
= b. (3.1)
Here x
s
is the vector of slack variables. Since the columns of the augmented matrix [A
.
.
. I] that
correspond to the slack variables {x
n+i
}
m
i=1
is an identity matrix which is clearly invertible, the slack
variables {x
n+i
}
m
i=1
are basic. We denote by B the set of current basic variables, i.e. B = {x
n+i
}
m
i=1
.
The set of non-basic variables, i.e. {x
i
}
n
i=1
will be denoted by N.
Consider now the process of replacing an x
r
B by an x
s
N. We say that x
r
is to leave
the basis and x
s
is to enter the basis. Consequently after this operation, x
r
becomes non-basic,
i.e. x
r
N and x
s
becomes basic, i.e. x
s
B. This of course amounts to a dierent (selection of
columns of matrix A to give a dierent) basis B. We shall achieve this change of basis by a pivot
operation (or simply called a pivot). This pivot operation is designed to maintain an identity matrix
as the basis in the tableau at all time.
3.1.1 Pivot Operation with Respect to the Element a
rs
.
Once we have decided to replace x
r
B by x
s
N, the a
rs
in the tableau will be called the pivot
element. We will see later that the feasibility condition implies that a
rs
> 0. The r-th row and the
s-th column of the tableau are called the pivot row and the pivot column respectively. The rules to
update the tableau are:
(a) In pivot row, a
rj
a
rj
/a
rs
for j = 1, n + m.
(b) In pivot column, a
rs
1, a
is
0 for i = 0, m, i = r.
(c) For all other elements, a
ij
a
ij
a
rj
a
is
/a
rs
.
Graphically, we have
j s
i a
ij
a
is
r a
rj
a

rs
becomes
j s
i a
ij
a
rj
a
is
/a
rs
0
r a
rj
/a
rs
1
Or, simply,
a b
c d

becomes
a
bc
d
0
c
d
1
Notice that this pivot operation is simply the Gaussian elimination such that variable x
s
is eliminated
from all m+1 but the r-th equation, and in the r-th equation, the coecient of x
s
is equal to 1. In
fact, Rule (a) above amounts to normalization of the pivot row such that the pivot element becomes
1. Rule (b) above amounts to eliminations of all the entries in the pivot column except the pivot
element. Rule (c) is to compute the Schurs complement for the remaining entries in the tableau.
3.1. Simplex Method for Problems in Feasible Canonical Form 3
Example 3.1. Consider

x
1
+ x
2
x
3
+ x
4
= 5
2x
1
3x
2
+ x
3
+ x
5
= 3
x
1
+ 2x
2
x
3
+ x
6
= 1
The initial tableau is given by
Tableau 1:
x
1
x
2
x
3
x
4
x
5
x
6
b
x
4
1

1 1 1 0 0 5
x
5
2 3 1 0 1 0 3
x
6
1 2 1 0 0 1 1
B
1

1 0 0
0 1 0
0 0 1

The current basic solution is [0, 0, 0, 5, 3, 1]


T
which is clearly feasible. Suppose we choose a
1,1
as our
pivot element. Then after one pivot operation, we have
Tableau 2:
x
1
x
2
x
3
x
4
x
5
x
6
b
x
1
1 1 1 1 0 0 5
x
5
0 5

3 2 1 0 7
x
6
0 3 2 1 0 1 6
B
2

1 0 0
2 1 0
1 0 1

We note that the current basic solution is [5, 0, 0, 0, 7, 6]


T
which is infeasible. Using the new (2, 2)
entry as pivot, we have
Tableau 3:
x
1
x
2
x
3
x
4
x
5
x
6
b
x
1
1 0
2
5
3
5
1
5
0
18
5
x
2
0 1
3
5
2
5

1
5
0
7
5
x
6
0 0
1
5


1
5
3
5
1
9
5
B
3

1 1 0
2 3 0
1 2 1

The current basic solution is [18/5, 7/5, 0, 0, 0, 9/5]


T
and is feasible. Finally, let us eliminate the last
slack variable x
6
by replacing it by x
3
.
Tableau 4:
x
1
x
2
x
3
x
4
x
5
x
6
b
x
1
1 0 0 1 1 2 0
x
2
0 1 0 1 2 3 4
x
3
0 0 1 1 2 5 9
B
4

1 1 1
2 3 1
1 2 1

The current basic solution is [0, 4, 9, 0, 0, 0]


T
which is infeasible and degenerate. Thus we see that
one cannot choose the pivot arbitrarily. It has to be chosen according to some feasibility criterion.
There are three important observations that we should note here. First the pivot operations
which amounts to elementary row operations on the tableaus, are being recorded in the tableaus at
the columns that correspond to the slack variables. In the example above, one can easily check that
Tableau i is obtained from Tableau 1 by pre-multiplying Tableau 1 by the matrix formed by the
columns of x
4
, x
5
and x
6
in Tableau i. In the tableaus, the inverse of these matrices are computed
4 Chapter 3. SIMPLEX METHOD
and are denoted by B
i
. Let the columns in Tableau 1 be denoted as usual by a
j
and the columns in
Tableau i be denoted by y
j
, then since
[a
1
, a
2
, , a
m+n
] = [A
.
.
. I] = B
i
[B
1
i
A
.
.
. B
1
i
] = B
i
[y
1
, y
2
, , y
m+n
],
it is clear that B
i
y
j
= a
j
. Comparing this with equation (2.20), we see that B
i
are the change of
basis matrices from Tableau i to Tableau 1.
Our second observation is the following one. Since the last column in Tableau 1 is given by b,
the last column in Tableau i, which we denote by y
0
= (y
10
, , y
m0
)
T
, will be given by B
i
y
0
= b.
Since B
i
is invertible, y
0
gives the basic variables of the current basic solution, i.e. the basic solution
x
i
B
corresponding to B
i
is given by
x
i
B
= y
0
= B
1
i
b. (3.2)
For this reason, the last column of the tableau, i.e. y
0
, is called the solution column.
The third observation is that the columns of B
i
are the columns of the initial tableau. For
example, the columns of B
3
are the rst, second and the sixth columns of Tableau 1. In fact,
Tableau 3 is obtained by moving (via elementary row operations) the identity matrix in Tableau 1
to the rst, second and the sixth columns in Tableau 3. It indicates that in each iteration of the
simplex method, we are just choosing dierent selection of columns of the augmented matrix to give
a dierent basic matrix B. In particular, the solution obtained in each tableau is indeed the basic
solution to our original augmented matrix system (3.1). In fact, Tableau 3 means that
[A
.
.
. I]

18/5
7/5
0
0
0
9/5

= B
3

18/5
7/5
9/5

5
3
1

= b,
i.e. the current solution is given by [18/5, 7/5, 0, 0, 0, 9/5]
T
. For Tableau 4, since B
4
= A, we have
[I
.
.
. A
1
]

A
1
b
000

= A
1
b,
which is equivalent to
A (A
1
b) + I 000 = b,
i.e. the current solution in Tableau 4 is given by [A
1
b, 000]
T
.
In the following, we consider the criteria that guarantee the feasibility and optimality of the
solutions.
3.1.2 Feasibility Condition.
Suppose that the entering variable x
s
has been chosen according to some optimality conditions, i.e.
the pivot column is the s-th column. Then the leaving basic variable x
r
must be selected as the
basic variable corresponding to the smallest positive ratio of the values of the current right hand
side to the current positive constraint coecients of the entering non-basic variable x
s
.
3.1. Simplex Method for Problems in Feasible Canonical Form 5
To determine row r x
s
y Ratio
y
r0
y
rs
= min
i
{
y
i0
y
is
| y
is
> 0}
y
1s
y
10
y
10
y
1s
y
2s
y
20
y
20
y
2s
.
.
.
.
.
.
.
.
.
y
is
y
i0
y
i0
y
is
.
.
.
.
.
.
.
.
.
y
ms
y
m0
y
m0
y
ms
This follows directly from equation (2.24) and the fact that the current basic solution x
B
dened in
(2.24) is given by the solution column y
0
here, see (3.2) above.
3.1.3 Optimality Condition.
For simplicity, we consider a maximization problem. We rst denote the entries in the row that
correspond to x
0
by y
0j
. The (m + 1, m + n + 1)-th entry in the tableau is denoted by y
00
. We will
show in the next section that
y
0j
= (c
j
z
j
), j = 1, , n + m, (3.3)
the negation of the reduced cost coecients that appeared in Theorem 2.6. Here z
j
is dened in
(2.25). Moreover, we will show also that
y
00
= c
T
B
x
B
, (3.4)
i.e. y
00
is the current objective function value associated with the current BFS in the tableau. Thus
according to Theorem 2.6, the entering variable x
s
N can be selected as a non-basic variable x
s
having a negative coecient. Usual choices are the rst negative y
0s
or the most negative y
0s
. If all
coecients y
0j
are non-negative, then by Theorem 2.7, an optimal solution has been reached.
3.1.4 Summary of Computation Procedure.
Once the initial tableau has been constructed, the simplex procedure calls for the successive iteration
of the following steps.
1. Testing of the coecients of the objective function row to determine whether an optimal
solution has been reached, i.e., whether the optimality condition that all coecients are non-
negative in that row is satised.
2. If not, select a currently non-basic variable x
s
to enter the basis. For example, the rst negative
coecient or the most negative one.
3. Then determine the currently basic variable x
r
to leave the basis using the feasibility condition,
i.e. select x
r
where y
r0
/y
rs
= min
i
{y
i0
/y
is
| y
is
> 0}.
4. Perform a pivot operation with pivot row corresponding to x
r
and pivot column corresponding
to x
s
. Return to 1.
6 Chapter 3. SIMPLEX METHOD
Example 3.2. Consider the LP problem:
Max x
0
= 3x
1
+ x
2
+ 3x
3
Subject to

2x
1
+ x
2
+ x
3
2
x
1
+ 2x
2
+ 3x
3
5
2x
1
+ 2x
2
+ x
3
6
x
1
, x
2
, x
3
0
By adding slack variables x
4
, x
5
and x
6
, we have the following initial tableau.
Tableau 1: Initial tableau, current BFS is x = [0, 0, 0, 2, 5, 6]
T
and x
0
= 0.
x
1
x
2
x
3
x
4
x
5
x
6
b Ratio
x
4
2 1

1 1 0 0 2
2
1
= 2

x
5
1 2 3 0 1 0 5
5
2
= 2.5
x
6
2 2 1 0 0 1 6
6
2
= 3
x
0
3 2 3 0 0 0 0
We choose x
2
as the entering variable to illustrate that any nonbasic variable with negative coecient
can be chosen as entering variable. The smallest ratio is given by x
4
row. Thus x
4
is the leaving
variable.
Tableau 2: Current BFS is x = [0, 2, 0, 0, 1, 2]
T
and x
0
= 2.
x
1
x
2
x
3
x
4
x
5
x
6
b Ratio
x
2
2 1 1 1 0 0 2
2
1
= 2
x
5
3 0 1

2 1 0 1
1
1
= 1

x
6
2 0 1 2 0 1 2
x
0
1 0 2 1 0 0 2
Tableau 3: Current BFS is x = [0, 1, 1, 0, 0, 3]
T
and x
0
= 4.
x
1
x
2
x
3
x
4
x
5
x
6
b Ratio
x
2
5

1 0 3 1 0 1
1
5
x
3
3 0 1 2 1 0 1
x
6
5 0 0 4 1 1 3
x
0
7 0 0 3 2 0 4
Tableau 4: Optimal tableau, optimal BFS x

= [1/5, 0, 8/5, 0, 0, 4]
T
, x

0
= 27/5.
x
1
x
2
x
3
x
4
x
5
x
6
b
x
1
1
1
5
0
3
5

1
5
0
1
5
x
3
0
3
5
1
1
5
2
5
0
8
5
x
6
0 1 0 1 0 1 4
x
0
0
7
5
0
6
5
3
5
0
27
5
3.2. Simplex Methods for Problems in Standard Form 7
We note that the extreme point sequence that the simplex method passes through are {x
4
, x
5
, x
6
}
{x
2
, x
5
, x
6
} {x
2
, x
3
, x
6
} {x
1
, x
3
, x
6
}.
3.2 Simplex Methods for Problems in Standard Form
Our previous method is based upon the existence of an initial BFS to the problem. It is desirable
to have an identity matrix as the initial basic matrix. For LP in feasible canonical form, the initial
basic matrix is the matrix associated with the slack variables, and is an identity matrix. Consider
an LP in standard form:
max x
0
= c
T
x
subject to

Ax = b,
x 000.
where we assume that b 000. There is no obvious initial starting basis B such that B = I
m
. For
notational simplicity, assume that we pick B as the last m (linearly independent) columns of A, i.e.
A is of the form A = [N
.
.
. B]. We then have for the augmented system:

Nx
N
+ Bx
B
= b
x
0
c
T
N
x
N
c
T
B
x
B
= 000
Multiplying by B
1
to the rst equation yields,
B
1
Nx
N
+x
B
= B
1
b
or
x
B
= B
1
b B
1
Nx
N
.
Hence the x
0
equation becomes
x
0
c
T
N
x
N
c
T
B
(B
1
b B
1
Nx
N
) = 0.
Thus we have

B
1
Nx
N
+ x
B
= B
1
b
x
0
(c
T
N
c
T
B
B
1
N)x
N
= c
T
B
B
1
b
Denoting z
T
N
= c
T
B
B
1
N (an (n m) row vector) gives

B
1
Nx
N
+ x
B
= B
1
b
x
0
(c
T
N
z
T
N
)x
N
= c
T
B
B
1
b
which is called the general representation of an LP in standard form with respect to the basis B. Its
initial simplex tableau is then
x
N
x
B
b
x
B
B
1
N I B
1
b
x
0
(c
T
N
z
T
N
) 0 c
T
B
B
1
b
8 Chapter 3. SIMPLEX METHOD
We note that the j-th entry of z
N
is given by
c
T
B
B
1
N
j
= c
T
B
B
1
a
j
= c
T
B
y
j
= z
j
where z
j
is dened as in (2.21). Thus in the table, we see that the entries in the x
0
row are given
by (c
j
z
j
) for x
j
N and zero for x
j
B. Thus they are the negation of the reduced cost
coecients. This veries equation (3.3) that we have assumed earlier. Moreover, by (3.2), we see
that
y
00
= c
T
B
B
1
b = c
T
B
x
B
,
which is the same as (3.4).
We remark that x
0
is now expressed in terms of the non-basic variables,
x
0
= c
T
B
B
1
b +

x
j
N
(c
j
z
j
)x
j
. (3.5)
Hence it is easy to see that for maximization problem, the current BFS is optimal when c
j
z
j
0
for all j. For minimization problem, the current BFS will be optimal when c
j
z
j
0 for all j.
Example 3.3. Consider the following LP.
max x
0
= x
1
+ x
2
subject to
2x
1
+ x
2
4
x
1
+ 2x
2
= 6
x
1
, x
2
0
Putting into standard form by adding the surplus variable x
3
, the augmented system is:

2 x
1
+ x
2
x
3
= 4
x
1
+ 2x
2
= 6
x
0
x
1
x
2
= 0
The simplex tableau for the problem is:
Tableau 0:
x
1
x
2
x
3
b
2 1 1 4
1 2 0 6
x
0
1 1 0 0
Here we do not have a starting identity matrix. Suppose we let x
1
and x
2
to be our starting basic
variables, then
B =

2 1
1 2

, N =

1
0

and c
B
=

1
1

.
In this case
B
1
=
1
3

2 1
1 2

,
x
3
= B
1
N =
1
3

2 1
1 2

1
0

2
3
1
3

,
b = B
1
b =
1
3

2 1
1 2

4
6

2
3
8
3

.
3.2. Simplex Methods for Problems in Standard Form 9
It is also easily check that
z
3
= c
T
B
1
a
j
= [1, 1]
1
3

2 1
1 2

1
0

=
1
3
and the current value of the objective function is given by
c
T
B
B
1
b = [1, 1]
1
3

2 1
1 2

4
6

= 10/3.
Hence the starting tableau is:
Tableau 1:
x
1
x
2
x
3
b
x
1
1 0
2
3
2
3
x
2
0 1
1
3

8
3
x
0
0 0
1
3
10
3
Thus x = [2/3, 8/3, 0]
T
is an initial BFS. We can now apply the simplex method as discussed in 1
to nd the optimal solution. The next iteration gives:
Tableau 2:
x
1
x
2
x
3
b
x
1
1 2 0 6
x
3
0 3 1 8
x
0
0 1 0 6
Thus the optimal solution is x

= [6, 0, 8]
T
with x

0
= 6.
We note that if we choose x
1
and x
3
as our starting basis variables, then we get Tableau 2
immediately and no iteration is required. However, if x
2
and x
3
are chosen as starting variables,
then we have
Tableau 1:
x
1
x
2
x
3
b
x
1
1
2
1 0 3
x
3

3
2
0 1 1
x
0

1
2
0 0 3
Hence the starting basic solution is not feasible and we cannot use the simplex method to nd our
optimal solution.
10 Chapter 3. SIMPLEX METHOD
3.3 The M-Method
Example 3.3 illustrates that the starting basic solution may sometimes be infeasible. The M-
method and the Two-phase method discussed in this and the next sections are methods that can
nd a starting basic feasible solution whenever it exists. Consider again an LPP where there is no
desirable starting identity matrix.
max x
0
= c
T
x
subject to

Ax = b,
x 000.
where b 000. We may add suitable number of articial variables x
a
1
, x
a
2
, , x
a
m
to it to get a
starting identity matrix. The corresponding prices for the articial variables are M for maximiza-
tion problem, where M is suciently large. The eect of the constant M is to penalize any articial
variables that will occur with positive values in the nal optimal solutions. Using the idea, the LPP
becomes
max z = c
T
x M 111
T
x
a
subject to

Ax + I
m
x
a
= b
x 000,
where x
a
= (x
a
1
, x
a
2
, , x
a
m
)
T
and 111 is the vector of all ones. We observe that x = 000 and x
a
= b
is a feasible starting BFS. Moreover, any solution to Ax + I
m
x
a
= b which is also a solution to
Ax = b must have x
a
= 000. Thus, we have to drive x
a
= 0 if possible.
Example 3.4. Consider the LP in Example 3.3 again.
max x
0
= x
1
+ x
2
subject to

2x
1
+ x
2
4
x
1
+ 2x
2
= 6
x
1
, x
2
0
Introducing surplus variable x
3
and articial variables x
4
and x
5
yields,

2 x
1
+ x
2
x
3
+ x
4
= 4
x
1
+ 2x
2
+ x
5
= 6
x
0
x
1
x
2
+ Mx
4
+ Mx
5
= 0
Now the columns corresponding to x
4
and x
5
form an identity matrix. In tableau form, we have
x
1
x
2
x
3
x
4
x
5
b
x
4
2 1 1 1 0 4
x
5
1 2 0 0 1 6
x
0
1 1 0 M M 0
Notice that in the x
0
row, the reduced cost coecients that correspond to the basic variables x
4
and x
5
are not zero. These nonzero entries are to be eliminated rst before we have our starting
tableau. After eliminations of those M, we have the initial tableau:
3.4. The Two-Phase Method 11
x
1
x
2
x
3
x
4
x
5
b
x
4
2

1 1 1 0 4
x
5
1 2 0 0 1 6
x
0
(1 + 3M) (1 + 3M) M 0 0 10M
We note that once an articial variable becomes non-basic, it can be dropped from consideration in
subsequent calculations.
x
1
x
2
x
3
x
5
b
x
1
1
1
2

1
2
0 2
x
5
0
3
2

1
2
1 4
x
0
0
1+3M
2

1+M
2
0 2 4M
After we eliminate all the articial variables we have
x
1
x
2
x
3
b
x
1
1 0
2
3
2
3
x
2
0 1
1
3

8
3
x
0
0 0
1
3
10
3
At this point all articial variables are dropped from the problem, and x = [2/3, 8/3, 0]
T
is an initial
BFS. Notice that this is the same as Tableau 1 in Example 3.3. After one iteration, we get the nal
optimal tableau.
x
1
x
2
x
3
b
x
1
1 2 0 6
x
3
0 3 1 8
x
0
0 1 0 6
Thus the optimal solution is x

= (6, 0, 8)
T
with x

0
= 6.
3.4 The Two-Phase Method
The M-method is sensitive to round-o error when being implemented on computers. The two-phase
method is used to circumvent this diculty.
Phase I: (Search for a Starting BFS)
Instead of considering the actual objective function in the M-Method
z =
n

i=1
c
i
x
i
M
m

i=1
x
a
i
,
12 Chapter 3. SIMPLEX METHOD
we maximize the function
z

=
m

i=1
x
a
i
.
Since b 000, the initial BFS satises x
a
000. Notice that z

0 and the possible maximum value


of z

is zero. Moreover, z

will be zero only if each articial variable is zero. If the maximum of z

is zero, we have driven all articial variables to zero. If the maximum of z

is not zero, then the


articial variables cannot be driven to zero and the original problem has no feasible solution. In
Phase I, we stop as soon as z

becomes zero, because we know that this is the maximum value of


z

. We need not continue until the optimality criterion is satised if z

becomes zero before this


happens. During Phase I, the sequence of vectors to enter and leave the basis is the same as the
M-method except when the vectors are tied. In fact, the reduced cost coecients of both methods
are given by
M-method: z
j
c
j
= M

r
y
rj
+
Phase I: z
j
c
j
=

r
y
rj
where is a small quantity compared with M. At the end of Phase I, i.e. when the optimality
condition is satised or z

= 0, we have one of the following three possibilities:


(i) max z

< 0, in this case, no feasible solution exists for our original problem, see 4.1.
(ii) max z

= 0 and no articial variable appears in the basis, i.e. we have found a BFS to the
original problem.
(iii) max z

= 0 and one or more articial variables appear in the basis at zero level. In this case,
we have also found a basic degenerate feasible solution to the original problem. Degenerate
solutions are discussed in 4.5.
Phase II: (Conclude with an Optimal BFS)
When Phase I ends in (ii) or (iii), we go to Phase II to nd an optimal solution. In Phase II,
we assign the actual price c
j
to each structural variable and a price of zero to any articial variables
which still appear in the basis at zero level. Thus the objective function to be optimized in Phase
II is the actual objective function z =
n

i=1
c
i
x
i
.
When Phase I ends in (ii), we are back to the situation discussed in 2, and there should be
no problem. When Phase I ends in (iii), we must give special attentions to the articial variables
which appear in the basis at zero level. We must make sure that the articial variables never become
positive again in Phase II. We will return to this case in 4.6.
Example 3.5. Consider the following LP.
min x
0
= 2x
1
+ 4x
2
+ 7x
3
+ x
4
+ 5x
5
subject to

x
1
+ x
2
+ 2x
3
+ x
4
+ 2x
5
= 7
x
1
+ 2x
2
+ 3x
3
+ x
4
+ x
5
= 6
x
1
+ x
2
+ x
3
+ 2x
4
+ x
5
= 4
x
1
free , x
2
, x
3
, x
4
, x
5
0 .
Since x
1
is free, it can be eliminated by solving for x
1
in terms of the other variables from the rst
equation and substituting everywhere else. This can be done nicely using our pivot operation on
the following simplex tableau:
3.4. The Two-Phase Method 13
x
1
x
2
x
3
x
4
x
5
b
1

1 2 1 2 7
1 2 3 1 1 6
1 1 1 2 1 4
2 4 7 2 5 0
Initial tableau
We select any non-zero element in the rst column as our pivot element this will eliminate x
1
from
all other rows:-
x
1
x
2
x
3
x
4
x
5
b
1 1 2 1 2 7 ()
0 1 1 0 1 1
0 0 1 1 1 3
0 2 3 1 1 14
Equivalent Problem
Saving the rst row () for future reference only, we carry on only the sub-tableau with the rst row
and the rst column deleted. There is no obvious basic feasible solution, so we use the two-phase
method: After making b 000, we introduce articial variables y
1
0 and y
2
0 to give the articial
problem:-
x
2
x
3
x
4
x
5
y
1
y
2
b
1 1 0 1 1 0 1
0 1 1 1 0 1 3
0 0 0 0 1 1 0
c
B
=

1
1

Initial Tableau for Phase I


The cost coecients of the articial variables are +1 because we are dealing with a minimization
problem. Transforming (by adding the rst two rows to the last row) the last row to give a tableau
in canonical form, we get
x
2
x
3
x
4
x
5
y
1
y
2
b
y
1
1 1 0 1 1 0 1
y
2
0 1 1 1 0 1 3
x
0
1 0 1 2 0 0 4
First tableau for Phase I
14 Chapter 3. SIMPLEX METHOD
which is in canonical form. Recall that this is a minimization problem, entering variable is chosen
with positive entry (rather than negative) in the x
0
-row. We carry out the pivot operations with
the indicated pivot elements:-
x
2
x
3
x
4
x
5
y
1
y
2
b
x
5
1 1 0 1 1 0 1
y
2
1

2 1 0 1 1 2
x
0
1 2 1 0 2 0 2
Second tableau for Phase I
x
2
x
3
x
4
x
5
y
1
y
2
b
x
5
0 1 1 1 0 1 3
x
1
1 2 1 0 1 1 2
x
0
0 0 0 0 1 1 0
Final tableau for Phase I
At the end of Phase I, we go back to the equivalent reduced problem (i.e. discarding the articial
variables y
1
, y
2
):-
x
2
x
3
x
4
x
5
b
x
5
0 1 1 1 3
x
1
1 2 1 0 2
x
0
2 3 1 1 14
c
B
=

1
2

Initial problem for Phase II


This is transform into
x
2
x
3
x
4
x
5
b
x
5
0 1 1 1 3
x
1
1 2

1 0 2
x
0
0 2 2 0 21
c
B
=

1
2

Initial tableau for Phase II


Pivoting as shown gives
x
2
x
3
x
4
x
5
b
x
5

1
2
0
1
2
1 2
x
3
1
2
1
1
2
0 1
x
0
1 0 1 0 19
Final tableau for Phase II
3.4. The Two-Phase Method 15
The solution x
3
= 1, x
5
= 2 can be inserted in the expression () for x
1
giving
x
1
= 7 + 2(1) + 2(2) = 1 .
Thus the nal solution is x

= [1, 0, 1, 0, 2]
T
with x

0
= 19.

You might also like