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

9b Simplex Operations Research

This chapter introduces the simplex method for solving linear programs (LPs) manually. While computers are now typically used to solve large, practical LPs, understanding how to solve them manually provides insight into the method. The simplex method moves from corner to adjacent corner of the feasible region to find the optimal solution, rather than checking all corners which becomes computationally infeasible for large problems. The chapter introduces concepts needed for the simplex method such as transforming LPs into slack form, identifying basic and non-basic variables, and how the simplex method will iteratively improve the solution by moving between corners.

Uploaded by

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

9b Simplex Operations Research

This chapter introduces the simplex method for solving linear programs (LPs) manually. While computers are now typically used to solve large, practical LPs, understanding how to solve them manually provides insight into the method. The simplex method moves from corner to adjacent corner of the feasible region to find the optimal solution, rather than checking all corners which becomes computationally infeasible for large problems. The chapter introduces concepts needed for the simplex method such as transforming LPs into slack form, identifying basic and non-basic variables, and how the simplex method will iteratively improve the solution by moving between corners.

Uploaded by

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

Chapter 6

Simplex Method

This chapter is the very hard core of this course!

Here we learn how to solve LPs manually. You may think that it is useless
to know such arcane things: We should use computers, you might say —
especially since the practical LPs are so large that no-one really solves them
manually. This criticism is valid. But, we do not study how to solve LPs
manually in order to solve them manually in practical problems (although it is
not a completely useless skill). We study how to solve them manually in order
to understand them!
This lecture is adapted from [2, Ch. 2] and [4, Ch. 4].

6.1 Towards Simplex Algorithm

Checking Corners

Theorem 5.2.9 told us that the optimal solution of an LP is in one of the corners
of the feasible region. So, it seems that we have a very simple algorithm for
finding the optimum: Just check all the corners! And, indeed, this naïve
approach works well with such petty examples that we have in this course.
The problem with this naïve approach in practice is the so-called combinatorial
curse, a.k.a. the curse of dimensionality: An LP with n decision variables and
m constraints has
n n!
 
=
m (n − m)!m!
corners.
Let us consider the curse of dimensionality more closely: Consider an LP
with 30 decision variables and 15 constraints. This LP has
30
 
= 155,117,520
15
corners. Suppose you have a computer that checks 100 corners per second (this
is pretty fast for today’s computers, and right-out impossible if you program
Towards Simplex Algorithm 69

with Java TM ). Then it would take almost three weeks for the computer to check
all the 155,117,520 corners. You may think this is not a problem: Maybe three
weeks is not such a long time, and a problem with 30 decision variables is way
bigger than anything you would encounter in the real life anyway. Well, think
again! Three weeks is a long time if you need to update your optimal solution
in a changing environment, say, daily, and LPs with at 30 decision variables
are actually rather small. Indeed, let us be a bit more realistic now: Consider a
shop owner who has 200 different products in her stock (a rather small shop).
Suppose the shop owner has 100 constraints (not unreasonable) and a super-
computer that checks 100 million corners per second (very optimistic, even if
one does not program with Java TM ). Then checking all the corners to optimize
the stock would take 6.89 × 1044 years. The author doubts that even the
universe can wait that long!
The bottom line is that checking all the corners will take too much time
even with a fast computer and a good programmer.

Simplex Idea

The general idea of the Simplex algorithm is that you do not check all the
corners. The following list explains the Simplex algorithm in a meta-level. We
call the steps Meta-Steps since they are in such a general level that they are
not immediately useful. In the same way the three Meta-Step algorithm could
be called a Meta-Simplex algorithm.
We shall see later how the Meta-Steps can be implemented in practice.

Meta-Step 1 Start with some corner.


Meta-Step 2 Check if the corner is optimal. If so, you have found the opti-
mum, and the algorithm terminates. Otherwise go to the next Meta-Step.
Meta-Step 3 Move to an adjacent corner. Of all the adjacent corners choose
the best one. Go back to Meta-Step 2.

One hopes that in moving around the corners one hits the optimal corner
pretty soon so that one does not have to check all the corners.
To use the meta-algorithm described above we have to:

• identify the corners analytically,


• know how to tell if a chosen corner is optimal,
• know how to go to the best adjacent corner.

Once the points raised above are solved we have a genuine algorithm. This
algorithm is given in the next section. Before that we have to discuss how to
prepare an LP before it can be used in the Simplex algorithm.
Towards Simplex Algorithm 70

Slack Forms

Before we can use the Simplex algorithm we must transform the LP into a
so-called canonical slack form.
We start with the slack form. Here is an informal definition of the slack
form: An LP is in slack form, if

1. It is a maximization problem.
2. The constraints are equalities, rather than inequalities.
3. The Right Hand Side (RHS) of each constraint is non-negative.

6.1.1 Example.

max z = 4x1 + 8x2 (0)


s.t. x1 + 2x2 ≤ 500 (1)
x1 + x2 ≥ 100 (2)
x1 , x2 ≥ 0 (3)

Let us transform the LP in Example 6.1.1 above into a slack form.


This is a maximization problem already, so we do not have to touch the
line (0).
Line (1) is an inequality. We can transform it into an equality by adding an
auxiliary non-negative slack (or surplus) variable s1 : We obtain the constraint

x1 + 2x2 + s1 = 500 (10 )

and, since we assumed that the slack s1 was non-negative, we have the sign
constraints
x1 , x2 , s1 ≥ 0 (30 )
The interpretation of the slack variable s1 is that it tells how much of the
resource (1) is unused.
Let us then consider line (2). We see that the LP is not in standard form.
We could change it into a standard form by multiplying the inequality (2) by
−1. But that would make the RHS of (2) negative, which is not good. Instead
we ad — or actually subtract — an auxiliary non-negative excess variable e2
to the inequality. We obtain the equality

x1 + x2 − e2 = 100 (20 )

and the sign constraints

x1 , x2 , s1 , e2 ≥ 0 (300 ).
Towards Simplex Algorithm 71

The interpretation of the excess is opposite to that of the slack: Excess e2 tells
how much the minimal requirement (2) is, well, excessed.
Now, the LP in 6.1.1 is transformed into a slack form:

max z = 4x1 + 8x2 (0)


s.t. x1 + 2x2 + s1 = 500 (10 )
x1 + x2 − e2 = 100 (20 )
x1 , x2 , s1 , e2 ≥ 0 (300 )

Solving this slack form with decisions x1 , x2 , s1 , e2 is equivalent to solving


the original LP with decisions x1 , x2 .
Here is the formal definition of the slack form:

6.1.2 Definition. An LP is in slack form if it is of the type

max z = c0 x 
x
s.t. [A S] = b
s
x, s ≥ 0

where b ≥ 0. Here s is the vector of slacks/excesses and S is the diagonal


matrix containing the coefficients of the slacks and the excesses: +1 for slack
and −1 for excess.

Here is an algorithm for transforming a standard form LP

max z = c0 x
s.t. Ax ≤ b
x ≥ 0

into a slack form:

Step 1: Add slacks If the bi in the constraint i is non-negative add a slack


(or surplus):

ai1 x1 + ai2 x2 + · · · + ain xn ≤ bi


ai1 x1 + ai2 x2 + · · · + ain xn + si = bi .

Step 2: Add excesses If the bi in the constraint i is negative change the


direction of the inequality (thus making the RHS −bi non-negative), and
add an excess:

ai1 x1 + ai2 x2 + · · · + ain xn ≤ bi


−ai1 x1 − ai2 x2 − · · · − ain xn − ei = −bi .

Steps 1 and 2 must be done to each constraint.


Towards Simplex Algorithm 72

6.1.3 Remark. The index i of the slack/excess refers to resources. For ex-
ample, if s3 = 2 it means that 2 units of the resource 3 is unused.
6.1.4 Remark. We have two kinds of auxiliary variables: slacks (or surpluses)
and excesses. Mathematically there is no need to differentiate between them:
Excess is just negative slack (or negative surplus). Indeed, in some textbooks
slacks are used for both the surpluses and the excesses. However, making
the sign difference makes the problem, and the solution, easier to interpret,
especially since typically the all the coefficients of an LP are non-negative.

