Lecture 7: Duality
y Theory
y
Yiling Chen
SEAS
Lesson Plan
• Certificate of optimality
• Duality for the standard equality form
• Weak and strong g dualityy theorems
Duality
• Linear programs come in primal/dual pairs
• Why is duality useful?
– it leads to a very nice variation called the “dual
simplex” method that has practical impact
– it provides economic insight into problems
– it suggests a method to perform “sensitivity
analysis” on an LP
• You can use it to “cheat” solvers
p towards the concept
• Let’s build up p of the dual
of a (primal) LP
Establishing optimality of a solution
• max x1 – x2 + 7x3 (P)
s.t. 2x1 – x2 + x3 = 1 ((a))
x1 + x2 + 2x3 = 5 (b)
x1, x2, x3 ! 0
Primal Dual
= constraints free variables
non-negative variables ! constraints
Example: “Furniture problem” (1/2)
• Make desks, tables
and chairs.
chairs Have 48 48’
lumber hours, 20 Desk Table Chair
finishing
s g hours,
ou s, 8 L b
Lumber 8 6 1
carpentry hours Finishing 4 2 1.5
available. Desk sells
Carpentry 2 15
1.5 05
0.5
for $60, table $30 and
chair for $20.
• Amount of each
resource needed to
make each type of
furniture is in table
Example
• max x1 – x2
s.t. – 3x1 + x2 = 2 y1 free
2x1 – x2 " -1 y2 nonnegative
g
x1! 0, x2 free
• min 2y1 – y2
s.t. – 3y1 + 2y2 ! 1 x1 nonnegative
y1 – y2 = -1 x2 free
y1 free, y2 ! 0
Standard inequality form:
Special
p case
• max cTx
s.t. Ax " b (yi)
x!0
• min bTy
s.t. ATy ! c (xj)
y!0
Obtain this by setting {d,A,E,G}
{d A E G} to zero
dual
gap?
primal
dual
• E.g.,
g if the initial basis for an LP consists
entirely of slack variables (as in the furniture
p ) then AB-1 for the optimal
example) p tableau is
simply the columns for the slack variables
(d) ( )
(c) (a)
(a)
(b)
(c)
(d)
(e)
(f)
(d) ( )
(c) (a)
• min y1 – 2y2
s t y1 – y2 ! 2
s.t. y2
-y1+y2!-1
–y1 + y2 ! -1 y1-y2! 2
y1, y2 ! 0
y1