Professional Documents
Culture Documents
University
c of Waterloo 1 / 20
Recap: Shortest Path LP
X
min ce xe : e ∈ E j i g
X
s.t. xe : e ∈ δ(U ) ≥ 1
(U ⊆ V, s ∈ U, t ∈
/ U) where
x≥0 • b = 1;
• A has a row for every s, t-cut
This LP is of the form: δ(U ), and a column for every
edge e; and
min{cT x : Ax ≥ b, x ≥ 0} • AU e = 1 if e ∈ δ(U ) and
AU e = 0 otherwise.
University
c of Waterloo 2 / 20
Recap: Shortest Path Dual
min{cT x : Ax ≥ b, x ≥ 0} (P) a b c
d
The dual of (P) is given by h
s t
T T
max{b y : A y ≤ c, y ≥ 0} (D)
j i g
If (P) is a shortest path LP, then we
can rewrite (D) as
X Theorem
max (yU : s ∈ U, t 6∈ U )
X If x̄ is feasible for (P) and ȳ is
s.t. (yU : e ∈ δ(U )) ≤ ce feasible for (D), then bT ȳ ≤ cT x̄.
(e ∈ E) Equivalent: y feasible widths and P
y≥0 an s, t-path −→ 1T y ≤ c(P )
University
c of Waterloo 3 / 20
This Lecture
max cT x min bT y
s.t. Ax ? b s.t. AT y ? c
x?0 y?0
University
c of Waterloo 5 / 20
Primal-Dual Pairs
The following table shows how constraints and variables in primal and
dual LPs correspond:
University
c of Waterloo 8 / 20
Primal-Dual Pairs
The following table shows how constraints and variables in primal and
dual LPs correspond:
University
c of Waterloo 9 / 20
Primal-Dual Pairs
University
c of Waterloo 10 / 20
Primal-Dual Pairs
University
c of Waterloo 11 / 20
Primal-Dual Pairs
The following table shows how constraints and variables in primal and
dual LPs correspond:
Theorem
Let (Pmax ) and (Pmin ) represent the above. If x̄ and ȳ are feasible for
the two LPs, then
cT x̄ ≤ bT ȳ
If cT x̄ = bT ȳ, then x̄ is optimal for (Pmax ), and ȳ is optimal for (Pmin ).
University
c of Waterloo 14 / 20
Primal-Dual Pairs
Theorem
Let (Pmax ) and (Pmin ) represent the above. If x̄ and ȳ are feasible for
the two LPs, then
cT x̄ ≤ bT ȳ
If cT x̄ = bT ȳ, then x̄ is optimal for (Pmax ), and ȳ is optimal for (Pmin ).
max cT x min bT y
s.t. rowi (A)x ≤ bi (i ∈ R1 ) s.t. colj (A)T y ≥ cj (j ∈ C1 )
rowi (A)x ≥ bi (i ∈ R2 ) colj (A)T y ≤ cj (j ∈ C2 )
rowi (A)x = bi (i ∈ R3 ) colj (A)T y = cj (j ∈ C3 )
xj ≥ 0 (j ∈ C1 ) yi ≥ 0 (i ∈ R1 )
xj ≤ 0 (j ∈ C2 ) yi ≤ 0 (i ∈ R2 )
xj free (j ∈ C3 ) yi free (i ∈ R3 )
University
c of Waterloo 16 / 20
Proving the General Weak Duality Theorem
max cT x min bT y
s.t. rowi (A)x ≤ bi (i ∈ R1 ) s.t. colj (A)T y ≥ cj (j ∈ C1 )
rowi (A)x ≥ bi (i ∈ R2 ) colj (A)T y ≤ cj (j ∈ C2 )
rowi (A)x = bi (i ∈ R3 ) colj (A)T y = cj (j ∈ C3 )
xj ≥ 0 (j ∈ C1 ) yi ≥ 0 (i ∈ R1 )
xj ≤ 0 (j ∈ C2 ) yi ≤ 0 (i ∈ R2 )
xj free (j ∈ C3 ) yi free (i ∈ R3 )
University
c of Waterloo 17 / 20
Proving the General Weak Duality Theorem
max cT x min bT y
s.t. Ax + s = b s.t. AT y + w = c (?)
si ≥ 0 (i ∈ R1 ) wj ≤ 0 (j ∈ C1 )
si ≤ 0 (i ∈ R2 ) wj ≥ 0 (j ∈ C2 )
si = 0 (i ∈ R3 ) wj = 0 (j ∈ C3 )
xj ≥ 0 (j ∈ C1 ) yi ≥ 0 (i ∈ R1 )
xj ≤ 0 (j ∈ C2 ) yi ≤ 0 (i ∈ R2 )
xj free (j ∈ C3 ) yi free (i ∈ R3 )
Suppose x̄ and ȳ are feasible for the original primal and dual LPs
Let s̄ = b − Ax̄ and w̄ = c − AT ȳ. It follows that
(?)
ȳ T b = ȳ T (Ax̄ + s̄) = (ȳ T A)x̄ + ȳ T s̄ = (c − w̄)T x̄ + ȳ T s̄ = cT x̄ − w̄T x̄ + ȳ T s̄.
University
c of Waterloo 18 / 20
Consequences of Weak Duality
Theorem
Let (Pmax ) and (Pmin ) represent (i) (Pmax ) is unbounded −→
the above table. If x̄ and ȳ are (Pmin ) infeasible
feasible for the two LPs, then
(ii) (Pmin ) is unbounded −→
T T
c x̄ ≤ b ȳ (Pmax ) infeasible
University
c of Waterloo 19 / 20
Recap
• We can use the above table to compute duals of general LPs
• Weak duality theorem: if x̄ and ȳ are feasible for (Pmax ) and
(Pmin ), then:
cT x̄ ≤ bT ȳ
Both are optimal if equality holds!
University
c of Waterloo 20 / 20