Вы находитесь на странице: 1из 49

# Dual simplex method for

## 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,
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

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 2 x1 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 2 x1 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

-3
2
-2
0

0
0
1
0
0
1
0 -3/2

0
30
-10
15
20

s1
s2
z

1 -2
0
2
0 -1
1 -1/2

s1

x2

1/2

0 -1/2

## This is the optimal tableau.

Optimal sol: x1= 0, x2=5; Optimum Value: z =15

(0,15)
2x1+2x2=30
(0,5)
(0,0)
(10,0) (15,0)
2x1+3x2=15
x1+2x2=10

2x1+3x2=45
2x1+3x2=30
2x1+3x2=20

Problem
Solve by Dual Simplex method
Minimize z 2 x1 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 2 x1 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

s1

1
0

-2
-2

-3
-2

0
1

0
0

0
-30

s2
z

0
1

-1
0

-2
-1

0
-1

1
0

-10
30

x1

-1/2 0

15

s2

-1

-1/2 1

## 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 4 x1 2 x2
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 0 s1 0 s2 0 s3
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
s1
0

x1
-4
1

x2
-2
1

s1
0
1

s2
0
0

s3
0
0

Sol
0
1

s2
s3

0
0

-1
-3

-1
1

0
0

1
0

0
1

-1
-2

z
s1
s2

1
0
0

0 -10/3
0 4/3
0 -4/3

0
1
0

0
0
1

-4/3
1/3
-1/3

8/3
1/3
-1/3

x1
z
s1
x2
x1

0
1
0
0
0

1
0
0
0
1

0
0 -1/3
0 -5/2 -1/2
1
1
0
0 -3/4 1/4
0 -1/4 -1/4

2/3
7/2
0
1/4
3/4

-1/3
0
0
1
0

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 0 s1 0 s2 0 s3
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
s1
0

x1
1
1

x2
1
1

s1
0
1

s2
0
0

s3
0
0

Sol
0
8

s2
s3
z
s1
x2
s3
z
s1
x2
x1

0
-1
1
1
0
-1
0
0
0
1

-1
1
0
0
1
0
0
0
1
0

0
0
0
1
0
0
0
1
0
0

1
0
1
1
-1
1
2
2
-1
-1

0
1
0
0
0
1
1
0
0
-1

-3
2
-3
5
3
-1
-4
4
3
1

0
0
1
0
0
0
1
0
0
0

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

Simplex method.

Basic z
z
1
s1
0
s2
0

x1
-3
3
1

x2
-2
1
1

s3
z
x1
s2
s3
z
x1
x2
s3

5
0
1
0
0
0
1
0
0

3
0 0
-1
1 0
1/3 1/3 0
2/3 - 1/3 1
4/3 - 5/3 0
0 1/2 3/2
0
1/2 -1/2
1 - 1/2 3/2
0
-1 -2

0
1
0
0
0
1
0
0
0

s1
0
1
0

s2
0
0
1

s3
0
0
0

Sol
0
12
6

1
0
0
0
1
0
0
0
1

27
12
4
2
7
15
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

t 2 2

y1 , y2 , y3 , t1 , t2 0

Basic w y1
w
1 -12
t1
0 -3

y2
-6
-1

y3
-27
-5

t1
0
1

t2
0
0

Sol
0
-3

t2

-1

-1

-3

-2

w
y1
t2
w
y1
y2

1
0
0
1
0
0

0
1
0
0
1
0

-2
-7
1/3 5/3
-2/3 - 4/3
0
-3
0
1
1
2

-4
0
-1/3 0
-1/3 1
-3 -3
-1/2 1/2
1/2 - 3/2

12
1
-1
15
1/2
3/2

Optimal
Tableau

## We now enumerate the basic solutions of the

primal & the complementary basic solutions
Iteration
No.

Primal
Basic
Solution

Fea- z=
sible w
?

(4,0, 0, 2, 7)

(3,3, 0, 0,3)

Compl.
Basic
Solution

Feasible
?

## (0,0, 0,-3, -2)

12 (1,0, 0, 0, -1)

15 (1/2,3/2, 0, 0, 0)

## Thus we observe that dual Simplex method

solves the dual on the primal tableau.

Problem 3

## Dual Simplex with Artificial Constraints

Consider the LPP
Maximize z 2 x1 x2 x3
subject to 2 x 3 x 5 x 4
1
2
3

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

