Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

Linear programming

Chapter V: Duality Theory

M. NACEUR AZAIEZ, Professor


Asma Ben Yaghlane Riahi, Doctor
Tunis Business School
https://sites.google.com/site/naceurazaiez/

1
Content
• Introduction & Motivation
• Definition of the dual of LP
• Primal-Dual Relationships
• Results on duality theory
• Dual of LP in non-canonical form
• Economic interpretations

2
Introduction & Motivation

First developed
in relation to LP

3
Introduction & Motivation

The original problem


in relation to its dual
is termed the primal

4
Example 1
There is a small company in Melbourne which has recently
become engaged in the production of office furniture.

The company manufactures tables, desks and chairs.

The production of a table requires 8 Kgs of wood and 5


Kgs of metal and is sold for $80.

5
Example 1-continued
A desk uses 6 Kgs of wood and 4 Kgs of metal and is sold
for $60; and a chair requires 4 Kgs of both metal and
wood and is sold for $50.

We would like to determine the revenue maximizing


strategy for this company, given that their resources are
limited to 100 Kgs of wood and 60 Kgs of metal.

6
Formulation-example 1
max Z  80 x1  60 x 2  50 x 3
x
8 x1  6 x 2  4 x3  100
5x1  4 x2  4 x 3  60
x1 , x 2 , x3  0

7
Duality-example 1
Now consider that there is a much bigger company in
Melbourne which has been the only producer of this type of
furniture for many years.

They don't appreciate the competition from this new


company; so they have decided to tender an offer to buy all
of their competitor's resources and therefore put them out of
business.

8
Formulating the dual LP

The challenge for this large company then is to develop a


linear program which will determine the appropriate
amount of money that should be offered for a unit of
each type of resource, such that the offer will be
acceptable to the smaller company while minimizing the
expenditures of the larger company.

9
Problem D1
min w  100 y1  60 y2
y
8 y1  5 y2  80
6 y1  4 y2  60
4 y1  4 y2  50
y1, y2  0
10
Example 2: A Diet Problem

An individual has a choice of two types of food to eat, meat and potatoes,
each offering varying degrees of nutritional benefit.

He has been warned by his doctor that he must receive at least 400 units
of protein, 200 units of carbohydrates and 100 units of fat from his daily
diet

11
Example 2-continued

Given that a kg of steak costs $10 and provides 80 units


of protein, 20 units of carbohydrates and 30 units of fat,
and that a kg of potatoes costs $2 and provides 40 units
of protein, 50 units of carbohydrates and 20 units of fat,
he would like to find the minimum cost diet which
satisfies his nutritional requirements.

12
Formulating example 2
min Z  10 x1  2 x2
x
80 x1  40 x 2  400
20 x1  50 x 2  200
30 x1  20 x 2  100
x1 , x 2  0
13
The Dual of example 2

Now consider a chemical company which hopes to


attract this individual away from his present diet by
offering him synthetic nutrients in the form of pills.

This company would like to determine prices per unit


for their synthetic nutrients which will bring them the
highest possible revenue while still providing an
acceptable dietary alternative to the individual.

14
Dual Problem of example 2
max w  400 y1  200 y2  100 y3
y

80 y1  20 y2  30 y3  10
40 y1  50 y2  20 y3  2
y1, y2 , y3  0
15
Comments

Each of the two The notion of We shall


examples “competition” investigate the
describes some could be economic
kind of investigated interpretation of
competition more formally in the primal/dual
between two “Game relationship later
decision makers. Theory”. in this chapter.

16
Definition
Primal Problem Dual Problem

z*:  max Z  cx w* : min w  yb


x x

s. t . s.t.
Ax  b yA  c
x 0 y 0
b is not assumed to be non-negative
17
Example

Max Z = 10X1 + 5X2

2X1 + 3X2  10

6X1 + X2  15

4X1 – 5X2  35

X1, X2  0

18
Max ZX= 10 X1 + 5 X2
2 X1 + 3 X2  10 Y1

6 X1 + X2  15 Y2

4 X1 – 5 X2  35 Y3

X1, X2  0

1st constraint 2nd constraint


Min ZY = Y1+ Y2 + Y3

Y1 + Y2 + Y3 

Y1 Y2 Y3 

Y1,Y2,Y3  0
19
Example
Primal
max Z  5x1  3x 2  8 x3  0 x 4  12 x5
x
3 x1  8x 2  9 x 4  15x 5  20
18x1  5x 2  8 x3  4 x4  12 x5  30
x1, x2 , x3 , x4 , x5  0
20
min
Dual y w  20 y1  30 y2

3y1  18 y2  5
 8 y1  5y 2  3
 8y2  8
9y1  4 y2  0
15 y1  12 y2  12
y1, y 2  0
21
Primal-Dual relationship
x1  0 x2  0 xn  0 w =

