Sie sind auf Seite 1von 10

Section 7.

4 The Simplex Method: Maximization


For linear programming problems with more than two variables or with two variables and many constraints,
the graphical method is usually inefficient or impossible, so the simplex method is used. This method,
which is introduced in this section, was developed for the U.S. Air Force by George B. Danzig in 1947. It
is now used in industrial planning, factory design, product distribution networks, sports scheduling, truck
routing, resource allocation, and a variety of other ways.
Because the simplex method is used for problems with many variables, it usually is not convenient to use
letters such as x, y, z, or w as variable names. Instead, the symbols x1 (read “x-sub-one”), x2 , x3 , and
so on, are used. In the simplex method, all constraints must be expressed in the linear form

a1 x 1 + a2 x 2 + a3 x 3 + . . . ≤ b

where x1 , x2 , x3 , . . . are variables, a1 , a2 , a3 , . . . are coefficients, and b is a constant.


We first discuss the simplex method for linear programming problems such as the following:

Maximize z = 2x1 + 3x2 + x3


subject to x1 + x2 + 4x3 ≤ 100
x1 + 2x2 + x3 ≤ 150
3x1 + 2x2 + x3 ≤ 320
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0

This example illustrates standard maximum form, which is defined as follows.

Setting up the Problem

The first step is to convert each constraint, a linear inequality, into a linear equation. This is done by
adding a nonnegative variable, called a slack variable, to each constraint. For example, convert the
inequality x1 + x2 ≤ 10 into an equation by adding the slack variable s1 , to get

x1 + x2 + s1 = 10 where s1 ≥ 0

The inequality x1 + x2 ≤ 10 says that the sum x1 + x2 is less than or equal to 10. The variable s1 “takes
up any slack” and represents the amount by which x1 + x2 fails to equal 10. For example, if x1 + x2 equals
8, then s1 is 2. If x1 + x2 = 10, the value of s1 is 0.

1
EXAMPLE: Restate the following linear programming problem by introducing slack variables:

Maximize z = 2x1 + 3x2 + x3


subject to x1 + x2 + 4x3 ≤ 100
x1 + 2x2 + x3 ≤ 150
3x1 + 2x2 + x3 ≤ 320
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0

Solution: Rewrite the three constraints as equations by introducing nonnegative slack variables s1 , s2 ,
and s3 , one for each constraint. Then the problem can be restated as

Adding slack variables to the constraints converts a linear programming problem into a system of linear
equations. These equations should have all variables on the left of the equals sign and all constants on
the right. All the equations of the Example above satisfy this condition except for the objective function,
z = 2x1 + 3x2 + x3 , which may be written with all variables on the left as

Now the equations of the Example above (with the constraints listed first and the objective function last)
can be written as the following augmented matrix.

This matrix is the initial simplex tableau. Except for the last entries — the 1 and 0 on the right end —
the numbers in the bottom row of a simplex tableau are called indicators.
This simplex tableau represents a system of four linear equations in seven variables. Since there are more
variables than equations, the system is dependent and has infinitely many solutions. Our goal is to find a
solution in which all the variables are nonnegative and z is as large as possible. This will be done by using
row operations to replace the given system by an equivalent one in which certain variables are eliminated
from some of the equations. The process will be repeated until the optimum solution can be read from
the matrix, as explained next.

2
Selecting the Pivot
Recall how row operations are used to eliminate variables in the Gauss-Jordan method: A particular
nonzero entry in the matrix is chosen and changed to a 1; then all other entries in that column are
changed to zeros. A similar process is used in the simplex method. The chosen entry is called the pivot.
If we were interested only in solving the system, we could choose the various pivots in many different
ways, as in Chapter 6. Here, however, it is not enough just to find a solution. We must find one that
is nonnegative, satisfies all the constraints, and makes z as a large as possible. Consequently, the pivot
must be chosen carefully, as explained in the next example. The reasons this procedure is used and why
it works are discussed in the last Example of this section.

EXAMPLE: Determine the pivot in the simplex tableau for the problem in the Example above:
Maximize z = 2x1 + 3x2 + x3
subject to x1 + x2 + 4x3 ≤ 100
x1 + 2x2 + x3 ≤ 150
3x1 + 2x2 + x3 ≤ 320
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0

Solution: Look at the indicators (the last row of the tableau) and choose the most negative one:

The most negative indicator identifies the variable that is to be eliminated from all but one of the equations
(rows) — in this case, x2 . The column containing the most negative indicator is called the pivot column.
Now, for each positive entry in the pivot column, divide the number in the far right column of the same
row by the positive number in the pivot column:

The row with the smallest quotient (in this case, the second row) is called the pivot row. The entry in
the pivot row and pivot column is the pivot:

