simplex method
simplex method
The simplex method is a set of mathematical steps for solving a linear programming
problem carried out in a table called a simplex tableau.
[Page A-6]
The initial simplex tableau for this model, with the various column and row headings, is shown
in Table A-1.
Basic
cj Variables Quantity x1 x2 s1 s2
zj
c j 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 magnitude,
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 next step is to determine a basic feasible solution. In other words, which two variables will
form the basic feasible solution and which will be assigned a value of zero? Instead of arbitrarily
selecting a point (as we did with points A, B, and C in the previous section), 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 problems. At that point x1 =
0 and x2 = 0; thus, the variables in the basic feasible solution are s1 and s2.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 2 of 15
x1 + 2x2 + s1 = 04
0 + 2(0) + s1 = 40
s1 = 40 hr
and
s2 = 120 lb
The basic feasible solution in the initial simplex tableau is the origin where all
decision variables equal zero.
In other words, at the origin, where there is no production, all resources are slack, or unused.
The variables s1 and s2, which form the initial basic feasible solution, are listed in Table A-2
under the column "Basic Variables," and their respective values, 40 and 120, are listed under
the column "Quantity."
Basic
cj Variables Quantity x1 x2 s1 s2
s1 40
s2 120
zj
c j zj
At the initial basic feasible solution at the origin, only slack variables have a value
greater than zero.
[Page A-7]
The initial simplex tableau always begins with the solution at the origin, where x1 and x2 equal
zero. Thus, the basic variables at the origin are the slack variables, s1 and s2. Since the
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 quantity column values are the solution values for the variables in the basic
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 3 of 15
feasible solution.
The top two rows and bottom two rows are standard for all tableaus; however, the number of
middle rows is equivalent to the number of constraints in the model. For example, 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 problem 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 rows in a tableau is equal to the number of constraints plus four.
Similarly, the three columns on the left side of the tableau are standard, and the remaining
columns are equivalent to the number of variables. Since there are four variables in this model,
there are four columns on the right of the tableau, corresponding to x1, x2, s1, and s2.
The next step is to fill in the cj values, which are the objective function coefficients,
representing the contribution to profit (or cost) for each variable xj or sj in the objective
function. 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.
40 50 0 0
Basic
cj Variables Quantity x1 x2 s1 s2
0 s1 40
0 s2 120
zj
c j zj
The cj values are the contribution to profit (or cost) for each variable.
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
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 4 of 15
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.
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj
c j zj
[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 mathematically using
simplex formulas.
The following list summarizes the steps of the simplex method (for a maximization model) that
have been presented so far.
2. Develop a simplex tableau with the number of columns equaling the number of variables
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 quantity
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.
So far the simplex tableau has been set up using values taken directly from the model. From
this point on the values are determined by computation. First, the values in the zj row are
computed by multiplying each cj column value (on the left side) by each column value under
Quantity, x1, x2, s1, and s2 and then summing each of these sets of values. The zj values are
shown in Table A-5.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 5 of 15
40 50 0 0
Basic
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 cj
The zj row values are computed by multiplying the cj column values by the variable
column values and summing.
For example, the value in the zj row under the quantity column is found as follows.
All of the other zj row values for this tableau will be zero when they are computed using this
formula.
The simplex method works by moving from one solution (extreme) point to an
adjacent point until it locates the best solution.
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 initial simplex tableau with all
values filled in. This tableau represents the solution at the origin, 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 column0 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.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 6 of 15
[Page A-9]
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
c j zj 40 50 0 0
x1 = 1
then
x1 + 2x2 + s1 = 40 hr of labor
1 + 2(0) + s1 = 40
s1 = 39 hr of labor
and
s2 = 116 lb of clay
In the labor constraint we see that, with the production of one bowl, the amount of slack, or
unused, labor is decreased by 1 hour. In the clay constraint the amount of slack is decreased by
4 pounds. Substituting these increases (for x1) and decreases (for slack) into the objective
function gives
cj zj
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 7 of 15
The variable with the largest positive cj zj value is the entering variable.
The first part of this objective function relationship represents the values in the cj row; the
second part represents the values in the zj row. The function expresses the fact that to produce
some bowls, we must give up some of the profit already earned from the items they replace. In
this case the production of bowls replaced only slack, so no profit was lost. In general, the cj zj
row values represent the net increase per unit of entering a nonbasic 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.
[Page A-10]
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
c j zj 40 50 0 0
The x2 column, highlighted in Table A-7, is referred to as the pivot column. (The operations used
to solve simultaneous equations are often referred to in mathematical terminology 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.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 8 of 15
[Page A-11]
In other words, enough labor is available to produce 20 mugs. Next, perform the same analysis
on the constraint for clay.
This indicates that there is enough clay to produce 40 mugs. But there is enough labor to
produce only 20 mugs. We are limited to the production of only 20 mugs because we do not
have enough labor to produce any more than that. This analysis is shown graphically in Figure
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 9 of 15
A-3.
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.
This analysis is performed in the simplex method by dividing the quantity values of the basic
solution variables by the pivot column values. For this tableau,
Basic
Variables Quantity x2
s2 120 ÷ 3 = 40
The leaving variable is determined by dividing the quantity values by the pivot column
values and selecting the minimum possible value or zero.
[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
quotient and would be the choice for the leaving variable.) Therefore, s1 is the leaving variable.
(At point A in Figure A-3, s1 equals zero because all the labor is used to make the 20 mugs.)
The s1 row, highlighted in Table A-8, is also referred to as the pivot row.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 10 of 15
0 s1 40 1 2 1 0
0 s2 120 4 3 0 1
zj 0 0 0 0 0
c j zj 40 50 0 0
The value of 2 at the intersection of the pivot row and the pivot column is called the pivot
number. The pivot number, row, and column are all instrumental in developing the next
tableau. We are now ready to proceed to the second simplex tableau and a better solution.
The pivot number is the number at the intersection of the pivot column and row.
Table A-9. The Basic Variables and cj Values for the Second
Simplex Tableau
40 50 0 0
Basic
cj Variables Quantity x1 x2 s1 s2
50 x2
0 s2
zj
c j zj
The various row values in the second tableau are computed using several simplex formulas.
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
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 11 of 15
40 50 0 0
Basic
cj Variables Quantity x1 x2 s1 s2
50 x2 20 1/2 1 1/2 0
0 s2
zj
c j zj
To compute all remaining row values (in this case there is only one other row), another formula
is used.
[Page A-13]
Thus, this formula requires the use of both the old tableau and the new one. The s2 row values
are computed in Table A-11.
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 solution at
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 12 of 15
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.
50 x2 20 1/2 1 1/2 0
0 s2 60 5/2 0 3/2 1
zj
c j 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.
[Page A-14]
After developing the simplex method for solving linear programming problems,
George Dantzig needed a good problem to test it on. The problem he selected was
the "diet problem" formulated in 1945 by Nobel economist George Stigler. This
problem was to determine an adequate nutritional diet at minimum cost (which was
an important military and civilian issue during World War II). Formulated as a linear
programming model, the diet problem consisted of 77 unknowns and 9 equations. It
took 9 clerks using hand-operated (mechanical) desk calculators 120 man-days to
obtain the optimal simplex solution: a diet consisting primarily of wheat flour,
cabbage, and dried navy beans that cost $39.69 per year (in 1939 prices). The
solution developed by Stigler using his own numerical method was only 24 cents
more than the optimal solution.
Column
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 13 of 15
The zj row values and the cj zj row values are added to the tableau to give the completed
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.
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
c j zj 15 0 25 0
The computational steps that we followed to derive the second tableau in effect accomplish the
same thing as row operations in the solution of simultaneous equations. These same steps are
used to derive each subsequent tableau, called iterations.
Each tableau is the same as performing row operations for a set of simultaneous
equations.
40 50 0 0
Basic
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
c j zj 15 0 25 0
At this point you might be wondering why the net increase in profit per bowl (x1) is $15 rather
than the original profit of $40. It is because the production of bowls (x1) will require some of
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 14 of 15
the resources previously used to produce mugs (x2) only. Producing some bowls means not
producing as many mugs; thus, we are giving up some of the profit gained from producing
mugs to gain even more by producing bowls. This difference is the net increase of $15.
[Page A-15]
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. Computation of the x2 Row for the Third Simplex Tableau
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
c j zj 0 0 16 6
These new row values, as well as the new zj row and cj zj row, are shown in the completed third
simplex tableau in Table A-16.
Observing the cj zj row to determine the entering variable, we see that a nonbasic 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
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 15 of 15
Z = $1,360 profit
[Page A-16]
An additional comment should be made regarding simplex solutions in general. Although this
solution resulted in integer values for the variables (i.e., 24 and 8), it is possible 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.
mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025