• 沒有找到結果。

Degeneracy and the Convergence of the Simplex Algorithm

在文檔中 An Introduction to Model Building (頁 168-172)

The LINGO Package

4.11 Degeneracy and the Convergence of the Simplex Algorithm

Theoretically, the simplex algorithm (as we have described it) can fail to find the optimal solution to an LP. However, LPs arising from actual applications seldom exhibit this un-pleasant behavior. For the sake of completeness, however, we now discuss the type of sit-uation in which the simplex can fail. Our discussion depends crucially on the following relationship (for a max problem) between the z-values for the current bfs and the new bfs (that is, the bfs after the next pivot):

z-value for new bfs  z-value of current bfs

 (value of entering variable in new bfs)(coefficient (15) of entering variable in row 0 of current bfs)

Equation (15) follows, because each unit by which the entering variable is increased will increase z by  (coefficient of entering variable in row 0 of current bfs). Recall that (co-efficient of entering variable in row 0)  0 and (value of entering variable in new bfs)  0. Combining these facts with (15), we can deduce the following facts:

1 If (value of entering variable in new bfs) 0, then (z-value for new bfs) (z-value for current bfs).

2 If (value of entering variable in new bfs)  0, then (z-value for new bfs)  (z-value for current bfs).

For the moment, assume that the LP we are solving has the following property: In each of the LP’s basic feasible solutions, all of the basic variables are positive (positive means 0). An LP with this property is a nondegenerate LP.

If we are using the simplex to solve a nondegenerate LP, fact 1 in the foregoing list tells us that each iteration of the simplex will increase z. This implies that when the sim-plex is used to solve a nondegenerate LP, it is impossible to encounter the same bfs twice.

mainder of this line, and the following lines as shown be-low.

@FOR(QUARTERS(I)|TIME(I)

#GT#1:

INV(I)=INV(I-1)+RP(I)+OP(I)-DEM(I););

INV(1)=10+RP(1)+OP(1)-DEM(1);

DATA:

DEM=40,60,75,25;

TIME=1,2,3,4;

ENDDATA END

While the Copy command only saved a few keystrokes in this example, it can save

T A B L E 28

District

1 2 3 4 5 6 7 8 9 10

Whites 400 200 150 300 400 100 200 300 250 150

Blacks 200 150 100 120 480 490 140 160 100 160

Distance (Miles)

1 2 3 4 5 6 7 8 9 10

High School 1 1 2 3 2 3 4 2 3 1 2

High School 2 2 1 3 3 4 2 1 2 2 3

High School 3 3 3 2 1 2 3 2 2 3 1

To see this, suppose that we are at a basic feasible solution (call it bfs 1) that has z 20.

Fact 1 shows that our next pivot will take us to a bfs (call it bfs 2) and has z 20. Be-cause no future pivot can decrease z, we can never return to a bfs having z 20. Thus, we can never return to bfs 1. Now recall that every LP has only a finite number of basic feasible solutions. Because we can never repeat a bfs, this argument shows that when we use the simplex algorithm to solve a nondegenerate LP, we are guaranteed to find the op-timal solution in a finite number of iterations. For example, suppose we are solving a non-degenerate LP with 10 variables and 5 constraints. Such an LP has at most

 

 252

basic feasible solutions. We will never repeat a bfs, so we know that for this problem, the simplex is guaranteed to find an optimal solution after at most 252 pivots.

However, the simplex may fail for a degenerate LP.

D E F I N I T I O N An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero.

The following LP is degenerate:

max z 5x1 2x2

s.t. x1 x2 6 s.t. x1 x2 0 (16) x1, x2 0

What happens when we use the simplex algorithm to solve (16)? After adding slack variables s1and s2to the two constraints, we obtain the initial tableau in Table 29. In this bfs, the basic variable s2 0. Thus, (16) is a degenerate LP. Any bfs that has at least one basic variable equal to zero (or, equivalently, at least one constraint with a zero right-hand side) is a degenerate bfs. Because 5  2, we enter x1into the basis. The winning ra-tio is 0. This means that after x1enters the basis, x1will equal zero in the new bfs. After doing the pivot, we obtain the tableau in Table 30. Our new bfs has the same z-value as

10 5

T A B L E 29 A Degenerate LP

Basic

z x1 x2 s1 s2 rhs Variable Ratio

1 5 2 0 0 0 z2 0

0 1 1 1 0 6 s1 6 6*

0 1 1 0 1 0 s2 0 0*

T A B L E 30 First Tableau for (16)

Basic

z x1 x2 s1 s2 rhs Variable Ratio

1 0 7 0 5 0 z2 0

0 0 2 1 1 6 s1 6 62  3*

0 1 1 0 1 0 x1 0 None

the old bfs. This is consistent with fact 2. In the new bfs, all variables have exactly the same values as they had before the pivot! Thus, our new bfs is also degenerate. Continu-ing with the simplex, we enter x2in row 1. The resulting tableau is shown in Table 31.