y1  0 a11 a12 a1n  b1


D ual y2  0 a21 a22 a2n  b2
(m in w ) .. . . .. ... . .. . ..
ym  0 am1 am2 amn  bn
  
Z= c1 c2 cn

22
Example
max Z  4 x1  10 x2  9 x3
x
5 x1  18 x2  5 x3  15
8 x1  12 x2  8x3  8
12 x1  4 x 2  8 x3  10
2 x1  5 x3  5
x1, x2 , x3  0
23
Dual
min w  15 y1  8y2  10 y3  5y4
y

5 y1  8 y2  12 y 3  2 y 4  4
18 y1  12 y 2  4 y 3  10
5 y1  8y 3  5 y 4  9
y1 , y2 , y 3 , y4  0

24
FINDING THE DUAL OF
NON-CANONICAL LP

25
Streamlining the conversion ...

equality unrestricted
constraint in sign dual
in the variable
primal

26
Streamlining the conversion ...

unrestricted inequality
sign variable inconstraint
the primal in the dual

27
Primal-Dual relationship
Primal Problem Dual Problem
opt=max opt=min

Constraint i : Variable i :
<= form yi >= 0
= form yi urs

Variable j: Constraint j:
xj >= 0 >= form
xj urs = form 28
Example
max Z  5x1  4 x 2
x
3x1  8 x2  6
x1  6 x 2  5
8 x1  10
x 2  0; x1 urs
29
Equivalent non-standard form
max Z  5x1  4 x 2
x
3 x1  8 x 2  6
x1  6 x2   5
8 x1  10
x 2  0; x1 urs
30
Dual from the recipe
min w  6 y1  5 y2  10 y3
y

3 y1  y2  8 y3  5
8y1  6 y2 4
y1  0; y2 , y3 urs

31
What about min ?

Can use the usual


trick of multiplying It is instructive to
i.e, what is the dual
the objective use this method to
of the dual of the
function by -1 construct the dual
standard primal
(remembering to of the dual of the
problem?
undo this when the standard form
dual is constructed)

32
What is the dual of

w* : min w  yb
x

s.t.
yA  c
y 0
33
max  w   yb max  w   yb
y y

s.t. s.t.
yA  c  yA  c
y 0 y 0

34
min  Z  cx max Z  cx
x x
s. t . s. t .
 Ax   b Ax  b
x 0 x 0

35
Important Observation

FOR ANY PRIMAL LINEAR PROGRAM, THE


DUAL OF THE DUAL IS THE PRIMAL

36
Primal-Dual Relationship
Primal or Dual Dual or Primal
opt=max opt=min

Constraint i :
Variable i :
<= form
yi >= 0
= form
yi urs
Variable j:
Constraint j:
xj >= 0
>= form
xj urs
= form 37
Example
min Z  6 x1  4 x2
x
3x1  5 x2  12
x1  2 x 2  8
5x1  x2  10
x1, x1  0
38
Equivalent form
min Z  6 x1  4 x2
x
3x1  5x 2  12
x1  2 x2  8
5 x1  x2  10
x1 , x 2  0
39
Dual
max w  12 y1  8 y2  10 y3
y
3y1  y2  5 y3  6
5 y1  2 y2  y3  4
y1, y3  0; y2 urs

40
Maximization Minimization
Number of constraints Number of variables
constraint  Variable positive or zero
constraint  Variable negative or zero
constraint = Unconstrained Variable
Number of variables Number of constraints
Variable positive or zero constraint 
Variable negative or zero constraint 
Unconstrained Variable constraint =
Coefficient of the jth variable RHS of the jth constraint
In the objective function
Coefficient of the ith variable
RHS of the ith constraint
In the objective function
Technological coefficient of the Technological coefficient of the ith
jth variable in the ith constraint variable in the jth constraint
41
Example
Primal Dual

Max ZX = 5X1 + 4X2 – 2X3 Min ZY = 20Y1 + 5Y2 + 30Y3


2X1 + 3X2  20 2Y1 + Y2 + Y3  5
X1 – 4X3  5 3Y1 + Y3  4

X1 + X2 + X3 = 30 - 4Y2 + Y3 =-2

X1, X2  0 Y1  0 , Y2  0 , Y3  IR
42
Primal Dual

Min ZX = 15X1 + 2X2 Max ZY = 10Y1+50Y2+2Y3+120Y4


X1 – X2  10 Y1 + 7Y2 - Y3 + 9Y4  15
7X1 + 2X2  50 -Y1 + 2Y2 +3Y3 + Y4 = 2
- X1 + 3X2  2 Y1  0 , Y2  0 , Y3  0 , Y4  IR

9X1 + X2 = 120

X1  0, X2  IR

Note that the dual of the dual is the primal


43
Results
• Consider the primal and dual LP:

