Dual Simplex Method

Dual simplex method
for solving the primal
In this lecture we describe the
important Dual Simplex method and
illustrate the method by doing one or
two problems.
Dual Simplex Method
Suppose a “basic solution” satisfies the optimality
conditions but not feasible, we apply dual simplex
algorithm. In regular Simplex method, we start
with a Basic Feasible solution (which is not
optimal) and move towards optimality always
retaining feasibility. In the dual simplex method,
the exact opposite occurs. We start with an (more
than) “optimal” solution (which is not feasible)
and move towards feasibility always retaining
optimality conditions. The algorithm ends once
we obtain feasibility.
To start the dual Simplex method, the following
three conditions are to be met:
1. The objective function must satisfy
the optimality conditions of the
regular Simplex method.
2. All the constraints must be of the
type .
3. All variables should be  0.
(Note: As in the simplex method, we must have an
identity matrix in the constraint matrix;
however, the RHS constants bi need NOT
be  0.)
In any iteration, we first decide the “leaving”
variable and then decide which variable should
enter (the basis).
Dual Feasibility Condition(=Condition for a
variable to leave (the basis))
The leaving variable, xi, is the basic variable
having the most negative value (i.e. in the
Simplex tableau, the corresponding constraint
row has the most negative RHS). Ties are
broken arbitrarily. If all the basic variables are 
0, the algorithm ends and we have obtained the
optimal solution.
Dual Optimality Condition (=Condition for a
non-basic variable xj to enter the basis)
The entering variable, xj , is determined from
among the non-basic variables as the one for
which the ratio  z j  c j





aij
: aij  0


is least, where zj - cj is the coefficient of xj in
the z-row, aij is the coefficient of xj in the
leaving variable row. Ties are broken
arbitrarily. If no variable can enter the basis,
the problem has no feasible solution. (Why?)
Problem 2(a) Problem Set 4.4A Page 141
Solve by Dual Simplex method
Minimize z  2x1  3x2
subject to
2 x1  2 x2  30
x1  2 x2  10
x1 , x2  0
Putting it in the form “all constraints of the type  ”
and adding slack variables, the problem becomes
Minimize
subject to
z  2x1  3x2
2 x1  2 x2  s1
 x1  2 x2
 30
 s2  10
x1 , x2 , s1 , s2  0
Since all the objective coefficients are  0 and the
problem is minimization, optimality is met. We start
the solution by writing the Simplex tableau.
Basic z
x1
x2
s1
s2
Sol
z
1
-2
-3
0
0
0
s1
0
2
2
1
0
30
s2
0
-1
-2
0
1
-10
z
1
-1/2
0
0
-3/2
15
s1
0
1
0
1
1
20
x2
0
1/2
1
0
-1/2
5
This is the optimal tableau.
Optimal sol: x1= 0, x2=5; Optimum Value: z =15
(0,15)
2x1+2x2=30
2x1+3x2=45
2x1+3x2=30
(0,5)
2x1+3x2=20
(0,0)
2x1+3x2=15
(10,0) (15,0)
x1+2x2=10
Problem
Solve by Dual Simplex method
Minimize z  2x1  3x2
subject to
2 x1  2 x2  30
x1  2 x2  10
x1 , x2  0
Putting it in the form “all constraints of the type  ”
and adding slack variables, the problem becomes
Minimize
subject to
z  2x1  3x2
2 x1  2 x2  s1
 x1  2 x2
 30
 s2  10
x1 , x2 , s1 , s2  0
Since all the objective coefficients are  0 and the
problem is minimization, optimality is met. We start
the solution by writing the Simplex tableau.
Basic z
x1
x2
s1
s2
s1
1
0
-2
-2
-3
-2
0
1
0
0
0
-30
s2
0
-1
-2
0
1
-10
z
1
0
-1
-1
0
30
x1
0
1
1
-1/2 0
15
s2
0
0
-1
-1/2
z
1
Sol
5
This is the optimal tableau.
Optimal sol: x1=15, x2=0; Optimum Value: z =30
Problem 2(c) Problem Set 4.4A Page 142
Solve by Dual Simplex method
Minimize z  4x1  2x2
subject to
x1  x2  1
3x1  x2  2
x1 , x2  0
That is subject to
x1  x2  1
 x1  x2   1
