Module 5 Notes
Module 5 Notes
Module Description
In the previous module, you learned about solving maximization and minimiza-
tion LP problems using graphical methods. In this module, you will learn about
the Simplex method of solving LP problems. You will be introduced to new ter-
minologies and approaches of solving LP problems in table form.
In this module, you will learn about the following concepts:
Hello and welcome, you are now at the first part of this module. Your first
task is to measure your prior knowledge and the concepts to be mastered by
solving the given problems.
Introduction
In the previous module, we used the geometrical method to solve linear pro-
gramming problems, but the geometrical approach will not work for problems
that have more than two variables.
1
algebraically, but that will not be very efficient.
The simplex method was developed during the Second World War by Dr.
George Dantzig. His linear programming models helped the Allied forces with
transportation and scheduling problems. In 1979, a Soviet scientist named
Leonid Khachian developed a method called the ellipsoid algorithm which
was supposed to be revolutionary, but as it turned out it is not any better than
the simplex method.
The simplex method uses an approach that is very efficient. It does not com-
pute the value of the objective function at every point; instead, it begins with
a corner point of the feasibility region where all the main variables are zero and
then systematically moves from corner point to corner point, while improving
the value of the objective function at each stage. The process continues until
the optimal solution is found.
We start out with an example we solved in the last chapter by the graphical
method. This will provide us with some insight into the simplex method and at
the same time give us the chance to compare a few of the feasible solutions we
obtained previously by the graphical method. But first, we list the algorithm
for the simplex method.
2
1. Set up the problem. That is, write the objective function and the inequal-
ity constraints.
2. Convert the inequalities into equations. This is done by adding one slack
variable for each inequality.
3. Construct the initial simplex tableau. Write the objective function as the
bottom row.
4. The most negative entry in the bottom row identifies the pivot column.
5. Calculate the quotients. The smallest quotient identifies a row. The el-
ement in the intersection of the column identified in step 4 and the row
identified in this step is identified as the pivot element. The quotients are
computed by dividing the far right column by the identified column in
step 4. A quotient that is a zero, or a negative number, or that has a zero
in the denominator, is ignored.
6. Perform pivoting to make all other entries in this column zero. This is
done the same way as we did with the Gauss-Jordan method.
7. When there are no more negative entries in the bottom row, we are fin-
ished; otherwise, we start again from step 4.
8. Read off your answers. Get the variables using the columns with 1 and
Os. All other variables are zero. The maximum value you are looking for
appears in the bottom right hand corner.
Let the number of hours per week Ouma will work at Job I be x1 .
Let the number of hours per week Ouma will work at Job II be x2 .
3
Now we write the objective function. Since Ouma gets paid $40 an hour at
Job
I, and $30 an hour at Job II, his total income Z is given by the following
equation.
Z = 40x1 + 30×2
Now the problem is formulated as follows
This is done by adding one slack variable for each inequality. For example,
to convert the inequality x1 + x2 ≤ 12 into an equation, we add a non-negative
variable y1 , and we get
x1 + x2 + y1 = 12
Here the variable y1 picks up the slack, and it represents the amount by
which x1 + x2 falls short of 12. In this problem, if Ouma works fewer than 12
hours, say 10 , then y1 is 2 . Later when we read off the final solution from the
simplex table, the values of the slack variables will identify the unused amounts.
We rewrite the objective function Z = 40x1 + 30x2 as −40x1 − 30x2 + Z = 0.
After adding the slack variables, our problem reads:
Each inequality constraint appears in its own row. (The non-negativity con-
straints do not appear as rows in the simplex tableau.) Write the objective
function as the bottom row.
Now that the inequalities are converted into equations, we can represent the
problem into an augmented matrix called the initial simplex tableau as follows.
x1 x2 y1 y2 Z C
1 1 1 0 0 12
2 1 0 1 0 16
-40 -30 0 0 1 0
4
Here the vertical line separates the left-hand side of the equations from the
right side. The horizontal line separates the constraints from the objective func-
tion. The right side of the equation is represented by the column C .
The reader needs to observe that the last four columns of this matrix look
like the final matrix for the solution of a system of equations. If we arbitrarily
choose x1 = 0 and x2 = 0, we get:
y1 y2 Z C
1 0 0 12
0 1 0 16
0 0 1 0
which reads:
y1 = 12, y2 = 16, z = 0
The solution obtained by arbitrarily assigning values to some variables and
then solving for the remaining variables is called the basic solution associated
with the tableau. So the above solution is the basic solution associated with the
initial simplex tableau. We can label the basic solution variable in the right of
the last column as shown in the table below.
x1 x2 y1 y2 Z Basic Solution
1 1 1 0 0 y1 = 12
2 1 0 1 0 y2 = 16
-40 -30 0 1 0 Z=0
The most negative entry in the bottom row identifies the pivot column. The
most negative entry in the bottom row is -40 ; therefore, column 1 is identified.
x1 x2 y1 y2 Z Basic Solution
1 1 1 0 0 y1 = 12
2 1 0 1 0 y2 = 16
-40 −30 0 1 0 Z=0
↑
Question: Why do we choose the most negative entry in the bottom row?
Answer: The most negative entry in the bottom row represents the largest
coefficient in the objective function-the coefficient whose entry will increase the
value of the objective function the quickest.
The simplex method begins at a corner point where all the main variables,
the variables that have symbols such as x1 , x2 , x3 etc., are zero. It then moves
from a corner point to the adjacent corner point always increasing the value of
5
the objective function.
In the case of the objective function Z = 40x1 + 30x2 , it will make more
sense to increase the value of x1 rather than x2 . The variable x1 represents
the number of hours per week Ouma works at Job I. Since Job I pays $40 per
hour as opposed to Job II which pays only $30, the variable x1 will increase the
objective function by $40 for a unit of increase in the variable x1 .
Step 5: Calculate the quotients
Question: Why do we find quotients, and why does the smallest quotient
identify a row?
Answer: When we choose the most negative entry in the bottom row, we are
trying to increase the value of the objective function by bringing in the variable
x1 . But we cannot choose any value for x1 . Can we let x1 = 100 ? Definitely
not! That is because Ouma never wants to work for more than 12 hours at both
jobs combined: x1 + x2 ≤ 12. Can we let x1 = 12 ? Again, the answer is
no because the preparation time for Job I is two times the time spent on the
job. Since Ouma never wants to spend more than 16 hours for preparation, the
maximum time he can work is 16 ÷ 2 = 8.
Now you see the purpose of computing the quotients; using the quotients to
identify the pivot element guarantees that we do not violate the constraints.
6
changing the number of units of the variables. We may add the number of units
of one variable, while throwing away the units of another. Pivoting allows us to
do just that.
The variable whose units are being added is called the entering variable, and
the variable whose units are being replaced is called the departing variable. The
entering variable in the above table is x1 , and it was identified by the most neg-
ative entry in the bottom row. The departing variable y2 was identified by the
lowest of all quotients.
x1 x2 y1 y2 z
1 1 1 0 0 12
1 1/2 0 1/2 0 8
-40 -30 0 1 0 0
To obtain a zero in the entry first above the pivot element, we multiply the
second row by -1 and add it to row 1 . We get:
x1 x2 y1 y2 Z
0 1/2 1 −1/2 0 4
1 1/2 0 1/2 0 8
-40 -30 0 1 0 0
To obtain a zero in the element below the pivot, we multiply the second row
by 40 and add it to the last row.
x1 x2 y1 y2 Z
0 1/2 1 −1/2 0 4 y1
01 1/2 0 1/2 0 8 x1
0 -10 0 20 1 320 z
We now determine the basic solution associated with this tableau. By arbi-
trarily choosing x2 = 0 and y2 = 0, we obtain x1 = 8, y1 = 4, and Z = 320. If
we write the augmented matrix, whose left side is a matrix with columns that
have one 1 and all other entries zeros, we get the following matrix stating the
same thing.
7
x1 y1 Z C
0 1 0 4
1 0 0 8
0 0 1 320
We can restate the solution associated with this matrix as x1 = 8, x2 = 0,
y1 = 4, y2 = 0, and Z = 320. At this stage of the game, it reads that if Ouma
works 8 hours at Job I, and no hours at Job II, her profit Z will be $320. Recall
from the previous module that (8, 0) was one of our critical points. Here y1 = 4
and y2 = 0 mean that he will be left with 4 hours of working time and no prepa-
ration time.
Since there is still a negative entry, -10 , in the bottom row, we need to
begin again from step 4 . This time we will not repeat the details of every step,
instead, we will identify the column and row that give us the pivot element, and
highlight the pivot element. The result is as follows.
Now to make all other entries as zeros in this column, we first multiply row
1 by − 12 and add it to row 2 , and then multiply row 1 by 10 and add it to the
bottom row.
x1 x2 y1 y2 Z
0 1 2 -1 0 8 x2
1 0 -1 1 0 4 x1
0 0 20 10 1 400 z
We no longer have negative entries in the bottom row, therefore we are fin-
ished. Question: Why are we finished when there are no negative entries in the
bottom row?
Answer: The answer lies in the bottom row. The bottom row corresponds to the
equation:
8
0x1 + 0x2 + 20y1 + 10y2 + Z = 400
or
References
1. Sekhon, R., and Bloom, R. (2022, May 3). Linear Programming - Maxi-
mization Applications. De Anza College. Material