Lecture Four Dr. Mudhaffar Y.
Hussein The Simplex Method: Maximization
Lecture 4
THE SIMPLEX METHOD: MAXIMIZATION
For linear programming problems involving two variables, the
graphical solution method introduced in Lecture 1 is convenient.
However, for problems involving more than two variables or
problems involving a large number of constraints, it is better to
use solution methods that are adaptable to computers. One such
method is called the simplex method, developed by George
Dantzig in 1946. It provides us with a systematic way of
examining the vertices of the feasible region to determine the
optimal value of the objective function. We introduce this method
with an example.
Suppose we want to find the maximum value of z = 4x1 + 6x2,
where x1 ≥ 0 and x2 ≥ 0, subject to the following constraints.
Since the left-hand side of each inequality is less than or equal to
the right-hand side, there must exist nonnegative numbers s1, s2
and s3 that can be added to the left side of each equation to
produce the following system of linear equations.
1
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
The numbers s1, s2 and s3 are called slack variables because they
take up the “slack” in each inequality.
Standard Form of a Linear Programming Problem
REMARK : Note that for a linear programming problem in
standard form, the objective function is to be maximized, not
minimized. (Minimization problems will be discussed in Lecture
6).
A basic solution of a linear programming problem in standard
form is a solution (x1, x2, …, xn, s1, s2, …, sm) of the constraint
2
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
equations in which at most m variables are nonzero––the
variables that are nonzero are called basic variables. A basic
solution for which all variables are nonnegative is called a basic
feasible solution.
The Simplex Tableau
The simplex method is carried out by performing elementary row
operations on a matrix that we call the simplex tableau. This
tableau consists of the augmented matrix corresponding to the
constraint equations together with the coefficients of the objective
function written in the form
In the tableau, it is customary to omit the coefficient of z. For
instance, the simplex tableau for the linear programming problem
3
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
For this initial simplex tableau, the basic variables are s1, s2 and
s3, and the nonbasic variables (which have a value of zero) are
x1 and x2. Hence, from the two columns that are farthest to the
right, we see that the current solution is
This solution is a basic feasible solution and is often written as
The entry in the lower–right corner of the simplex tableau is the
current value of z. Note that the bottom–row entries under x1 and
x2 are the negatives of the coefficients of x1 and x2 in the objective
function
4
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
To perform an optimality check for a solution represented by a
simplex tableau, we look at the entries in the bottom row of the
tableau. If any of these entries are negative (as above), then the
current solution is not optimal.
Pivoting
Once we have set up the initial simplex tableau for a linear
programming problem, the simplex method consists of checking
for optimality and then, if the current solution is not optimal,
improving the current solution. (An improved solution is one that
has a larger z-value than the current solution.) To improve the
current solution, we bring a new basic variable into the solution–
–we call this variable the entering variable. This implies that one
of the current basic variables must leave, otherwise we would
have too many variables for a basic solution––we call this
variable the departing variable. We choose the entering and
departing variables as follows.
1. The entering variable corresponds to the smallest (the most
negative) entry in the bottom row of the tableau.
2. The departing variable corresponds to the smallest
nonnegative ratio of bi/aij, in the column determined by the
entering variable.
5
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
3. The entry in the simplex tableau in the entering variable’s
column and the departing variable’s row is called the pivot.
Finally, to form the improved solution, we apply Gauss-Jordan
elimination to the column that contains the pivot, as illustrated in
the following example. (This process is called pivoting)
EXAMPLE 1
Pivoting to Find an Improved Solution
Use the simplex method to find an improved solution for the
linear programming problem represented by the following
tableau.
The objective function for this problem is z = 4x1 + 6x2
Solution
Note that the current solution (𝑥1 = 0. 𝑥2 = 0. 𝑠1 = 11. 𝑠2 =
27. 𝑠3 = 90) corresponds to a z–value of 0. To improve this
6
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
solution, we determine that x2 is the entering variable, because -6
is the smallest entry in the bottom row.
To see why we choose 𝑥2 as the entering variable, remember that
𝑧 = 4𝑥1 + 6𝑥2 Hence, it appears that a unit change in 𝑥2
produces a change of 6 in z, whereas a unit change in 𝑥1 produces
a change of only 4 in z.
To find the departing variable, we locate the 𝑏𝑖 ’s that have
corresponding positive elements in the entering variables column
and form the following ratios.
Here the smallest positive ratio is 11, so we choose 𝑠1 as the
departing variable.
7
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
Note that the pivot is the entry in the first row and second column.
Now, we use Gauss- Jordan elimination to obtain the following
improved solution.
The new tableau now appears as follows.
8
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
Note that 𝑥2 has replaced 𝑠1 in the basis column and the improved
solution
has a z-value of
In Example 1 the improved solution is not yet optimal since the
bottom row still has a negative entry. Thus, we can apply another
iteration of the simplex method to further improve our solution as
follows. We choose 𝑥1 as the entering variable. Moreover, the
smallest nonnegative ratio of 11/(-1), 16/2 = 8 and 35/7 is 5, so
𝑠3 is the departing variable. Gauss-Jordan elimination produces
the following.
Thus, the new simplex tableau is as follows.
9
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
In this tableau, there is still a negative entry in the bottom row.
Thus, we choose s1 as the entering variable and 𝑠2 as the departing
variable, as shown in the following tableau.
By performing one more iteration of the simplex method, we
obtain the following tableau. (Try checking this.)
10
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
In this tableau, there are no negative elements in the bottom row.
We have therefore determined the optimal solution to be
Because the linear programming problem in Example 1 involved
only two decision variables, we could have used a graphical
solution technique, as we did in Lecture 1. Notice in Figure
below that each iteration in the simplex method corresponds to
moving from a given vertex to an adjacent vertex with an
improved z-value.
11
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
The Simplex Method
We summarize the steps involved in the simplex method as
follows.
The Simplex Method (Standard Form)
12
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
Note that the basic feasible solution of an initial simplex tableau
is
This solution is basic because at most m variables are nonzero
(namely the slack variables). It is feasible because each variable
is nonnegative.
In the next two examples, we illustrate the use of the simplex
method to solve a problem involving three decision variables.
EXAMPLE 2
The Simplex Method with Three Decision Variables
Use the simplex method to find the maximum value of
subject to the constraints
13
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
Solution
Using the basic feasible solution
the initial simplex tableau for this problem is as follows. (Try
checking these computations, and note the “tie” that occurs when
choosing the first entering variable.)
14
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
This implies that the optimal solution is
and the maximum value of z is 15.
Occasionally, the constraints in a linear programming problem
will include an equation. In such cases, we still add a “slack
variable” called an artificial variable to form the initial simplex
tableau. Technically, this new variable is not a slack variable
(because there is no slack to be taken). Once you have determined
an optimal solution in such a problem, you should check to see
that any equations given in the original constraints are satisfied.
Example 3 illustrates such a case.
EXAMPLE 3
The Simplex Method with Three Decision Variables
Use the simplex method to find the maximum value of
15
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
subject to the constraints
Solution
Using the basic feasible solution
the initial simplex tableau for this problem is as follows. (Note
that s1 is an artificial variable, rather than a slack variable.)
16
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
This implies that the optimal solution is
and the maximum value of z is 45. (This solution satisfies the
equation given in the constraints because 4(3) + 1(18) + 1(0) =
30.)
17
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
Application
A manufacturer produces three types of plastic fixtures. The time
required for molding, trimming, and packaging is given in Table
1. (Times are given in hours per dozen fixtures.)
Table 1
How many dozen of each type of fixture should be produced to
obtain a maximum profit?
Solution
Letting 𝑥1 . 𝑥2 and 𝑥3 represent the number of dozen units of
Types A, B, and C, respectively, the objective function is given
by
Moreover, using the information in the table, we construct the
following constraints.
18
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
(We also assume that 𝑥1 ≥ 0. 𝑥2 ≥ 0 and 𝑥3 ≥ 0.) Now, applying
the simplex method with the basic feasible solution
we obtain the following tableaus.
19
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
From this final simplex tableau, we see that the maximum profit
is $100,200, and this is obtained by the following production
levels.
Type A: 600 dozen units
Type B: 5,100 dozen units
Type C: 800 dozen units
REMARK : In Example above, note that the second simplex
tableau contains a “tie” for the minimum entry in the bottom row.
(Both the first and third entries in the bottom row are -3.)
Although we chose the first column to represent the departing
20
Lecture Four Dr. Mudhaffar Y. Hussein The Simplex Method: Maximization
variable, we could have chosen the third column. Try reworking
the problem with this choice to see that you obtain the same
solution.
21