The Simplex Solution Method
The Simplex Solution Method
Module A
The Simplex
Solution Method
A-1
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-2
he simplex method is a general mathematical solution technique for solving linear pro-
T gramming problems. In the simplex method, the model is put into the form of a table,
and then a number of mathematical steps are performed on the table. These mathematical
steps in effect replicate the process in graphical analysis of moving from one extreme
point on the solution boundary to another. However, unlike the graphical method, in
which we could simply search through all the solution points to find the best one, the sim-
plex method moves from one better solution to another until the best one is found, and
then it stops.
The manual solution of a linear programming model using the simplex method can
be a lengthy and tedious process.Years ago, manual application of the simplex method
was the only means for solving a linear programming problem. Now computer solution
is certainly preferred. However, knowledge of the simplex method can greatly enhance
one’s understanding of linear programming. Computer software programs like QM
for Windows or Excel spreadsheets provide solutions to linear programming problems,
but they do not convey an in-depth understanding of how those solutions are derived. To
a certain extent, graphical analysis provides an understanding of the solution process,
and knowledge of the simplex method further expands on that understanding. In fact,
computer solutions are usually derived using the simplex method. As a result, much of
the terminology and notation used in computer software comes from the simplex
method. Thus, for those students of management science who desire a more in-depth
knowledge of linear programming, it is beneficial to study the simplex solution method
as provided here.
subject to
subject to
x1 + 2x2 + s1 = 40
4x1 + 3x2 + s2 = 120
x1, x2, s1, s2 Ú 0
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-3
Slack variables are added to … The slack variables, s1 and s2, represent the amount of unused labor and clay, respectively.
constraints and represent For example, if no bowls and mugs are produced, and x1 = 0 and x2 = 0, then the solution
unused resources. to the problem is
x1 + 2x2 + s1 = 40
0 + 2(0) + s1 = 40
s1 = 40 hr. of labor
and
In other words, when we start the problem and nothing is being produced, all the
resources are unused. Since unused resources contribute nothing to profit, the profit is
zero:
It is at this point that we begin to apply the simplex method. The model is in the
required form, with the inequality constraints converted to equations for solution with the
simplex method.
Figure A-1
Solutions at points A, B, and C x2
4x1 + 3x2 + s2 = 120
40
x1 = 0
30 x2 = 20 x1 = 24
s1 = 0 x2 = 8
s2 = 60 s1 = 0
x1 s2 = 0
20 +2
A x2
+s
1 =4 x1 = 30
0
x2 = 0
10
B s1 = 10
s2 = 0
0
C
10 20 30 40 x1
Consider a second example where x2 = 0 and s2 = 0. These values result in the follow-
ing set of equations:
x1 + 2x2 + s1 = 40
4x1 + 3x2 + s2 = 120
and
x1 + 0 + s1 = 40
4x1 + 0 + 0 = 120
Solve for x1:
4x1 = 120
x1 = 30
Then solve for s1:
30 + s1 = 40
s1 = 10
This basic feasible solution corresponds to point C in Figure A-1, where x1 = 30,
x2 = 0, s1 = 10, and s2 = 0.
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-5
Finally, consider an example where s1 = 0 and s2 = 0. These values result in the follow-
ing set of equations:
x1 + 2x2 + s1 = 40
4x1 + 3x2 + s2 = 120
and
x1 + 2x2 + 0 = 40
4x1 + 3x2 + 0 = 120
Row operations are used to solve These equations can be solved using row operations. In row operations, the equations
simultaneous equations where can be multiplied by constant values and then added or subtracted from each other
equations are multiplied by without changing the values of the decision variables. First, multiply the top equation
constants and added or subtracted
by 4 to get
from each other.
4x1 + 8x2 = 160
and then subtract the second equation:
4x1 + 8x2 = 160
- 4x1 - 3x2 = -120
5x2 = 40
x2 = 8
Next, substitute this value of x2 into either one of the constraints:
x1 + 2(8) = 40
x1 = 24
This solution corresponds to point B on the graph, where x1 = 24, x2 = 8, s1 = 0, and
s2 = 0, which is the optimal solution point.
All three of these example solutions meet our definition of basic feasible solutions.
However, two specific questions are raised by the identification of these solutions.
1. In each example, how was it known which variables to set equal to zero?
2. How is the optimal solution identified?
The answers to both of these questions can be found by using the simplex method. The
simplex method is a set of mathematical steps that determines at each step which variables
should equal zero and when an optimal solution has been reached.
The initial simplex tableau for this model, with the various column and row headings, is
shown in Table A-1.
Table A-1
Basic ____________________________
The Simplex Tableau
cj Variables Quantity x1 x2 s1 s2
____________________________________________________________________
zj ____________________________
cj - zj
The first step in filling in Table A-1 is to record the model variables along the second row
from the top. The two decision variables are listed first, in order of their subscript magni-
tude, followed by the slack variables, also listed in order of their subscript magnitude. This
step produces the row with x1, x2, s1, and s2 in Table A-1.
The basic feasible solution in the The next step is to determine a basic feasible solution. In other words, which two vari-
initial simplex tableau is the origin ables will form the basic feasible solution and which will be assigned a value of zero? Instead
where all decision variables of arbitrarily selecting a point (as we did with points A, B, and C in the previous section),
equal zero. the simplex method selects the origin as the initial basic feasible solution because the values
of the decision variables at the origin are always known in all linear programming prob-
lems. At that point x1 = 0 and x2 = 0; thus, the variables in the basic feasible solution are
s1 and s2:
x1 + 2x2 + s1 = 40
0 + 2(0) + s1 = 40
s1 = 40 hr.
and
4x1 + 3x2 + s2 = 120
4(0) + 3(0) + s2 = 120
s2 = 120 lb.
At the initial basic feasible solution In other words, at the origin, where there is no production, all resources are slack, or
at the origin, only slack variables unused. The variables s1 and s2, which form the initial basic feasible solution, are listed in
have a value greater than zero. Table A-2 under the column “Basic Variables,” and their respective values, 40 and 120, are
listed under the column “Quantity.”
Table A-2
Basic ____________________________
The Basic Feasible Solution
cj Variables Quantity x1 x2 s1 s2
s1 40 ____________________________
s2 120
z1 ____________________________
cj - zj
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-7
The quantity column values are The initial simplex tableau always begins with the solution at the origin, where x1 and x2
the solution values for the vari- equal zero. Thus, the basic variables at the origin are the slack variables, s1 and s2. Since the
ables in the basic feasible solution. quantity values in the initial solution always appear as the right-hand-side values of the
constraint equations, they can be read directly from the original constraint equations.
The number of rows in a tableau is The top two rows and bottom two rows are standard for all tableaus; however, the num-
equal to the number of constraints ber of middle rows is equivalent to the number of constraints in the model. For example,
plus four. this problem has two constraints; therefore, it has two middle rows corresponding to s1 and
s2. (Recall that n variables minus m constraints equals the number of variables in the prob-
lem with values of zero. This also means that the number of basic variables with values
other than zero will be equal to m constraints.)
The number of columns in a Similarly, the three columns on the left side of the tableau are standard, and the remain-
tableau is equal to the number of ing columns are equivalent to the number of variables. Since there are four variables in
variables (including slacks, etc.) this model, there are four columns on the right of the tableau, corresponding to x1, x2, s1,
plus three. and s2.
The cj values are the contribution The next step is to fill in the cj values, which are the objective function coefficients, rep-
to profit (or cost) for each resenting the contribution to profit (or cost) for each variable xj or sj in the objective func-
variable. tion. Across the top row the cj values 40, 50, 0, and 0 are inserted for each variable in the
model, as shown in Table A-3.
Table A-3
40 50 0 0
The Simplex Tableau with Basic
cj Values cj Variables Quantity x1 x2 s1 s2
0 s1 40 ____________________________
0 s2 120
zj ____________________________
cj - zj
The values for cj on the left side of the tableau are the contributions to profit of only
those variables in the basic feasible solution, in this case s1 and s2. These values are inserted
at this location in the tableau so that they can be used later to compute the values in the
zj row.
The columns under each variable (i.e., x1, x2, s1, and s2) are filled in with the coefficients
of the decision variables and slack variables in the model constraint equations. The s1 row
represents the first model constraint; thus, the coefficient for x1 is 1, the coefficient for x2 is
2, the coefficient for s1 is 1, and the coefficient for s2 is 0. The values in the s2 row are the
second constraint equation coefficients, 4, 3, 0, and 1, as shown in Table A-4.
Table A-4
40 50 0 0
The Simplex Tableau with Basic
Model Constraint Coefficients cj Variables Quantity x1 x2 s1 s2
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj ____________________________
cj - zj
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-8
This completes the process of filling in the initial simplex tableau. The remaining values
in the zj and cj - zj rows, as well as subsequent tableau values, are computed mathemati-
cally using simplex formulas.
The following list summarizes the steps of the simplex method (for a maximization
model) that have been presented so far:
1. First, transform all inequalities to equations by adding slack variables.
2. Develop a simplex tableau with the number of columns equaling the number of vari-
ables plus three, and the number of rows equaling the number of constraints plus four.
3. Set up table headings that list the model decision variables and slack variables.
4. Insert the initial basic feasible solution, which are the slack variables and their quan-
tity values.
5. Assign cj values for the model variables in the top row and the basic feasible solution
variables on the left side.
6. Insert the model constraint coefficients into the body of the table.
Table A-5
40 50 0 0
The Simplex Tableau with zj Basic
Row Values cj Variables Quantity x1 x2 s1 s2
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
cj - zj
For example, the value in the zj row under the quantity column is found as follows:
cj Quantity
0 * 40 = 0
0 * 120 = 0
zq = 0
The value in the zj row under the x1 column is found similarly:
cj x1
0 * 1 = 0
The simplex method works by 0 * 4 = 0
moving from one solution zj = 0
(extreme) point to an adjacent
point until it locates the best All the other zj row values for this tableau will be zero when they are computed using this
solution. formula.
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-9
Now the cj - zj row is computed by subtracting the zj row values from the cj (top) row
values. For example, in the x1 column the cj - zj row value is computed as 40 - 0 = 40.
This value as well as other cj - zj values are shown in Table A-6, which is the complete ini-
tial simplex tableau with all values filled in. This tableau represents the solution at the ori-
gin, where x1 = 0, x2 = 0, s1 = 40, and s2 = 120. The profit represented by this solution
(i.e., the Z value) is given in the zj row under the “Quantity” column—0 in Table A-6. This
solution is obviously not optimal because no profit is being made. Thus, we want to move
to a solution point that will give a better solution. In other words, we want to produce either
some bowls (x1) or some mugs (x2). One of the nonbasic variables (i.e., variables not in the
present basic feasible solution) will enter the solution and become basic.
Table A-6
40 50 0 0
The Complete Initial Basic
Simplex Tableau cj Variables Quantity x1 x2 s1 s2
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
cj - zj 40 50 0 0
variable into the basic solution. Naturally, we want to make as much money as possible,
because the objective is to maximize profit. Therefore, we enter the variable that will give
the greatest net increase in profit per unit. From Table A-7, we select variable x2 as the
entering basic variable because it has the greatest net increase in profit per unit, $50—the
highest positive value in the cj - zj row.
Table A-7
40 50 0 0
Selection of the Entering Basic Basic
Variable cj Variables Quantity x1 x2 s1 s2
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
cj - zj 40 50 0 0
The pivot column is the column The x2 column, highlighted in Table A-7, is referred to as the pivot column. (The opera-
corresponding to the entering tions used to solve simultaneous equations are often referred to in mathematical terminol-
variable.
ogy as pivot operations.)
The selection of the entering basic variable is also demonstrated by the graph in Figure A-2.
At the origin nothing is produced. In the simplex method we move from one solution point
to an adjacent point (i.e., one variable in the basic feasible solution is replaced with a variable
that was previously zero). In Figure A-2 we can move along either the x1 axis or the x2 axis in
order to seek a better solution. Because an increase in x2 will result in a greater profit, we
choose x2.
Figure A-2
Selection of which item to x2
produce—the entering basic
variable 40
Produce mugs
30
A
20
10 B
0 C
10 20 30 40 x1
Produce bowls
the labor to make mugs (because no bowls are to be produced, x1 = 0; and because we will
use all the labor possible and s1 = unused labor resources, s1 = 0 also):
Figure A-3
Determination of the basic x2
feasible solution point R
40
30
$50 profit
A
20
10
B
0
C
10 20 30 40 x1
$40 profit
Because we are moving out the x2 axis, we can move from the origin to either point A or
point R. We select point A because it is the most constrained and thus feasible, whereas point
R is infeasible.
The leaving variable is determined This analysis is performed in the simplex method by dividing the quantity values of the
by dividing the quantity values by basic solution variables by the pivot column values. For this tableau,
the pivot column values and
selecting the minimum possible Basic
value or zero. Variables Quantity x2
s1 40 , 2 = 20, the leaving basic variable
s2 120 , 3 = 40
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-12
The leaving basic variable is the variable that corresponds to the minimum nonnegative
quotient, which in this case is 20. (Note that a value of zero would qualify as the minimum
The pivot row is the row quotient and would be the choice for the leaving variable.) Therefore, s1 is the leaving
corresponding to the leaving variable. (At point A in Figure A-3, s1 equals zero because all the labor is used to make the
variable. 20 mugs.) The s1 row, highlighted in Table A-8, is also referred to as the pivot row.
Table A-8
40 50 0 0
Pivot Column, Pivot Row, and Basic
Pivot Number cj Variables Quantity x1 x2 s1 s2
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
cj - zj 40 50 0 0
The value of 2 at the intersection of the pivot row and the pivot column is called the
The pivot number is the number pivot number. The pivot number, row, and column are all instrumental in developing the
at the intersection of the pivot next tableau. We are now ready to proceed to the second simplex tableau and a better
column and row. solution.
Table A-9
40 50 0 0
The Basic Variables and Basic
cj Values for the Second cj Variables Quantity x1 x2 s1 s2
Simplex Tableau
50 x2
0 s2
zj
cj - zj
Computing the new tableau pivot The various row values in the second tableau are computed using several simplex for-
row values. mulas. First, the x2 row, called the new tableau pivot row, is computed by dividing every
value in the pivot row of the first (old) tableau by the pivot number. The formula for these
computations is
old tableau pivot row values
new tableau pivot row values =
pivot number
The new row values are shown in Table A-10.
Computing all remaining row To compute all remaining row values (in this case there is only one other row), another
values. formula is used.
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-13
Table A-10
40 50 0 0
Computation of the New Pivot Basic
Row Values cj Variables Quantity x1 x2 s1 s2
50 x2 20 1/2 1 1/2 0
0 s2
zj
cj - zj
corresponding corresponding
new tableau = old tableau - £ coefficients in * new tableau ≥
row values row values pivot column pivot row value
Thus, this formula requires the use of both the old tableau and the new one. The s2 row val-
ues are computed in Table A-11.
Table A-11
Computation of New s2 Corresponding New Tableau New Tableau
Old Tableau - £ Coefficients in * Pivot ≥ = Row Value
Row Values Row Value
Column Pivot Column Row Value
These values have been inserted in the simplex tableau in Table A-12.
This solution corresponds to point A in the graph of this model in Figure A-3. The solu-
tion at this point is x1 = 0, x2 = 20, s1 = 0, s2 = 60. In other words, 20 mugs are produced
and 60 pounds of clay are left unused. No bowls are produced and no labor hours remain
unused.
Table A-12
40 50 0 0
The Second Simplex Tableau Basic
with Row Values cj Variables Quantity x1 x2 s1 s2
50 x2 20 1/2 1 1/2 0
0 s2 60 5/2 0 -3/2 1
zj
cj - zj
The second simplex tableau is completed by computing the zj and cj - zj row values the
same way they were computed in the first tableau. The zj row is computed by summing the
products of the cj column and all other column values.
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-14
Column
Quantity zj = (50)(20) + (0)(60) = 1000
x1 z1 = (50)(1>2) + (0)(5>2) = 25
x2 z2 = (50)(1) + (0)(0) = 50
s1 z3 = (50)(1>2) + (0)(-3>2) = 25
s2 z4 = (50)(0) + (0)(1) = 0
The zj row values and the cj - zj row values are added to the tableau to give the com-
pleted second simplex tableau shown in Table A-13. The value of 1,000 in the zj row is the
value of the objective function (profit) for this basic feasible solution.
Table A-13
40 50 0 0
The Completed Second Basic
Simplex Tableau cj Variables Quantity x1 x2 s1 s2
50 x2 20 1/2 1 1/2 0
0 s2 60 5/2 0 -3/2 1
zj 1,000 25 50 25 0
cj - zj 15 0 -25 0
Each tableau is the same as The computational steps that we followed to derive the second tableau in effect accom-
performing row operations for a plish the same thing as row operations in the solution of simultaneous equations. These
set of simultaneous equations. same steps are used to derive each subsequent tableau, called iterations.
Table A-14
40 50 0 0
The Pivot Row, Pivot Column, Basic
and Pivot Number cj Variables Quantity x1 x2 s1 s2
50 x2 20 1/2 1 1/2 0
0 s2 60 5/2 0 -3/2 1
zj 1,000 25 50 25 0
cj - zj 15 0 -25 0
The new tableau pivot row (x1) in the third simplex tableau is computed using the same
formula used previously. Thus, all old pivot row values are divided through by 5/2, the
pivot number. These values are shown in Table A-16. The values for the other row (x2) are
computed as shown in Table A-15.
Table A-15
Corresponding New Tableau
Row Value Q
Computation of the x2 Row for
P Pivot Column
Old Tableau Coefficients in * Pivot New Tableau
the Third Simplex Tableau Row Value - = Row Value
Column
These new row values, as well as the new zj row and cj - zj row, are shown in the com-
pleted third simplex tableau in Table A-16.
Table A-16
40 50 0 0
The Completed Third Simplex Basic
Tableau cj Variables Quantity x1 x2 s1 s2
50 x2 8 0 1 4/5 -1/5
40 x1 24 1 0 -3/5 2/5
zj 1,360 40 50 16 6
cj - zj 0 0 -16 -6
The solution is optimal when all Observing the cj - zj row to determine the entering variable, we see that a nonbasic
cj - zj values … 0. variable would not result in a positive net increase in profit, as all values in the cj - zj row
are zero or negative. This means that the optimal solution has been reached. The solution is
x1 = 24 bowls
x2 = 8 mugs
Z = $1,360 profit
which corresponds to point B in Figure A-1.
Z06_TAYL4367_10_SE_Mod A.QXD 1/9/09 1:07 AM Page A-16
The simplex method does not An additional comment should be made regarding simplex solutions in general.
guarantee integer solutions. Although this solution resulted in integer values for the variables (i.e., 24 and 8), it is possi-
ble to get a fractional solution for decision variables even though the variables reflect items
that should be integers, such as airplanes, television sets, bowls, and mugs. To apply the
simplex method, one must accept this limitation.