44
Theorem
Theorem. The dual of the dual is the primal.
Proof: The dual problem LP2 is equivalent to the following problem:
Max - bT y
s. t. - AT y   c
y  0.
By definition, the dual of this problem is
Min  cT x
s. t. (  AT x   b
x  0,
or equivalently,
Max cT x
s. t. Ax  b
x  0.
which is the primal problem.
45
Various theorems related to duality (without proof)

If x* is primal feasible and y*


If x is primal feasible and y is
is dual feasible and cTx* =
dual feasible, then cTx ≤ bTy
bTy* then x* and y* are
(weak duality theorem).
optimal

If one of a pair of primal and


dual problems has an optimal
solution, then the other also
has an optimal solution and
the optimal values of their
objective functions are equal.
46
Theorem-continued
If the primal is feasible and If the dual is feasible and
unbounded then the dual is unbounded, then the primal is
infeasible. infeasible.

Complementary Slackness
Theorem: A primal feasible
solution x* and a dual feasible
solution y* are optimal if and
only if (b-Ax*)Ty* = 0 and
(ATy* - c)Tx* = 0.

47
Interpretation of Duality
The fact that profit would
The dual variable y* increase by yi* if an
measures the change in additional unit of resource
optimal profit due to a unit i were available imputes a
change in resource i. value or price to resource
i.

This value or price is


called a shadow price.
Thus, the shadow price is
the amount of contribution
of an additional unit of a
resource to total profit.
48
Discussion

• Note from the weak duality theorem that we always have

49
Discussion-continued
The inequality is Weak duality
strict except at At optimality, yi is theorem:
optimal solution interpreted as the
where equality worth of resource i the profit is ≤
holds worth of resources

Resources are not exploited


according to the best yi's: shadow prices
allocation except at of resources
optimality

50
Discussion-continued
Shadow price: additional unit
profit that could be made by
acquiring additional units of
resource i

Resource not totally consumed at optimal Active constraint (i.e., the resource is entirely
exploitation: consumed at optimal exploitation):
• related constraint is inactive • corresponding shadow price is positive
• corresponding shadow price must be zero • it will be profitable to acquire additional
• corresponding slack variable is basic units of that resource.

51
Example
Consider the following LP and its dual :

Max ZX = 5X1 + 2X2 + 7X3 Min ZY = 50Y1 + 75Y2

X1 + X2 + X3  50 Y1 + 2Y2  5

2X1 + 4X2 + 3X3  75 Y1 + 4Y2  2

X1, X2, X3  0 Y1 + 3Y2 ≥ 7

Y1  0 , Y2  0
52
The optimal tableau is given by

CJ 5 2 7 0 0
Basis X1 X2 X3 S1 S2 bI
0 S1 0 -1 -1/2 1 -1/2 12,5
5 X1 1 2 3/2 0 1/2 37,5
J 0 -8 -1/2 0 -5/2 187,5
Dual E1 E2 E3 Y1 Y2 ZY
Solution 0 8 1/2 0 5/2 187,5

53
Economic Interpretation of
the dual problem

The production process


Assume that in the
requires the use of 2
context of the previous
resources R1 & R2 ,
LP, 3 products P1, P2 et
which are available in
P3 are to be
limited quantities of 50
manufactured
et 75 units respectively

54
Reconsider the following example
Max ZX = 5X1 + 2X2 + 7X3
X1 + X2 + X3  50 (R1)
2X1 + 4X2 + 3X3  75 (R2)
X1, X2, X3  0

CJ 5 2 7 0 0
Basis X1 X2 X3 S1 S2 bi
0 S1 0 -1 -1/2 1 -1/2 12,5
5 X1 1 2 3/2 0 1/2 37,5
CJ-ZJ 0 -8 -1/2 0 -5/2 187,5
55
From the corresponding optimal Tableau, the marginal value or
shadow price of R1 is 0 and the shadow price of R2 is 2.5

An additional unit of R1 has no effect on the value of Z, whereas


an additional unit of R2 will increase Z by 2.5 dinars

The producer will not be ready to cede a unit of R1 (respectively


R2) unless he obtains against it at least 0 (respectively 2.5 dinars)
additional gain

Equivalently, in order to acquire one more unit of R1


(respectively R2), the producer will be willing to pay additional
cost of 0 (respectively 2.5 dinars)
56
The CJ-ZJ of a decision variable

CJ-ZJ is called
the reduced It is interpreted
cost of the as the deficit
for the decision
corresponding variable to
decision become basic
variable

57
The CJ-ZJ of a decision variable
In the last tableau, C2-Z2 =-8. This says
that the unit profit of P2 must increase at
least by 8 dinars for P2 to become
profitable.

By forcing one unit of P2 to be produced,


the profit will be reduced by 8 dinars.

The unit profit of P3 must increase at least


by 0.5 dinars for P3 to become profitable.

58

You might also like