Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 29

Chapter-III

Duality in LPP

Dr. T. VENKATESAN
Assistant Professor
Department of Statistics
St. Joseph’s College, Trichy-2.
The Essence
• Every linear program has another linear program
associated with it:
Its ‘dual’
• The dual complements the original linear program,
the ‘primal’
• The theory of duality provides many insights into what is
happening ‘behind the scenes’

Duality/Sensitivity-2
Primal and Dual

Primal Dual

Decision variables: x Decision variables: y

max Z = cx min W = yb
s.to Ax  b n s.to yA  c m
x0 m y0 n

Duality/Sensitivity-3
Primal and Dual - Example
Standard Algebraic Form

Primal Dual
Max Z = 3x1+ 5x2 Min W = 4y1+ 12y2+ 18y3

s. to x1 ≤4 s. to y1+ 3y3 ≥3
2x2 ≤ 12 2y2+ 2y3 ≥5
3x1+ 2x2 ≤ 18
y1, y2, y3 ≥ 0
x1,x2 ≥ 0

Duality/Sensitivity-4
Primal and Dual - Example
Matrix Form

Primal Dual
4
maximize 3 5 
 x1  minimize y 1 y 2 y 3 12
 x2  18 
 1 0 4
   x1     1 0
subject to 0 2    12
x subject to y 1 y 2 y 3 0 2  3 5
3 2  2  18
3 2
 x1  0
x    
y1 y2 y 3   0 0 0
 2  0

Duality/Sensitivity-5
Symmetry Property
• For any primal problem and its dual problem, all
relationships between them must be symmetric
because…

Duality/Sensitivity-6
Duality Theorem

The following are the only possible relationships between


the primal and dual problems:
1. If one problem has feasible solutions and a bounded objective
function (and so has an optimal solution), then so does the
other problem, so both the weak and the strong duality
properties are applicable
2. If one variable has feasible solutions but an unbounded
objective function (no optimal solutions), then the other problem
has no feasible solutions
3. If one variable has no feasible solutions, then the other problem
either has no feasible solutions or an unbounded objective
function

Duality/Sensitivity-7
Relationships between Primal and Dual
• Weak duality property
If x is a feasible solution to the primal, and
y is a feasible solution to the dual, then
cx  yb

• Strong duality property


If x* is an optimal solution to the primal, and
y* is an optimal solution to the dual, then
cx* = y*b

Duality/Sensitivity-8
Complementary Solutions
• At each iteration, the simplex method identifies
– x, a BFS for the primal, and
– a complementary solution y, a BS for the dual
(which can be found from the row coefficients under slack
variables)
• For any primal feasible (but suboptimal) x,
its complementary solution y is dual infeasible, with
cx=yb
• For any primal optimal x*,
its complementary solution y* is dual optimal, with
cx*=y*b

Duality/Sensitivity-9
Complementary Slackness

• Associated variables between primal and dual


Primal Dual
(original variable) xj ysm+j (surplus variable)
(slack variable) xsn+i yi (original variable)

• Complementary slackness property:


When one variable in primal is basic,
its associated variable in dual is nonbasic
Primal Dual
(m variables) basic nonbasic (m variables)
(n variables) nonbasic basic (n variables)

Duality/Sensitivity-10
Primal and Dual
Primal Dual
Z=cx
Z= W=yb
W=

superoptimal suboptimal

(optimal) Z* W* (optimal)

suboptimal superoptimal

Duality/Sensitivity-11
Insight
Original Variables Slack Variables
B.V. Z r.h.s.
x1 x2 … xn xsn+1 … xsn+m

Z 1 cBB-1A-c cBB-1 cBB-1b

xB 0 B-1A B-1 B-1b

Original Variables Slack Variables


B.V. Z r.h.s.
x1 x2 … xn xsn+1 … xsn+m

Z 1 yA-c y yb

xB 0 B-1A B-1 B-1b

Duality/Sensitivity-12
A More Detailed Look at Sensitivity
• We are interested in the optimal solution sensitivity to
changes in model parameters
– Coefficients aij, cj
– Right hand sides bi
• If we change the model parameters, how does it affect
– Feasibility?
If violated, then primal infeasible, but may be dual feasible
– Optimality?
If violated, then dual infeasible, but may be primal feasible

Duality/Sensitivity-13
General Procedure for Sensitivity Analysis

• Revise the model


• Calculate changes to the original final tableau
• Covert to the proper form using Gaussian elimination
• Feasibility Test: Is the new right-hand-sides  0 ?
• Optimality Test: Is the new row-0 coefficients  0 ?
• Reoptimization
– If feasible, but not optimal, continue solving with the
primal simplex method
– If not feasible, but satisfies optimality, continue solving with the
dual simplex method
– If feasible and satisfies optimality, then calculate new x* and Z*

Duality/Sensitivity-14
Example of Sensitivity Analysis
Original model Revised model
Max Z = 3x1+ 5x2 Max Z= 4x1+ 5x2
s. to x1 ≤4 s. to x1 ≤4
2x2 ≤ 12 2x2 ≤ 24
3x1+ 2x2 ≤ 18 2x1+ 2x2 ≤ 18
x1,x2 ≥ 0 x1,x2 ≥ 0
Original final simplex tableau
Basic Z x1 x2 s1 s2 s3 r.h.s.
variable cBB-1A-c cBB-1 cBB-1b
Z 1 0 0 0 3/2 1 36
s1 0 0 0 1 1/3 -1/3 2
x2 0 0 1 0 1/2 0 6
x1 0 1 0 0 -1/3 1/3 2

