LINEAR PROGRAMMING
3. Continue to find better basic feasible solutions, improving the objective function values. When a particular basic feasible solution cannot be
improved further, it becomes an optimal solution, and the simplex method terminates.
We begin by considering the details of step 2 of the simplex method by assuming that the basic solution given by system (S1) is feasible. Thus, we have an initial basic feasible solution in canonical form as follows:
Basic: xi⫽ bi⭓0 for i ⫽ 1, 2, . . . , m Nonbasic: xj⫽ 0 for j ⫽ m⫹1, . . . , n
The set of basic variables will be called a basis and will be denoted xB. Let the objective function coefficients of the basic variables be denoted cB. For the initial basis,
xB⫽ (x , . . . , x )1 m and cB ⫽ (c , c , . . . , c )1 2 m
Since the nonbasic variables are zero, the value of the objective function Z corresponding to the initial basic feasible solution is given by
Z⫽c xB B ⫽c b1 1⫹ ⫹c bm m
Given this, the simplex method checks whether it is possible to find a better basic feasible solution with a higher value of Z. This is done by first exam-ining whether the present solution is optimal. In case it is not optimal, the simplex method obtains an adjacent basic feasible solution with a larger value of Z (or at least as large).
Definition
An adjacent basic feasible solution differs from the present basic feasible solution in exactly one basic variable.
To obtain an adjacent basic feasible solution, the simplex method makes one of the basic variables a nonbasic variable and brings in a nonbasic variable as a basic variable in its place. The problem is to select the appropriate basic and nonbasic variables such that an exchange between them will give the maximum improvement to the objective function.
In any basic feasible solution, the basic variables can assume positive val-ues while the nonbasic variables are always held at zero. Hence, making a
interested in examining adjacent basic feasible solutions only, the values of the other nonbasic variables will continue to remain zero and system (S1) can be rewritten as follows:
x1 ⫹a x1s s ⫽ b1
⯗
xr ⫹ a xrs s ⫽ br (S2)
⯗ xm⫹ a xms s⫽ bm
From system (S2), we obtain the new solution when xsincreases from 0 to 1:
xi⫽ bi⫺ ais for i⫽ 1, . . . , m xs⫽ 1
xj⫽ 0 for j⫽ m⫹ 1, . . . , n and j⫽ s The new value of the objective function is
m
Z⫽i
冘
⫽1 c (bi i⫺ a )is ⫹csHence, the net change in the value of Z per unit increase in xs, denotedc ,s is cs ⫽new value of Z ⫺ old value of Z
m m
⫽
冘
i⫽1 c (bi i⫺ a )is ⫹ cs ⫺冘
i⫽1 c bi im
⫽cs ⫺i
冘
⫽1 c ai is (4.5)where cs is called the relative profit of the nonbasic variable xs, as opposed to its actual profit cs in the objective function. If cs ⬎ 0, then the objective
function Z can be increased further by making xs a basic variable. Equation (4.5), which gives the formula for calculating the relative profits, is known as the inner product rule.
Inner Product Rule
The relative profit coefficient of a nonbasic variable xj, denoted byc ,j is given by
cj⫽cj⫺c PB j
where cB corresponds to the profit coefficients of the basic variables and Pj
corresponds to the jth column in the canonical system of the basis under consideration.
Condition of Optimality
In a maximization problem, a basic feasible solution is optimal if the relative profits of its nonbasic variables are all negative or zero.
It is clear that when all cj ⭐ 0 for nonbasic variables, then every adjacent basic feasible solution has an objective function value lower than the present solution. This implies that we have a local maximum at this point. Since the objective function Z is linear, a local maximum automatically becomes the global maximum.
For the sake of illustration, let us assume thatcs⫽ maxcj⬎ 0, and hence the initial basic feasible solution is not optimal. The positive relative profit of xs implies that Z will be increased by cs units for every unit increase of the nonbasic variable xs. Naturally, we would like to increase xsas much as possible so as to get the largest increase in the objective function. But as xs
increases, the values of the basic variables change, and their new values are obtained from system (S2) as
xi⫽bi ⫺a xis s for i ⫽ 1, . . . , m (4.6) Ifais⬍ 0, then xiincreases as xs is increased, and if ais⫽ 0, the value of xi does not change. However, ifais⬎ 0, xidecreases as xsis increased and may turn negative (making the solution infeasible) if xs is increased indefinitely.
Hence, the maximum increase in xsis given by the following rule:
bi
max xs ⫽minais⬎0 冋 册ais (4.7) Let
br
xi ⫽bi⫺ ais冉 冊ars for all i br
xs ⫽ (4.8)
ars
for all other nonbasic variables xj ⫽0 j ⫽ m⫹1, . . . , n and j ⫽ s
Since a unit increase in xs increases the objective function Z by cs units, the total increase in Z is given by
br (c )s冉 冊ars ⬎0
Equation (4.7), which determines the basic variables to leave the basis, is known as the minimum-ratio rule in the simplex algorithm. Once again, the simplex algorithm checks whether the basic feasible solution given by (4.8) is optimal by calculating the relative profits for all the nonbasic variables, and the cycle is repeated until the optimality conditions are reached.
Let us now illustrate the basic steps of the simplex algorithm with an example.
Example 4.6
Let us use the simplex method to solve the following problem:
Maximize Z ⫽3x1 ⫹ 2 x2 Subject to ⫺x1 ⫹2 x2⭐ 4
3x1 ⫹2 x2⭐ 14 x1 ⫺ x2⭐ 3 x1⭓ 0 x2 ⭓0
Converting the problem to standard form by the addition of slack variables, we get
Tableau 1 basic variables. The various steps of the simplex method can be carried out in a compact manner by using a tableau form to represent the constraints and the objective function. In addition, the various calculations (e.g., inner product rule, minimum-ratio rule, pivot operation) can be made mechanical. The use of the tableau form has made the simple method more efficient and convenient for computer implementation.
The tableau presents the problem in a detached coefficient form. Tableau 1 gives the initial basic feasible solution for Example 4.6. Note that only the coefficients of the variables are written for each constraint. The objective function coefficients cj are written above their respective xj’s. Basis denotes the basic variables of the initial tableau, namely x3 for constraint 1, x4 for constraint 2, and x5for constraint 3. The parameter cBdenotes their respective cj values. From Tableau 1, we obtain the initial basic feasible solution im-mediately as x3 ⫽ 4, x4 ⫽ 14, x5 ⫽ 3, and x1 ⫽ x2 ⫽ 0. The value of the objective function Z is given by the inner product of the vectors cB and con-stants:
4 Z⫽ (0, 0, 0) 14
冢 冣
3 ⫽ 0To decide which basic variable is going to be replaced, we apply the minimum-ratio rule [Eq. (4.7)] by calculating the ratios for each constraint that has a positive coefficient under the x1 column as follows:
Row Number Basic Variable Ratio
1 x3 ⬁
2 x4 ––143
3 x5 –31
Note that no ratio is formed for the first row or is set to⬁, since the coefficient for x1in row 1 is negative. This means that x1can be increased to any amount without making x3 negative. On the other hand, the ratio ––143 for the second row implies that x4 will become zero when x1 increases to ––143. Similarly, as x1 increases to 3, x5turns zero. The minimum ratio is 3, or as x1 is increased from 0 to 3, the basic variable x5 will turn zero first and will be replaced by x1. Row 3 is called the pivot row, and the coefficient of x1 in the pivot row is called the pivot element (circled in Tableau 1). We obtain the new basic variable x3, x4, and x1and the new canonical system (Tableau 2) by performing a pivot operation as follows:
1. Add the pivot row (row 3) to the first row to eliminate x1.
2. Multiply the pivot row by⫺3 and add it to the second row to eliminate x1.
To check whether the basic feasible solution given by Tableau 2 is optimal, we must calculate the new relative-profit coefficients(c row). We can do this by applying the inner product rule as before. On the other hand, it is also possible to calculate the new c row through the pivot operation. Since x1 is the new basic variable, its relative-profit coefficient in Tableau 2 should be zero. To achieve this, we multiply the third row of Tableau 1 (the pivot row) by ⫺3 and add it to the c row. This will automatically give the new c row for Tableau 2!
The movement from Tableau 1 to Tableau 2 is illustrated pictorially in Figure 4.5. The feasible region of Example 4.6 is denoted ABCDE. The dotted lines correspond to the objective function lines at Z⫽3 and Z⫽ 9. Note that the basic feasible solution represented by Tableau 1 corresponds to the corner
Tableau 2
cj
3 2 0 0 0
cB Basis x1 x2 x3 x4 x5 Constants
0 x3 0 1 1 0 1 7
0 x4 0 ⑤ 0 1 ⫺3 5
3 x1 1 ⫺1 0 0 1 3
row
c 0 5 0 0 ⫺3 Z⫽9
Figure 4.5. Feasible region for Example 4.6.
point A. Thec row in Tableau 1 indicates that either x1or x2may be made a basic variable to increase Z. From Figure 4.5 it is clear that either x1 or x2 can be increased to increase Z. Having decided to increase x1, it is clear that we cannot increase x1beyond three units (point B) in order to remain in the feasible region. This was essentially the minimum-ratio value that was ob-tained by the simplex method. Thus, Tableau 2 is simply corner point B in Figure 4.5.
Tableau 3
Alternate Optima. In Tableau 3, the nonbasic variable x5has a relative profit of zero. This means that no increase in x5 will produce any change in the objective function value. In other words x5 can be made a basic variable and the resulting basic feasible solution will also have Z⫽14. By definition, any feasible solution whose value of Z equals the optimal value is also an optimal solution. Hence, we have an alternate optimal solution to this linear program.
This can be obtained by making x5 a basic variable. By the minimum-ratio rule, x3leaves the basis, and we have an alternative optimal tableau, as shown in Tableau 4. Thus the alternate optimal solution is given by x1 ⫽ –52, x2 ⫽
x3 ⫽ 0, x4 ⫽ 0, and x5⫽
13 15
––4, ––4.
In general, an alternate optimal solution is indicated whenever there exists a nonbasic variable whose relative profit(cjcoefficient) is zero in the optimal tableau. Referring to Figure 4.5, the movement from Tableau 2 to Tableau 3 by the simplex method corresponds to moving along the edge BC of the feasible region. Using the objective function Z ⫽ 3x1 ⫹ 2 x2, it is clear that corner points C and D, as well as the line CD, are optimal.
Summary of Computational Steps
In summary, the computational steps of the simplex method in tableau form for a maximization problem are as follows: