EE/Econ 458
The Simplex Method using the
Tableau Method
J. McCalley
1
Our example problem
F 3x1 5 x2 0 (1)
x1 x3 4 (2)
2 x2 x4 12 (3)
3 x1 2 x2 x5 18 (4)
The tableau for initial solution
Basic Eq. Coefficients of Right
variable # F x1 x2 x3 x4 x5 side
F 0 1 -3 -5 0 0 0 0
x3 1 0 1 0 1 0 0 4
x4 2 0 0 2 0 1 0 12
x5 3 0 3 2 0 0 1 18
Not yet optimal!
2
Iteration 1 – determine entering variable
Select the variable that improves the objective at the highest rate
(i.e., the largest amount of objective per unit change in variable).
This is the one in the first row that is most negative.
Basic Eq. Coefficients of Right
variable # F x1 x2 x3 x4 x5 side
F 0 1 -3 -5 0 0 0 0
x3 1 0 1 0 1 0 0 4
x4 2 0 0 2 0 1 0 12
x5 3 0 3 2 0 0 1 18
Pivot column
3
Iteration 1 – determine leaving variable
Choose leaving variable to be the one that hits 0 first as entering
variable is increased, as dictated by one of the m constraint equations
Basic Equation Upper bound for x2
variable
x3 x1+x3=4 No limit imposed
x4 2x2+x4=12 x2=(12-0)/2=6
x5 3x1+2x2+x5=18 x2=(18-3(0)-0)/2=9
1. Identify each equation that contains the entering variable (x2) and therefore imposes a
constraint on how much it can be increased. In the table , this is the last two equations
(the ones for x4 and x5).
2. For each identified equation, we solved for the entering variable (x2). Notice in the
table that in both cases, this turned out to be x2=[RHS-0-0….]/[coefficient of x2]. The
numerator subtracts zero(s) because, except for the entering variable and the right-
hand-side, all other terms in each equation are zero! This is because each equation has
only one basic (non-zero) term in it, and we are pushing this term to zero in order to
see how much we can increase the entering variable (x2).
3. The leaving variable is the one that hits 0 for the least value of the entering variable.
4
Iteration 1 – determine leaving variable
Choose leaving variable to be the one that hits 0 first as entering
variable is increased, as dictated by one of the m constraint equations
Basic Eq. Coefficients of Right
variable # F x1 x2 x3 x4 x5 side
F 0 1 -3 -5 0 0 0 0 12
6
x3 1 0 1 0 1 0 0 4 2
x4 2 0 0 2 0 1 0 12 18
x5 3 0 3 2 0 0 1 18 9
2
1. Identify each equation that contains the entering variable (x2) and therefore imposes a
constraint on how much it can be increased. In a Tableau, this will be the rows that
have non-zero values for the entering variable, i.e., the rows that have non-zero values
in the pivot column.
2. For each identified row in the Tableau, solve for the entering variable (x2) using:
x2=[RHS]/[coefficient of x2].
3. The leaving variable is identified by the equation having minimum ratio given in step
2 as the previously basic (nonzero) variable of this equation.
Basic Eq. Coefficients of Right The pivot element is the
variable # F x1 x2 x3 x4 x5 side intersection of the two
F 0 1 -3 -5 0 0 0 0
boxes.
x3 1 0 1 0 1 0 0 4
x4 2 0 0 2 0 1 0 12
x5 3 0 3 2 0 0 1 18
5
Iteration 1 – find new BFS
Using the equation used to identify the leaving variable as the pivot
row, eliminate the entering variable from all other equations.
A. Re-write the tableau so that
• x2 replaces x4 in the left-hand-column of basic variables, and
• the pivot row is divided by the pivot element
Basic Eq. Coefficients of Right
variable # F x1 x2 x3 x4 x5 side
F 0 1 -3 -5 0 0 0 0
x3 1 0 1 0 1 0 0 4 Divided
x2 2 0 0 1 0 0.5 0 6 by 2
x5 3 0 3 2 0 0 1 18
B. To eliminate x2 from all other equations (including objective), add
an appropriate multiple of it to each row.
Basic Eq. Coefficients of Right
variable # F x1 x2 x3 x4 x5 side
F 0 1 -3 0 0 2.5 0 30 Add 5 ×
pivot row
x3 1 0 1 0 1 0 0 4
x2 2 0 0 1 0 0.5 0 6 Add -2 ×
x5 3 0 3 0 0 -1 1 6 pivot row
6
Exceptions – tie for entering variable
What happens if there is a tie for the entering variable, i.e., if there
are two variables with the same coefficient in the objective function?
The way it was…. The way it could be….
F 3x1 5 x2 F 3 x1 3 x2
Choose one of them arbitrarily
as the entering variable.
You either move to one corner point or another. Either way, the
simplex will arrive at the optimal answer eventually. Choosing
one over the other may get you there faster (with fewer
iterations), but there is, in general, no way to know at this point
7
Exceptions – tie for leaving variable
What happens if we have two variables hitting zero for the same
value of the entering variable?
The way it was….
Basic Equation Upper bound for x2
variable
x3 x1+x3=4 No limit imposed
x4 2x2+x4=12 x2=(12-0)/2=6
x5 3x1+2x2+x5=18 x2=(18-3(0)-0)/2=9
The way it could be….
Basic Equation Upper bound for x2
variable
x3 x1+x3=4 No limit imposed
x4 2x2+x4=12 x2=(12-0)/2=6
x5 3x1+2x2+x5=12 x2=(12-3(0)-0)/2=6
Should you choose x4 or x5 as the leaving variable? The best
answer is x5 because then you move along constraint 3 to get
to the lower right-hand corner point in the next iteration. But
choosing x4 will also get there, it will just take 1 more iteration. 8
Exceptions – no leaving variable
What happens if we have NO variables hitting zero for the same
value of the entering variable?
The way it was….
Basic Equation Upper bound for x2
variable
x3 x1+x3=4 No limit imposed
x4 2x2+x4=12 x2=(12-0)/2=6
x5 3x1+2x2+x5=18 x2=(18-3(0)-0)/2=9
The way it could be….
Basic Equation Upper bound for x2
variable
x3 x1+x3=4 No limit imposed
x4 4x1+x4=12 No limit imposed
x5 3x1+x5=18 No limit imposed
x2 is unbounded (no feasible solution). We recognize this when
we cannot choose the leaving variable due to no limits
imposed on the increase in the entering variable. In such case,
we stop the iterations and report the solution is unbounded. 9