3x1  x2  2
x1 , x2  0
Note this !
Adding slack variables, the problem becomes
Minimize z  4 x1  2 x2  0s1  0s2  0s3
subject to
x1  x2  s1
 x1  x2
 3 x1  x2
 1
 s2
 1
 s3  2
x1 , x2 , s1 , s2 , s3  0
Since all the objective coefficients are  0 and the
problem is minimization, optimality is met. We start
the solution by writing the Simplex tableau.
Basic z
z
1
x1
-4
x2
-2
s1
0
s2
0
s3
0
Sol
0
s1
0
1
1
1
0
0
1
s2
0
-1
-1
0
1
0
-1
s3
0
-3
1
0
0
1
-2
z
1
0 -10/3
0
0
-4/3
8/3
s1
s2
0
0
0
0
4/3
-4/3
1
0
0
1
1/3
-1/3
1/3
-1/3
x1
0
1
-1/3
0
0
-1/3
2/3
z
s1
x2
x1
1
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
-5/2 -1/2
1
0
-3/4 1/4
-1/4 -1/4
7/2
0
1/4
3/4
Optimal
Tableau
Problem (From Hillier & Lieberman)
Solve by Dual Simplex method
Maximize z   x1  x2
subject to
x1  x2  8
x2  3
 x1  x2  2
x1 , x2  0
Adding slack variables, the problem becomes
Maximize z   x1  x2  0s1  0s2  0s3
subject to
x1  x2  s1
 x2
 x1  x2
 8
 s2
 3
 s3  2
x1 , x2 , s1 , s2 , s3  0
Since all the objective coefficients are ≤ 0 and the
problem is maximization, optimality is met. We
start the solution by writing the Simplex tableau.
Basic z
z
1
x1
1
x2
1
s1
0
s2
0
s3
0
Sol
0
s1
0
1
1
1
0
0
8
s2
0
0
-1
0
1
0
-3
s3
0
-1
1
0
0
1
2
z
1
1
0
0
1
0
-3
s1
0
1
0
1
1
0
5
x2
0
0
1
0
-1
0
3
s3
0
-1
0
0
1
1
-1
z
s1
x2
x1
1
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
2
2
-1
-1
1
0
0
-1
-4
4
3
1
Optimal
Tableau
Problem (From Hillier & Lieberman)
Consider the following LPP:
Maximize z  3x1  2 x2
subject to 3 x1  x2  12
x1 
x2  6
5 x1  3 x2  27
x1 , x2  0
(a)Write the dual of the above problem.
(b)Solve the problem by Regular Simplex
method.
(c)Solve the dual by the dual Simplex
method.
(d)Compare the resulting sequence of
basic solutions with the complementary
basic solutions obtained in part (b).
Solution:
(a) The Dual of the given LPP is:
Minimize w  12 y1  6 y2  27 y3
subject to 3 y1  y2  5 y3  3
y1  y2  3 y3  2
y1 , y2 , y3  0
(b) We now solve the given LPP by regular
Simplex method.
Basic z
x1
x2
s1
s2
s3
Sol
z
1
-3
-2
0
0
0
0
s1
0
3
1
1
0
0
12
s2
0
1
1
0
1
0
6
s3
0
5
3
0
0
1
27
z
1
0
-1
1
0
0
12
x1
0
1
1/3
1/3
0
0
4
s2
0
0
2/3
- 1/3
1
0
2
s3
z
0
1
0
0
4/3
0
- 5/3 0
1/2 3/2
1
0
7
15
x1
x2
s3
0
0
0
1
0
0
0
1
0
1/2 -1/2
- 1/2 3/2
-1
-2
0
0
1
3
3
3
Optimal
Tableau
(c) We now solve the dual by Dual Simplex
method.
Putting it in the form “all constraints of the
type  ” and adding slack variables, the
problem becomes
Minimize w  12 y1  6 y2  27 y3
subject to
3 y1  y2  5 y3  t1
 y1  y2  3 y3
 3
 t2  2