Finally, let us give the definition of the canonical slack form.


6.1.5 Definition. A slack form LP is canonical slack form if each constraint
equation has a unique variable with coefficient 1 that does not appear in any
other constraint equation.
6.1.6 Remark. Note that the slack form we constructed in Example 6.1.1 is
not a canonical one. This is basically due to “wrong sign” −1 of the excess
variable. Indeed, if there were a slack instead of an excess in the constraint (2)
we would have a canonical form: The slacks would be the unique variables with
coefficient 1 that do not appear in any other constraint equation. We shall see
in Chapter 7 how to transform the slack form of 6.1.1 into a canonical form by
using the Big M method. In this lecture we shall have to confine ourselves to
more simple problems.

Basic Feasible Solutions, Basic Variables, and Non-Basic Variables

There is still one more concept — or two, or three, depending on how you
count — that we have to discuss before we can present the Simplex algorithm:
That of Basic Variables (BV) and Non-Basic Variables (NBV).
Basic variables (BV) and non-basic variables (NBV) are related to the
corners, or the basic feasible solutions (BFS), of an underdetermined linear
system. So, what we are discussing in this subsection is related to the Meta-
Step 1 of the Meta-Simplex algorithm.
Before going into formal definitions let us consider the following problem:

6.1.7 Example. Leather Ltd. manufactures two types of belts: the


regular model and the deluxe model. Each type requires 1 unit of
leather. A regular belt requires 1 hour of skilled labor and deluxe belt
requires 2 hours of of skilled labor. Each week 40 units of leather and
60 hours of skilled labor are available. Each regular belt contributes
=C3 to profit, and each deluxe belt contributes =C4 to profit.
Leather Ltd. wants to maximize its profit.
Towards Simplex Algorithm 73

Let us build the LP for Leather Ltd.


First, we have to choose the decision variables. So, what is there for Leather
Ltd. to decide? The number of products to produce! So, Leather Ltd. has the
following decision variables:

x1 = number of regular belts manufactured


x2 = number of deluxe belts manufactured

Second, we have to find the objective function. What is it that Leather Ltd.
wants to optimize? The profit! What is the Leather Ltd.’s profit? Well, each
regular belt contributes =C3 to the profit, and each deluxe belt contributes =C4
to the profit. Since we denoted the number of regular belts produced by x1
and the number of deluxe belts produced by x2 the profit to be maximized is

z = 3x1 + 4x2 .

Finally, we have to find the constraints. So, what are the restrictions Leather
Ltd. has to satisfy in making the belts? There are two restrictions: available
labor and available leather. Let us consider the leather restriction first. There
are only 40 units of leather available, and producing one regular belt requires
1 unit of leather. So does producing one deluxe belt. So, the leather constraint
is
x1 + x2 ≤ 40.
Let us then consider the labor constraint. There are only 60 hours of labor
available. Each regular belt produced consumes 1 hour of labor and each
deluxe belt produced consumes 2 hours of labor. So, the labor constraint is

x1 + 2x2 ≤ 60.

Putting what we have just obtained together we obtain the LP for Leather
Ltd. Here it is:
max z = 3x1 + 4x2
s.t. x 1 + x2 ≤ 40
x1 + 2x2 ≤ 60
x1 , x2 ≥ 0
Following the algorithm given after Definition 6.1.2 we can transform the
LP above into a slack form. Here is what we get:
max z = 3x1 + 4x2
s.t. x1 + x2 + s1 = 40
x1 + 2x2 + s2 = 60
x1 , x2 , s1 , s2 ≥ 0

Let us then solve this slack form by using the method of Brutus Forcius
(108–44 BC), which corresponds to checking all the corners. The Brutus’s
method is based on the following observation, listed here as Remark 6.1.8:
Towards Simplex Algorithm 74

