LPnotes3 Foil
LPnotes3 Foil
Recall that
XB
B b
=
XN
0
is called a basic solution, with vector XB called the vector of basic
variables, and XN is called the vector of nonbasic variables. If in addition,
XB 0 then
1
B b
X=
0
is called a basic feasible solution.
X=
The canonical representation forms the foundation upon which the simplex
method is built. Letting J denote the index set of the nonbasic variables,
observe that this canonical representation can be rewritten as follows.
z
= cB B
jJ
XB
= B
(B1aj )xj
jJ
The central idea behind the simplex method is to move from an extreme
point to an improving adjacent extreme point by interchanging a column of
B and N.
z
= (zj cj ) = (cB B1aj cj ) 0 for allj J
xj
or equivalently, if
(zj cj ) = (cB B1aj cj ) 0 for allj J
Note that because (zj cj ) = 0 for all basic variables, then the optimality
conditions could also be stated simply as (zj cj ) 0, for all j = 1, . . . , n.
If (zj cj ) > 0, for all j J, then the current basic solution will be the
unique optimal solution because increasing any nonbasic variable results in a
strict decrease in the objective function. However, if some nonbasic variable
xk has (zk ck ) = 0 then increasing xk does not change the objective value,
and in the absence of degeneracy, entering xk will lead to an alternative
extreme point with the same objective value. When this occurs, we say that
there are alternative optimal solutions.
10
Consider
the vector of coefficients of the nonbasic variable xk in XB =
P
B1b jJ (B1aj )xj and let
k = B1ak
The elements of vector k can be interpreted in two different ways.
11
1,k
m
2,k X
=
j,k bj
ak = Bk = (b1, b2, . . . , bm)
.
.
j=1
m,k
Recall that ak can be written uniquely as a linear combination of the
columns of the basis matrix B. Thus, the above equation identifies that, in
fact, the elements of k specify how to write ak as a linear combination of
the columns of B. Therefore, ak may be exchanged with any column of bj
of B for which j,k 6= 0.
12
Second, note that the rate of change of the basic variables with respect
to the nonbasic variable xk is given by
XB
= B1ak = k
xk
That is, if the nonbasic variable xk is increased from its current value of zero
while holding all other nonbasic variables at zero, then the basic variables
will change according to the relationship
XB = B1b + xk (B1ak ) = B1b xk k
And because all variables must remain nonnegative, it follows that
XB = B1b xk k 0
Chapter 2: The Simplex Algorithm: Tableau and Computation
13
Now let
1
2
1
B b==
..
m
Then
1
1,k
2
2,k
. xk . 0
.
.
m
m,k
and an upper bound on xk can be found quite easily as
i
: i,k
xk minimum
i,k
>0
14
This process is termed the minimum ratio test and provides a very
simple method for determining the maximum value of the entering variable.
Essentially, we are finding the smallest value of the entering variable xk ,
which results in a basic variable assuming the value zero. The basic variable
that is forced to zero as a result of this increase in xk is called the departing
variable.
15
1
1,k
2
2,k
. xk . 0
.
.
m
m,k
xk can be increased without bound, that is, as xk is increased from
its current value of zero, no basic variable decreases in value. Thus, if
zk ck < 0 and k 0, then the objective function can be increased
indefinitely and no finite optimal solution exists. In fact, the objective
function can be increased indefinitely by moving along the ray defined by
1
B b
k
+ xk
0
ek
Chapter 2: The Simplex Algorithm: Tableau and Computation
16
where
ek =
0
0
..
1
..
0
and the 1 appears in the kth position. Note that the vertex of this ray is
the current basic feasible solution that is given by
XB
XN
=
k
ek
=
B ak
ek
17
18
x2
.
....
...
..
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
..
.........................................................................................................
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
.
....
...
.......
.
.
.
.
.
...
.
.....
.
.
.
.
.
...
.
.....
.
.
.
.
.
...
.
...
.......
...
.......
...
.......
.......
...
.......
.
.
.
.
.
...
.
.......
...
.......
.
.......
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
....
..
....
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
T (0, 10)
x5 = 0
x1 = 0
S(4, 10)
x4 = 0
R(8, 2)
x2 = 0
x3 = 0
P (0, 0)
Q(4, 0)
x1
19
1 0 0
B = (a3, a4, a5) = 0 1 0
0 0 1
x3
XB,1
XB = XB,2 = x4
x5
XB,3
20
= 2x1 + 3x2
x3 = 4 x1 + 2x2
x4 = 18 2x1 x2
x5 = 10 x2
21
= 0
14
x3
XB,1
XB = XB,2 = x4 = 18
10
x5
XB,3
x1
0
XN =
=
x2
0
1 0 0
B = (a3, a4, a5) = 0 1 0
0 0 1
22
23
2
x3
14
XB = x4 = x22 = 18 x2 1 0
1
10
x5
From this equation, x3/x2 = 2, and thus x3 increases 2 units for
each unit increase in x2. Therefore, x3 will always remain positive as
x2 increased. However, this is not true of x4 and x5 because x4/x2 =
1 and x5/x2 = 1. Notice from the above equation that x4 will
remain nonnegative as long as x2 18/1, and similarly, x5 will remain
nonnegative as long as x2 10/1. Thus, by the minimum ratio test, the
maximum value of x2 is equal to minimum {18, 10} = 10. Equation x5 =
10 x2 is called the blocking equation and x5 is called the blocking
variable, or departing variable. A new canonical representation is
now derived by solving for z and the new set of basic variables in terms
of the new set of nonbasic variables. This can be done by solving for
Chapter 2: The Simplex Algorithm: Tableau and Computation
24
25
= 30
24
x3
XB,1
XB = XB,2 = x4 = 8
10
x2
XB,3
x1
0
XN =
=
x5
0
1 0 2
B = (a3, a4, a2) = 0 1 1
0 0 1
Note that a2 has replaced a5 in the basis matrix B. Also observe, that
graphically, we have moved from extreme point P to extreme point T .
This solution is not yet optimal because (z1 c1) = 2 < 0. Thus,
x1 is chosen as the entering variable. As before, the basic variables can
Chapter 2: The Simplex Algorithm: Tableau and Computation
26
be written as
1
x3
24
XB = x4 = x11 = 8 x1 2 0
0
10
x2
27
XB
XN
=
=
XB,1
XB,2
XB,3
x4
x5
=
0
0
x3
x1
x2
20
= 4
10
1 1 2
B = (a3, a1, a2) = 0 2 1
0 0 1
Note again that the basis matrix has changed by one column.
The algebraic process just described is usually summarized in tabular
form. These tabular formats are referred to as the simplex tableau.
Chapter 2: The Simplex Algorithm: Tableau and Computation
28
Now, rearranging terms so that all variables are on the left-hand side of the
equation, with the constants on the right-hand side, we have
z + (cB B1N cN )XN
XB + B1NXN
= cB B1b
= B1b
29
The simplex tableau is simply a table used to store the coefficients of the
algebraic representation in the above equations. The top row of the tableau
consists of the coefficients in the objective function, and the body of the
tableau records of the coefficient of the constraint equations. The general
form is shown in the following table.
z
z
1
XB
0
XN
cB B1N cN
RHS
cB B1b
XB
B1NXN
B1b
30
xj
zj cj
j
xj
1
cB B aj cj
=
B1aj
31
the position in the updated tableau that was occupied by I in the original
tableau. For example, suppose the original identity I = (ai, aj , ak ). Then
B1 = B1I = B1(ai, aj , ak ) = (B1ai, B1aj , B1ak ) = i, j , k .
Thus, B1 can be found by a suitable rearrangement of a subset of the
j columns. This provides a method for conveniently identifying B1 for a
given tableau.
32
33
i
: i,k > 0
i,k
Row r is called the pivot row, r,k is called the pivot element, and the
basic variable, xB,r associated with row r is the departing variable. Go
to Step 5.
5. Pivot and establish a new tableau.
(a) The entering variable xk is the new basic variable in row r.
(b) Use elementary row operations on the old tableau so that the column
associated with xk in the new tableau consists of all zero except for a
1 at the pivot position r,k .
(c) Return to Step 1.
34
Example 2. The initial tableau for the problem of the previous example
is given below.
z
x3
x4
x5
z
1
0
0
0
x1
-2
1
2
0
x2
-3
-2
1
1
x3
0
1
0
0
x4
0
0
1
0
x5
0
0
0
1
RHS
0
4
18
10
Because there are negative zj cj , the tableau is not yet optimal. And
since no j 0 associated with a zj cj < 0, finite improvement in the
objective is possible. The entering variable is x2 and to determine the
departing variable, we examine the ratios i/i, 2 where i, 2 > 0. We add
another column to the initial tableau for this process.
Chapter 2: The Simplex Algorithm: Tableau and Computation
35
z
x3
x4
x5
z
1
0
0
0
x1
-2
1
2
0
x2
-3
-2
1
1
x3
0
1
0
0
x4
0
0
1
0
x5
0
0
0
1
RHS
0
4
18
10
Ratio
18
10
z
1
0
0
0
x1
-2
1
2
0
x2
0
0
0
1
x3
0
1
0
0
x4
0
0
1
0
x5
3
2
-1
1
RHS
30
24
8
10
Ratio
24
4
-
36
Recall from the previous section that B1 occupies that portion of the
tableau associated with the original identity. Note that I = (a3, a4, a5).
Thus, B1 = B1I = B1(a3, a4, a5) = (B1a3, B1a4, B1a5) =
(3, 4, 5). That is B1 is located beneath the slack variables x3, x4, x5.
For the tableau above, this corresponds to
B1
1 0 2
= 0 1 1
0 0 1
37
z
1
x1
0
x2
0
x3
0
x4
1
x5
2
RHS
38
5
2
20
x3
x1
1
2
x2
1
2
4
10
1
5
1 2 2
B1 = 0 12 12
0 0
1
The solution given in the last table is now optimal.
Chapter 2: The Simplex Algorithm: Tableau and Computation
38
In fact, because zj cj > 0 for the nonbasic variables x4 and x5, then
this tableau represents the unique optimal solution. Thus, the optimal
solution is
z = 38
x1 = 4
x2 = 10
x3 = 20
x4 = 0
x5 = 0
39
40
subject to
x1 + x2 + x3 = 4
x1 2x2 + x4 = 6
x1, x2, x3, x4 0
The following tables present the first two tableaux when applying the
simplex algorithm to the preprocessed algorithm.
Chapter 2: The Simplex Algorithm: Tableau and Computation
41
z
x3
x4
z
x3
x1
z
1
0
0
1
0
0
x1
-5
-1
1
0
0
1
x2
-3
1
-2
-13
-1
-2
x3
0
1
0
0
1
0
x4
0
0
1
5
1
1
RHS
0
4
6
30
10
6
Ratio
6
42
43
maximize z = 2x1 + x2
subject to
2x1 + x2 + x3 = 8
x1 + x2 + x 4 = 5
x1, x2, x3, x4 0
44
z
x3
x4
z
x1
x4
z
1
0
0
1
0
0
x1
-2
2
1
0
x2
-1
1
1
0
x3
0
1
0
1
x4
0
0
1
0
RHS
0
8
5
8
1
2
1
2
1
2
1
2
Ratio
4
5
45
z
x1
x2
z
1
1
0
x1
0
0
1
x2
0
1
-1
x3
1
-1
2
x4
0
0
1
RHS
8
3
2
Observe that we have moved from the optimal extreme point Q to the
optimal extreme point R in the following figure.
Chapter 2: The Simplex Algorithm: Tableau and Computation
46
x2
....
...
..
...
...
...
...
...
...
.
.......
.. ......
... .......
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
.....
...
.....
...
.....
...
.....
.....
...
....
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
..
.....................................................................................................................................................................................................................................................................................................................................................................
...
...
...
...
...
...
...
S(0, 5)
R(3, 2)
...
...
...
...
...
...
...
...
...
...
...
...
..
Alternative Optima
P (0, 0)
Q(4, 0) x1
47
48
1 1 0 0
A= 1 1 1 0
1 21 0 1
49
Observe that the matrix A does not contain the identity as submatrix.
We cannot use B = I as a convenient starting basis. Artificial-variable
techniques were developed to find a starting basis feasible solution in
this all-too-common situation when a nice starting basis is not available.
In the following section, we present one of the most common artificialvariable techniques, the two-phase method.
50
x1 x2 + x5 = 1
x1 + x2 + x3 = 9
1
x1 + x2 x4 + x6 = 4
2
x1, x2, x3, x4, x5, x6 0
Chapter 2: The Simplex Algorithm: Tableau and Computation
51
1 1 0 0 1 0
(a1, a2, a3, a4, a5, a6) = 1 1 1 0 0 0
1 12 0 1 0 1
Clearly, the identity submatrix is now available with I = (a5, a3, a6). Note
that it was not necessary to add an artificial variable to the second constraint
because x3 appears only in the second constraint with a coefficient of 1.
However, by adding these variables, we have changed the problem, and
in order to have a solution to the original problem, the artificial variables
must be zero. Thus, in phase I, an artificial objective function is used and
an attempt is made to drive all artificial variables to zero. This artificial
objective is to minimize the sum of the artificial variables. If all the artificial
variables cannot be driven to zero, then at least one constraint of the
original constraint is violated, and, consequently, the original problem is
infeasible.
Chapter 2: The Simplex Algorithm: Tableau and Computation
52
53
54
zero level are given a cj value of zero in phase II. Any artificial variables
that are not in the basis may be dropped from consideration by striking
out their entire associated column in the tableau.
5. The first tableau of phase II is the final tableau of phase I except for the
objective row. Update the objective row using the relationships
zj cj = cB B1aj cj = cB j cj
z = cB B1b = cB
6. If no artificial variables were in the basis at the end of phase I, we now
simply use the simplex algorithm and proceed as usual. If, however, there
are artificial variables in the basis, go to Step 7.
55
7. We must make sure that the artificial variables in the basis do not
ever become positive in phase II. This is accomplished by modifying the
departing variable rule of the simplex algorithm as follows:
(a) Determine the entering variable xk in the usual manner.
(b) Examine the entering variable column ak = B1ak . If the i,k values
for any of the artificial variables left in the basis are negative, then
choose an artificial variable with a negative i,k as the departing
variable. Otherwise, employ the usual departing variable rule.
56
57
z1 c1 = cB B1a1 c1
z2 c2 = cB B1a2 c2
z3 c3 = cB B1a3 c3
1
= (1 0 1) 1 0 = 2
1
1
1
= (1 0 1) 1 0 =
2
1
2
0
= (1 0 1) 1 0 = 0
0
58
z4 c4 = cB B1a4 c4 = (1 0 1)
z5 c5 = cB B1a5 c5 = (1 0 1)
z6 c6 = cB B1a6 c6 = (1 0 1)
Z = cB B1b = (1 0 1)
0
0 0=1
1
1
0 (1) = 0
0
0
0 (1) = 0
1
1
9 = 5
4
59
Z
1
0
0
0
1
0
0
0
1
0
0
0
x1
-2
1
1
1
0
1
0
0
0
1
0
0
x2
1
2
-1
1
1
2
23
-1
2
3
2
0
0
0
1
x3
0
0
1
0
0
0
1
0
0
0
1
0
x4
1
0
0
-1
1
0
0
-1
0
32
4
3
32
x5
0
1
0
0
2
1
-1
-1
1
x6
0
0
0
1
0
0
0
1
0
1
3
1
3
23
2
3
43
2
3
RHS
-5
1
9
4
-3
1
8
3
0
3
4
2
Ratio
1
9
4
4
2
60
z4 c4 = cB B1a4 c4 = (8 0 10)
32
4
3
23
0 = 12
3
z = cB B1b = (8 0 10) 4 = 44
2
61
z
x1
x3
x2
z
x1
x4
x2
z
1
0
0
0
1
0
0
0
x1
0
1
0
0
0
1
0
0
x2
0
0
0
1
0
0
0
1
x3
0
0
1
0
9
1
2
3
4
1
2
x4
-12
32
4
3
32
0
0
1
0
RHS
44
3
4
2
80
5
3
4
Ratio
62
63
64
maximize Z = x6 x7
subject to
2x1 + x2 x3 + x6 = 5
x2 x4 + x 7 = 1
2x1 + 3x2 + x5 = 6
x1, x2, x3, x4, x5, x6, x7 0
65
Phase I:
Z
x6
x7
x5
Z
x1
x7
x5
Z
x1
x7
x2
Z
1
0
0
0
1
0
0
0
1
0
0
0
x1
-2
2
0
2
0
1
0
0
0
1
0
0
x2
-2
1
1
3
-1
1
2
1
2
0
0
0
1
x3
1
-1
0
0
0
21
0
1
1
2
43
21
1
2
x4
1
0
-1
0
1
0
-1
0
1
0
-1
0
x5
0
0
0
1
0
0
0
1
x6
0
1
0
0
1
1
2
14
12
1
2
1
2
3
4
1
2
12
1
2
0
-1
x7
0
0
1
0
0
0
1
0
0
0
1
0
RHS
-6
5
1
6
-1
Ratio
5
2
5
1
1
1
12
5
2
1
2
9
4
1
2
1
2
66
67
x2
.
....
...
..
...
...
...
...
.
.
.
..
.
.
.... ...
.
.
.
.
.
...
....
........
...
...
...
...
...
...
...
..
...
... ....
... ...
... ..
... ...
... ..
.....
...
.
.........
... ...
... ....
... ....
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
.
.
.
.......
...
.
.
.
.
.
.
...
... .........
.
.
.
.
.
.
.
.
...
...... ..
...
...... .
...
........
...
...
...
.... ...........
...
......
...
...
......
...
...
......
...
......
...
......
...
...
......
...
......
...
...
......
.
...
.
.
......
...
......
....
....
....
......
..
...
..
...
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
......
...
....
......
...... .....
...
...... ..
...
...... ...
........
...
......
...
.........
... ........
...
... .......
...
......
...
...
......
...
...
..
.
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
......
...
....
......
...
......
...
...
......
...
......
...
...
......
...
......
...
......
...
...
.....
...
...
...
.......
.
...
......
.....
.
.
...
.
.
.
.
.
...
.
... ...........
...
......
...
...
...
...
....
..
...
...
...
...
...
...
...
...
...
...
...
...
...
...
x1
68
The table below is the first tableau, for a particular problem of phase
II. Variables x6 and x7 are artificial variables and are both in the basis
at zero values. Under normal simplex rules, variable x2 would enter the
basis and x4 would leave, resulting in both x6 and x7 going positive.
This would result in an infeasible solution.
Chapter 2: The Simplex Algorithm: Tableau and Computation
69
z
x1
x6
x4
x7
z
x1
x6
x2
x7
z
1
0
0
0
0
1
0
0
0
0
x1
0
1
0
0
0
0
1
0
0
0
x2
-3
-1
-2
3
-1
0
0
0
1
0
x3
3
3
1
-1
0
2
x4
0
0
0
1
0
1
x5
2
1
3
-1
2
1
8
3
1
3
31
31
1
3
2
3
1
3
1
3
2
3
7
3
13
5
3
x6
0
0
1
0
0
0
0
1
0
0
x7
0
0
0
0
1
0
0
0
0
1
RHS
6
3
0
9
0
15
6
6
3
3
Ratio
70
71
72
73
z1 c1 = cB B1a1 c1 = (M M )
1
z2 c2 = cB B
a2 c2
z3 c3 = cB B1a3 c3
z4 c4 = cB B1a4 c4
1
4
+ 3 = 5M + 3
1
= (M M )
+1=1
1
1
= (M M )
+ 4 = 2M + 4
1
1
= (M M )
0=M
0
74
0
0=M
1
1
+M =0
z6 c6 = cB B1a6 c6 = (M M )
0
0
z7 c7 = cB B1a7 c7 = (M M )
+M =0
1
12
1
z = cB B b = (M M )
= 18M
6
z5 c5 = cB B1a5 c5 = (M M )
z0
x6
x7
z0
1
0
0
x1
5M + 3
1
4
x2
1
1
-1
x3
2M + 4
1
1
x4
M
-1
0
x5
M
0
-1
x6
0
1
0
x7
0
0
1
RHS
18M
12
6
75
z0
x1
x2
x3
x4
x5
x6
x7
RHS
z0
11
5
1
5
2
5
M 57
M 25
106
5
x2
3
5
54
1
5
4
5
15
42
5
x1
2
5
51
15
51
1
5
18
5
Because all zj cj 0 and the artificial variables have value zero, then
the above table represents the optimal solution to the original problem.
Chapter 2: The Simplex Algorithm: Tableau and Computation
76
Thus,
z = z 0 = (
106
106
)=
5
5
18
5
42
=
5
= 0
x1 =
x2
x3
x4 = 0
x5 = 0
The use of M as the objective coefficient for artificial variables serves
its purpose, but at the cost of tedious hand calculations. It also presents
problems when using the computer. On the computer, M must be assigned
some numerical value that must be considerably larger than any of the other
Chapter 2: The Simplex Algorithm: Tableau and Computation
77
78
All of the material presented so far has stressed that all variables must
be restricted to nonnegative values when employing simplex algorithm. This
restriction is one that may easily be circumvented by simple substitutions.
For example, if xk is an unrestricted variable, we may simply let
x k = x+
x
k
k
where
xk +
x+
,
x
k
k 0
79
Wherever xk appears in the problem, we substitute x+
x
k
k . Because
a positive value. If x+
k is in the basis, then xk 0, whereas if xk is in the
basis, then xk 0.
In a similar way, we can also handle variables with negative lower bounds.
For example, suppose xl 5. Then we simply let
x0l = xl + 5 0
Whenever xl appears in the problem, we substitute x0l 5. Both of these
techniques are illustrated in the following example.
80
Variables
and
Variables
With
maximize z = 3x1 + x2
subject to
2x1 + 3x2 4
2x1 + x2 8
4x1 x2 16
x1
unrestricted
x2 4
+
Let x02 = x2 + 4 0. Also let x1 = x+
1 x1 , where x1 , x1 0.
Now transform the original problem by substituting x2 = x02 4 and
x1 = x+
x
1
1 . This results in
Chapter 2: The Simplex Algorithm: Tableau and Computation
81
0
0
maximize z = 3(x+
x
)
+
(x
4)
=
3x
+
3x
+
x
2
24
1
1
1
1
subject to
0
2(x+
x
)
+
3(x
2 4) 4
1
1
0
2(x+
x
)
+
(x
2 4) 8
1
1
0
4(x+
1 x1 ) (x2 4) 16
0
x+
,
x
1
1 , x2 0
82
0
maximize z 0 = 3x+
+
3x
+
x
2
1
1
subject to
0
2x+
1 + 2x1 + 3x2 + x3 = 16
0
2x+
2x
1
1 + x2 + x4 = 12
0
4x+
4x
x
2 + x5 = 12
1
1
0
x+
1 , x1 , x2 , x3 , x4 , x5 0
z0
1
0
0
0
x+
1
3
-2
2
4
x
1
-3
2
-2
-4
x02
-1
3
1
-1
x3
0
1
0
0
x4
0
0
1
0
x5
0
0
0
1
RHS
0
16
12
12
83
After using the simplex algorithm, the final tableau is obtained. This is
shown below.
z0
x
1
x4
x5
z0
1
0
0
0
x+
1
0
-1
0
0
x
1
0
1
0
0
x02
x3
7
2
3
2
3
2
1
2
4
5
1
2
x4
0
0
1
0
x5
0
0
0
1
RHS
24
8
28
44
84
x1 = x+
x
1
1 = 0 8 = 8
x2 = x02 4 = 0 4 = 4
x3 = 0
x4 = 28
x5 = 44
85
86
Preprocessing, we have
87
subject to
2x1 + x2 + x3 = 8
x1 + x 2 + x4 = 5
x1 x 2 + x5 = 4
x 1 + x6 = 4
x1, x2, x3, x4, x5, x6 0
88
x2
....
...
..
...
...
...
...
...
...
...
.........
.
.
.
...
.
... ........
.
.
.
.
...... ....
.....
...... ..
.......
.
...............
.........
... ........
....... .....
......
...
.......
...
......
.......
...
...
......
...
......
...
...
......
...
......
...
...
......
...
......
...
...
......
...
...
......
...
......
...
...
......
...
...
......
...
...
......
...
......
...
...
......
...
......
...
...
......
...
......
...
...
......
...
...
......
...
...
......
...
......
...
..
......
...
...... ....
...... ...
...
...... ...
...
........
...
.........
......
...
.........
...
... .......
...
... ......
... .......
...
......
...
...
...
...
...
... .........
.......
...
........
.......
.... ..............
...
...
...
...
.....
...
...
.....
..
...
.
...
.....
.
.
.
.
.
...
.
...
....
...
...
...
.....
... ...
...
.....
... ...
.....
...
... ..
.....
.
.
.
...
.
.
... .. .....
...
... .. .....
.... .....
..
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
.. ..
.
...
.
... .... ....
.
.
.
...
.
.
..... ... ....
...
....
.... .....
...
.....
...
.....
...
...
.....
...
.
.
.
.
.
.
...
...
.....
....
...
...
.....
.
.
.
......
.
...
.
.
...
.
...... .......
.
...
.
...
.........
.
....
...
......
... ..............
...
... ...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
..
..............
...
...
...
...
...
...
...
...
...
...
.
S(0, 5)
x4 = 0
x1 = 0
R(3, 2)
x3 = 0
P (0, 0)
x2 = 0
x5 = 0
Q(4, 0)
x1
x6 = 0
89
90
z
x3
x4
x5
x6
z
x3
x4
x1
x6
z
x3
x4
x1
x2
z
x5
x4
x1
x2
z
x5
x6
x1
x2
z
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
x1
-3
2
1
1
1
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
x2
-2
1
1
-1
0
-5
3
2
-1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
x3
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
2
1
-1
0
1
1
-2
-1
0
-1
x4
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
1
3
1
-1
2
x5
0
0
0
1
0
3
-2
-1
1
-1
-2
1
1
0
-1
0
1
0
0
0
0
1
0
0
0
x6
0
0
0
0
1
0
0
0
0
1
5
-3
-2
1
1
-1
-3
1
1
-2
0
0
1
0
0
RHS
0
8
5
4
4
12
0
1
4
0
12
0
1
4
0
12
0
1
4
0
13
3
1
3
2
Ratio
4
5
4
4
0
1
2
0
0
1
1
4
91
Note that in the initial tableau, x1 chosen as the entering variable, and
the minimum ratio test results in a three-way tie. That is, each of x3, x5
or x6 could be chosen as the departing variable. This should be the signal
that the next basic feasible solution will be degenerate. Choosing x5 as
the departing variable results in a degenerate solution which represents
extreme point Q. Note that as expected, the basic variables x3 and x6
are equal to zero. After the first iteration, x2 is chosen as the entering
variable. This results in a minimum ratio of zero with either x3 or x6 as
the departing variable. Choosing x6 as the departing variable results to
the next tableau. Note that although the basis has changed, the values
of all the variables are the same, and this new solution is also a basic
feasible solution representing extreme point Q. Continuing the simplex
procedure, we see that after an additional degenerate pivot, we eventually
end up with the optimal solution in the final tableau corresponding to
the extreme point R.
In this example, we saw that in the presence of degeneracy, it is
possible to perform pivot operations and remain at the same extreme point.
Chapter 2: The Simplex Algorithm: Tableau and Computation
92
93
EXERCISES.
1. Consider the following linear programming problem.
maximize z = 4x1 + 3x2
subject to
x1 + x2 6
2x1 + x2 20
x1 + x2 12
x1, x2 0
(a) Solve this problem graphically.
(b) Solve this problem by the algebraic simplex method and at each
iteration, identify the corresponding extreme-point solution on the
graph.
Chapter 2: The Simplex Algorithm: Tableau and Computation
94
(c) Identify the basic variables, the nonbasic variables, and the basis matrix
B at each iteration.
2. Consider the following constraint set.
x2 9
x1 x2 5
2x1 + x2 22
x1, x2 0
(a) Sketch the feasible region.
(b) Identify the basic variables, the nonbasic variables, and the basis matrix
associated with each extreme point of the feasible region.
(c) Suppose that x2 and the slack variable in the second constraint are
the nonbasic variables defining the current extreme-point solution. If
x2 is chosen as the entering variable, what would be the departing
Chapter 2: The Simplex Algorithm: Tableau and Computation
95
variable and which extreme point would correspond to the next basic
feasible solution?
3. Consider the following linear programming problem.
maximize z = x1 + 2x2
subject to
x1 + x2 16
x1 + x2 5
x1 12
x1 + 3x2 16
x1, x2 0
(a) Solve this problem graphically.
(b) Solve this problem by the algebraic simplex method.
Chapter 2: The Simplex Algorithm: Tableau and Computation
96
(c) Solve this problem by the simplex algorithm using the simplex tableau.
4. Solve the following linear programming problem by the simplex algorithm.
minimize z = 3x1 4x2 x3 2x4 3x5
subject to
x1 + x2 + x3 x4 + 2x5 12
x1 2x2 x3 x4 x5 30
x1, x2, x3, x4, x5 0
5. Solve the following linear programming problem by the simplex algorithm,
identifying the basis matrix B and the basis inverse B1 at each iteration.
Is the optimal solution unique? Explain.
maximize z = x1 + 2x2 + 5x3 + x4
Chapter 2: The Simplex Algorithm: Tableau and Computation
97
subject to
x1 + 2x2 + x3 x4 20
x1 + x2 + x3 + x4 12
2x1 + x2 + x3 x4 30
x1, x2, x3, x4 0
6. Consider the following linear programming problem.
maximize z = 2x1 + 2x2
subject to
x2 10
x1 3x2 2
x1 + x2 16
x1, x2 0
Chapter 2: The Simplex Algorithm: Tableau and Computation
98
(a) Verify graphically that this problem has alternative optimal solutions.
(b) Use the simplex algorithm to find all alternative optimal solutions.
7. Three products A, B, and C, are made using two manufacturing processes.
The unit production times in hours are given in the following table. The
time available for Process 1 is 36 hours, and for Process 2 is 40 hours.
Products A, B, and C sell for $9, $6, and $8, respectively. In addition,
it is estimated that no more than 6 units of Product C can be sold.
Formulate a linear programming problem for determining the optimal
product mix, and solve by the simplex method.
Product
A
B
C
Unit
times
Process 1
2
1
2
production
(hours)
Process 2
2
3
1
99
x3
x1
x2
x1
0
1
0
x2
0
0
1
x3
1
0
0
x4
12
x5
1
2
5
2
21
RHS
20
4
10
100
x1 12
x1 + 2x2 8
x2 8
2x1 + 3x2 36
x1, x2 0
10. Consider the optimal tableau below. Characterize mathematically the set
of all optimal solutions to this problem.
Chapter 2: The Simplex Algorithm: Tableau and Computation
101
z
x1
x4
x2
z
1
0
0
0
x1
0
1
0
0
x2
0
0
0
1
x3
3
0
3
-1
x4
0
0
1
0
x5
0
12
1
12
x6
4
1
2
0
12
RHS
8
4
4
2
102
(b) Use the simplex method to show that this problem does not have a
finite optimal solution.
(c) Use your final tableau to construct an extreme direction of the feasible
region, AX = b, X 0.
12. Once a variable departs from a basis (during the simplex procedure), can
it ever return (i.e., become, once again, basic)? Explain.
13. Consider the basic solution defined by the following tableau. Suppose
that the objective function of this problem is given by maximize z =
c1x1 + c2x2. Give a mathematical condition(s) in terms of c1 and c2
such that the given basic feasible solution indicates that no finite optimal
solution exists.
14. Consider the following problem.
maximize z = 2x1 + x2
subject to
Chapter 2: The Simplex Algorithm: Tableau and Computation
103
x1 + 2x2 10
x1 6
x1 + x2 14
x1 x2 6
x1, x2 0
(a) Sketch the feasible region and identify any degenerate extreme points.
(b) For each extreme point, specify all possible basis matrices.
(c) Solve the problem by the simplex algorithm.
104
4x1 + x2 + x3 18
3x1 + 2x2 + x3 14
x1, x2, x3 0
Let the slack variables for the respective constraints be denoted by x4
and x5. The tableau below represents the current basic solution.
z
x1
x3
z
1
0
0
x1
x2
x3
x4
1
1
-3
x5
1
-1
4
RHS
105
x1
0
0
0
1
x2
1
3
1
1
x3
1
1
0
1
x4
0
1
0
0
x5
a
b
c
d
x6
1
1
1
2
1
2
x7
0
0
1
0
RHS
e
f
g
h
106
(a) Identify the basic variables and the basis inverse corresponding to the
given tableau.
(b) Determine the values of the unknowns in the tableau.
(c) What is the range of change of z with respect to x2 (i.e. z/x2)?
(d) What is the range of change of x7 with respect to x6 (i.e. x7/x2)?
17. Consider the following problem.
maximize z = 2x1 + x2
subject to
x 1 + x2 6
x1 + 3x2 24
x2 2
x 1 x2 8
x1, x2 0
Chapter 2: The Simplex Algorithm: Tableau and Computation
107
(a) Sketch the feasible region and find the optimal solution graphically.
(b) Solve the problem by the two-phase method and track the sequence
of solutions on the graph. Note that each solution corresponds to a
basic (but not necessarily feasible) solution of the problem.
18. Consider the following problem.
maximize z = 2x1 + x2
subject to
x1 x2 10
2x1 + 3x2 24
2x1 + x2 12
x1, x2 0
(a) Verify graphically that this problem is infeasible.
Chapter 2: The Simplex Algorithm: Tableau and Computation
108
(b) Use phase I of the two-phase method to show that the problem is
infeasible.
19. Solve the following problem by the two-phase method.
minimize z = 2x1 5x2 + x3
subject to
x1 + x2 + x3 5
x1 x2 + x3 = 1
5x1 + 3x2 x3 9
x1, x2, x3 0
20. Consider the following problem.
minimize z = 7x1 + 3x2 + 4x3
Chapter 2: The Simplex Algorithm: Tableau and Computation
109
subject to
x1 + x2 10
2x1 + 2x2 + x3 40
2x1 + x2 x3 = 22
x1, x2, x3 0
(a) Solve this problem by the two-phase method.
(b) Solve this problem by the big-M method.
110
z
x1
x2
x6
(a)
(b)
(c)
(d)
(e)
z
1
0
0
0
x1
0
1
0
0
x2
a
b
c
0
x3
d
1
-2
3
x4
2
e
-1
-1
x5
6
3
f
1
x6
0
0
0
1
RHS
88
10
g
8
111
x1 x2 9
x1 x2 2
2x1 + x2 12
x1 0
x2
unrestricted
112
x1 x2 + x 3 8
x1 x2 x3 12
x1 2
x2 0
x3
unrestricted
113
x 1 x2 + x3 = 2
x1 + x2 + 2x3 10
x 1 + x2 x3 6
x1, x2, x3 0
(a) Solve this problem by the two-phase method.
(b) Solve this problem by the big-M method.
114
26. Consider the following linear programming problem and the associated
optimal tableau shown below.
maximize z = c1x1 + c2x2 + c3x3
subject to
a1,1x1 + a1,2x2 + a1,3x3 b1
a2,1x1 + a2,2x2 + a2,3x3 b2
x1, x2, x3 0
Chapter 2: The Simplex Algorithm: Tableau and Computation
115
z
x3
x1
z
1
0
0
x1
0
0
1
x2
2
-5
3
x3
0
1
0
x4
1
-2
1
x5
1
2
3
2
12
RHS
11
3
1
2x1 2x2 + x3 = 2
2x1 + x2 2x3 = 3
x1 + x2 + x3 = 6
(a) Use phase I of the two-phase method to find the unique optimal
solution to this system.
Chapter 2: The Simplex Algorithm: Tableau and Computation
116