3
Pivoting
Once the pivot has been selected, row operations are used to replace the initial simplex tableau by another
simplex tableau in which the pivot column variable is eliminated from all but one of the equations. Since
this new tableau is obtained by row operations, it represents an equivalent system of equations (that
is, a system with the same solutions as the original system). This process, which is called pivoting, is
explained in the next example.

EXAMPLE: Use the indicated pivot, 2, to perform the pivoting on the simplex tableau of the Example
above:

1
Solution: Start by multiplying each entry of row 2 by in order to change the pivot to 1:
2

Now use row operations to make the entry in row 1, column 2, a 0:

Change the 2 in row 3, column 2, to a 0 by a similar process:

Finally, add 3 times row 2 to the last row in order to change the indicator −3 to 0:

The pivoting is now complete, because the pivot column variable x2 has been eliminated from all equations
except the one represented by the pivot row. The initial simplex tableau has been replaced by a new simplex
tableau, which represents an equivalent system of equations.

4
When at least one of the indicators in the last row of a simplex tableau is negative (as is the case with
the tableau obtained in the Example above), the simplex method requires that a new pivot be selected
and the pivoting be performed again. This procedure is repeated until a simplex tableau with no negative
indicators in the last row is obtained or a tableau is reached in which no pivot row can be chosen.

EXAMPLE: In the simplex tableau obtained in the Example above

select a new pivot and perform the pivoting.


Solution: First, locate the pivot column by finding the most negative indicator in the last row. Then
locate the pivot row by computing the necessary quotients and finding the smallest one, as shown here:

So the pivot is the number 21 in row 1, column 1. Begin the pivoting by multiplying every entry in row 1
by 2. Then continue as indicated to obtain the following simplex tableau:

Since there are no negative indicators in the last row, no further pivoting is necessary, and we call this the
final simplex tableau.

5
Reading the Solution

The next example shows how to read an optimal solution of the original linear programming problem from
the final simplex tableau.

EXAMPLE: Solve the following linear programming problem:

Maximize z = 2x1 + 3x2 + x3


subject to x1 + x2 + 4x3 ≤ 100
x1 + 2x2 + x3 ≤ 150
3x1 + 2x2 + x3 ≤ 320
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0

Solution: Look at the final simplex tableau for this problem, which was obtained in the Example above:

The last row of this matrix represents the equation

4x3 + s1 + s2 + z = 250, or equivalently, z = 250 − 4x3 − s1 − s2

If x3 , s1 , and s2 are all 0, then the value of z is 250. If any one of x3 , s1 , or s2 is positive, then z will have
a smaller value than 250. (Why?) Consequently, since we want a solution for this system in which all the
variables are nonnegative and z is as large as possible, we must have

x3 = 0, s1 = 0, s2 = 0

When these values are substituted into the first equation (represented by the first row of the final simplex
tableau), the result is
x1 + 7 · 0 + 2 · 0 − 1 · 0 = 50; that is, x1 = 50
Similarly, substituting 0 for x3 , s1 , and s2 in the last three equations represented by the final simplex
tableau shows that
x2 = 50, s3 = 70, and z = 250
Therefore, the maximum value of z = 2x1 + 3x2 + x3 occurs when

x1 = 50, x2 = 50, and x3 = 0

in which case z = 2 · 50 + 3 · 50 + 0 = 250. (The values of the slack variables are irrelevant in stating the
solution of the original problem.)

6
In any simplex tableau, some columns look like columns of an identity matrix (one entry is 1 and the
rest are 0). The variables corresponding to these columns are called basic variables and the variables
corresponding to the other columns are referred to as nonbasic variables. In the tableau of the Example
above, for instance, the basic variables are x1 , x2 , s3 , and z (shown in blue), and the non basic variables
are x3 , s1 , and s2 :

The optimal solution in the Example above was obtained from the final simplex tableau by setting the
non basic variables equal to 0 and solving for the basic variables. Furthermore, the values of the basic
variables are easy to read from the matrix: Find the 1 in the column representing a basic variable; the
last entry in that row is the value of that basic variable in the optimal solution. In particular, the entry
in the lower right-hand comer of the final simplex tableau is the maximum value of z.
The steps involved in solving a standard maximum linear programming problem by the simplex method
have been illustrated in the Examples above and are summarized here.

The solution found by the simplex method may not be unique, especially when choices are possible in
steps 5, 6, or 9. There may be other solutions that produce the same maximum value of the objective
function.

7
Geometric Interpretation of the Simplex Method

Although it may not be immediately apparent, the simplex method is based on the same geometrical
considerations as the graphical method. This can be seen by looking at a problem that can be readily
solved by both methods.

EXAMPLE: In Example 1 of Section 7.3, the following problem was solved graphically (using x and y
instead of x1 and x2 , respectively):
Maximize z = 8x1 + 12x2
subject to 40x1 + 80x2 ≤ 560
6x1 + 8x2 ≤ 72
x1 ≥ 0, x2 ≥ 0