y1 , y2 , y3 , t1 , t2  0
Basic w y1
w
1 -12
y2
-6
y3
-27
t1
0
t2
0
Sol
0
t1
0
-3
-1
-5
1
0
-3
t2
0
-1
-1
-3
0
1
-2
w
1
0
-2
-7
-4
0
12
y1
0
1
1/3
5/3 -1/3
0
1
t2
0
0
-2/3 - 4/3 -1/3
1
-1
w
1
0
0
-3
-3
15
y1
y2
0
0
1
0
0
1
1
2
-3
-1/2 1/2
1/2 - 3/2
1/2
3/2
Optimal
Tableau
We now enumerate the basic solutions of the
primal & the complementary basic solutions
Iteration
No.
Primal Basic Fea- z= w Compl. Basic
Solution
sible?
Solution
Feasible?
0
(0,0, 12, 6,27)
Y
0
(0,0, 0,-3, -2)
N
1
(4,0, 0, 2, 7)
Y
12
(1,0, 0, 0, -1)
N
2
(3,3, 0, 0,3)
Y
15 (1/2,3/2, 0, 0, 0)
Thus we observe that dual Simplex method
solves the dual on the primal tableau.
Y
Problem 3 Problem Set 4.4A Page 142
Dual Simplex with Artificial Constraints
Consider the LPP
Maximize z  2 x1  x2  x3
subject to
2 x1  3 x2  5 x3  4
 x1  6 x2  x3  3
4 x1  6 x2  3 x3  8
x1 , x2 , x3  0
Adding the surplus variables s1 and s2 to the first
and second constraints and the slack variable s3 to
the third constraint, the LPP becomes
Maximize z  2 x1  x2  x3
subject to
2 x1  3x2  5 x3  s1
x1  6 x2  x3
 4
 s2
4 x1  6 x2  3 x3
x1 , x2 , x3 , s1 , s2 , s3  0
 3
 s3  8
The starting Basic Solution consisting of surplus s1
and s2 and slack s3 is infeasible as s1 = -4 and s2 = -3.
However the dual Simplex method is NOT applicable
as the optimality condition is not met. We will solve
the problem by augmenting the artificial constraint
x1  x3  M
where M is large enough NOT to eliminate any
feasible points of the original solution space.
Using the new constraint row as the pivot row and
taking x1 as the entering variable as it has the most
negative coefficient in the z-row will give an alloptimal objective function row. Next we carry out
the dual simplex method. The working follows.
Basic z
z
1
x1
-2
x2
1
x3
-1
s1
0
s2
0
s3
0
s4
0
Sol
0
s1
0
-2
-3
5
1
0
0
0
-4
s2
0
1
-9
1
0
1
0
0
-3
s3
0
4
6
3
0
0
1
0
8
s4
0
1
0
1
0
0
0
1
M
We now allow s4 to leave and x1 to enter the basis
z
1
0
1
1
0
0
0
2
2M
s1
0
0
-3
7
1
0
0
2
-4+2M
s2
s3
0
0
0
0
-9
6
0
-1
0
0
1
0
0
1
-1
-4
-3- M
8-4M
x1
0
1
0
1
0
0
0
1
M
Now dual simplex method starts: s3 leaves;s4 enters the basis
Basic z
z
1
x1
0
x2
4
x3
1/2
s1
0
s2
0
s3
1/2
s4
0
Sol
4
0
13/2
1
0
1/2
0
0
s1
0
0
s2
0
0
-21/2 1/4
0
1
-1/4
0
-5
s4
0
0
-3/2
1/4
0
0
-1/4
1
-2+M
x1
0
1
3/2
3/4
0
0
1/4
0
2
z
1
0
0
25/42
0
s1
x2
0
0
0
0
0
1
13/2 1
-1/42 0
0
-2/21
s4
x1
0
0
0
1
0
0
3/14 0
11/14 0
-1/7
1/7
This is the optimal tableau.
8/21 17/42
0
44/21
1/2
1/42
0
0
0
10/21
-3/14
3/14
1
0
-9/7+M
9/7
Problem 4(b)
Problem Set 4.4A Page 142
Dual Simplex with Artificial Constraints
Consider the LPP
Maximize z  x1  3x2
subject to
x1 
x2  2
x1 
x2  4
2 x1  2 x2  3
x1 , x2  0
Adding the slack variable s1 to the first constraint
and the surplus variables s2 and s3 to the second and
third constraints, the LPP becomes
Maximize
z  x1  3x2
subject to
x1  x2  s1
 x1  x2
