5. LP Duality (Example)
• Let’s consider a simple example
minimize 7𝑥* + 𝑥> + 5𝑥@
subject to 𝑥* − 𝑥> + 3𝑥@ ≥ 10
5𝑥* + 2𝑥> − 𝑥@ ≥ 6
𝑥*, 𝑥>, 𝑥@ ≥ 0
• Let 𝑓 be objective, 𝑓* and 𝑓> be L.H.S. of constraints respectively
• The goal is finding the lower bound of the objective 𝑓
• Since 𝑓, and 𝑥, are bounded below, if we can represent 𝑓 with
positive combination of 𝑓, and 𝑥,, be can bound 𝑓 below
• ex) 7𝑥* + 𝑥> + 5𝑥@ ≥ 𝑥* − 𝑥> + 3𝑥@ + 5𝑥* + 2𝑥> − 𝑥@ ≥ 16
5/34
6. LP Duality (Example)
• Let 𝑓 be objective, 𝑓* and 𝑓> be L.H.S. of constraints respectively
• The goal is finding the lower bound of the objective 𝑓
• Let 𝑦, be positive weight for 𝑓, such that 𝑓 ≥ ∑ 𝑦, 𝑓,
• For each coefficient of ∑ 𝑦, 𝑓,, it should be upper bounded by 𝑓
• It leads the dual program of 𝑦,, which also forms LP
• For previous example, the dual program is
maximize 10𝑦* + 6𝑦>
subject to 𝑦* + 5𝑦> ≤ 7
−𝑦* + 2𝑦> ≤ 1
3𝑦* − 𝑦> ≤ 5
𝑦*, 𝑦> ≥ 0
6/34
7. Duality Theorem
• LP duality theorem: Let 𝑥∗, 𝑦∗ are optimal solutions of primal and
dual programs respectively. Then ∑ 𝑐& 𝑥&
∗(
&)* = ∑ 𝑏, 𝑦,
∗:
,)* .
• Weak duality theorem: Let 𝑥, 𝑦 are feasible solutions of primal and
dual programs respectively. Then ∑ 𝑐& 𝑥&
(
&)* ≥ ∑ 𝑏, 𝑦,
:
,)* .
• Proof) ∑ 𝑐& 𝑥&& ≥ ∑ ∑ 𝑎,& 𝑦,, 𝑥&& = ∑ ∑ 𝑎,& 𝑥&& 𝑦,, ≥ ∑ 𝑏, 𝑦,,
• Complementary slackness: From equality condition, we obtain
• Primal C.S.: For each 𝑗, either 𝑥& = 0 or ∑ 𝑎,& 𝑦,, = 𝑐&
• Dual C.S.: For each 𝑖, either 𝑦, = 0 or ∑ 𝑎,& 𝑥&, = 𝑏,
𝑝∗
= 𝑑∗
7/34
9. Facility Location
• (Metric Uncapacitated) Facility Location:
• Let 𝐺 be a bipartite graph with bipartition (𝐹, 𝐶)
• Let 𝑓, be the cost of opening facility 𝑖
• Let 𝑐,& be the cost of connecting city 𝑗 to facility 𝑖
• Find the optimal way to connect cities to open facilities
Source: http://www.or.uni-bonn.de/~vygen/files/tokyo.pdf 9/34
10. Facility Location (Formal Ver.)
• (Metric Uncapacitated) Facility Location:
• Let 𝐺 be a bipartite graph with bipartition (𝐹, 𝐶)
• Let 𝑓, be the cost of opening facility 𝑖
• Let 𝑐,& be the cost of connecting city 𝑗 to facility 𝑖
• Then
minimize ∑ 𝑐,& 𝑥,&,∈N,&∈O + ∑ 𝑓, 𝑦,,∈N
subject to ∑ 𝑥,&,∈N ≥ 1 𝑗 ∈ 𝐶
𝑦, − 𝑥,& ≥ 0 𝑖 ∈ 𝐹, 𝑗 ∈ 𝐶
𝑥,& ∈ {0,1} 𝑖 ∈ 𝐹, 𝑗 ∈ 𝐶
𝑦, ∈ {0,1} 𝑖 ∈ 𝐹
• Let 𝑖 ∈ 𝐼 iff 𝑦, = 1, and 𝜙 𝑗 = 𝑖 iff 𝑥,& = 1
10/34
15. Algorithm
• Phase 1: Collect all candidate facilities
• Let (𝑖, 𝑗) be tight if 𝛼& ≥ 𝑐,&, and (𝑖, 𝑗) be special if 𝛽,& > 0
• Initialize every city not connected, 𝛼&, 𝛽,& = 0
• While not every city connected:
• Increase 𝛼& of every unconnected cities by 1
• If (𝑖, 𝑗) is tight, increase 𝛽,& by 1 to satisfy 𝛼& = 𝑐,& + 𝛽,&
• If 𝑓, = ∑ 𝛽,&& , let facility 𝑖 be temporarily open
• Every city 𝑗 tight to 𝑖 is now connected to 𝑖
15/34
16. Algorithm
• Phase 2: Prune unnecessary facilities
• Let 𝑖 and 𝑖d are conflicting if there is 𝑗 such that 𝛽,&, 𝛽,e& > 0
• Consider graph 𝐹f such that nodes are temporarily open, and
edge implies two nodes are conflicting
• Choose maximal independent set 𝐼 ⊂ 𝐹f and let 𝑖 ∈ 𝐼 be open
• If 𝜙(𝑗) ∈ 𝐼, keep connection and let 𝑗 be directly connected to 𝜙(𝑗)
• Else, let 𝑖 be any neighbor of 𝜙(𝑗), connect 𝑗 to 𝑖, and let 𝑗 be
indirectly connected to 𝑖
• Note that 𝛽,& = 0 if 𝑗 is indirectly connected to 𝑖
16/34
31. Theorem
• Theorem The solution of algorithm satisfy
h 𝑐,& 𝑥,&
,∈N,&∈O
+ 3 h 𝑓, 𝑦,
,∈N
≤ 3 h 𝛼&
&∈O
• Corollary The dual solution is 3-approximation algorithm
• Proof) Let 𝛼& = 𝛼&
i
+ 𝛼&
j
, each contributes to facility/edge
• If 𝑗 is directly connected, let 𝛼&
i
= 𝛽,& and 𝛼&
j
= 𝑐,& where 𝑖 = 𝜙(𝑗)
• If 𝑗 is indirectly connected, let 𝛼&
i
= 0 and 𝛼&
j
= 𝛼&
• Goal: prove that
① ∑ 𝑓, 𝑦,,∈N = ∑ 𝛼&&∈O
i
② ∑ 𝑐,& 𝑥,&,∈N,&∈O ≤ 3 ∑ 𝛼&&∈O
j
31/34
32. Theorem
• Lemma 1 ∑ 𝑓, 𝑦,,∈N = ∑ 𝛼&&∈O
i
• Proof)
h 𝑓, 𝑦,
,∈N
= h 𝑓,
,∈k
= h h 𝛼&
i
&:[ & ),,∈k
= h 𝛼&
i
&∈O
• Lemma 2 ∑ 𝑐,& 𝑥,&,∈N,&∈O ≤ 3 ∑ 𝛼&
j
&∈O
• Proof) For directly connected city, 𝑐[(&)& = 𝛼&
j
≤ 3𝛼&
j
• Goal: prove that 𝑐[(&)& ≤ 3𝛼&
j
for indirectly connected cities too
• Then
h 𝑐,& 𝑥,&
,∈N,&∈O
= h 𝑐[ & &
&∈O
≤ 3 h 𝛼&
j
&∈O
32/34
33. Theorem
• Lemma 2 ∑ 𝑐,& 𝑥,&,∈N,&∈O ≤ 3 ∑ 𝛼&
j
&∈O
• Goal: prove that 𝑐[(&)& ≤ 3𝛼&
j
for indirectly
connected city 𝑗
• Let 𝑗 is temporarily connected to 𝑖′, and indirectly connected to 𝑖
• Then there is 𝑗′ such that specially connected to both 𝑖 and 𝑖′
• Let 𝑡* and 𝑡> be time that 𝑖 and 𝑖′ be opened
• Since both (𝑖, 𝑗d) and (𝑖d, 𝑗d) are special, they must be tight before
either 𝑖 or 𝑖′ be opened i.e. 𝛼&d ≤ min(𝑡*, 𝑡>)
• Since (𝑖d, 𝑗) is tight, 𝛼& ≥ 𝑡>, and it leads 𝛼& ≥ 𝛼&e
• By tightness, 𝛼& ≥ 𝑐,e&, 𝛼&e ≥ 𝑐,&e and 𝛼&e ≥ 𝑐,e&e
• Thus, by triangle inequality, 𝑐,& ≤ 𝑐,e& + 𝑐,&e + 𝑐,e&e ≤ 3𝛼&
= 3𝛼&
j
33/34