This action might not be possible to undo. Are you sure you want to continue?

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 diﬀerent (selection of

columns of matrix A to give a diﬀerent) 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 coeﬃcient 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 Schur’s 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 diﬀerent selection of columns of the augmented matrix to give

a diﬀerent 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 coeﬃcients 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

deﬁned 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 coeﬃcients that appeared in Theorem 2.6. Here z

j

is deﬁned 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 coeﬃcient. Usual choices are the ﬁrst negative y

0s

or the most negative y

0s

. If all

coeﬃcients 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 coeﬃcients of the objective function row to determine whether an optimal

solution has been reached, i.e., whether the optimality condition that all coeﬃcients are non-

negative in that row is satisﬁed.

2. If not, select a currently non-basic variable x

s

to enter the basis. For example, the ﬁrst negative

coeﬃcient 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 coeﬃcient

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 deﬁned 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

coeﬃcients. This veriﬁes 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 artiﬁcial variables x

a

1

, x

a

2

, · · · , x

a

m

to it to get a

starting identity matrix. The corresponding prices for the artiﬁcial variables are −M for maximiza-

tion problem, where M is suﬃciently large. The eﬀect of the constant M is to penalize any artiﬁcial

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 artiﬁcial 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 coeﬃcients 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 artiﬁcial 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 artiﬁcial 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 artiﬁcial 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 diﬃculty.

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 satisﬁes x

a

≥ 000. Notice that z

∗

≤ 0 and the possible maximum value

of z

∗

is zero. Moreover, z

∗

will be zero only if each artiﬁcial variable is zero. If the maximum of z

∗

is zero, we have driven all artiﬁcial variables to zero. If the maximum of z

∗

is not zero, then the

artiﬁcial 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 satisﬁed 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 coeﬃcients 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 satisﬁed 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 artiﬁcial variable appears in the basis, i.e. we have found a BFS to the

original problem.

(iii) max z

∗

= 0 and one or more artiﬁcial 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 artiﬁcial 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 artiﬁcial variables

which appear in the basis at zero level. We must make sure that the artiﬁcial 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 artiﬁcial variables y

1

≥ 0 and y

2

≥ 0 to give the artiﬁcial

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 coeﬃcients of the artiﬁcial 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 artiﬁcial

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.

