Simplex Method
Simplex Method
Simplex Method
30
2.2 Converting an LP to Standard Form
We have seen that an LP can have both equality and inequality constraints.
It also can have variables that are required to be nonnegative as well as those
allowed to be unrestricted in sign (urs). The development of the simplex method
computations is facilitated by imposing two requirements on the LP model:
3x1 + 2x2 + s = 12 ; s ≥ 0.
The substitution must be effected throughout all the constraints and the
objective function. In the optimal LP solution only one of the two variables
yi1 and yi2 can assume a positive value, but never both. Thus, when
yi1 > 0, yi2 = 0 and vice versa. For example, if xi = 4 then yi1 = 4 and
yi2 = 0, and if xi = −4 then yi1 = 0 and yi2 = 4.
31
Solution: The following changes must be effected.
22x1 − 4x2 ≥ −7
Show that multiplying both sides of the inequality by −1 and then con-
verting the resulting inequality into an equation is the same as converting
it first to an equation and then multiplying both sides by −1.
32
max (or min) z = c1 x1 + c2 x2 + · · · + cn xn
s.t. a11 x1 + a12 x2 + · · · + a1n xn = b1
a21 x1 + a22 x2 + · · · + a2n xn = b2
..
.
am1 x1 + am2 x2 + · · · + amn xn = bm
x1 , x2 , · · · , xn ≥ 0
If we define
a11 a12 ··· a1n x1 b1
a21 a22 ··· a2n x2 b2
A= . .. , x = . and b = .
.. ..
.. . . . .
. ..
am1 am2 · · · amn xn bm
n n!
Note 7. The maximum number of corner points is Cm = .
m! (n − m)!
Of course, the different choices of nonbasic variables will lead to different
basic solutions. To illustrate, we find all the basic solutions to the following
system of two equations (m = 2) in three variables (n = 3):
x1 + x2 = 3
− x2 + x3 = −1
x1 + x2 = 3
− x2 = −1
If NBV= {x2 }, then BV= {x1 , x3 }. We obtain the values of the basic
variables by setting x2 = 0 and we find that x1 = 3, x3 = −1. Thus,
(x1 , x2 , x3 ) = (3, 0, −1) is a basic solution to the system.
33
If NBV= {x1 }, then BV= {x2 , x3 }. We obtain the values of the basic
variables by setting x1 = 0 and solving
x2 = 3
− x2 + x3 = −1
The following table provides all the basic and nonbasic solutions of the above
linear system.
Note 8. Some sets of m variables do not yield a basic solution. For example,
consider the following linear system:
x1 + 2x2 + x3 = 1
2x1 + 4x2 + x3 = 3
If we choose NBV= {x3 } and BV= {x1 , x2 }, the corresponding basic solution
would be obtained by solving
x1 + 2x2 = 1
2x1 + 4x2 = 3
x1 + x2 = 3
− x2 + x3 = −1
34
Theorem 2.1. A point in the feasible region of an LP is an
extreme point if and only if it is a basic feasible solution to
the LP.
Figure 23
s1 = 4 and s2 = 5.
35
This solution corresponds to point A in Figure 23. Another point can be de-
termined by setting s1 = 0 and s2 = 0 and then solving the resulting two
equations
2x1 + x2 = 4
x1 + 2x2 = 5
The associated basic solution is x1 = 1, x2 = 2, or point C in Figure 23. In the
present example, the maximum number of corner points is C24 = 6. Looking at
Figure 23, we can spot the four corner points A, B, C, and D. So, where are
the remaining two? In fact, points E and F also are corner points. But, they
are infeasible, and, hence, are not candidates for the optimum. The following
table provides all the basic and nonbasic solutions of the current example.
Basic Corner
NBVs BVs Solution Point Feasible? z−Value
x1 , x2 s1 , s2 4, 5 A 3 0
x1 , s1 x2 , s2 4, −3 F 7
x1 , s2 x2 , s1 2.5, 1.5 B 3 7.5
x2 , s1 x1 , s2 2, 3 D 3 4
x2 , s2 x1 , s1 5, −6 E 7
s1 , s2 x1 , x2 1, 2 C 3 8 Optimum
Exercise 2.2.
2. Determine the optimum solution for each of the following LPs by enumer-
ating all the basic solutions.
36
(a) max z = 2x1 − 4x2 + 5x3 − 6x4
s.t. x1 + 5x2 − 2x3 + 8x4 ≤ 2
−x1 + 2x2 + 3x3 + 4x4 ≤ 1
x1 , x2 , x3 , x4 ≥ 0
(b) min w = x1 + 2x2 − 3x3 − 2x4
s.t. x1 + 2x2 − 3x3 + x4 = 4
x1 + 2x2 + x3 + 2x4 = 4
x1 , x2 , x3 , x4 ≥ 0
3. Show algebraically that all the basic solutions of the following LP are
infeasible.
max z = x1 + x2
s.t. x1 + 2x2 ≤ 3
2x1 + x2 ≥ 8
x1 , x2 ≥ 0
max z = x1 + 3x2
s.t. x1 + x2 ≤ 2
−2x1 + x2 ≤ 4
x1 urs, x2 ≥ 0
37
For example, in Figure 23, two basic feasible solutions will be adjacent if they
have 2 − 1 = 1 basic variable in common. Thus, the bfs corresponding to
point B in Figure 23 is adjacent to the bfs corresponding to point C but is not
adjacent to bfs D. Intuitively, two basic feasible solutions are adjacent if they
both lie on the same edge of the boundary of the feasible region.
38
in the form
z − c1 x1 − c2 x2 − · · · − cn xn = 0.
We call this format the row 0 version of the objective function (row 0 for
short).
Step 2: Obtain a bfs (if possible) from the standard form. This is easy if all
the constraints are ≤ with nonnegative right-hand sides. Then the slack
variable si may be used as the basic variable for row i. If no bfs is readily
apparent, then use the technique discussed in Section 2.6 to find a bfs.
Step 3: Determine whether the current bfs is optimal. If all nonbasic variables
have nonnegative coefficients in row 0, then the current bfs is optimal. If
any variables in row 0 have negative coefficients, then choose the variable
with the most negative coefficient in row 0 to enter the basis. We call
this variable the entering variable.
Step 4: If the current bfs is not optimal, then determine which nonbasic variable
should become a basic variable and which basic variable should become a
nonbasic variable to find a new bfs with a better objective function value.
When entering a variable into the basis, compute the ratio
Right-hand side of constraint
Coefficient of entering variable in constraint
for every constraint in which the entering variable has a positive coeffi-
cient. The constraint with the smallest ratio is called the winner of the
ratio test. The smallest ratio is the largest value of the entering variable
that will keep all the current basic variables nonnegative.
Step 5: Use elementary row operations (EROs) to find the new bfs with the
better objective function value by making the entering variable a basic
variable (has coefficient 1 in pivot row, and 0 in other rows) in the con-
straint that wins the ratio test. Go back to step 3.
This saves writing the symbols for the variables in each of the equations, but
what is even more important is the fact that it permits highlighting the numbers
39
involved in arithmetic calculations and recording the computations compactly.
For example, the form
z − 2x1 − 3x2 =0
2x1 + x2 + s1 =4
x1 + 2x2 + s2 = 5
40
↓
Iteration [1] Basic x1 x2 s1 s2 RHS
z −1/2 0 0 3/2 15/2
← s1 3/2 0 1 −1/2 3/2 Ratio= 3/2 ÷ 3/2 = 1
x2 1/2 1 0 1/2 5/2 Ratio= 5/2 ÷ 1/2 = 5
Example 2.4. Solve the following LP problem using the simplex method.
max z = 4x1 + 4x2
s.t. 6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
−x1 + x2 ≤ 1
x2 ≤ 2
x1 , x2 ≥ 0
Solution: By adding slack variables s1 , s2 , s3 and s4 , respectively, we obtain
the LP in standard form:
max z − 4x1 − 4x2 = 0
s.t. 6x1 + 4x2 + s1 = 24
x1 + 2x2 + s2 = 6
−x1 + x2 + s3 = 1
x2 + s 4 = 2
x1 , x2 , s1 , s2 , s3 , s4 ≥ 0
The initial tableau and all following tableaus until the optimal solution is reached
are shown below. Note that we can choose to enter either x1 or x2 into the
basis. We arbitrarily choose to enter x1 into basis.
↓
Iteration [0] Basic x1 x2 s1 s2 s3 s4 RHS
z −4 −4 0 0 0 0 0
← s1 6 4 1 0 0 0 24 Ratio= 24/6 = 4
s2 1 2 0 1 0 0 6 Ratio= 6/1 = 6
s3 −1 1 0 0 1 0 1 7
s4 0 1 0 0 0 1 2 7
41
↓
Iteration [1] Basic x1 x2 s1 s2 s3 s4 RHS
z 0 −4/3 2/3 0 0 0 16
x1 1 2/3 1/6 0 0 0 4 Ratio= 4 ÷ 2/3 = 6
← s2 0 4/3 −1/6 1 0 0 2 Ratio= 2 ÷ 4/3 = 3/2
s3 0 5/3 1/6 0 1 0 5 Ratio= 5 ÷ 5/3 = 3
s4 0 1 0 0 0 1 2 Ratio= 2/1 = 2
Example 2.5. Solve the following LP problem using the simplex method.
max z = x1 + 3x2
s.t. x1 + x2 ≤ 2
−x1 + x2 ≤ 4
x1 ≥ 0, x2 urs
Solution: By assuming x2 = y1 − y2 and then adding slack variables s1 and
s2 , respectively, we obtain the LP in standard form:
max z − x1 − 3y1 + 3y2 = 0
s.t. x1 + y1 − y2 + s1 = 2
−x1 + y1 − y2 + s2 = 4
x1 , y1 , y2 , s1 , s2 ≥ 0
The initial tableau and all following tableaus until the optimal solution is reached
are shown below.
↓
Iteration [0] Basic x1 y1 y2 s1 s2 RHS
z −1 −3 3 0 0 0
← s1 1 1 −1 1 0 2 Ratio= 2/1 = 2
s2 −1 1 −1 0 1 4 Ratio= 4/1 = 4
42
Exercise 2.3.
1. Use the simplex algorithm to solve the following problems.
2. Solve the following problem by inspection, and justify the method of so-
lution in terms of the basic solutions of the simplex method.
Method (1) Multiply the objective function for the min problem by −1 and
solve the problem as a maximization problem with objective function
(−w). The optimal solution to the max problem will give you the op-
timal solution to the min problem where
optimal objective function optimal objective function
=−
value for min problem value for max problem
Example 2.6. Solve the following LP problem using the simplex method.
43
max z = −2x1 + 3x2
s.t. x1 + x2 ≤ 4
x1 − x2 ≤ 6
x1 , x2 ≥ 0
The initial tableau and all following tableaus until the optimal solution is
reached are shown below.
↓
Iteration [0] Basic x1 x2 s1 s2 RHS
z 2 −3 0 0 0
← s1 1 1 1 0 4 Ratio= 4/1 = 4
s2 1 −1 0 1 6 7
Iteration [1] Basic x1 x2 s1 s2 RHS Optimal Tableau
z 5 0 3 0 12 w = −z = −12
x2 1 1 1 0 4 x1 = 0, x2 = 4
s2 2 0 1 1 10 s1 = 0, s2 = 10
The initial tableau and all following tableaus until the optimal solution is
reached are shown below. Note that, because x2 has the most positive
coefficient in row 0, we enter x2 into the basis.
44
↓
Iteration [0] Basic x1 x2 s1 s2 RHS
w −2 3 0 0 0
← s1 1 1 1 0 4 Ratio= 4/1 = 4
s2 1 −1 0 1 6 7
Iteration [1] Basic x1 x2 s1 s2 RHS Optimal Tableau
w −5 0 −3 0 −12 w = −12
x2 1 1 1 0 4 x1 = 0, x2 = 4
s2 2 0 1 1 10 s1 = 0, s2 = 10
Exercise 2.4. Use the simplex algorithm to solve the following problems.
45
the optimum iteration is reached (assuming the problem has a feasible solution).
The desired goal is achieved by assigning a penalty defined as:
Artificial variable objective −M in max problems
=
function coefficient M in min problems
3x1 + x2 =3
4x1 + 3x2 − e2 =6
x1 + 2x2 + s3 = 4
The third equation has its slack variable, s3 , but the first and second equations
do not. Thus, we add the artificial variables a1 and a2 in the first two equations
and penalize them in the objective function with M a1 + M a2 (because we are
minimizing). The resulting LP becomes
min w = 4x1 + x2 + M a1 + M a2
s.t. 3x1 + x2 + a1 = 3
4x1 + 3x2 − e2 + a2 = 6
x1 + 2x2 + s3 = 4
x1 , x2 , s3 , e2 , a1 , a2 ≥ 0
After writing the objective function as w − 4x1 − x2 − M a1 − M a2 = 0, the
initial tableau will be
Iteration [0] Basic x1 x2 s3 e2 a1 a2 RHS
w −4 −1 0 0 −M −M 0
a1 3 1 0 0 1 0 3
a2 4 3 0 −1 0 1 6
s3 1 2 1 0 0 0 4
Before proceeding with the simplex method computations, row 0 must be made
consistent with the rest of the tableau. The right−hand side of row 0 in the
tableau currently shows w = 0. However, given the nonbasic solution x1 =
x2 = e2 = 0, the current basic solution is a1 = 3, a2 = 6, and s3 = 4 yields
w = (4 × 0) + (1 × 0) + (3 × M ) + (6 × M ) = 9M 6= 0.
46
The inconsistency stems from the fact that a1 and a2 have nonzero coefficients
in row 0. To eliminate the inconsistency, we use EROs. The modified tableau
thus becomes (verify!):
Iteration [0] Basic x1 x2 s3 e2 a1 a2 RHS
w 7M − 4 4M − 1 0 −M 0 0 9M
a1 3 1 0 0 1 0 3
a2 4 3 0 −1 0 1 6
s3 1 2 1 0 0 0 4
The last tableau is ready for the application of the simplex optimality and the
feasibility conditions. Because the objective function is minimized, the variable
x1 having the most positive coefficient in the row 0 enters the solution. The
minimum ratio of the feasibility condition specifies a1 as the leaving variable.
All tableaus until the optimal solution is reached are shown below.
↓
Iteration [0] Basic x1 x2 s3 e2 a1 a2 RHS
w 7M − 4 4M − 1 0 −M 0 0 9M
← a1 3 1 0 0 1 0 3 Ratio= 3/3 = 1
a2 4 3 0 −1 0 1 6 Ratio= 6/4 = 3/2
s3 1 2 1 0 0 0 4 Ratio= 4/2 = 2
↓
Iteration [1] Basic x1 x2 s3 e2 a1 a2 RHS
w 0 (1+5M )/3 0 −M (4−7M )/3 0 4 + 2M
x1 1 1/3 0 0 1/3 0 1 Ratio= 1 ÷ 1/3 = 3
← a2 0 5/3 0 −1 −4/3 1 2 Ratio= 2 ÷ 5/3 = 6/5
s3 0 5/3 1 0 −1/3 0 3 Ratio= 3 ÷ 5/3 = 9/5
↓
Iteration [2] Basic x1 x2 s3 e2 a1 a2 RHS
w 0 0 0 1/5 8/5 − M −1/5 − M 18/5
x1 1 0 0 1/5 3/5 −1/5 3/5 Ratio= 3/5 ÷ 1/5 = 3
x2 0 1 0 −3/5 −4/5 3/5 6/5 7
← s3 0 0 1 1 1 −1 1 Ratio= 1/1 = 1
47
use the computer). We break away from the long tradition of manipulating M
algebraically and use a numerical substitution instead. The intent is to simplify
the presentation without losing substance. What value of M should we use?
The answer depends on the data of the original LP. Recall that the penalty
M must be sufficiently large relative to the original objective coefficients to
force the artificial variables to be zero (which happens only if a feasible solution
exists). At the same time, since computers are the main tool for solving LPs,
M should not be unnecessarily too large, as this may lead to serious round-off
error. In the present example, the objective coefficients of x1 and x2 are 2 and
1, respectively, and it appears reasonable to set M = 100.
Example 2.8. Solve the following LP problem using the simplex method.
max z = 2x1 + x2
s.t. x1 + x2 ≤ 10
−x1 + x2 ≥ 2
x1 , x2 ≥ 0
Solution: To convert the constraint to equations, use s1 as a slack in the first
constraint and e2 as a surplus in the second constraint.
x1 + x2 + s1 = 10
−x1 + x2 − e2 = 2
We add the artificial variables a2 in the second equation and penalize it in the
objective function with −M a2 = −100a2 (because we are maximizing). The
resulting LP becomes
max z = 2x1 + x2 − 100a2
s.t. x1 + x2 + s1 = 10
−x1 + x2 − e2 + a2 = 2
x1 , x2 , s1 , e2 , a2 ≥ 0
After writing the objective function as z − 2x1 − x2 + 100a2 = 0, the initial
tableau will be
Iteration [0] Basic x1 x2 s1 e2 a2 RHS
z −2 −1 0 0 100 0
s1 1 1 1 0 0 10
a2 −1 1 0 −1 1 2
Before proceeding with the simplex method computations, row 0 must be made
consistent with the rest of the tableau. The inconsistency stems from the fact
that a2 has nonzero coefficients in row 0. To eliminate the inconsistency, we use
EROs. The modified tableau and all other tableaus until the optimal solution
is reached are:
48
↓
Iteration [0] Basic x1 x2 s1 e2 a2 RHS
z 98 −101 0 100 0 −200
s1 1 1 1 0 0 10 Ratio= 10/1 = 10
← a2 −1 1 0 −1 1 2 Ratio= 2/1 = 2
↓
Iteration [1] Basic x1 x2 s1 e2 a2 RHS
z −3 0 0 −1 101 2
← s1 2 0 1 1 −1 8 Ratio= 8/2 = 4
x2 −1 1 0 −1 1 2 7
Solution: The main difference here from the usual simplex is that x3 and x4
have nonzero objective coefficients in row 0: z − 2x1 − 4x2 − 4x3 + 3x4 = 0. To
eliminate their coefficients, we use EROs. The initial tableaus and all following
tableaus until the optimal solution is reached are shown below.
49
Exercise 2.5.
1. Use the Big M -method to solve the following LPs:
2.7.1 Degeneracy
In the application of the feasibility condition of the simplex method, a tie for the
minimum ratio may occur and can be broken arbitrarily. When this happens, at
least one basic variable will be zero in the next iteration, and the new solution
is said to be degenerate. This situation may reveal that the model has at least
one redundant constraint.
50
Definition 2.4. An LP is degenerate if it has at least one bfs
in which a basic variable is equal to zero.
If one of these degenerate basic variables retains its value of zero until it is
chosen at a subsequent iteration to be a leaving basic variable, the corresponding
entering basic variable also must remain zero, so the value of the objective
function must remain unchanged. However, if the objective function may remain
the same rather than change at each iteration, the simplex method may then go
around in a loop, repeating the same sequence of solutions periodically rather
than eventually changing the objective function toward an optimal solution.
This occurrence is called cycling.
Example 2.10. Solve the following LP problem.
max z = 3x1 + 9x2
s.t. x1 + 4x2 ≤ 8
x1 + 2x2 ≤ 4
x1 , x2 ≥ 0
Solution: By adding slack variables s1 and s2 , we obtain the LP in standard
form
max z − 3x1 − 9x2 = 0
s.t. x1 + 4x2 + s1 = 8
x1 + 2x2 + s2 = 4
x1 , x2 , s1 , s2 ≥ 0
The initial tableau and all following tableaus until the optimal solution is reached
are shown below.
↓
Iteration [0] Basic x1 x2 s1 s2 RHS
z −3 −9 0 0 0
← s1 1 4 1 0 8 Ratio= 8/4 = 2
s2 1 2 0 1 4 Ratio= 4/2 = 2
In iteration 0, s1 and s2 tie for the leaving variable, leading to degeneracy in
iteration 1 because the basic variable s2 assumes a zero value.
↓
Iteration [1] Basic x1 x2 s1 s2 RHS
z −3/4 0 9/4 0 18
x2 1/4 1 1/4 0 2 Ratio= 2 ÷ 1/4 = 8
← s2 1/2 0 −1/2 1 0 Ratio= 0 ÷ 1/2 = 0
51
The following example illustrates the occurrence of cycling in the simplex
iterations and the possibility that the algorithm may never converge to the
optimum solution.
Example 2.11. This example was authored by E.M. Beale1 . Consider the
following LP:
3 1
max C = x1 − 150x2 + x3 − 6x4
4 50
1 1
s.t. x1 − 60x2 − x3 + 9x4 ≤ 0
4 25
1 1
x1 − 90x2 − x3 + 3x4 ≤ 0
2 50
x3 ≤ 1
x1 , x2 , x3 , x4 ≥ 0
1 1
Actually, the optimal solution of this example is C = when x1 = ,
20 25
x3 = 1, and x2 = x4 = 0. However, in order to solve this LP using the Simplex
algorithm, we write it in standard form as follows.
3 1
max C − x1 + 150x2 − x3 + 6x4 = 0
4 50
1 1
s.t. x1 − 60x2 − x3 + 9x4 + s1 = 0
4 25
1 1
x1 − 90x2 − x3 + 3x4 + s2 = 0
2 50
x3 + s3 = 1
x1 , x2 , x3 , x4 , s1 , s2 , s3 ≥ 0
Let us start applying the Simplex algorithm, and see what will happen through
the iterations.
↓
Iteration [0] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C −3/4 150 −1/50 6 0 0 0 0
← s1 1/4 −60 −1/25 9 1 0 0 0 Ratio= 0
s2 1/2 −90 −1/50 3 0 1 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
↓
Iteration [1] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 −30 −7/50 33 3 0 0 0
x1 1 −240 −4/25 36 4 0 0 0 7
← s2 0 30 3/50 −15 −2 1 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
1
Saul I. Gass, Sasirekha Vinjamuri. Cycling in linear programming problems. Computers
& Operations Research 31 (2004)
52
↓
Iteration [2] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 0 −2/25 18 1 1 0 0
← x1 1 0 8/25 −84 −12 8 0 0 Ratio= 0
x2 0 1 1/500 −1/2 −1/15 1/30 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 Ratio= 1
↓
Iteration [3] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 1/4 0 0 −3 −2 3 0 0
x3 25/8 0 1 −525/2 −75/2 25 0 0 7
← x2 −1/160 1 0 1/40 1/120 −1/60 0 0 Ratio= 0
s3 −25/8 0 0 525/2 75/2 −25 1 1 Ratio= 2/525
↓
Iteration [4] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C −1/2 120 0 0 −1 1 0 0
← x3 −125/2 10500 1 0 50 −150 0 0 Ratio= 0
x4 −1/4 40 0 1 1/3 −2/3 0 0 Ratio= 0
s3 125/2 −10500 0 0 −50 150 1 1 7
↓
Iteration [5] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C −7/4 330 1/50 0 0 −2 0 0
s1 −5/4 210 1/50 0 1 −3 0 0 7
← x4 1/6 −30 −1/150 1 0 1/3 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
Note 10. There are several ways to solve the LP problem in example (2.11).
We review these methods as follows.
53
3 1
max C − x1 + 150x2 − x3 + 6x4 = 0
4 50
s.t. 25x1 − 6000x2 − 4x3 + 900x4 + s1 = 0
25x1 − 4500x2 − x3 + 150x4 + s2 = 0
x3 + s 3 = 1
x1 , x2 , x3 , x4 , s1 , s2 , s3 ≥ 0
↓
Iteration [0] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C −3/4 150 −1/50 6 0 0 0 0
← s1 25 −6000 −4 900 1 0 0 0 Ratio= 0
s2 25 −4500 −1 150 0 1 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
↓
Iteration [1] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 −30 −7/50 33 3/100 0 0 0
x1 1 −240 −4/25 36 1/25 0 0 0 7
← s2 0 1500 3 −750 −1 1 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
↓
Iteration [2] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 0 −2/25 18 1/100 1/50 0 0
x1 1 0 8/25 −84 −3/25 4/25 0 0 Ratio= 0
← x2 0 1 1/500 −1/2 −1/1500 1/1500 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 Ratio= 1
↓
Iteration [3] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 40 0 −2 −1/60 7/150 0 0
x1 1 −160 0 −4 −1/75 4/75 0 0 7
x3 0 500 1 −250 −1/3 1/3 0 0 7
← s3 0 −500 0 250 1/3 −1/3 1 1 Ratio= 1/250
↓
Iteration [4] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 36 0 0 −7/500 11/250 1/125 1/125
x1 1 −168 0 0 −1/125 6/125 2/125 2/125 7
x3 0 0 1 0 0 0 1 1 7
← x4 0 −2 0 1 1/750 −1/750 1/250 1/250 Ratio= 3
54
Iteration [5] Basic x1 x2 x3 x4 s1 s2 s3 RHS Optimal
C 0 15 0 21/2 0 3/100 1/20 1/20 Tableau
x1 1 −180 0 6 0 1/25 1/25 1/25
x3 0 0 1 0 0 0 1 1
s1 0 −1500 0 750 1 −1 3 3
(a) For the entering basic variable: Of all negative coefficients in the
objective row (Row 0), choose the one with smallest subscript.
(b) For the departing basic variable: When there is a tie between one
or more ratios computed, choose the candidate for departing basic
variable that has the smallest subscript.
↓
Iteration [0] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C −3/4 150 −1/50 6 0 0 0 0
← x5 1/4 −60 −1/25 9 1 0 0 0 Ratio= 0
x6 1/2 −90 −1/50 3 0 1 0 0 Ratio= 0
x7 0 0 1 0 0 0 1 1 7
↓
Iteration [1] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C 0 −30 −7/50 33 3 0 0 0
x1 1 −240 −4/25 36 4 0 0 0 7
← x6 0 30 3/50 −15 −2 1 0 0 Ratio= 0
x7 0 0 1 0 0 0 1 1 7
↓
Iteration [2] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C 0 0 −2/25 18 1 1 0 0
← x1 1 0 8/25 −84 −12 8 0 0 Ratio= 0
x2 0 1 1/500 −1/2 −1/15 1/30 0 0 Ratio= 0
x7 0 0 1 0 0 0 1 1 Ratio= 1
3
James Calvert and William Voxman, Linear Programming, 1st Edition, Harcourt Brace
Jovanovich Publishers, 1989.
55
↓
Iteration [3] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C 1/4 0 0 −3 −2 3 0 0
x3 25/8 0 1 −525/2 −75/2 25 0 0 7
← x2 −1/160 1 0 1/40 1/120 −1/60 0 0 Ratio= 0
x7 −25/8 0 0 525/2 75/2 −25 1 1 Ratio= 2/525
↓
Iteration [4] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C −1/2 120 0 0 −1 1 0 0
x3 −125/2 10500 1 0 50 −150 0 0 7
x4 −1/4 40 0 1 1/3 −2/3 0 0 7
← x7 125/2 −10500 0 0 −50 150 1 1 Ratio= 2/125
↓
Iteration [5] Basic x1 x2 x3 x4 x5 x6 x7 RHS
C 0 36 0 0 −7/5 11/5 1/125 1/125
x3 0 0 1 0 0 0 1 1 7
← x4 0 −2 0 1 2/15 −1/15 1/250 1/250 Ratio= 100/3
x1 1 −168 0 0 −4/5 12/5 2/125 2/125 7
56
I2 , where, in general, Ij is formed from Ij−1 as follows:
yrj yij
Ij = r : = min
yrk i∈Ij−1 yik
↓
Iteration [0] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C −3/4 150 −1/50 6 0 0 0 0
s1 1/4 −60 −1/25 9 1 0 0 0 Ratio= 0
← s2 1/2 −90 −1/50 3 0 1 0 0 Ratio= 0
s3 0 0 1 0 0 0 1 1 7
Here, I0 = {1, 2}, and then I1 = {2}, and therefore xB2 = s2 leaves the
basis.
↓
Iteration [1] Basic x1 x2 x3 x4 s1 s2 s3 RHS
C 0 15 −1/20 21/2 0 3/2 0 0
s1 0 −15 −3/100 15/2 1 −1/2 0 0 7
x1 1 −180 −1/25 6 0 2 0 0 7
← s3 0 0 1 0 0 0 1 1 Ratio= 1
57
nonbasic variables. The zero coefficient of nonbasic xj indicates that xj can
be made basic, altering the values of the basic variables without changing the
value of z.
In practice, alternative optima are useful because we can choose from many
solutions without experiencing deterioration in the objective value. If the exam-
ple represents a product-mix situation, it may be advantageous to market two
products instead of one.
Mathematically, we can determine all the points (x1 , x2 ) on the line segment
joining the optimal solutions 0, 25 and (3, 1) as follows:
x1 = t(0)+ (1 − t)(3) = 3 − 3t
; 0≤t≤1
x2 = t 25 + (1 − t)(1) = 1 + 3t
2
58
2.7.3 Unbounded Solutions
In some LP models, as in example (1.16) of Section 1.4, the solution space is
unbounded in at least one variable, meaning that variables may be increased
indefinitely without violating any of the constraints. The associated objective
value may also be unbounded in this case. An unbounded LP for a max problem
occurs when a variable with a negative coefficient (positive for min LP) in row
0 has a nonpositive coefficient in each constraint.
An unbounded solution space may signal that the model is poorly con-
structed. The most likely irregularity in such models is that some key con-
straints have not been accounted for. Another possibility is that estimates of
the constraint coefficients may not be accurate.
59
of the type ≤ with nonnegative right-hand sides because the slacks provide
an obvious feasible solution. For other types of constraints, penalized artificial
variables are used to start the solution. If at least one artificial variable is
positive in the optimum iteration, then the LP has no feasible solution. From
the practical standpoint, an infeasible space points to the possibility that the
model is not formulated correctly.
2x1 + x2 + s1 = 2
3x1 + 4x2 − e2 = 12
We add the artificial variables a2 in the second equation and penalize it in the
objective function with −M a2 = −100a2 (because we are maximizing). The
resulting LP becomes
max z = 3x1 + 2x2 − 100a2
s.t. 2x1 + x2 + s1 = 2
3x1 + 4x2 − e2 + a2 = 12
x1 , x2 , s1 , e2 , a2 ≥ 0
After writing the objective function as z − 3x1 − 2x2 + 100a2 = 0, the initial
tableau will be and all following tableaus until the optimal solution is reached
are shown below.
Iteration [0] Basic x1 x2 s1 e2 a2 RHS
z −3 −2 0 0 100 0
s1 2 1 1 0 0 2
a2 3 4 0 −1 1 12
↓
Iteration [0] Basic x1 x2 s1 e2 a2 RHS
z −303 −402 0 100 0 −1200
← s1 2 1 1 0 0 2 Ratio= 2/1 = 2
a2 3 4 0 −1 1 12 Ratio= 12/4 = 3
60
Optimum iteration 1 shows that the artificial variable a2 is positive (= 4),
meaning that the LP is infeasible. The result is what we may call a pseudo-
optimal solution.
Exercise 2.6.
1. Consider the following LP:
(a) Show that the associated simplex iterations are temporarily degen-
erate. How many iterations are needed to reach the optimum?
(b) Verify the result by solving the problem graphically.
(c) Interchange constraints (1) and (3) and resolve the problem. How
many iterations are needed to solve the problem?
2. Solve the following problem, using the lexicographic rule for noncycling.
Repeat using Bland’s Rule:
max z = x1 + 2x2 + x3
s.t. x1 + 4x2 + 3x3 ≤ 4
−x1 + x2 + 4x3 ≤ 1
x1 + 3x2 + x3 ≤ 6
x1 , x2 , x3 ≥ 0
3. For the following LP, identify three alternative optimal basic solutions.
From the optimal tableau, show that all the alternative optima are not
corner points (i.e., nonbasic).
61
5. For the following LP, show that the optimal solution is degenerate and
that none of the alternative solutions are corner points.
max z = 3x1 + x2
s.t. x1 + 2x2 ≤ 5
x1 + x2 − x3 ≤ 2
7x1 + 3x2 − 5x3 ≤ 20
x1 , x2 , x3 ≥ 0
Use hand computations to show that the optimal solution can include an
artificial basic variable at zero level. Does the problem have a feasible
optimal solution?
Basic x1 x2 x3 x4 x5 x6 x7 x8 RHS
z 0 −5 0 4 −1 −10 0 0 620
x8 0 3 0 −2 −3 −1 5 1 12
x3 0 1 1 3 1 0 3 0 6
x1 1 −1 0 0 6 −4 0 0 0
62
(a) Categorize the variables as basic and nonbasic, and provide the cur-
rent values of all the variables.
(b) Assuming that the problem is of the maximization type, identify the
nonbasic variables that have the potential to improve the value of
z. If each such variable enters the basic solution, determine the
associated leaving variable, if any, and the associated change in z.
(c) Repeat part (b) assuming that the problem is of the minimization
type.
(d) Which nonbasic variable(s) will not cause a change in the value of z
when selected to enter the solution?
9. You are given the tableau shown below for a maximization problem.
Basic x1 x2 x3 x4 x5 RHS
z −c 2 0 0 0 10
x3 −1 a1 1 0 0 4
x4 a2 −4 0 1 0 1
x5 a3 3 0 0 1 b
10. Suppose we have obtained the tableau shown below for a maximization
problem.
Basic x1 x2 x3 x4 x5 x6 RHS
z c1 c2 0 0 0 0 10
x3 4 a1 1 0 a2 0 b
x4 −1 −5 0 1 −1 0 2
x6 a3 −3 0 0 −4 1 3
(a) The current solution is optimal, and there are alternative optimal
solutions.
(b) The current basic solution is not a basic feasible solution.
(c) The current basic solution is a degenerate bfs.
63
(d) The current basic solution is feasible, but the LP is unbounded.
(e) The current basic solution is feasible, but the objective function value
can be improved by replacing x6 as a basic variable with x1 .
11. The starting and current tableaux of a given problem are shown below.
Find the values of the unknowns a through n.
64