6.1.8 Remark. Consider the constraints of an LP in slack form. This is


a linear system with m equations and n + m unknowns: n actual decision
variables and m slacks. Since n+m > m this linear system is underdetermined.
In principle, to solve a system of m equations requires only m variables. The
remaining n variables can be set to zero.

So, according to Remark 6.1.8, we choose successively 2 = m of the 4 = n−


m variables x1 , x2 , s1 , s2 to be our basic variables (BV) and set the remaining
2 = n variables to be zero (NBV) and solve the constraint system. If the
solution turns out to be feasible (it may not be since we are omitting the non-
negativity constraints here) we check the value of the objective at this solution.
Since we this way check all the BFSs of the system we must find the optimal
value.
The next table lists the results:

BVs Linear system x1 x2 s1 s2 BFS z Pt


0 + 0 + s1 = 40
s1 , s2 0 0 40 60 Yes 0 F
0 + 0 + s2 = 60
0 + x2 + 0 = 40
x2 , s2 0 40 0 20 Yes 120 B
0 + 2x2 + s2 = 60
0 + x2 + s 1 = 40
x2 , s1 0 60 −20 0 No – D
0 + 2x2 + 0 = 60
x1 + 0 + 0 = 40
x1 , s2 40 0 0 −20 No – A
x1 + 0 + s2 = 60
x1 + 0 + s1 = 40
x1 , s1 30 0 10 0 Yes 120 C
x1 + 0 + 0 = 60
x1 + x2 + 0 = 40
x1 , x2 20 20 0 0 Yes 140 E
x1 + 2x2 + 0 = 60

From this table we read that the decision

x1 = 20, x2 = 20, s1 = 0, s2 = 0

is optimal. The corresponding optimal value is

z = =C140.

So, we have solved Leather Ltd.’s problem. Note that both of the slacks, s1
and s2 , are NBV, i.e. zeros, at the optimal decision. This means that at the
optimal solution the resources, leather and skilled labor, are fully utilized. This
full utilization of the resources is not uncommon in LPs, but it is not always
the case. Sometimes it may be optimal not to use all your resources.
Next picture illustrates the situation. The centers of the red balls are the
candidate BFSs (Pts in the previous table). Note that only the points B , C ,
E , and F are actual BFSs. The optimal BFS is the point E .
Simplex Algorithm 75

x2 60

50

A
40

C
30

E
20

10

F B D
0
0 10 20 30 40 50 60
x1

6.2 Simplex Algorithm

Simplex Steps

Step 1: Transform the LP into canonical slack form Transforming LP


into a slack form has been explained in the previous section. For now,
let us just hope that the said slack form is also a canonical one. It will
be if there are no excesses. If there are excesses then the slack form most
likely will not be canonical — unless you are extremely lucky. From the
canonical slack form we construct the first Simplex Tableau. The first
Simplex tableau is the canonical slack form where

• The 0th row represents the objective function as a 0th constraint


as
z − c0 x = 0.
• The variables that have unique row with 1 as coefficient, and 0 as
coefficient in all other rows, will be chosen to be the BVs. Typically,
the slacks are chosen to be the BVs. In that case the decisions are
Simplex Algorithm 76

set to be zero, and thus the first Simplex tableau will be solved for
the slacks.

So, most typically, the slack form LP

max z = c1 x1 + · · · + cn xn
s.t. a11 x1 + · · · + a1n xn +s1 = b1
a21 x1 + · · · + a2n xn +s2 = b2
.. ..
. .
am1 x1 + · · · + amn xn · · · +sm = bm
x1 , . . . , xn , s1 , . . . , sm ≥ 0

becomes
max z
s.t. z − c1 x1 − · · · − cn xn =0
a11 x1 + · · · + a1n xn +s1 = b1
a21 x1 + · · · + a2n xn +s2 = b2
.. ..
. .
am1 x1 + · · · + amn xn · · · +sm = bm
x1 , . . . , xn , s1 , . . . , sm ≥ 0