(b) In pivot column. · · · . 3. We will see later that the feasibility condition implies that ars > 0.1.1) . b1 .e. and in the r-th equation. i. We denote by B the set of current basic variables. Since the columns of the augmented matrix [A . i. i. i = r. xs (3. Here xs is the vector of slack variables. Note that this corresponds to the origin of the n-dimensional subspace Rn of Rn+m . correspond to the slack variables {xn+i }m is an identity matrix which is clearly invertible. xr ∈ N and xs becomes basic. the original constraint Ax ≤ b has be augmented to [A I] x = Ax + Ixs = b. the ars in the tableau will be called the pivot element. We shall achieve this change of basis by a pivot operation (or simply called a pivot). simply. · · · . {xi }n will be denoted by N . This pivot operation is designed to maintain an identity matrix as the basis in the tableau at all time. b2 . We say that xr is to leave the basis and xs is to enter the basis.e. Graphically. i. i=1 i=1 The set of non-basic variables. Rule (a) above amounts to normalization of the pivot row such that the pivot element becomes 1. (c) For all other elements. a c b d∗ a− c d bc d s ais a∗ rs becomes i r j aij − arj ais /ars arj /ars s 0 1 aij arj becomes 0 1 Notice that this pivot operation is simply the Gaussian elimination such that variable xs is eliminated from all m + 1 but the r-th equation.e. Once we have decided to replace xr ∈ B by xs ∈ N . i. arj ← arj /ars for j = 1. we have j i r Or. The rules to update the tableau are: (a) In pivot row.2 Chapter 3. SIMPLEX METHOD BFS given by [0. · · · m.e. Rule (c) is to compute the Schur’s complement for the remaining entries in the tableau. · · · n + m. 0. In fact. ais ← 0 for i = 0. The r-th row and the s-th column of the tableau are called the pivot row and the pivot column respectively. 0. the coeﬃcient of xs is equal to 1. This of course amounts to a diﬀerent (selection of columns of matrix A to give a diﬀerent) basis B. I] that . ars ← 1. xs ∈ B.1 Pivot Operation with Respect to the Element ars .e. the slack i=1 variables {xn+i }m are basic. Rule (b) above amounts to eliminations of all the entries in the pivot column except the pivot element. aij ← aij − arj ∗ ais /ars . bm ]T . xr becomes non-basic. i=1 Consider now the process of replacing an xr ∈ B by an xs ∈ N . all structural variables xj are set to zero. . In matrix form. Consequently after this operation. B = {xn+i }m .

3. 0. Then after one pivot operation. In the tableaus. 0. 0. let us eliminate the last slack variable x6 by replacing it by x3 . 0. −7. 0. 0. 0. x5 and x6 in Tableau i. In the example above. Thus we see that one cannot choose the pivot arbitrarily. 0]T which is infeasible and degenerate. 0. −9. Consider =5 x1 + x2 − x3 + x4 2x1 − 3x2 + x3 + x5 =3 −x1 + 2x2 − x3 + x6 = 1 3 The initial tableau is given by Tableau 1: x1 x4 x5 x6 1∗ 2 −1 x2 1 −3 2 x3 −1 1 −1 x4 1 0 0 x5 0 1 0 x6 0 0 1 b 5 3 1 1 0 0 B1 0 1 0 0 0 1 The current basic solution is [0. Using the new (2. It has to be chosen according to some feasibility criterion. Tableau 4: x1 x1 x2 x3 1 0 0 x2 0 1 0 x3 0 0 1 x4 1 1 1 x5 −1 −2 −2 x6 −2 −3 −5 b 0 −4 −9 2 −1 1 B4 1 −3 2 −1 1 −1 The current basic solution is [0. There are three important observations that we should note here. 6]T which is infeasible.1. we have Tableau 2: x1 x1 x5 x6 1 0 0 x2 1 −5 3 ∗ x3 −1 3 −2 x4 1 −2 1 x5 0 1 0 x6 0 0 1 b 5 −7 6 B2 1 0 0 2 1 0 −1 0 1 We note that the current basic solution is [5. 1]T which is clearly feasible. 9/5]T and is feasible. 0. we have Tableau 3: x1 x1 x2 x6 1 0 0 x2 0 1 0 x3 2 −5 3 −5 x4 3 5 2 5 x5 1 5 x6 0 0 1 b 18 5 7 5 9 5 2 −1 1 B3 1 0 −1 5 3 5 −1 5 ∗ −1 5 −3 0 2 1 The current basic solution is [18/5. Suppose we choose a1. 2) entry as pivot. 3. the inverse of these matrices are computed . 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 x4 . Simplex Method for Problems in Feasible Canonical Form Example 3. 0.1. First the pivot operations which amounts to elementary row operations on the tableaus. −4. Finally. 7/5. 5.1 as our pivot element. are being recorded in the tableaus at the columns that correspond to the slack variables.

· · · .1). For example. A−1 ] . Then the leaving basic variable xr 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 coeﬃcients of the entering non-basic variable xs . 0. 3.e. will be given by Bi y0 = b. we consider the criteria that guarantee the feasibility and optimality of the solutions. y2 . In fact.e.2 Feasibility Condition. ym0 )T . A−1 b [I . the basic solution xi corresponding to Bi is given by B −1 xi = y0 = Bi b. we have . the solution obtained in each tableau is indeed the basic solution to our original augmented matrix system (3. Since the last column in Tableau 1 is given by b. the current solution in Tableau 4 is given by [A−1 b. In particular. is called the solution column. Tableau 3 is obtained by moving (via elementary row operations) the identity matrix in Tableau 1 to the ﬁrst. .e. Our second observation is the following one. 0 which is equivalent to A · (A−1 b) + I · 0 = b.4 Chapter 3. the last column in Tableau i. second and the sixth columns of Tableau 1. Comparing this with equation (2. . 0 9/5 1 0 9/5 i. · · · . i. Let the columns in Tableau 1 be denoted as usual by aj and the columns in Tableau i be denoted by yj . Suppose that the entering variable xs has been chosen according to some optimality conditions. i. 0.2) For this reason. In fact. . 9/5]T . second and the sixth columns in Tableau 3. i. Bi ] = Bi [y1 . 0. it is clear that Bi yj = aj . we see that Bi are the change of basis matrices from Tableau i to Tableau 1. the columns of B3 are the ﬁrst. which we denote by y0 = (y10 .1. ym+n ]. the current solution is given by [18/5. I] . In the following. we are just choosing diﬀerent selection of columns of the augmented matrix to give a diﬀerent basic matrix B. 0 ]T . then since . For Tableau 4. Since Bi is invertible. i. 7/5. am+n ] = [A . It indicates that in each iteration of the simplex method. · · · . Tableau 3 means that 18/5 7/5 18/5 5 . y0 gives the basic variables of the current basic solution.e. . B (3.e. I] = Bi [Bi A . a2 . The third observation is that the columns of Bi are the columns of the initial tableau. the pivot column is the s-th column. 0 = B3 7/5 = 3 = b. since B4 = A. −1 −1 [a1 . = A−1 b.20). [A . y0 . the last column of the tableau. SIMPLEX METHOD and are denoted by Bi .

we will show also that y00 = cT xB .6.e. . . We ﬁrst denote the entries in the row that correspond to x0 by y0j .7.24) is given by the solution column y0 here. Usual choices are the ﬁrst negative y0s or the most negative y0s . yms y y10 y20 . . Return to 1.e. Moreover.24) and the fact that the current basic solution xB deﬁned in (2. the ﬁrst negative coeﬃcient or the most negative one. .6. see (3.e. Perform a pivot operation with pivot row corresponding to xr and pivot column corresponding to xs . select xr where yr0 /yrs = min{yi0 /yis | yis > 0}.1. · · · . If not. Thus according to Theorem 2. Once the initial tableau has been constructed. . i. 3.4) i. . y00 is the current objective function value associated with the current BFS in the tableau. 3. 2. For example.3) the negation of the reduced cost coeﬃcients that appeared in Theorem 2. We will show in the next section that y0j = −(cj − zj )..3 Optimality Condition.2) above. The (m + 1. . ym0 Ratio y10 y1s y20 y2s 5 yr0 yrs = mini { yi0 | yis > 0} yis . . 3. whether the optimality condition that all coeﬃcients are nonnegative in that row is satisﬁed. Here zj is deﬁned in (2. . we consider a maximization problem.1. .25). 1. i 4. an optimal solution has been reached. n + m. j = 1. If all coeﬃcients y0j are non-negative. For simplicity. yis . Then determine the currently basic variable xr to leave the basis using the feasibility condition. i. select a currently non-basic variable xs to enter the basis. Testing of the coeﬃcients of the objective function row to determine whether an optimal solution has been reached. then by Theorem 2. . Simplex Method for Problems in Feasible Canonical Form To determine row r xs y1s y2s . yi0 yis ym0 yms This follows directly from equation (2.3. (3. yi0 .4 Summary of Computation Procedure. B (3.1. the entering variable xs ∈ N can be selected as a non-basic variable xs having a negative coeﬃcient. the simplex procedure calls for the successive iteration of the following steps. m + n + 1)-th entry in the tableau is denoted by y00 . . . .

0. 2. we have the following initial tableau. x1 x2 x3 x6 x0 5∗ −3 −5 −7 x2 1 0 0 0 x3 0 1 0 0 x4 3 −2 −4 −3 x5 −1 1 1 2 x6 0 0 1 0 b 1 1 3 4 Ratio 1 5 – – Tableau 4: Optimal tableau. 0. Thus x4 is the leaving variable. 0 x1 x1 x3 x6 x0 1 0 0 0 x2 1 5 3 5 x3 0 1 0 0 x4 3 5 x5 −1 5 2 5 x6 0 0 1 0 b 1 5 8 5 −1 5 −1 6 5 1 7 5 0 3 5 4 27 5 . 2. 1. x2 . 2]T and x0 = 2. x1 x2 x5 x6 x0 2 −3 −2 −1 x2 1 0 0 0 x3 1 1 ∗ x4 1 −2 −2 1 x5 0 1 0 0 x6 0 0 1 0 b 2 1 2 2 Ratio 2 1 1 1 =2 = 1∗ – −1 −2 Tableau 3: Current BFS is x = [0. SIMPLEX METHOD By adding slack variables x4 . 0. The smallest ratio is given by x4 row. x5 and x6 . x3 ≥0 Chapter 3. 0. 5. Consider the LP problem: Max x0 = 3x1 + x2 + 3x3 2x1 + x2 + x3 ≤ 2 x + 2x + 3x ≤ 5 1 2 3 Subject to 2x1 + 2x2 + x3 ≤ 6 x1 . Tableau 2: Current BFS is x = [0. 4]T . current BFS is x = [0. 3]T and x0 = 4. 0. 1. 0. optimal BFS x∗ = [1/5.6 Example 3. 6]T and x0 = 0. x1 x4 x5 x6 x0 2 1 2 −3 x2 1∗ 2 2 −2 x3 1 3 1 −3 x4 1 0 0 0 x5 0 1 0 0 x6 0 0 1 0 b 2 5 6 0 Ratio 2 1 5 2 6 2 = 2∗ = 2. 0. 1.5 =3 We choose x2 as the entering variable to illustrate that any nonbasic variable with negative coeﬃcient can be chosen as entering variable. 0. 0. 8/5. Tableau 1: Initial tableau. x∗ = 27/5.2.

x3 . where we assume that b ≥ 0 . x6 } → {x2 . There is no obvious initial starting basis B such that B = Im . Consider an LP in standard form: max subject to x0 = cT x Ax = b. We then have for the augmented system: . x6 } → {x1 . x5 . Its initial simplex tableau is then xN xB x0 B −1 N −(cT − zT ) N N xB I 0 b B −1 b cT B −1 b B . x6 } → {x2 .3. 3. N xN + BxB = b x0 − cT xN − cT xB = 0 N B Multiplying by B −1 to the ﬁrst equation yields.2. B]. Simplex Methods for Problems in Standard Form 7 We note that the extreme point sequence that the simplex method passes through are {x4 . For LP in feasible canonical form. and is an identity matrix. assume that we pick B as the last m (linearly independent) columns of A. the initial basic matrix is the matrix associated with the slack variables. x6 }. N B Thus we have B −1 N xN + xB = B −1 b x0 − (cT − cT B −1 N )xN N B Denoting zT = cT B −1 N (an (n − m) row vector) gives N B B −1 N xN + xB = B −1 b x0 − (cT − zT )xN N N = cT B −1 b B = cT B −1 b B xB = B −1 b − B −1 N xN . x5 . x3 . . A is of the form A = [N . For notational simplicity.2 Simplex Methods for Problems in Standard Form Our previous method is based upon the existence of an initial BFS to the problem. B −1 N xN + xB = B −1 b or Hence the x0 equation becomes x0 − cT xN − cT (B −1 b − B −1 N xN ) = 0. It is desirable to have an identity matrix as the initial basic matrix. which is called the general representation of an LP in standard form with respect to the basis B. i.e. x ≥ 0.

0 3 −1 2 3 2 1 2 −1 4 b = B −1 b = = 3 . max x0 = x1 + x2 2x1 + x2 ≥ 4 subject to x1 + 2x2 = 6 x1 . This veriﬁes equation (3. we see that the entries in the x0 row are given by −(cj − zj ) for xj ∈ N and zero for xj ∈ B. then 2 1 −1 1 B= . Suppose we let x1 and x2 to be our starting basic variables.3) that we have assumed earlier. we see that y00 = cT B −1 b = cT xB .8 We note that the j-th entry of zN is given by Chapter 3. (3. the current BFS is optimal when cj − zj ≤ 0 for all j.2). 8 6 3 −1 2 3 . x2 ≥ 0 Putting into standard form by adding the surplus variable x3 . We remark that x0 is now expressed in terms of the non-basic variables. 2 x3 = B −1 N = 1 2 −1 −1 −2 = 13 . 1 2 0 1 In this case B −1 = 1 2 3 −1 −1 .5) Hence it is easy to see that for maximization problem. by (3. Consider the following LP. the current BFS will be optimal when cj − zj ≥ 0 for all j. N= and cB = .3. Thus they are the negation of the reduced cost coeﬃcients. the augmented system is: 2 x1 + x2 − x3 = 4 x1 + 2x2 =6 x0 − x1 − x2 =0 The simplex tableau for the problem is: Tableau 0: x1 2 1 x0 −1 x2 1 2 −1 x3 −1 0 0 b 4 6 0 Here we do not have a starting identity matrix. Example 3. Thus in the table. B B which is the same as (3.4). For minimization problem.21). SIMPLEX METHOD cT B −1 N·j = cT B −1 aj = cT yj = zj B B B where zj is deﬁned as in (2. x0 = cT B −1 b + B xj ∈N (cj − zj )xj . Moreover.

8/3. However. 8]T with x∗ = 6. .3. Simplex Methods for Problems in Standard Form It is also easily check that z3 = cT B −1 aj = [−1. then we get Tableau 2 immediately and no iteration is required. if x2 and x3 are chosen as starting variables. 0 We note that if we choose x1 and x3 as our starting basis variables.2. 6 x1 x1 x2 x0 1 0 0 x2 0 1 0 x3 −2 3 1∗ 3 b 2 3 8 3 10 3 −1 3 Thus x = [2/3. 0. −1] 1 2 3 −1 −1 2 1 −1 = 0 3 9 and the current value of the objective function is given by cT B −1 b = [−1. We can now apply the simplex method as discussed in §1 to ﬁnd the optimal solution. 0]T is an initial BFS. then we have Tableau 1’: x1 x1 x3 x0 1 2 x2 1 0 0 x3 0 1 0 b 3 −1 3 −3 2 −1 2 Hence the starting basic solution is not feasible and we cannot use the simplex method to ﬁnd our optimal solution. −1] B Hence the starting tableau is: Tableau 1: 1 2 3 −1 −1 2 4 = 10/3. The next iteration gives: Tableau 2: x1 x1 x3 x0 1 0 0 x2 2 3 1 x3 0 1 0 b 6 8 6 Thus the optimal solution is x∗ = [6.

x ≥ 0. We may add suitable number of artiﬁcial variables xa1 . we have x1 x4 x5 x0 2 1 −1 x2 1 2 −1 x3 −1 0 0 x4 1 0 M x5 0 1 M b 4 6 0 max Notice that in the x0 row. We observe that x = 0 and xa = b is a feasible starting BFS. xam to it to get a starting identity matrix. xam )T and 1 is the vector of all ones. x2 ≥ 0 Introducing surplus variable x3 and artiﬁcial variables x4 and x5 yields. the reduced cost coeﬃcients that correspond to the basic variables x4 and x5 are not zero. where xa = (xa1 . Consider the LP in Example 3. we have the initial tableau: .3 The M -Method Example 3. After eliminations of those M . The corresponding prices for the artiﬁcial variables are −M for maximization problem. Consider again an LPP where there is no desirable starting identity matrix. Thus. The eﬀect of the constant M is to penalize any artiﬁcial variables that will occur with positive values in the ﬁnal optimal solutions. · · · .3 illustrates that the starting basic solution may sometimes be infeasible. These nonzero entries are to be eliminated ﬁrst before we have our starting tableau. xa2 . 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. Moreover. SIMPLEX METHOD 3. any solution to Ax + Im xa = b which is also a solution to Ax = b must have xa = 0 . where M is suﬃciently large.4. we have to drive xa = 0 if possible. Using the idea. · · · . where b ≥ 0 .10 Chapter 3. Example 3. max subject to x0 = cT x Ax = b. the LPP becomes max subject to z = cT x − M · 1 T xa Ax + Im xa = b x ≥ 0. x0 = x1 + x2 2x1 + x2 ≥ 4 x1 + 2x2 = 6 subject to x1 .3 again. 2 x1 + x2 − x3 + x4 =4 x1 + 2x2 + x5 = 6 x0 − x1 − x2 + M x4 + M x5 = 0 Now the columns corresponding to x4 and x5 form an identity matrix. xa2 . In tableau form.

we get the ﬁnal optimal tableau. and x = [2/3. The two-phase method is used to circumvent this diﬃculty. 0 3. The Two-Phase Method x1 x4 x5 x0 2 ∗ 11 x2 1 2 −(1 + 3M ) x3 −1 0 M x4 1 0 0 x5 0 1 0 b 4 6 −10M 1 −(1 + 3M ) We note that once an artiﬁcial variable becomes non-basic.4. x1 x1 x3 x0 1 0 0 x2 2 3 1 x3 0 1 0 b 6 8 6 Thus the optimal solution is x∗ = (6. . 0.4 The Two-Phase Method The M -method is sensitive to round-oﬀ error when being implemented on computers. Notice that this is the same as Tableau 1 in Example 3. 8)T with x∗ = 6. 0]T is an initial BFS. 8/3. it can be dropped from consideration in subsequent calculations. x1 x1 x5 x0 1 0 0 x2 1 2 3∗ 2 x3 −1 2 1 2 x5 0 1 0 b 2 4 2 − 4M − 1+3M 2 − 1+M 2 After we eliminate all the artiﬁcial variables we have x1 x1 x2 x0 1 0 0 x2 0 1 0 x3 −2 3 1∗ 3 b 2 3 8 3 10 3 −1 3 At this point all artiﬁcial variables are dropped from the problem.3.3. After one iteration. Phase I: (Search for a Starting BFS) Instead of considering the actual objective function in the M -Method n m z= i=1 ci xi − M i=1 xai .

In this case. . x0 = −2x1 + 4x2 + 7x3 + x4 + 5x5 −x1 + x2 + 2x3 + x4 + 2x5 = 7 −x + 2x + 3x + x + x = 6 1 2 3 4 5 subject to −x1 + x2 + x3 + 2x4 + x5 = 4 x1 free . In Phase I. Moreover.e. In fact. when the optimality condition is satisﬁed or z ∗ = 0. we are back to the situation discussed in §2. x3 . When Phase I ends in (iii). In Phase II. we go to Phase II to ﬁnd an optimal solution. we have driven all artiﬁcial variables to zero.5. the initial BFS satisﬁes xa ≥ 0 . i. it can be eliminated by solving for x1 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: min i=1 ci xi . x2 . i. then the artiﬁcial variables cannot be driven to zero and the original problem has no feasible solution. Phase II: (Conclude with an Optimal BFS) When Phase I ends in (ii) or (iii). we must give special attentions to the artiﬁcial variables which appear in the basis at zero level. the reduced cost coeﬃcients of both methods are given by M -method: Phase I: zj − cj = −M r yrj + β yrj zj − cj = − r where β is a small quantity compared with M . If the maximum of z ∗ is zero. Thus the objective function to be optimized in Phase II is the actual objective function z = n When Phase I ends in (ii). x4 .12 we maximize the function z∗ = − i=1 Chapter 3.1. Degenerate solutions are discussed in §4. Since x1 is free. z ∗ will be zero only if each artiﬁcial variable is zero. no feasible solution exists for our original problem.5. the sequence of vectors to enter and leave the basis is the same as the M -method except when the vectors are tied.e. we have also found a basic degenerate “feasible solution” to the original problem. x5 ≥ 0 . Consider the following LP. At the end of Phase I.6. Notice that z ∗ ≤ 0 and the possible maximum value of z ∗ is zero. (iii) max z ∗ = 0 and one or more artiﬁcial variables appear in the basis at zero level. SIMPLEX METHOD m x ai . Example 3. We need not continue until the optimality criterion is satisﬁed if z ∗ becomes zero before this happens. because we know that this is the maximum value of z ∗ . we have one of the following three possibilities: (i) max z ∗ < 0. in this case. Since b ≥ 0 . see §4. We will return to this case in §4. We must make sure that the artiﬁcial variables never become positive again in Phase II. and there should be no problem. During Phase I. (ii) max z ∗ = 0 and no artiﬁcial variable appears in the basis. we have found a BFS to the original problem. we assign the actual price cj to each structural variable and a price of zero to any artiﬁcial variables which still appear in the basis at zero level. If the maximum of z ∗ is not zero. we stop as soon as z ∗ becomes zero.

There is no obvious basic feasible solution. Transforming (by adding the ﬁrst two rows to the last row) the last row to give a tableau in canonical form. The Two-Phase Method x1 −1 ∗ 13 x2 1 2 1 −4 x3 2 3 1 −7 x4 1 1 2 −2 x5 2 1 1 −5 b 7 6 4 0 −1 −1 2 Initial tableau We select any non-zero element in the ﬁrst column as our pivot element – this will eliminate x1 from all other rows:x1 1 0 0 0 x2 −1 1 0 −2 x3 −2 1 −1 −3 x4 −1 0 1 1 x5 −2 −1 −1 −1 b −7 −1 −3 14 ← (∗) Equivalent Problem Saving the ﬁrst row (∗) for future reference only.4. we get x2 y1 y2 x0 −1 0 −1 x3 −1 1 0 x4 0 −1 −1 x5 1 1 2 y1 1 0 0 y2 0 1 0 b 1 3 4 First tableau for Phase I . we carry on only the sub-tableau with the ﬁrst row and the ﬁrst column deleted. we introduce artiﬁcial variables y1 ≥ 0 and y2 ≥ 0 to give the artiﬁcial problem:x2 −1 0 0 x3 −1 1 0 x4 0 −1 0 x5 1 1 0 y1 1 0 −1 y2 0 1 −1 b 1 3 0 1 cB = 1 Initial Tableau for Phase I The cost coeﬃcients of the artiﬁcial variables are +1 because we are dealing with a minimization problem.3. so we use the two-phase method: After making b ≥ 0 .

SIMPLEX METHOD which is in canonical form. y2 ):x2 x5 x1 x0 0 1 −2 x3 1 2 −3 x4 −1 −1 1 x5 1 0 −1 b 3 2 14 1 cB = 2 Initial problem for Phase II This is transform into x2 x5 x1 x0 0 1 0 x3 1 2∗ 2 x4 −1 −1 −2 x5 1 0 0 b 3 2 21 1 cB = 2 Initial tableau for Phase II Pivoting as shown gives x2 x5 x3 x0 −1 2 1 2 x3 0 1 0 x4 −1 2 −1 2 −1 x5 1 0 0 b 2 1 19 −1 Final tableau for Phase II . We carry out the pivot operations with the indicated pivot elements:x2 x5 y2 x0 −1 1∗ 1 x3 −1 2 2 x4 0 −1 −1 x5 1 0 0 y1 1 −1 −2 y2 0 1 0 b 1 2 2 Second tableau for Phase I x2 x5 x1 x0 0 1 0 x3 1 2 0 x4 −1 −1 0 x5 1 0 0 y1 0 −1 −1 y2 1 1 −1 b 3 2 0 Final tableau for Phase I At the end of Phase I. Recall that this is a minimization problem. we go back to the equivalent reduced problem (i. entering variable is chosen with positive entry (rather than negative) in the x0 -row.14 Chapter 3.e. discarding the artiﬁcial variables y1 .

1. Thus the ﬁnal solution is x∗ = [−1. x5 = 2 can be inserted in the expression (∗) for x1 giving x1 = −7 + 2(1) + 2(2) = −1 . 0. 0. 2]T with x∗ = 19.4. 0 15 .3. The Two-Phase Method The solution x3 = 1.

Sign up to vote on this title

UsefulNot useful- MTH 101 Term Paper by Mridul
- Chapter 4
- L10_Walsh & Hadamard Transforms
- Elementary Linear Algebra on Rank
- Blind Compressed Sensing-2011
- Matrices Copy
- simplex3
- The International Journal of Robotics Research-2014-Hesch-182-201
- coding
- Math416_SimilarMatrices
- Gram Index Read Me
- Ch6QM09
- Carell J. - Basic Concepts of Linear Algebra (2003)
- chap02sols
- 415 Exam3 Solution 2011
- LA-6-12
- MH1200_1213soln05
- PDF%2Fajassp.2014.396.405
- Compressed Sensing1
- Linear Algebra notes
- Basis for Radrommet
- Math1104 Sample Final With Solutions
- Lec26
- Kamdin
- Unique.solution Matriks
- hw03
- find_bases.pdf
- MAT 1341F Assignment 3
- HW04
- m
- simplex1