dualityAndSensitivity PDF
dualityAndSensitivity PDF
• Suppose that a farmer has L km2 of land on which he intends to plant rice and wheat. The
farmer has F kilograms of fertilizers, and P kilograms of pesticides.
– Available resources: Land (L), Fertilizer (F) and pesticide (P)
• Each square kilometer of rice requires FR kilograms of fertilizer and PR kilograms of pesticide,
while each square kilometer of wheat requires FW kilograms of fertilizer and PW kilograms of
pesticide. If we denote the area of land planted with rice and wheat by xR and xW then the
constraints can be written as follows:
– xR + xW ≤ L
– FR xR + FW xW ≤ F
– PR xR + PW xW ≤ P
– x R ≥ 0, x W ≥ 0
• Let CR be the contribution of rice per square kilometer, and CW be the contribution of wheat
per square kilometer. Then the objective function can be written as:
– CR xR + CW xW
Primal Formulation
Maximize CR xR + CW xW
Subject to
xR + xW ≤ L
FR xR + FW xW ≤ F
PR xR + PW xW ≤ P
xR ≥ 0, xW ≥ 0
• Assume now that a third party decides to buy the resources from the
farmer and they want to set unit prices yL, yF and yP for each of the inputs
land, fertilizer and pesticide, respectively. Their objective is to minimize
the total cost of procuring the set amounts of inputs:
– L yL + F yF + P yP
• The farmer would accept the deal only if the resources are valued such
that it provides the farmer with a lower bound on the unit price of each
of his crops (outputs), CR for rice and CW for wheat. Therefore, the
constraints are as follows:
– yL + FR yF + PR yP ≥ CR
– yL + FW yF + PW yP ≥ CW
– yL ≥ 0, yF ≥ 0, yP ≥ 0
Dual Formulation
Minimize L yL + F yF + P yP
Subject to
yL + FR yF + PR yP ≥ CR
yL + FW yF + PW yP ≥ CW
yL ≥ 0, yF ≥ 0, yP ≥ 0
Max 3 x1 + 5 x2 , Min 4 y1 + 12 y2 + 18 y3 ,
Subject to Subject to
x1 £ 4 y1 + 3 y3 ³ 3
2 x2 £ 12 2 y2 + 2 y3 ³ 5
3 x1 + 2 x2 £ 18 y1 ³ 0, y 2 ³ 0, y3 ³ 0
x1 ³ 0, x2 ³ 0
Standard form (maximization)
é x1 ù é y1 ù
Max Z = [3,5]ê ú, Min W = [4,12,18]êê y2 úú
ë x2 û
êë y3 úû
Subject to Switch
Subject to
é1 0ù é4ù é y1 ù
ê0 2ú é x1 ù £ ê12ú é 1 0 3 ù ê ú é3ù
ê úêx ú ê ú ê0 2 2ú ê y2 ú ³ ê5ú
êë3 2úû ë 2 û êë18úû ë ûê y ú ë û
ë 3û
é y1 ù é0ù
é x1 ù é0ù ê y ú ³ ê0ú.
ê x ú ³ ê0ú. ê 2ú ê ú
Flip
ë 2û ë û êë y3 úû êë0úû
Standard form (maximization)
Min 4 y1 + 12 y2 + 18 y3 , Max 3 x1 + 5 x2 ,
Subject to Subject to
y1 + 3 y3 ³ 3 x1 £ 4
2 y2 + 2 y3 ³ 5 2 x2 £ 12
y1 ³ 0, y 2 ³ 0, y3 ³ 0 3 x1 + 2 x2 £ 18
x1 ³ 0, x2 ³ 0
Standard form (minimization)
é y1 ù é x1 ù
Min W = [4,12,18]êê y2 úú
Max Z = [3,5]ê ú,
ë x2 û
êë y3 úû
Subject to Subject to
Switch
é y1 ù é1 0ù é4ù
é 1 0 3 ù ê ú é3ù ê0 2ú é 1 ù £ ê12ú
x
ê0 2 2ú ê y2 ú ³ ê5ú ê úêx ú ê ú
ë ûê y ú ë û
ë 3û êë3 2úû ë 2 û êë18úû
é y1 ù é0ù
ê y ú ³ ê0ú. é x1 ù é0ù
ê 2ú ê ú ê x ú ³ ê0ú.
Flip
êë y3 úû êë0úû ë 2û ë û
Some shortcuts
Max
20 x1 + 30 x2 + 25 x3 + 40 x4
s.t.
5 x1 + 3x2 - 5 x3 + 3x4 £ 25
9 x1 - 4 x2 + 8 x3 - 4 x4 ³ 10
2 x1 - 7 x2 - 6 x3 + 5 x4 = 15
x1 , x2 ³ 0, x3 free, x4 £ 0
Standard form (maximization)
Min 25 y1 + 10 y2 + 15 y3
s.t. 5 y1 + 9 y2 + 2 y3 ³ 20
3 y1 - 4 y2 - 7 y3 ³ 30
- 5 y1 + 8 y2 - 6 y3 = 25
3 y1 - 4 y2 + 5 y3 £ 40
y1 ³ 0, y2 £ 0, y3 free
Laws of Duality
q Weak Law of Duality: Each feasible solution for the primal (maximization)
problem has an objective value that is less than or equal to the objective
value of every feasible solution to the dual (minimization) problem.
• In other words: c T x £ bT y
• Proof: Ax £ b
cT £ ( AT y )T
Þ cT x £ ( AT y )T x = y T Ax £ y T b = bT y
Þ c T x £ bT y
• Write the dual of the primal and find the shadow prices.
Complementary Slackness
Consider at an optimal solution to the primal problem:
In an optimal solution,
Optimal solutions
8 1 = 2000, 8 2 = 500, 8 3 = 0, 8 4 = 0
Degenerate
optimum