Since we have to keep track of the BVs, this form is then represented as
the Simplex tableau

Row z x1 ··· xn s1 s2 ··· sm BV RHS


0 1 −c1 ··· −cn 0 0 ··· 0 z= 0
1 0 a11 ··· a1n 1 0 ··· 0 s1 = b1
2 0 a21 ··· a2n 0 1 ··· 0 s2 = b2
.. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . .
m 0 am1 ··· amn 0 0 ··· 1 sm = bm

From this tableau one readily reads the BFS related to the BVs
s1 , . . . , sm : [s1 · · · sm ]0 = [b1 · · · bm ]0 ; and [x1 · · · xn ]0 = [0 · · · 0]0 .

Step 2: Check if the current BFS is optimal In the first Simplex


tableau the BVs are s1 , . . . , sm , and a BFS related to this solution
is x1 = 0, . . . , xn = 0, s1 = b1 , . . . , sm = bm . The value of the objective
can be read from the 0th row:
Row z x1 ··· xn s1 s2 ··· sm BV RHS
0 1 −c1 ··· −cn 0 0 ··· 0 z= 0

This solution is hardly optimal. Indeed, suppose that the coefficients


ci are non-negative (as is usually the case). But now all the decisions
xi related to the coefficients ci are zero, as they are NBVs. But then,
Simplex Algorithm 77

obviously increasing the value of any xi will increase the value of the
objective z .

Let us then consider the general case. Suppose that, after some steps, we
have come up with a Simplex tableau with the 0th row

Row z x1 ··· xn s1 s2 ··· sm BV RHS


0 1 d1 ··· dn dn+1 dn+2 ··· dn+m z= z∗

where all the coefficients di are non-negative for all the NBVs. Then
making any NBV a BV would decrease the value of the objective. So,
the criterion for the optimality is: The Simplex tableau is optimal,
if in the 0th row there are no negative coefficients in any NBVs.
If the tableau is optimal the algorithm terminates, and the op-
timal value and decision can be read from the BV and RHS
columns.

Step 3: Determine the entering variable If the BFS is not optimal, we


have to change the BVs. One of the NBVs will become a BV (entering),
and one of the old BVs will become a NBV (leaving). The entering
variable will be the one with smallest coefficient in the 0th row.
Indeed, this way we increase the value of the objective z the most.

Step 4: Determine the leaving variable In Step 3 we chose some variable


to enter as a new BV. Now we have to make one of the old BVs to leave
to be a NBV. Now each BV in a Simplex tableau is associated to some
row. The leaving BV will the one associated to the row that wins
the ratio test (the smallest value is the winner)

RHS of row
.
Coefficient of entering varaible in row
The idea of the ratio test is, that we shall increase the entering variable
as much as possible. At some point the increasing of the entering variable
will force one of the BVs to become zero. This BV will then leave. The
ratio test picks up the row associated to the leaving variable.

Step 5: Find a new BFS Now we have a new system of BVs. Next we have
to solve the Simplex tableau in terms of the new BVs. This can be
done by using the Gauss–Jordan method. Then we have a new Simplex
tableau, and we go back to Step 2.

6.2.1 Remark. The Step 1 above corresponds to the Meta-Step 1. The Step
2 corresponds to the Meta-Step 2. The Steps 3–5 correspond to the Meta-Step
3.
Simplex Algorithm 78

Dakota Furniture’s Problem

6.2.2 Example. The Dakota Furniture Company manufactures desks,


tables, and chairs. The manufacture of each type of furniture requires
lumber and two types of skilled labor: finishing labor and carpentry
labor. The amount of each resource needed to make each type of fur-
niture is given in the table below:

Resource Desk Table Chair


Lumber 8 units 6 units 1 unit
Finishing hours 4 hours 2 hours 1.5 hours
Carpentry hours 2 hours 1.5 hours 0.5 hours

At present, 48 units of lumber, 20 finishing hours, and 8 carpentry