B-1A B-1 B-1b


What happens when A, b, c changes?
Duality/Sensitivity-15
The Changes in Coefficients
x2 x2
2x2 = 24

x1 = 4 x1 = 4

Z = 4x1+ 5x2

2x2 = 12

Z = 3x1+ 5x2 = 36

2x1+ 2x2 = 18
3x1+ 2x2 = 18

x1 x1
Duality/Sensitivity-16
Example of Sensitivity Analysis
• Calculate changes to the original final tableau
from original final tableau
1 1
Bold  CB Bold  y* 

use new coefficients Anew , bnew , c new :


1 1
Bold bnew  CB Bold bnew  y * bnew 

1
CB Bold Anew  c new 

Duality/Sensitivity-17
Example of Sensitivity Analysis

Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1 0 0 0 ½ 1 48
s1 0 0 0 1 ½ -½ 7
x2 0 0 1 0 ½ 0 12
x1 0 1 0 0 -½ ½ -3

• Feasible?

• Satisfies optimality criterion?

Duality/Sensitivity-18
Example of Sensitivity Analysis

Simple dual simplex iteration


Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1 0 0 0 ½ 1 48
s1 0 0 0 1 ½ -½ 7
x2 0 0 1 0 ½ 0 12
x1 0 1 0 0 -½ ½ -3

Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1
0
0
0

Duality/Sensitivity-19
Changes in bi only (Case 1)
Original Variables Slack Variables
B.V. Z r.h.s.
x1 x2 … xn xsn+1 … xsn+m

Z 1 cBB-1A-c cBB-1 cBB-1b

xB 0 B-1A B-1 B-1b

• What is affected when only b changes?

• Optimality criterion will always be satisfied


• Feasibility might not

Duality/Sensitivity-20
Changes in bi only
Example A
4 4
Change b  12 to b  24 B-1b=
18  18 

cBB-1b=

Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable

Z 1 0 0 0 3/2 1
s1 0 0 0 1 1/3 -1/3
x2 0 0 1 0 1/2 0
x1 0 1 0 0 -1/3 1/3

Duality/Sensitivity-21
Changes in bi only
Example A

Simple dual simplex iteration


Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1 0 0 0 3/2 1 54
s1 0 0 0 1 1/3 -1/3 6
x2 0 0 1 0 1/2 0 12
x1 0 1 0 0 -1/3 1/3 -2

Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1
0
0
0

Duality/Sensitivity-22
Changes in bi only
Representing as differences

4 4
Change b  12 to b  24
18  18 

 b1 
 
Can represent as b  b  b2 
b3 

b
1
Then we can find B b = change in r.h.s. of optimal tableau

cB B 1b = change in optimal Z value

Duality/Sensitivity-23
Changes in bi only
Allowable ranges

• Assume only b2 changes


• The current basis stays feasible (and optimal) as long as
B 1 (b  b)  0

Duality/Sensitivity-24
Changes in coefficients of nonbasic variables
(Case 2a)
Original Variables Slack Variables
B.V. Z r.h.s.
x1 x2 … xn xsn+1 … xsn+m

Z 1 cBB-1A-c cBB-1 cBB-1b

xB 0 B-1A B-1 B-1b

• What is affected when only c and A columns for a


nonbasic variable change?

• Feasibility criterion will always be satisfied


• Optimality might not
Duality/Sensitivity-25
Changes in coefficients of nonbasic variables
Example A continued

• From Example A (slide 22 – p241, Table 6.21), we had


Basic
Z x1 x2 s1 s2 s3 r.h.s.
variable
Z 1 9/2 0 0 0 5/2 45
s1 0 1 0 1 0 0 4
x2 0 3/2 1 0 0 1/2 9
s2 0 -3 0 0 1 -1 6

Change c1  3 to c1  4 (cBB-1A - c)1= y* A – c =


 1  1
A1  0 A1  0
3 2
(B-1A)1=

Duality/Sensitivity-26
Changes in coefficients of nonbasic variables
Allowable ranges

• Assume only c1 changes


• The current basis stays optimal (and feasible) as long as
C B
B
1

Ac  0

Duality/Sensitivity-27
Introduction of a new variable (Case 2b)

• Assume the variable was always there, with ci=0, Aij=0


• Can now assume it is a nonbasic variable at the original
optimal, and apply the same approach as Case 2a

Example A Example A with new variable


Max Z = 3x1+ 5x2 Max Z = 3x1+ 5x2 + 2x6
s. to x1 ≤4 s. to x1 + x6 ≤ 4
2x2 ≤ 24 2x2 ≤ 24
3x1+ 2x2 ≤ 18 3x1+ 2x2 + 2x6 ≤ 18
x1,x2 ≥ 0 x1,x2 ≥ 0

Duality/Sensitivity-28
Other possible analyses
• Changes to the coefficients of a basic variable
– Utilize same approach as initial example, not much of a ‘special
case’
• Introduction of a new constraint
– Would optimality criterion be satisfied?
– Would feasibility criterion be satisfied?
• Parametric analysis

Duality/Sensitivity-29

You might also like