2
x

x
1
2
3
Maximize
subject to

2 x1 3 x2 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
s1
0
s2
s3

0
0

x1
-2
-2

x2
1
-3

x3
-1
5

s1
0
1

s2
0
0

s3
0
0

s4
0
0

Sol
0
-4

1
4

-9
6

1
3

0
0

1
0

0
1

0
0

-3
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
0 0
-9
0
0
1
0
-1 -3- M
s3
0 0
6
-1
0
0
1
-4 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
s1
0
s2
0

x1 x2
x3
0
4
1/2
0
0 13/2
0 -21/2 1/4

s1
0
1
0

s2
0
0
1

s3
1/2
1/2
-1/4

s4
0
0
0

Sol
4
0
-5

s4

-3/2

1/4

-1/4

-2+M

x1

3/2

3/4

1/4

z
s1
x2
s4
x1

1
0
0
0
0

0
0
0
0
1

0
0
1
0
0

25/42 0
13/2 1
-1/42 0
3/14 0
11/14 0

8/21 17/42
0
1/2
-2/21 1/42
-1/7 -3/14
1/7 3/14

0
0
0
1
0

44/21
0
10/21
-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 3 x2
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

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
s1
0

x1
-1
1

x2
3
-1

s1
0
1

s2
0
0

s3
0
0

s4
0
0

Sol
0
2

s2

-1

-1

-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
s1
0

x1
0
0

x2
3
-1

s1
0
1

s2
0
0

s3
0
0

s4
1
-1

Sol
M
2-M

s2
s3

0
0

0
0

-1
2

0
0

1
0

0
1

1
2

-4+ M
-3+2M

x1

z
s4
s2
s3
x1

1
0
0
0
0

0
0
0
0
1

2
1
-2
0
-1

1
-1
1
2
1

0
0
1
0
0

0
0
0
1
0

0
1
0
0
0

2
M-2
-2
1
2

Basic z
z
1
s4
0
s2
0

x1
0
0
0

x2
2
1
-2

s1
1
-1
1

s2
0
0
1

s3
0
0
0

s4
0
1
0

Sol
2
M-2
-2

s3

x1

-1

z
s4
x2
s3
x1

1
0
0
0
0

0
0
0
0
1

0
0
1
0
0

0
0
0
1
0

0
1
0
0
0

0
M-3
1
1
3

2
1
-1/2 1/2
-1/2 -1/2
2
0
1/2 -1/2

## 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
s1
0

x1
-1
1

x2
3
-1

s1
0
1

s2
0
0

s3
0
0

Sol
0
2

s2
s3

-1
-2

-1
2

0
0

1
0

0
1

-4
-3

0
0

## 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
0 0
-2
1
1
0
-2
x1 0 1
1
0
-1
0
4
s3
0 0
4
0
-2
1
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
x2 0

x1
0
0

x2
0
1

s1 s2
2
1
-1/2 -1/2

s3
0
0

Sol
0
1

x1
s3

1
0

0
0

1/2 -1/2
2
0

0
1

3
1

0
0

Problem 4(c)

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

s2

s3 1

x1 , x2 , s1 , s2 , s3 0

Basic z
z
1
s1
0

x1
1
-1

x2
-1
4

s1
0
1

s2
0
0

s3
0
0

Sol
0
-5

s2
s3

1
-2

-3
5

0
0

1
0

0
1

1
-1

0
0

## 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

x1
0 1
-4
-1
0
0
5
s2
0 0
1
1
1
0
-4
s3
0 0
-3 -2
0
1
9
The new s2 row shows that the problem has no feasible
solution.

Problem 4(b)

Maximize
subject to

z x1 3 x2
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
subject to

z x1 3x2
x1 x2 s1
x1 x2
2 x1 2 x2

s2

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
s3

-1
-2

-1
2

0
0

1
0

0
1

0
0

-4
-3

0
0

z

x1
s2
s3

0
0
0

1
0
0

-1
-2
0

1
1
2

0
1
0

0
0
1

0
0
0

2
-2
1

Basic z
z
1

x1
0

x2
0

s1
2

s2
1

s3
0

s4
0

Sol
0

x1

1/2 -1/2

x2
s3

0
0

0
0

1
0

-1/2 -1/2
2
0

0
1

0
0

1
1

## This is the optimal tableau

Max z = 0; x1 = 3; x2 = 1.

z = -3

SF