You are on page 1of 15

Duality of Linear Programming Problems

1. The dual of LP problem

For a LP problem in the following format


n

max Z  cjxj
j 1
n

a ij x j  bi , i  1,..., m
s.t. j 1

x j  0, j  1,..., n

Its dual problem is


m

min W   bi yi
i 1
m

s.t.
a
i 1
ij yi  c j , j  1,..., n

yi  0, j  1,..., n

In its matrix format


max z  cX
s.t.
AX  b
X 0

Its dual problem is


min W  yb
s.t.
yA  c
y0

 a11 , a12 , . .. , a1n 


a 
c  ( c1 , c2 , c3 ,...cn ) , A  
 
21, a 22 ,
 
. .. , a 2 n



,
 
 a m1 , a m 2 , . .. , a mn  m n

b 1   x1 
b  x 
b  


2 


, X  


2





, y  ( y1 , y2 , y3 ,..., ym )
 bm  m1  xn  n1

Example.

40
For the problem:
max z  3 x1  5 x2
s.t.
x1  4
2 x2  12
3 x1  2 x2  18
x1  0, x2  0

Its dual is:

min W  4 y1  12 y 2  18 y3
s.t.
y1  3 y3  3
2 y 2  2 y3  5
y1  0, y2  0, y3  0

In table form for this example:

x1 x2
y1 1 0 4
y2 0 2  12
y3 3 2  18
| |
3 5

Explanation.

From the summary of the Simplex method, we have

t*  t  y * T  [ y*A - c  y*  y* b] (1)
T*  S*T  [S*A S* S*b]

(2)

These equations hold for any iteration in the Simplex process, so they can be
written as:

41
t  t  yT  [ yA - c  y  y b]

(1)
T  ST  [SA S Sb] (2)

Let
z  yA

so
m
z j   aij yi , j  1,..., n
i 1

Then in the Simplex tableau, we always have:

Coefficient RH
Eq. Z x1 x2 … xn x n 1 xn  2 … xn  m
Z (0) 1 z1  c1 z2  c2 … zn  cn y1 y2 … ym W

Then the conditions for optimality are:


z j  c j  0, j  1,..., n

yi  0, i  1,..., m

These are the exact constraint conditions for the dual problem:
m

a
i 1
ij yi  c j , j  1,..., n

yi  0, j  1,..., n

To find the minimum value of


m
W  yb   bi yi
i 1

will lead to feasible solutions to the corresponding primal problem. That is to


say:
min W  yb
s.t.
yA  c

42
y0
This is the dual problem of the original problem.

Example.
max z  3 x1  5 x2
s.t.
x1  4
2 x2  12
3 x1  2 x2  18
x1  0, x2  0

0 Rows of the tableaux of the 3 iterations in solving this problem are:


Primal Problem Dual Problem
Iteration Row 0 y1 y2 y3 z1  c1 z2  c2 W
0 -3 -5 0 0 0 0 0 0 -3 -5 0
1 -3 0 0 5/2 0 0 2/5 0 -3 0 30
2 0 0 0 3/2 1 0 3/2 1 0 0 36

The dual problem is:


min W  4 y1  12 y 2  18 y3
s.t.
y1  3 y3  3
2 y 2  2 y3  5
y1  0, y2  0, y3  0

The optimal objective function value of the dual problem:

W *  4 y1  12 y2  18 y3  4  0  12  3 / 2  18  1  36  Z *

 We have found 3 solutions of the dual problem corresponding to the 3


iterations in solving the primal problem:
y 1  ( y1 , y 2 , y3 )  (0,0,0)

y 2  ( y1 , y2 , y3 )  (0, 52 , 0)

43
y 3  ( y1 , y2 , y3 )  (0, 3
2
, 1)

 The first two solutions are not feasible for the dual problem since they violate
at least one of the constraints.
 The third solution is feasible for the dual problem.
 The third solution is also optimal to the dual problem if we solve it directly.
 The third solution also corresponds to the optimal solution of the primal
problem since all corresponding zj  cj  0 .

 The objective values for the primal and dual problems is: W *  36  Z *

2. Primal-Dual Properties
 Weak duality property.
If X is a feasible solution for the primal problem and y is a feasible
solution for the dual problem, then
cX  yb

 Strong duality property


If X * is an optimal solution for the primal problem and y * is an
optimal solution for the dual problem, then
cX *  y * b

 Complementary solutions property


The simplex method simultaneously identifies CPF solution X and
complementary solution y with
cX  yb

if X is not optimal to the primal problem, y is not feasible to the dual


problem.
 Complementary optimal solutions property

44
In the final simplex tableau, the simplex method simultaneously identifies an
optimal solution X * and complementary optimal solution y * with
cX *  y * b

if X is not optimal to the primal problem, y is not feasible to the dual


problem. The yi* are the shadow prices for the primal problem.
 Symmetry property
The dual of the dual problem is the primal problem.