2 x1  2 x2
 2
 s2
 4
 s3   3
x1 , x2 , s1 , s2 , s3  0
The starting Basic Solution consisting of slack s1 and
surplus s2 and s3 is infeasible as s2 = - 4 and s3 = - 3.
However the dual Simplex method is NOT applicable
as the optimality condition is not met. We will solve
this by augmenting the artificial constraint
x1  M
where M is large enough NOT to “eliminate” any
feasible points of the original solution space. Using
the new constraint row as the pivot row and taking x1
as the entering variable as it has the negative
coefficient in the z-row will give an all-optimal
objective function row. Next we carry out the dual
simplex method. The working follows.
Basic z
z
1
x1
-1
x2
3
s1
0
s2
0
s3
0
s4
0
Sol
0
s1
0
1
-1
1
0
0
0
2
s2
0
-1
-1
0
1
0
0
-4
s3
0
-2
2
0
0
1
0
-3
s4
0
1
0
0
0
0
1
M
We now allow x1 to enter and s4 to leave the basis
z
1
0
3
0
0
0
1
M
s1
0
0
-1
1
0
0
-1
2-M
s2
0
0
-1
0
1
0
1
-4+ M
s3
0
0
2
0
0
1
2
-3+2M
x1
0
1
0
0
0
0
1
M
Now dual simplex method starts: s1 leaves;s4 enters the basis
Basic z
z
1
x1
0
x2
3
s1
0
s2
0
s3
0
s4
1
Sol
M
s1
0
0
-1
1
0
0
-1
2-M
s2
0
0
-1
0
1
0
1
-4+ M
s3
0
0
2
0
0
1
2
-3+2M
x1
0
1
0
0
0
0
1
M
z
1
0
2
1
0
0
0
2
s4
s2
0
0
0
0
1
-2
-1
1
0
1
0
0
1
0
M-2
-2
s3
x1
0
0
0
1
0
-1
2
1
0
0
1
0
0
0
1
2
Basic z
z
1
x1
0
x2
2
s1
1
s2
0
s3
0
s4
0
Sol
2
s4
0
0
1
-1
0
0
1
M-2
s2
0
0
-2
1
1
0
0
-2
s3
0
0
0
2
0
1
0
1
x1
0
1
-1
1
0
0
0
2
z
1
0
0
2
1
0
0
0
s4
x2
0
0
0
0
0
1
-1/2 1/2
-1/2 -1/2
0
0
1
0
s3
x1
0
0
0
1
0
0
2
0
1/2 -1/2
1
0
0
0
This is the optimal tableau.
M-3
1
1
3
Generalized Simplex Algorithm
The (primal) Simplex algorithm starts with a
feasible solution which is not optimal and then
moves towards optimality always retaining the
feasibility. The dual Simplex algorithm starts
with (better than) optimal solution which is not
feasible and moves towards feasibility always
retaining the optimality. What if the starting
solution is neither feasible nor optimal? We have
to use either (primal) Simplex Algorithm with
Artificial variables or Dual Simplex Algorithm
with Artificial constraints.
In both these algorithms we look for corner point
solutions (feasible or not). The generalized
Simplex algorithm exploits this fact and without
using artificial variables or constraints moves
from one corner point solution to another till
optimality is obtained (or the criterion that the
problem is unbounded or infeasible is detected).
We illustrate with two examples.
We now redo Problem 4(b) of Problem Set 4.4A
Page 142 without adding an artificial constraint.
The starting Simplex tableau is neither feasible
nor optimal.
Basic z
z
1
x1
-1
x2
3
s1
0
s2
0
s3
0
Sol
0
s1
0
1
-1
1
0
0
2
s2
0
-1
-1
0
1
0
-4
s3
0
-2
2
0
0
1
-3
We now allow s2 to leave the basis as it has the most –ve
value and x1 to enter as it satisfies the minimum ratio test.
z
1
0
4
0
-1
0
4
s1
x1
s3
0
0
0
0
1
0
-2
1
4
1
0
0
1
-1
-2
0
0
1
-2
4
5
We now allow s1 to leave the basis as it has the –ve value and
x2 to enter as it has the only –ve coefficient in the leaving row.
Basic z
z
1
x1
0
x2
0
x2
0
0
x1
0
s3
0
s1
2
s2
1
s3
0
Sol
0
1
-1/2 -1/2
0
1
1
0
1/2 -1/2
0
3
0
0
1
1
2
This is the optimal tableau
0
Problem 4(c) Problem Set 4.4A Page 143
Consider the LPP
Minimize
subject to
z   x1  x2
x1  4 x2  5
x1  3 x2  1
2 x1  5 x2  1
x1 , x2  0
Adding the slack variable s2 to the second constraint
and the surplus variables s1 and s3 to the first and
third constraints, the LPP becomes
Minimize
z   x1  x2
subject to
 x1  4 x2  s1