Graphing the feasible region (see the Figure below (left)) and evaluating z at each corner point shows that
the maximum value of z occurs at (8, 3).

To solve the same problem by the simplex method, add a slack variable to each constraint:

40x1 + 80x1 + s1 = 560


6x1 + 8x2 + s2 = 72

Then write the initial simplex tableau:

In this tableau, the basic variables are s1 , s2 , and z. (Why?) By setting


the nonbasic variables (namely, x1 and x2 ) equal to 0 and solving for the
basic variables, we obtain the following solution (which will be called a
basic feasible solution):

x1 = 0, x2 = 0, s1 = 560, s2 = 72, and z = 0

Since x1 = 0 and x2 = 0, this solution corresponds to the corner point at


the origin in the graphical solution (see the Figure on the right).

8
The basic feasible solution (0, 0) given by the initial simplex tableau has z = 0, which is obviously not
maximal. Each round of pivoting in the simplex method will produce another corner point, with a larger
value of z, until we reach a corner point that provides the maximum solution.
The most negative indicator in the initial tableau is −12, and it determines the pivot column. Then we
form the necessary quotients and determine the pivot row:

Thus, the pivot is 80 in row 1, column 2. Performing the pivoting leads to this tableau:

The basic variables here are x2 , s2 , and z, and the basic feasible solution
(found by setting the nonbasic variables equal to 0 and solving for the
basic variables) is
x1 = 0, x2 = 7, s1 = 0, s2 = 16, and z = 84
which corresponds to the corner point (0, 7) in the Figure on the right.
Note that the new value of the pivot variable x2 is precisely the smallest
quotient, 7, that was used to select the pivot row. Although this value
of z is better, further improvement is possible.
Now the most negative indicator is −2. We form the necessary quotients and determine the pivot as usual:

The pivot is 2 in row 2, column 1. Pivoting now produces the final tableau:

Here, the basic feasible solution is


x1 = 8, x2 = 3, s1 = 0, s2 = 0, and z = 100
which corresponds to the corner point (8, 3) in the Figure on the right.
Once again, the new value of the pivot variable x1 is the smallest quotient,
8, that was used to select the pivot. Because all the indicators in the last
row of the final tableau are nonnegative, (8, 3) is the maximum solution
according to the simplex method. We know that this is the case, since this
is the maximum solution found by the graphical method. An algebraic
argument similar to the one in the Example on page 6 could also be
made.

9
As illustrated in the Example above, the basic feasible solution obtained from a simplex tableau corresponds
to a corner point of the feasible region. Pivoting, which replaces one tableau with another, is a systematic
way of moving from one corner point to another, each time improving the value of the objective function.
The simplex method ends when a corner point that produces the maximum value of the objective function
is reached (or when it becomes clear that the problem has no maximum solution).
When there are three or more variables in a linear programming problem, it may be difficult or impossible
to draw a picture, but it can be proved that the optimal value of the objective function occurs at a basic
feasible solution (corresponding to a corner point in the two-variable case). The simplex method provides
a means of moving from one basic feasible solution to another until one that produces the optimal value
of the objective function is reached.

Explanation of Pivoting
The rules for selecting the pivot in the simplex method can be understood by examining how the first
pivot was chosen in the Example above.

EXAMPLE: The initial simplex tableau of the Example above provides a basic feasible solution with
x1 = 0 and x2 = 0:

This solution certainly does not give a maximum value for the objective function z = 8x1 + 12x2 . Since x2
has the largest coefficient, z will be increased most if x2 is increased. Tn other words, the most negative
indicator in the tableau (which corresponds to the largest coefficient in the objective function) identifies
the variable that will provide the greatest change in the value of z.
To determine how much x2 can be increased without leaving the feasible region, look at the first two
equations,
40x1 + 80x2 + s1 = 560 s1 = 560 − 40x1 − 80x2
, or equivalently,
6x1 + 8x2 + s2 = 72 s2 = 72 − 6x1 − 8x2
Now x2 is to be increased while x1 is to keep the value 0. Hence,
s1 = 560 − 80x2
s2 = 72 − 8x2
Since s1 ≥ 0 and s2 ≥ 0, we must have
0 ≤ s1 0 ≤ s2
0 ≤ 560 − 80x2 and 0 ≤ 72 − 8x2
80x2 ≤ 560 8x2 ≤ 72
560 72
x2 ≤ =7 x2 ≤ =9
80 8
The right sides of these last inequalities are the quotients used to select the pivot row. Since x2 must
satisfy both inequalities, x2 can be at most 7. In other words, the smallest quotient formed from positive
entries in the pivot column identifies the value of x2 that produces the largest change in z while remaining
in the feasible region. By pivoting with the pivot determined in this way, we obtain the second tableau
and a basic feasible solution in which x2 = 7, as was shown in the Example on page 8.

10

Das könnte Ihnen auch gefallen