hours are available. A desk sells for =C60, a table for =C30, and a
chair for =C20. Dakota believes that demand for desks and chairs is
unlimited, but at most 5 tables can be sold.
Since the available resources have already been purchased, Dakota
wants to maximize total revenue.

As a modelling problem Dakota’s problem is very similar to Giapetto’s


problem 3.3.1. After making some comparisons on how we modelled Giapetto’s
problem we notice that we should define the decision variables as

x1 = number of desks produced


x2 = number of tables produced
x3 = number of chairs produced

and that Dakota should solve the following LP:

max z = 60x1 + 30x2 + 20x3


s.t. 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
x2 ≤ 5
x1 , x2 , x3 ≥ 0

Dakota Furniture’s Solution with Simplex


Simplex Algorithm 79

Step 1: We start by transforming the Dakota’s LP into a slack form. Since


all the inequalities are of type ≤ we have no excesses, and consequently we
obtain the canonical slack form
max z = 60x1 + 30x2 + 20x3
s.t. 8x1 + 6x2 + x3 + s1 = 48
4x1 + 2x2 + 1.5x3 + s2 = 20
2x1 + 1.5x2 + 0.5x3 + s3 = 8
x2 + s4 = 5
x1 , x2 , x3 , s1 , s2 , s3 , s4 ≥ 0

Taking s1 , s2 , s3 , s4 to be our first BVs our first Simplex tableau for Dakota is

Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 −60 −30 −20 0 0 0 0 z= 0
1 0 8 6 1 1 0 0 0 s1 = 48
2 0 4 2 1.5 0 1 0 0 s2 = 20
3 0 2 1.5 0.5 0 0 1 0 s3 = 8
4 0 0 1 0 0 0 0 1 s4 = 5

Step 2: We check if the current Simplex tableau is optimal. The 0th row
is now
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 −60 −30 −20 0 0 0 0 z= 0
We see that there is a NBV x1 with negative coefficient −60. So the first
Simplex tableau is not optimal. (Well, one does not expect to get an optimal
solution by slacking off!)

Step 3: We determine the entering variable. Since x1 has the smallest


coefficient in row 0, increasing x1 will allow the objective z to increase most.
So, x1 will enter as a new BV.

Step 4: We determine the leaving variable. The ratio test gives us

Row 1 limit in on x1 = 48/8 = 6


Row 2 limit in on x1 = 20/4 = 5
Row 3 limit in on x1 = 8/2 = 4
Row 4 limit in on x1 = No limit, since xi ’s coefficient is non-positive

So, Row 3 wins the ratio test. Since s3 the the BV associated to row 3, s3 is
no longer a BV.

Step 5: Now we have new BVs: s1 , s2 , x1 , s4 (remember x1 replaced s3 ).


This means we have the unsolved Simplex tableau
Simplex Algorithm 80

Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 −60 −30 −20 0 0 0 0 z= 0
1 0 8 6 1 1 0 0 0 s1 = 48
2 0 4 2 1.5 0 1 0 0 s2 = 20
3 0 2 1.5 0.5 0 0 1 0 x1 = 8
4 0 0 1 0 0 0 0 1 s4 = 5
Now we have to solve this Simplex tableau in terms of the BVs. This
means that each row must have coefficient 1 for its BV, and that BV must
have coefficient 0 on the other rows. This can be done with EROs in the
following way:
ERO1: We create a coefficient of 1 for x1 in row 3 by multiplying row 3
by 0.5. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 −60 −30 −20 0 0 0 0 z= 0
1 0 8 6 1 1 0 0 0 s1 = 48
2 0 4 2 1.5 0 1 0 0 s2 = 20
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
ERO2: To create a 0 coefficient for x1 in row 0, we replace the row 0 with
60(row 3) + row 0. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 15 −5 0 0 30 0 z= 240
1 0 8 6 1 1 0 0 0 s1 = 48
2 0 4 2 1.5 0 1 0 0 s2 = 20
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
ERO2: To create a 0 coefficient for x1 in row 1, we replace row 1 with
−8(row3) + row 1. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 15 −5 0 0 30 0 z= 240
1 0 0 0 −1 1 0 −4 0 s1 = 16
2 0 4 2 1.5 0 1 0 0 s2 = 20
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
ERO2: To create a 0 coefficient for x1 in row 2, we replace row 2 with
−4(row 3) + row 2. Now we have the tableau
Simplex Algorithm 81

Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 15 −5 0 0 30 0 z= 240
1 0 0 0 −1 1 0 −4 0 s1 = 16
2 0 0 −1 0.5 0 1 −2 0 s2 = 4
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
Now we see that this Simplex tableau is solved: Each of the BVs have
coefficient 1 on their own rows and coefficient 0 in other rows. So, we go now
back to Step 2.