x1  3 x2
 2 x1  5 x2
5
 s2
 1
 s3  1
x1 , x2 , s1 , s2 , s3  0
Basic z
z
1
x1
1
x2
-1
s1
0
s2
0
s3
0
Sol
0
s1
0
-1
4
1
0
0
-5
s2
0
1
-3
0
1
0
1
s3
0
-2
5
0
0
1
-1
We now allow s1 to leave the basis as it has the most –ve value
and x1 to enter as it has the only –ve coefft in the leaving row.
z
1
0
3
1
0
0
5
x1
0
1
-4
-1
0
0
5
s2
s3
0
0
0
0
1
-3
1
-2
1
0
0
1
-4
9
The new s2 row shows that the problem has no feasible
solution.
Problem 4(b) Problem Set 4.4A Page 142
Consider the LPP
Maximize
subject to
z  x1  3x2
x1  x2  2
x1  x2  4
2 x1  2 x2  3
x1 , x2  0
Adding the slack variable s1 to the first constraint
and the surplus variables s2 and s3 to the second and
third constraints, the LPP becomes
Maximize
z  x1  3x2
subject to
x1  x2  s1
 x1  x2
 2 x1  2 x2
 2
 s2
 4
 s3  3
x1 , x2 , s1 , s2 , s3  0
We did this by generalized Simplex algorithm earlier.
We redo it in another way.
Basic z
z
1
s1
0
x1
-1
1
x2
3
-1
s1
0
1
s2
0
0
s3
0
0
s4
0
0
Sol
0
2
s2
0
-1
-1
0
1
0
0
-4
s3
0
-2
2
0
0
1
0
-3
We now allow x1 to enter and s1 to leave the basis
z
1
0
2
1
0
0
0
2
x1
s2
0
0
1
0
-1
-2
1
1
0
1
0
0
0
0
2
-2
s3
0
0
0
2
0
1
0
1
Now dual simplex method starts: s2 leaves;x2 enters the basis
Basic z
z
1
x1
0
x2
0
s1
2
s2
1
s3
0
s4
0
Sol
0
x1
0
1
0
1/2 -1/2
0
0
3
x2
0
0
1
-1/2 -1/2
0
0
1
s3
0
0
0
1
0
1
2
0
This is the optimal tableau
Max z = 0; x1 = 3; x2 = 1.
z = -3
SF
(3,1) Optimal Solution