Linear Programming: Chapter 5 Duality: Robert J. Vanderbei
Linear Programming: Chapter 5 Duality: Robert J. Vanderbei
Operations Research and Financial Engineering Princeton University Princeton, NJ 08544 http://www.princeton.edu/rvdb
Resource Allocation
Recall the resource allocation problem (m = 2, n = 3): maximize c1x1 + c2x2 + c3x3 subject to a11x1 + a12x2 + a13x3 b1 a21x1 + a22x2 + a23x3 b2 x1, x2, x3 0, where cj = prot per unit of product j produced bi = units of raw material i on hand aij = units raw material i required to produce 1 unit of prod j.
Closing Up Shop
If we produce one unit less of product j, then we free up: a1j units of raw material 1 and a2j units of raw material 2. Selling these unused raw materials for y1 and y2 dollars/unit yields a1j y1 + a2j y2 dollars. Only interested if this exceeds lost prot on each product j: a1j y1 + a2j y2 cj , j = 1, 2, 3.
Consider a buyer oering to purchase our entire inventory. Subject to above constraints, buyer wants to minimize cost: minimize b1 y 1 subject to a11y1 a12y1 a13y1 + + + + b2 y 2 a21y2 a22y2 a23y2 y1 , y 2 c1 c2 c3 0 .
Duality
Every Problem:
n
maximize
j=1 n
cj xj aij xj bi
j=1
subject to
i = 1, 2, . . . , m j = 1, 2, . . . , n,
xj 0 Has a Dual:
m
minimize
i=1 m
bi y i yiaij cj
i=1
subject to
j = 1, 2, . . . , n i = 1, 2, . . . , m.
yi 0
Dual of Dual
Primal Problem:
n
maximize
j=1 n
cj x j aij xj bi
j=1
subject to
xj 0
A problem is dened by its data (notation used for the variables is arbitrary).
maximize
i=1 m
bi yi aij yi cj
i=1
subject to
j = 1, . . . , n i = 1, . . . , m.
yi 0
Proof. cj xj
j j i
yiaij yiaij xj
ij
xj
=
i
aij xj yi
j
bi y i .
i
Gap or No Gap?
An important question: Is there a gap between the largest primal value and the smallest dual value?
Dual Values
Dual Values
No Gap
Its Dual:
Use primal to choose pivot: x2 enters, w2 leaves. Make analogous pivot in dual: z2 leaves, y2 enters.
Second Iteration
After First Pivot:
Primal (feasible):
Note: negative transpose property intact. Again, use primal to pick pivot: x3 enters, w1 leaves. Make analogous pivot in dual: z3 leaves, y1 enters.
and cj x = j
j i
biyi.
Duality Gap
Four possibilities: Primal optimal, dual optimal (no gap). Primal unbounded, dual infeasible (no gap). Primal infeasible, dual unbounded (no gap). Primal infeasible, dual infeasible (innite gap). Example of innite gap: maximize subject to 2x1 x2 x1 x2 1 x1 + x2 2 x1, x2 0.
Complementary Slackness
Proof
(cj + zj )xj =
j i
yiaij
xj =
ij
yiaij xj
=
i
aij xj yi =
j i
(bi wi)yi
i
bi y i ,
The inequalities come from the fact that xj zj 0, wiyi 0, for all j, for all i.
Looking at dual dictionary: y2 enters, z2 leaves. On the primal dictionary: w2 leaves, x2 enters. After pivot...
Pick leaving variable from those rows that are infeasible. Pick entering variable from a box with a negative value and which can be increased the least (on the dual side).
Example:
Notes: Two objective functions: the true objective (on top), and a fake one (below it). For Phase I, use the fake objectiveits dual feasible. Two right-hand sides: the real one (on the left) and a fake (on the right). Ignore the fake right-hand sidewell use it in another algorithm later. Phase IFirst Pivot: w3 leaves, x1 enters. After rst pivot...
After pivot:
Fourth PivotPhase II
Current dictionary:
Its feasible. Ignore fake objective. Use the real thing (top row). Primal pivot: x3 enters, w4 leaves.
Final Dictionary
After pivot:
Problem is unbounded!