This is an optimal tableau, so the optimal solution to (16) is z 21, x2 3, x1  3, s1 s2= 0.

We can now explain why the simplex may have problems in solving a degenerate LP.

Suppose we are solving a degenerate LP for which the optimal z-value is z 30. If we begin with a bfs that has, say, z 20, we know (look at the LP we just solved) that it is possible for a pivot to leave the value of z unchanged. This means that it is possible for a sequence of pivots like the following to occur:

Initial bfs (bfs 1): z 20 After first pivot (bfs 2): z 20 After second pivot (bfs 3): z 20 After third pivot (bfs 4): z 20 After fourth pivot (bfs 1): z 20

In this situation, we encounter the same bfs twice. This occurrence is called cycling. If cycling occurs, then we will loop, or cycle, forever among a set of basic feasible solutions and never get to the optimal solution (z 30, in our example). Cycling can indeed occur (see Problem 3 at the end of this section). Fortunately, the simplex algorithm can be mod-ified to ensure that cycling will never occur [see Bland (1977) or Dantzig (1963) for de-tails].For a practical example of cycling, see Kotiah and Slater (1973).

If an LP has many degenerate basic feasible solutions (or a bfs with many basic vari-ables equal to zero), then the simplex algorithm is often very inefficient. To see why, look at the feasible region for (16) in Figure 12, the shaded triangle BCD. The extreme points of the feasible region are B, C, and D. Following the procedure outlined in Section 4.2, let’s look at the correspondence between the basic feasible solutions to (16) and the ex-treme points of its feasible region (see Table 32). Three sets of basic variables correspond to extreme point C. It can be shown that for an LP with n decision variables to be de-generate, n 1 or more of the LP’s constraints (including the sign restrictions xi 0 as constraints) must be binding at an extreme point.

In (16), the constraints x1 x2 0, x1 0, and x2 0 are all binding at point C.

Each extreme point at which three or more constraints are binding will correspond to more than one set of basic variables. For example, at point C, s1must be one of the ba-sic variables, but the other baba-sic variable may be x2, x1, or s2.

T A B L E 31 Optimal Tableau for (16)

Basic

z x1 x2 s1 s2 rhs Variable

1 0 0 3.5 1.5 21 z2 21

0 0 1 0.5 0.5 13 x2 3

0 1 0 0.5 0.5 13 x1 3

Bland showed that cycling can be avoided by applying the following rules (assume that slack and excess variables are numbered xn1, xn2, . . .):

1 Choose as the entering variable (in a max problem) the variable with a negative coefficient in row 0 that has the smallest subscript.

2 If there is a tie in the ratio test, then break the tie by choosing the winner of the ratio test so that the vari-able leaving the basis has the smallest subscript.

We can now discuss why the simplex algorithm often is an inefficient method for solv-ing degenerate LPs. Suppose an LP is degenerate. Then there may be many sets (maybe hundreds) of basic variables that correspond to some nonoptimal extreme point. The sim-plex algorithm might encounter all these sets of basic variables before it finds that it was at a nonoptimal extreme point. This problem was illustrated (on a small scale) in solving (16): The simplex took two pivots before it found that point C was suboptimal. Fortu-nately, some degenerate LPs have a special structure that enables us to solve them by methods other than the simplex (see, for example, the discussion of the assignment prob-lem in Chapter 7).

P R O B L E M S

Group A

C B

D

A x2

x1 6

x1 + x2 = 6

x1 – x2 = 0 5

1 2 3 4 5 6

4

3

2

F I G U R E 12 1

Feasible Region for the LP (16)

T A B L E 32

Three Sets of Basic Variables Correspond to Corner Point C

Basic Corresponds to

Variables Basic Feasible Solution Extreme Point

x1, x2 x1 x2 3, s1 s2 0 D x1, s1 x1 0, s1 6, x2 s2 0 C x1, s2 x1 6, s2 6, x2 s1 0 Infeasible x2, s1 x2 0, s1 6, x1 s2 0 C x2, s2 x2 6, s2 6, s1 x1 0 B s1, s2 s1 6, s2 0, x1 x2 0 C

1 Even if an LP’s initial tableau is nondegenerate, later tableaus may exhibit degeneracy. Degenerate tableaus often occur in the tableau following a tie in the ratio test. To illustrate this, solve the following LP:

max z 5x1 3x2

s.t. 4x1 2x2 12 s.t. 4x1 x2 10 s.t. x1 x2 4

x1, x2 0

Also graph the feasible region and show which extreme points correspond to more than one set of basic variables.

2 Find the optimal solution to the following LP:

min z x1 x2

s.t. x1 x2 1 s.t. x1 x2 0 x1, x2 0

在文檔中 An Introduction to Model Building (頁 168-172)