Step 2: We check if the Simplex tableau above is optimal. It is not, since


the NBV x3 has negative coefficient on row 0.

Step 3: We determine the entering variable. In this case it is obvious: x3


enters.

Step 4: We determine the leaving variable. The ratio test gives us


Row 1 limit in on x3 = No limit
Row 2 limit in on x3 = 4/0.5 = 8
Row 3 limit in on x3 = 4/0.25 = 16
Row 4 limit in on x3 = No limit
So, row 2 wins the ratio test. Since s2 was the BV of row 2, s2 will leave and
become a NBV.

Step 5 : Now we have new BVs: s1 , x3 , x1 , s4 , since s2 was replaced with


x3 in the previous step. So, we have the following unsolved Simplex tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 15 −5 0 0 30 0 z= 240
1 0 0 0 −1 1 0 −4 0 s1 = 16
2 0 0 −1 0.5 0 1 −2 0 x3 = 4
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
To solve this tableau we must invoke the Gauss–Jordan method again:
ERO1: To create a coefficient of 1 for x3 in row 2, we multiply the row 2
by 2. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 15 −5 0 0 30 0 z= 240
1 0 0 0 −1 1 0 −4 0 s1 = 16
2 0 0 −2 1 0 2 −4 0 x3 = 8
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
Simplex Algorithm 82

ERO2: To create a coefficient 0 for x3 in row 0, we replace row 0 with


5(row 2) + row 0. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 5 0 0 10 10 0 z= 280
1 0 0 0 −1 1 0 −4 0 s1 = 16
2 0 0 −2 1 0 2 −4 0 x3 = 8
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
ERO2: To create a coefficient 0 for x3 in row 1, we replace row 1 with
row 2 + row 1. Now we have the tableau
Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 5 0 0 10 10 0 z= 280
1 0 0 −2 0 1 2 −8 0 s1 = 24
2 0 0 −2 1 0 2 −4 0 x3 = 8
3 0 1 0.75 0.25 0 0 0.5 0 x1 = 4
4 0 0 1 0 0 0 0 1 s4 = 5
ERO2: To create a coefficient 0 for x3 in row 3, we replace row 3 with
−0.25(row 3) + row 3. Now we have the tableau

Row z x1 x2 x3 s1 s2 s3 s4 BV RHS
0 1 0 5 0 0 10 10 0 z= 280
1 0 0 −2 0 1 2 −8 0 s1 = 24
2 0 0 −2 1 0 2 −4 0 x3 = 8
3 0 1 1.25 0 0 −0.5 1.5 0 x1 = 2
4 0 0 1 0 0 0 0 1 s4 = 5

Now we see that this Simplex tableau is solved: Each of the BVs have
coefficient 1 on their own rows and coefficient 0 in other rows. So, we go now
back to Step 2.

Step 2: We check if the Simplex tableau is optimal. We see that it is!


Indeed, all the NBVs x2 , s2 , s3 have non-negative coefficients in row 0.

Finally, let us interpret the result: The number of desks, tables, and chairs
Dakota Furniture should manufacture is 2, 0, and 8. With this decision
Dakota’s revenue is =C280. Of the resources: 24 units of lumber is left unused:
s1 = 24. All the other actual resources are fully used: s2 = 0, s3 = 0, but
the market demand for tables is not used at all s5 = 5, since no tables are
manufactured.

You might also like