3. Other properties between primal and dual problems


 If one problem has feasible solutions and bounded objective function, then
the other also has feasible solutions and bounded objective function
 If one problem has feasible solutions and an unbounded objective function,
then the other has no feasible solutions
 If one problem has no feasible solutions, the other problem has either no
feasible solutions or an unbounded objective function

4. Primal-Dual Relationships

 The decision variables in the primal problem xj corresponds to the surplus


variables zj  cj of the dual problem
 The slack variables in the primal problem xn  i corresponds to the decision
variables yi of the dual problem
 Each basic solution in the primal problem has a complementary basic
solution in the dual problem with the same objective function. These basic
solutions may or may not be feasible solutions for the primal or the dual
problems.

45
 Basic variables in the primal problem correspond to the non-basic variables
in the dual problem. (Tables 6.7, 6.8, 6.9)
 Sub-optimal solutions of the primal problem corresponds to super optimal
solutions of the dual problem (Figure 6.1)
 For a maximization problem, the objective function value corresponding to a
solution of its dual (if simpler to find) can be used as an upper bound of the
primal problem.

5. Economic interpretations

 yi value in the optimal solution is the shadow price of the i-th resources
m

 a
i 1
ij yi is the contribution to profit of the mix of resources that would be

consumed if 1 unit of activity j were used.


m

 a
i 1
ij yi  c j says that the actual contribution to the profit of the above mix of

resources must be at least as much as if they were used by 1 unit of activity j.


 yi  0 say that the contribution to profit of resource i must be non-negative,
otherwise, it would be better not to use this resource.
m

 min W   bi yi is to minimize the implicit value of the resources consumed


i 1

by the activities. Keeping unused resources is not economical.

6. Other primal forms


The standard form of the primal problem for constructing its dual is:

46
n

max Z  cjxj
j 1
n

a ij x j  bi , i  1,..., m
s.t. j 1

x j  0, j  1,..., n

For the purpose of dual construction, the right hand side of the constraints are
not necessarily positive. Dual problem can be constructed if the primal problem
is not in its standard form (Table 6.14)

Example. (Tables 6.15, 6.16)

47
Dual Simplex Method

1. Introduction

 The standard Simplex method starts from a feasible solution with all xj  0

while the initial solution may not be optimal. In each iteration, feasibility of
the solution is kept with all xj  0 . At the same time, if all the reduced cost
z j  c j  0, j  1,..., n and yi  0, i  1,..., m , then the optimal solution is reached.
The solution is feasible and optimal.
 The dual simplex method is also an iterative process, similar to the standard
simplex method In dual simplex method, the initial solution is optimal with
all z j  c j  0, j  1,..., n and yi  0, i  1,..., m while the initial solution may not
be feasible. That is, some or all of xj  0. In each iteration, these infeasible
variables become feasible by letting non-basic variables enter the base to
replace basic variables, one at a time.
 The initial iteration of the dual simplex method still needs an identity matrix
to start

2. Examples

Example 1
min W  4 x1  12 x2  18 x3
x1  3 x3  3
s.t. 2 x 2  2 x3  5
x1  0, x2  0, x3  0

Or:

48
max Z  4 x1  12 x2  18 x3
 x1  3x3  3
s.t.  2 x 2  2 x3   5
x1  0, x2  0, x3  0
Adding slack variables:
max Z  4 x1  12 x2  18 x3
 x1  3x3  x4  3
s.t.  2 x 2  2 x3  x 5  5
x1  0, x2  0, x3  0
Iteration 0
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 4 12 18 0 0 0
x4 (1) 0 -1 0 -3 1 0 -3
x5 (2) 0 0 -2 -2 0 1 -5
Ratio 12/2=6 18/2=9

Iteration 1
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 4 0 6 0 6 -30
x4 (1) 0 -1 0 -3 1 0 -3
x2 (2) 0 0 1 1 0 -1/2 5/2
Ratio 4/1= 4 6/3=2

Iteration 2
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 2 0 0 2 6 -36
x3 (1) 0 1/3 0 1 -1/3 0 1
x2 (2) 0 -1/3 1 0 1/3 -1/2 3/2
Finish.

Example 2
max Z  5 x1  35 x2  20 x3

49
 x1  x2  x3  2
s.t.  x1  3x2  3
x1  0, x2  0, x3  0

Adding slack variables:


max Z  5 x1  35 x2  20 x3
 x1  x2  x3  x4  2
s.t.  x1  3x2  x5  3
x1  0, x2  0, x3  0, x4  0, x5  0

Iteration 0
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 5 35 20 0 0 0
x4 (1) 0 -1 -1 -1 1 0 -2
x5 (2) 0 -1 -3 0 0 1 -3
Ratio 5 11.67

Iteration 1
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 0 20 20 0 5 -15
x4 (1) 0 0 -4 -1 1 1 -5
x1 (2) 0 1 3 0 0 -1 3
Ratio 5 20

