0% found this document useful (0 votes)
3 views

simplex method

The document explains the Simplex Method for solving linear programming problems using a tableau format. It details the steps involved in setting up the initial simplex tableau, including identifying basic feasible solutions and calculating objective function coefficients. The process continues with computing values for the zj and cj zj rows to determine optimal production variables.

Uploaded by

Salih Akadar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

simplex method

The document explains the Simplex Method for solving linear programming problems using a tableau format. It details the steps involved in setting up the initial simplex tableau, including identifying basic feasible solutions and calculating objective function coefficients. The process continues with computing values for the zj and cj zj rows to determine optimal production variables.

Uploaded by

Salih Akadar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

The Simplex Method Page 1 of 15

[Page A-5 (continued)]

The Simplex Method


The steps of the simplex method are carried out within the framework of a table, or tableau.
The tableau organizes the model into a form that makes applying the mathematical steps
easier. The Beaver Creek Pottery Company example will be used again to demonstrate the
simplex tableau and 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.

Table A-1. The Simplex Tableau

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

4x1 + 3x2 + s2 = 120

4(0) + 3(0) + = 120


s2

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."

Table A-2. The Basic Feasible Solution

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 number of columns in a tableau is equal to the number of variables (including


slacks, etc.) plus three.

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.

Table A-3. The Simplex Tableau with cj Values

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.

Table A-4. The Simplex Tableau with Model Constraint


Coefficients
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

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.

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 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.

Computing the zj and cj zj Rows

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.

Table A-5. The Simplex Tableau with zj Row Values

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.

The value in the zj row under the x1 column is found similarly.

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]

Table A-6. The Complete Initial Simplex Tableau


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

c j zj 40 50 0 0

The Entering Nonbasic Variable


As an example, suppose the pottery company decides to produce some bowls. With this
decision x1 will become a basic variable. For every unit of x1 (i.e., each bowl) produced, profit
will be increased by $40 because that is the profit contribution of a bowl. However, when a bowl
(x1) is produced, some previously unused resources will be used. For example, if

x1 = 1

then

x1 + 2x2 + s1 = 40 hr of labor

1 + 2(0) + s1 = 40

s1 = 39 hr of labor

and

4x1 + 3x2 + s2 = 120 lb of clay

4(1) + 3(0) + = 120


s2

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

Z = 40(1) + 50(0) 0(1) + 0(4)


+
Z = $40

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]

Table A-7. Selection of the Entering Basic Variable


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

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 pivot column is the column corresponding to the entering variable.

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 produce the entering basic


variable

mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 8 of 15

The Leaving Basic Variable


Since each basic feasible solution contains only two variables with nonzero values, one of the
two basic variables present, s1 or s2, will have to leave the solution and become zero. Since we
have decided to produce mugs (x2), we want to produce as many as possible or, in other words,
as many as our resources will allow. First, in the labor constraint we will use all 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).

[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.

Figure A-3. Determination of the basic feasible solution point

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

s1 40 ÷ 2 = 20, the leaving basic variable

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

Table A-8. Pivot Column, Pivot Row, and Pivot Number


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

c j zj 40 50 0 0

The pivot row is the row corresponding to the leaving variable.

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.

Developing a New Tableau


Table A-9 shows the second simplex tableau with the new basic feasible solution variables of x2
and s2 and their corresponding cj values.

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

Computing the new tableau pivot row values.

mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025
The Simplex Method Page 11 of 15

The new row values are shown in Table A-10.

Table A-10. Computation of the New Pivot Row Values


(This item is displayed on page A-13 in the print version)

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.

Computing all remaining row values.

[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.

Table A-11. Computation of New s2 Row Values

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.

Table A-12. The Second Simplex Tableau with Row Values


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

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]

Time Out: For George B. Dantzig

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

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

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.

Table A-13. The Completed Second Simplex Tableau


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

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.

The Optimal Simplex Tableau


The steps that we followed to derive the second simplex tableau are repeated to develop the
third tableau. First, the pivot column or entering basic variable is determined. Because 15 in the
cj zj row represents the greatest positive net increase in profit, x1 becomes the entering
nonbasic variable. Dividing the pivot column values into the values in the quantity column
indicates that s2 is the leaving basic variable and corresponds to the pivot row. The pivot row,
pivot column, and pivot number are indicated in Table A-14.

Table A-14. The Pivot Row, Pivot Column, and


Pivot Number
(This item is displayed on page A-15 in the print version)

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

[View full size image]

Table A-16. The Completed Third Simplex


Tableau
40 50 0 0
Basic
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

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

The solution is optimal when all cj zj values 0.

[Page A-16]

which corresponds to point B in Figure A-1.

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.

The simplex method does not guarantee integer solutions.

mk:@MSITStore:C:\Users\MSFuser\Desktop\private%20document\Prentice.Hall.Intro... 2/26/2025

You might also like