Iteration 2
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 0 0 15 5 10 -40
x2 (1) 0 0 1 1/4 -1/4 -1/4 1.25
x1 (2) 0 1 0 -3/4 3/4 -1/4 -0.75
Ratio 20 40
Iteration 3
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side

50
z (0) 1 20 0 0 20 5 -55
x2 (1) 0 0.333 1 0 0 -0.333 1
x1 (2) 0 -1.333 0 1 -1 0.333 1
Finish.

3. Applications of Dual Simplex method


 Re-optimize a problem after it has been solved but the right hand side values
have changes

Example
max z  3 x1  5 x2
s.t.
x1  4
2 x2  12
3 x1  2 x2  18
x1  0, x2  0
 4 
 
b   12 
 18 
 

Solving it by standard simplex method and we can get the following optimal tableau:
Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 0 0 0 3/2 1 36
x3 (1) 0 0 0 1 1/3 -1/3 2
x2 (2) 0 0 1 0 1/2 0 6
x1 (3) 0 1 0 0 -1/3 1/3 2

 4   4 
   
If b is changed from b   12 
 18 
 
to b new   24
 18




, we can use dual

simplex method to re-optimize the problem without resolving it from the


beginning.

51
For this problem, we know that the optimal
1 1/ 3  1/ 3 
 
B 1  0

0
1/ 2
 1/ 3
0
1/ 3



so the new values of the optimal

solution corresponding to b new will be


 x3  1 1 / 3  1 / 3  4   6 
      
X B   x2   B 1bnew   0 1/ 2 0  24   12 
x  0  1 / 3 1 / 3 18    2 
 1 

and the corresponding objective function value is:

4 
 
Z *  y * b new  0 3/ 2 1   24   54
 18 
 

However, the new optimal solution is not feasible since x1 is negative. Dual
simplex then can be used to re-optimize the problem. Use the final optimal
tableau with the new information for the changed right hand side and new Z
value:

Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 0 0 0 3/2 1 54
x3 (1) 0 0 0 1 1/3 -1/3 6
x2 (2) 0 0 1 0 1/2 0 12
x1 (3) 0 1 0 0 -1/3 1/3 -2

The next iteration gives:


Coefficient
Basic Eq. z x1 x2 x3 x4 x5 Right
Variable Side
z (0) 1 9/2 0 0 0 5/2 45
x3 (1) 0 1 0 1 0 0 4
x2 (2) 0 3/2 1 0 0 1/2 9
x4 (3) 0 -3 0 0 1 -1 6

The new optimal solution will be


 x3   4
   
X B   x2
 x
  9
 6

with Z=45
 1  

52
In fact, this is part of Sensitivity Analysis.
 Re-optimize a problem after it has been solved but a new constraint is added
 4 
 
Example, the same example with b new   24
 18




:

max z  3 x1  5 x2
s.t.
x1  4
2 x2  24
3 x1  2 x2  18
x1  0, x2  0
Adding a new constraint:
2 x1  3x2  24
The optimal tableau without the new constraint is:
Basic Coefficient Right
Variable Eq. z x1 x2 x3 x4 x5 Side
z (0) 1 9/2 0 0 0 5/2 45
x3 (1) 0 1 0 1 0 0 4
x2 (2) 0 3/2 1 0 0 1/2 9
x4 (3) 0 -3 0 0 1 -1 6

With this new constraint, a new slack variable x6 is also added. So the new
tableau is:

Basic Coefficient Right


Variable Eq. z x1 x2 x3 x4 x5 x6 Side
z (0) 1 9/2 0 0 0 5/2 0 45
x3 (1) 0 1 0 1 0 0 0 4
x2 (2) 0 3/2 1 0 0 1/2 0 9
x4 (3) 0 -3 0 0 1 -1 0 6
x6 new 0 2 3 0 0 0 1 24

This is not in the proper form since the column of x2 is not part of an identity
matrix. After conversion, the proper tableau is:

Basic Coefficient Right

53
Variable Eq. z x1 x2 x3 x4 x5 x6 Side
z (0) 1 9/2 0 0 0 5/2 0 45
x3 (1) 0 1 0 1 0 0 0 4
x2 (2) 0 3/2 1 0 0 1/2 0 9
x4 (3) 0 -3 0 0 1 -1 0 6
x6 new 0 -5/2 0 0 0 -3/2 1 -3

Again, this is optimal but not feasible since x6 is negative. Use dual simplex
method, the next iteration gives:

Basic Coefficient Right


Variable Eq. z x1 x2 x3 x4 x5 x6 Side
z (0) 1 1/3 0 0 0 0 5/3 40
x3 (1) 0 1 0 1 0 0 0 4
x2 (2) 0 2/3 1 0 0 0 1/3 8
x4 (3) 0 -4/3 0 0 1 0 -2/3 8
x6 new 0 5/3 0 0 0 1 -2/3 2

Again, this is part of the sensitivity analysis.

54

You might also like