Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group...
Transcript of Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group...
![Page 1: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/1.jpg)
Approximation Algorithms
Group Members: 1. Geng Xue (A0095628R)
2. Cai Jingli (A0095623B)
3. Xing Zhe (A0095644W)
4. Zhu Xiaolu (A0109657W)
5. Wang Zixiao (A0095670X)
6. Jiao Qing (A0095637R)
7. Zhang Hao (A0095627U)
1
![Page 2: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/2.jpg)
Introduction
Geng Xue
2
![Page 3: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/3.jpg)
Optimization problem
Find the minimum/maximum of …
– Vertex Cover : A minimum set of vertices that covers all the edges in a graph.
3
![Page 4: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/4.jpg)
NP optimization problem
• The hardness of NP optimization is NP hard.
• Can’t be solved in polynomial time.
4
![Page 5: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/5.jpg)
How to solve ?
5
![Page 6: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/6.jpg)
How to solve ?
6
![Page 7: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/7.jpg)
How to solve ?
7
![Page 8: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/8.jpg)
How to solve ?
8
![Page 9: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/9.jpg)
How to evaluate ?
Mine is better!
9
![Page 10: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/10.jpg)
How to evaluate ?
• Sub-optimal solution : 𝜌 × 𝑂𝑃𝑇 (𝜌 is factor).
• The closer factor 𝜌 is to 1, The better the algorithm is.
Exact optimal value of optimization problem.
relative performance guarantee.
10
![Page 11: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/11.jpg)
Set cover
• It leads to the development of fundamental techniques for the entire approximation algorithms field.
• Due to set cover, many of the basic algorithm design techniques can be explained with great ease.
11
![Page 12: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/12.jpg)
What is set cover ?
• Definition:
– Given a universe 𝑈 of n elements, a collection of subsets of 𝑈, 𝑆 = {𝑆1, 𝑆2, … , 𝑆𝑘}, and a cost function 𝑐: 𝑆 → 𝑄+, find a minimum cost sub-collection of 𝑆 that covers all elements of 𝑈.
12
![Page 13: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/13.jpg)
What is set cover ?
• Example:
S Sets Cost
S1 {1,2} 1
S2 {3,4} 1
S3 {1,3} 2
S4 {5,6} 1
S5 {1,5} 3
S6 {4,6} 1
Universal Set : 𝑈 = {1,2,3,4,5,6}
Find a sub-collection of 𝑆 that covers all the elements of 𝑈 with minimum cost.
Solution?
S1 S2 S4
Cost = 1 + 1 + 1 = 3 13
![Page 14: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/14.jpg)
Approximation algorithms to set cover problem
• Combinatorial algorithms
• Linear programming based Algorithms
(LP-based)
14
![Page 15: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/15.jpg)
Combinatorial & LP-based
• Combinatorial algorithms
– Greedy algorithms
– Layering algorithms
• LP-based algorithms
– Dual Fitting
– Rounding
– Primal–Dual Schema
15
![Page 16: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/16.jpg)
Greedy set cover algorithm
Cai Jingli
16
![Page 17: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/17.jpg)
Greedy set cover algorithm
Where C is the set of elements already covered at the beginning of an iteration and 𝛼 is the average cost at which it covers new elements.
17
![Page 18: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/18.jpg)
Example
subset cost
S1 = {1, 2} 1
S2 = {2, 3, 4} 2
S3 = {3, 4} 3
S4 = {5, 6} 3
Iteration 1: C = {} α1 = 1 / 2 = 0.5 α2 = 2 / 3 = 0.67 α3 = 3 / 2 = 1.5 α4 = 3 / 2 = 1.5 C = {1, 2} Price(1) = 0.5 Price(2) = 0.5
Iteration 2: C = {1, 2} α2 = 2 / 2 = 1 α3 = 3 / 2 = 1.5 α4 = 3 / 2 = 1.5 C = {1, 2, 3, 4} Price(3) = 1 Price(4) = 1
Iteration 3: C = {1, 2, 3, 4 } α3 = 3 / 0 = infinite α4 = 3 / 2 = 1.5 C = {1, 2, 3, 4, 5, 6} Price(5) = 1.5 Price(6) = 1.5
1
3
2
6 5
4
U
S1
S2
S3
S4
18
![Page 19: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/19.jpg)
Example
subset cost
S1 = {1, 2} 1
S2 = {2, 3, 4} 2
S3 = {3, 4} 3
S4 = {5, 6} 3
1
3
2
6 5
4
U
S1
S2
S3
S4
The picked sets = {S1, S2, S4} Total cost = Cost(S1)+Cost(S2)+Cost(S4) = Price(1) + Price(2) + … + Price(6) = 0.5 + 0.5 + 1 + 1 + 1.5 + 1.5 = 6
19
![Page 20: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/20.jpg)
Theorem
• The greedy algorithm is an 𝑯𝒏 factor approximation algorithm for the minimum set cover problem, where
𝐻𝑛 = 1 +1
2+1
3+⋯+
1
𝑛
𝐶𝑜𝑠𝑡(𝑆𝑖)
𝑖
≤ 𝐻𝑛 ∙ 𝑂𝑃𝑇
20
![Page 21: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/21.jpg)
Proof
1) We know 𝑝𝑟𝑖𝑐𝑒 𝑒 =𝑒∈𝑈 cost of the greedy algorithm = 𝑐 𝑆1 + c 𝑆2 +⋯+ 𝑐 𝑆𝑚 .
2) We will show 𝑝𝑟𝑖𝑐𝑒(𝑒𝑘) ≤𝑂𝑃𝑇
𝑛−𝑘+1, where 𝑒𝑘 is
the kth element covered.
If 2) is proved then theorem is proved also.
𝐶𝑜𝑠𝑡(𝑆𝑖)
𝑖
= 𝑝𝑟𝑖𝑐𝑒 𝑒 ≤ 𝑂𝑃𝑇
𝑛 − 𝑘 + 1= 𝑂𝑃𝑇 ∗
𝑛
𝑘=1𝑒∈𝑈
1
𝑛 − 𝑘 + 1
𝑛
𝑘=1
= 𝑂𝑃𝑇 ∗ (1 +1
2+1
3+⋯+
1
𝑛) = 𝐻𝑛∙ 𝑂𝑃𝑇
21
![Page 22: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/22.jpg)
𝑝𝑟𝑖𝑐𝑒(𝑒𝑘) ≤𝑂𝑃𝑇
𝑛 − 𝑘 + 1
• Say the optimal sets are 𝑂1, 𝑂2, … , 𝑂𝑝, so OPT = c 𝑂1 + 𝑐 𝑂2 +⋯+ 𝑐 𝑂𝑝 = c 𝑂𝑖
𝑝𝑖=1
• Now, assume the greedy algorithm has covered the elements in C so far.
𝑈 − 𝐶 ≤ 𝑂1 ∩ 𝑈 − 𝐶 +⋯+ 𝑂𝑝 ∩ 𝑈 − 𝐶
= 𝑂𝑖 ∩ 𝑈 − 𝐶
𝑝
𝑖=1
• price 𝑒𝑘 = 𝛼 ≤𝑐(𝑂𝑖)
|𝑂𝑖∩(𝑈−𝐶)| (2), i=1,…,p. we know
this because of greedy algorithm
22
![Page 23: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/23.jpg)
1 OPT = c 𝑂𝑖
𝑝
𝑖=1
2 𝑈 − 𝐶 ≤ |𝑂𝑖 ∩ 𝑈 − 𝐶 |
𝑝
𝑖=1
3 𝑐 𝑂𝑖 ≥ 𝛼 ∙ 𝑂𝑖 ∩ 𝑈 − 𝐶
• So
𝑈 − 𝐶 = 𝑛 − 𝑘 + 1
𝑝𝑟𝑖𝑐𝑒 𝑒𝑘 = 𝛼 ≤𝑂𝑃𝑇
𝑛 − 𝑘 + 1
𝑂𝑃𝑇 = c 𝑂𝑖
𝑝
𝑖=1
≥ 𝛼 ∙ 𝑂𝑖 ∩ 𝑈 − 𝐶
𝑝
𝑖=1
≥ 𝛼 ∙ 𝑈 − 𝐶
𝑝𝑟𝑖𝑐𝑒(𝑒𝑘) ≤𝑂𝑃𝑇
𝑛 − 𝑘 + 1
23
![Page 24: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/24.jpg)
Shortest Superstring Problem (SSP)
• Given a finite alphabet Σ, and set of 𝑛 strings, 𝑆 = {𝑠1, … , 𝑠𝑛} ⊆ Σ
+.
• Find a shortest string 𝑠 that contains each 𝑠𝑖 as a substring.
• Without loss o𝑓 generality, we may assume that no string 𝑠𝑖 is a substring of another string 𝑠𝑗 , 𝑗 ≠ 𝑖.
24
![Page 25: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/25.jpg)
Application: Shotgun sequencing
25
![Page 26: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/26.jpg)
Approximating SSP Using Set Cover
26
![Page 27: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/27.jpg)
Set Cover Based Algorithm • Set Cover Problem:
– Choose some sets that cover all elements with least cost
• Elements – The input strings
• Subsets – 𝜎𝑖𝑗𝑘 = string obtained by overlapping input strings 𝑠𝑖 and 𝑠𝑗 ,
with 𝑘 letters.
– 𝛽 = 𝑺 ∪ 𝜎𝑖𝑗𝑘 , 𝑎𝑙𝑙 𝑖, 𝑗, 𝑘
– Let 𝜋 ∈ 𝛽 – set(𝜋) = {𝑠 ∈ 𝑺 | 𝑠 is a substr. of 𝜋}
27
![Page 28: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/28.jpg)
Set Cover Based Algorithm • Set Cover Problem:
– Choose some sets that cover all elements with least cost
• Elements – The input strings
• Subsets – 𝜎𝑖𝑗𝑘 = string obtained by overlapping input strings 𝑠𝑖 and 𝑠𝑗 ,
with 𝑘 letters.
– 𝛽 = 𝑺 ∪ 𝜎𝑖𝑗𝑘 , 𝑎𝑙𝑙 𝑖, 𝑗, 𝑘
– Let 𝜋 ∈ 𝛽 – set(𝜋) = {𝑠 ∈ 𝑺 | 𝑠 is a substr. of 𝜋}
• Cost of a subset – set(𝜋) is |𝜋|
• A solution to SSP is the concatenation of 𝜋 obtained from SCP
28
![Page 29: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/29.jpg)
Example • S = {CATGC, CTAAGT, GCTA, TTCA, ATGCATC}
𝝅 Set Cost
CATGC . . . . . . . . . CTAAGT CATGCTAAGT
CATGC, CTAAGT, GCTA
10
CATGC . . . . . GCTA CATGCTA
CATGC, GCTA
7
. . . . . . CATGC ATGCATC . . . . ATGCATCATGC
CATGC, ATGCATC
11
CTAAGT . . . . . . . . TTCA CTAAGTTCA
CTAAGT, TTCA
9
ATGCATC . . . . . . . . . . . CTAAGT ATGCATCTAAGT
CTAAGT, ATGCATC
12 29
![Page 30: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/30.jpg)
GCTA . . . . . . . . . ATGCATC GCTATGCATC
GCTA, ATGCATC
10
TTCA . . . . . . . . . ATGCATC TTCATGCATC
TTCA, ATGCATC, CATGC
10
GCTA . . . . CTAAGT GCTAAGT
GCTA, CTAAGT
7
TTCA . . . . . CATGC TTCATGC
CATGC, TTCA
7
CATGC . . . . ATGCATC CATGCATC
CATGC, ATGCATC
8
CATGC CATGC 5
CTAAGT CTAAGT 6
GCTA GCTA 4
TTCA TTCA 4
ATGCATC ATGCATC 7 30
![Page 31: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/31.jpg)
Lemma
𝑶𝑷𝑻 ≤ 𝑶𝑷𝑻𝑺𝑪𝑨 ≤ 𝟐𝑯𝒏 ∙ 𝑶𝑷𝑻
31
![Page 32: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/32.jpg)
Layering Technique
Xing Zhe
32
![Page 33: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/33.jpg)
Layering Technique
Combinatorial algorithms
Greedy: 𝐻𝑛
Layering ?
Set Cover Problem
33
![Page 34: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/34.jpg)
Vertex Cover Problem
Definition:
Given a graph 𝐺 = (𝑉, 𝐸), and a weight function
𝑤: 𝑉 → 𝑄+ assigning weights to the vertices, find a
minimum weighted subset of vertices 𝐶 ⊆ 𝑉, such
that 𝐶 “covers” all edges in 𝐸, i.e., every edge 𝑒𝑖 ∈ 𝐸 is incident to at least one vertex in 𝐶.
34
![Page 35: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/35.jpg)
Vertex Cover Problem
Example: all vertices of unit weight
1 2 3
4 5 6 7
35
![Page 36: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/36.jpg)
Vertex Cover Problem
Example: all vertices of unit weight
1 2 3
4 5 6 7
Total cost = 5 36
![Page 37: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/37.jpg)
Vertex Cover Problem
Example: all vertices of unit weight
1 2 3
4 5 6 7
Total cost = 3 37
![Page 38: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/38.jpg)
Vertex Cover Problem
Example: all vertices of unit weight
1 2 3
4 5 6 7
Total cost = 3 OPT 38
![Page 39: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/39.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Edges are elements, vertices are subsets
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝑓 = 2
39
![Page 40: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/40.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝑓 = 2
Edges are elements, vertices are subsets
40
![Page 41: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/41.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Edges are elements, vertices are subsets
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝑓 = 2
41
![Page 42: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/42.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝑓 = 2
Edges are elements, vertices are subsets
42
![Page 43: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/43.jpg)
Notation
1) frequency
2) 𝑓 : the frequency of the most frequent element.
Layering algorithm is an 𝑓 factor approximation for the minimum set cover problem.
43
![Page 44: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/44.jpg)
Notation
1) frequency
2) 𝑓 : the frequency of the most frequent element.
Layering algorithm is an 𝑓 factor approximation for the minimum set cover problem. In the vertex cover problem, f = ?
44
![Page 45: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/45.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝑓 = 2
Edges are elements, vertices are subsets
45
![Page 46: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/46.jpg)
Vertex Cover Problem Vertex cover is a special case of set cover.
1 2 3
4 5 6 7
a
b c
d e
𝑓
g h
A collection of subsets 𝑆 = 𝑆1, 𝑆2, 𝑆3, 𝑆4, 𝑆5, 𝑆6, 𝑆7
Universe 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ}
𝑆1 = {𝑎, 𝑏} 𝑆2 = {𝑏, 𝑐, 𝑑} 𝑆3 = {𝑐, 𝑒, 𝑔, ℎ} 𝑆4 = {𝑎} 𝑆5 = {𝑑, 𝑒, 𝑓} 𝑆6 = {𝑓, 𝑔} 𝑆7 = {ℎ}
Vertex cover problem is a set cover problem with 𝒇 = 𝟐
Edges are elements, vertices are subsets
46
![Page 47: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/47.jpg)
Approximation factor 1) frequency
2) 𝑓 : the frequency of the most frequent element.
In the vertex cover problem, f = 2
Set Cover Problem Vertex Cover Problem
factor = f factor = 2 Layering Algorithm
47
![Page 48: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/48.jpg)
Approximation factor 1) frequency
2) 𝑓 : the frequency of the most frequent element.
In the vertex cover problem, f = 2
Set Cover Problem Vertex Cover Problem
factor = f factor = 2 Layering Algorithm
48
![Page 49: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/49.jpg)
Vertex Cover Problem
arbitrary weight function: 𝑤: 𝑉 → 𝑄+
degree-weighted function:
∃ 𝑐 > 0 s.t.
∀ 𝑣 ∈ 𝑉, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
49
![Page 50: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/50.jpg)
Vertex Cover Problem
arbitrary weight function: 𝑤: 𝑉 → 𝑄+
degree-weighted function:
∃ 𝑐 > 0 s.t.
∀ 𝑣 ∈ 𝑉, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
50
![Page 51: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/51.jpg)
Degree weighted function
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 𝟐 ⋅ 𝑂𝑃𝑇
51
![Page 52: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/52.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
52
![Page 53: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/53.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
53
![Page 54: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/54.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
54
![Page 55: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/55.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
55
![Page 56: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/56.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
56
![Page 57: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/57.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
57
![Page 58: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/58.jpg)
Lemma:
If 𝑤: 𝑉 → 𝑄+ is a degree-weighted function.
Then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
degree-weighted function, 𝑤 𝑣 = 𝑐 ⋅ deg (𝑣)
𝐶∗ is the optimal vertex cover in G, deg 𝑣 ≥ |𝐸|𝑣∈𝐶∗
in worst case, we pick all vertices.
𝑂𝑃𝑇 = 𝑤 𝐶∗ = c ⋅ deg 𝑣 ≥ 𝑐 ⋅ |𝐸|𝑣∈𝐶∗
handshaking lemma, deg 𝑣 = 2|𝐸|𝑣∈𝑉
𝑤 𝑉 = 𝑤 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣𝑣∈𝑉 = 𝑐 ⋅ deg 𝑣 = 𝑐 ⋅ 2|𝐸| 𝑣∈𝑉
(1)
(2)
from (1) and (2), 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇
Proof:
58
![Page 59: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/59.jpg)
Layering algorithm
Basic idea:
arbitrary weight function
several degree-weighted functions
nice property (factor = 2) holds in each layer
59
![Page 60: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/60.jpg)
Layering algorithm
1) remove all degree zero vertices, say this set is 𝑫𝟎
2) compute 𝒄 = 𝒎𝒊𝒏 {𝒘 𝒗 𝒅𝒆𝒈(𝒗) }
3) compute degree-weighted function 𝐭(𝒗) = 𝒄 ⋅ 𝐝𝐞𝐠 (𝒗)
4) compute residual weight function 𝒘′ 𝒗 = 𝒘 𝒗 − 𝒕(𝒗)
5) let 𝑾𝟎 = 𝒗 𝒘′ 𝒗 = 𝟎}, pick zero residual vertices into the cover set
6) let 𝑮𝟏be the graph induced on 𝑽 − (𝑫𝟎 ∪𝑾𝟎)
7) repeat the entire process on 𝑮𝟏 w.r.t. the residual weight function,
until all vertices are of degree zero
60
![Page 61: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/61.jpg)
Layering algorithm
zero residual weight non-zero residual weight zero degree
61
![Page 62: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/62.jpg)
Layering algorithm
62
![Page 63: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/63.jpg)
Layering algorithm
63
![Page 64: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/64.jpg)
Layering algorithm
64
![Page 65: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/65.jpg)
Layering algorithm
The vertex cover chosen is 𝑪 = 𝑾𝟎 ∪𝑾𝟏 ∪ …∪𝑾𝒌−𝟏
Clearly, 𝑽 − 𝑪 = 𝑫𝟎 ∪ 𝑫𝟏 ∪ …∪ 𝑫𝒌
65
![Page 66: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/66.jpg)
Layering algorithm
Example:
all vertices of unit weight: w(v) = 1
1 2 3
4 5 6 7
8
66
![Page 67: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/67.jpg)
1 2 3
4 5 6 7
8
𝐷0 = { 8 }
Iteration 0
67
![Page 68: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/68.jpg)
1 2 3
4 5 6 7
1
0.5
0.33 0.25
0.33 0.5 1
8
𝐷0 = { 8 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗
Iteration 0
68
![Page 69: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/69.jpg)
1 2 3
4 5 6 7
8
𝐷0 = { 8 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v)
Iteration 0
0.5
0.25
0.75
0
0.25 0.5 0.75
69
![Page 70: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/70.jpg)
1 2 3
4 5 6 7
8
𝐷0 = { 8 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊0 = { 3 }
Iteration 0
0.5
0.25
0.75
0
0.25 0.5 0.75
70
![Page 71: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/71.jpg)
1 2
4 5 6 7
𝐷0 = { 8 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊0 = { 3 } remove 𝐷0 and 𝑊0
Iteration 0
0.5
0.25
0.75 0.25 0.5 0.75
71
![Page 72: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/72.jpg)
1 2
4 5 6 7
𝐷1 = { 7 }
Iteration 1
0.5
0.25
0.75 0.25 0.5 0.75
72
![Page 73: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/73.jpg)
1 2
4 5 6 7
𝐷1 = { 7 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.125 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟏𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗
Iteration 1
0.75 0.75
0.25
0.125
0.125 0.5
73
![Page 74: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/74.jpg)
1 2
4 5 6 7
𝐷1 = { 7 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.125 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟏𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v)
Iteration 1
0.75
0.25 0
0.625 0 0.375
74
![Page 75: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/75.jpg)
1 2
4 5 6 7
𝐷1 = { 7 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.125 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟏𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊1 = { 2, 5 }
Iteration 1
0.75
0.25 0
0.625 0 0.375
75
![Page 76: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/76.jpg)
1
4 6
𝐷1 = { 7 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.125 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟏𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊1 = { 2, 5 } remove 𝐷1 and 𝑊1
Iteration 1
0.25
0.625 0.375
76
![Page 77: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/77.jpg)
1
4 6
𝐷2 = { 6 }
Iteration 2
0.25
0.625 0.375
77
![Page 78: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/78.jpg)
1
4 6
𝐷2 = { 6 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗
Iteration 2
0.25
0.625 0.375
78
![Page 79: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/79.jpg)
1
4 6
𝐷2 = { 6 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v)
Iteration 2
0
0.375 0.375
79
![Page 80: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/80.jpg)
1
4 6
𝐷2 = { 6 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊2 = { 1 }
Iteration 2
0
0.375 0.375
80
![Page 81: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/81.jpg)
4
𝐷2 = { 6 } compute c = 𝑚𝑖𝑛 {𝑤 𝑣 𝑑𝑒𝑔(𝑣) } = 0.25 degree-weighted function: 𝑡 𝑣 = 𝑐 ⋅ deg v = 𝟎. 𝟐𝟓 ⋅ 𝒅𝒆𝒈 𝒗 compute residual weight: w’(v) = w(v) – t(v) 𝑊2 = { 1 } remove 𝐷2 and 𝑊2
Iteration 2
0.375
81
![Page 82: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/82.jpg)
Layering algorithm all vertices of unit weight: w(v) = 1
1 2 3
4 5 6 7
8
Vertex cover 𝑪 = 𝑾𝟎 ∪𝑾𝟏 ∪ 𝑾𝟐 = {𝟏, 𝟐, 𝟑, 𝟓} Total cost: 𝐰 𝑪 = 𝟒
82
![Page 83: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/83.jpg)
Layering algorithm all vertices of unit weight: w(v) = 1
1 2 3
4 5 6 7
8
Optimal vertex cover 𝑪∗ = {𝟏, 𝟑, 𝟓} Optimal cost: 𝑶𝑷𝑻 = 𝐰 𝑪∗ = 𝟑
83
![Page 84: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/84.jpg)
Layering algorithm all vertices of unit weight: w(v) = 1
1 2 3
4 5 6 7
8
Vertex cover 𝑪 = 𝑾𝟎 ∪𝑾𝟏 ∪ 𝑾𝟐 = {𝟏, 𝟐, 𝟑, 𝟓} Total cost: 𝐰 𝑪 = 𝟒 Optimal cost: 𝑶𝑷𝑻 = 𝐰 𝑪∗ = 𝟑 𝐰 𝑪 < 2⋅OPT
84
![Page 85: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/85.jpg)
Approximation factor
The layering algorithm for vertex cover problem (assuming arbitrary vertex weights) achieves an approximation guarantee of factor 2.
85
![Page 86: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/86.jpg)
Approximation factor
The layering algorithm for vertex cover problem (assuming arbitrary vertex weights) achieves an approximation guarantee of factor 2. We need to prove: 1) set C is a vertex cover for G 2) 𝑤 𝐶 ≤ 2 ⋅ 𝑂𝑃𝑇
86
![Page 87: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/87.jpg)
Proof
1) set C is a vertex cover for G layering algorithm terminates until all nodes are zero degree. all edges have been already covered.
87
![Page 88: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/88.jpg)
Proof 2) 𝑤 𝐶 ≤ 2 ⋅ 𝑂𝑃𝑇 a vertex 𝑣 ∈ 𝐶, if 𝑣 ∈ 𝑊𝑗,
its weight can be decomposed as 𝐰 𝒗 = 𝒕𝒊(𝒗)𝒊≤𝒋
a vertex 𝑣 ∈ 𝑉 − 𝐶, if 𝑣 ∈ 𝐷𝑗,
a lower bound on its weight is given by 𝐰 𝒗 ≥ 𝒕𝒊(𝒗)𝒊≤𝒋
Let 𝐶∗ be the optimal vertex cover, in each layer i, 𝑪∗ ∩ 𝑮𝒊 is a vertex cover for 𝐺𝑖 recall the lemma : if 𝑤: 𝑉 → 𝑄+ is a degree-weighted function, then 𝑤 𝑉 ≤ 2 ⋅ 𝑂𝑃𝑇 by lemma, 𝐭𝐢(𝐂 ∩ 𝐆𝐢) ≤ 𝟐 ⋅ 𝐭𝐢(𝐂
∗ ∩ 𝐆𝐢)
𝐰 𝐂 = 𝐭𝐢 𝐂 ∩ 𝐆𝐢𝐤−𝟏𝐢=𝟎 ≤ 𝟐 ⋅ 𝐭𝐢 𝐂
∗ ∩ 𝐆𝐢𝐤−𝟏𝐢=𝟎 ≤ 𝟐 ⋅ 𝐰(𝐂∗)
88
![Page 89: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/89.jpg)
Summary
Layering Algorithm Set Cover Problem
factor = f
Vertex Cover Problem
factor = 2
89
![Page 90: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/90.jpg)
Introduction to LP-Duality
Zhu Xiaolu
90
![Page 91: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/91.jpg)
Introduction to LP-Duality
• Linear Programming (LP)
• LP-Duality
• Theorem
a) Weak duality theorem
b) LP-duality theorem
c) Complementary slackness conditions
91
![Page 92: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/92.jpg)
obtaining approximation algorithms using LP • Rounding Techniques to solve the linear program and convert the fractional solution into an integral solution. • Primal-dual Schema to use the dual o𝑓 the LP-relaxation in the design o𝑓 the algorithm.
analyzing combinatorially obtained approximation algorithms • LP-duality theory is useful • using the method of dual fitting
Why use LP ?
92
![Page 93: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/93.jpg)
What is LP ?
Objective function: The linear function that we want to optimize.
Feasible solution: An assignment of values to the variables that satisfies the inequalities. E.g. X=(2,1,3)
Cost: The value that the objective function gives to an assignment. E.g. 7 ∙ 2 + 1 + 5 ∙ 3=30
Linear programming: the problem of optimizing (i.e., minimizing or maximizing) a linear function subject to linear inequality constraints.
Minimize 7𝑋1 + 𝑋2 + 5𝑋3 Subject to 𝑋1 − 𝑋2 + 3𝑋3 ≥ 10 5𝑋1 + 2𝑋2 − 𝑋3 ≥ 6 𝑋1, 𝑋2, 𝑋3 ≥ 0
93
![Page 94: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/94.jpg)
What is LP-Duality ? Minimize 7𝑋1 + 𝑋2 + 5𝑋3 Subject to 𝑋1 − 𝑋2 + 3𝑋3 ≥ 10 5𝑋1 + 2𝑋2 − 𝑋3 ≥ 6 𝑋1, 𝑋2, 𝑋3 ≥ 0
7𝑋1 + 𝑋2 + 5𝑋3≥ 𝟏 × 𝑋1 − 𝑋2 + 3𝑋3 + 𝟏 × 5𝑋1 + 2𝑋2 − 𝑋3= 6𝑋1 + 𝑋2 + 2𝑋3 = 1 × 10 + 1 × 6 ≥ 16
7𝑋1 + 𝑋2 + 5𝑋3≥ 𝟐 × 𝑋1 − 𝑋2 + 3𝑋3 + 𝟏 × 5𝑋1 + 2𝑋2 − 𝑋3= 7𝑋1 + 5𝑋3 = 2 × 10 + 1 × 6 ≥ 26
As large as possible
Abstract the constraints: a ≥ b c ≥ d Find multipliers: 𝑦1, 𝑦2 ≥0 𝑦1a ≥ 𝑦1b 𝑦2c ≥ 𝑦2d
Objective function≥ 𝑦1𝑎 + 𝑦2𝑐 ≥ 𝑦1𝑏 + 𝑦2𝑑 (1)
Min 16 26
Range of the objective function
94
![Page 95: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/95.jpg)
What is LP-Duality ?
Maximize 10𝑌1 + 6𝑌2 Subject to 𝑌1 + 5𝑌2 ≤ 7 −𝑌1 + 2𝑌2 ≤ 1 3𝑌1 − 𝑌2 ≤ 5 𝑌1, 𝑌2 ≥ 0
Minimize 7𝑋1 + 𝑋2 + 5𝑋3 Subject to 𝑋1 − 𝑋2 + 3𝑋3 ≥ 10 5𝑋1 + 2𝑋2 − 𝑋3 ≥ 6 𝑋1, 𝑋2, 𝑋3 ≥ 0
The primal program The dual program
Minimize 𝑐𝑗𝑥𝑗𝑛𝑗=1
Subject to 𝑎𝑖𝑗𝑥𝑗𝑛𝑗=1 ≥ 𝑏𝑖 ,
𝑖 = 1,⋯ ,𝑚 𝑥𝑗 ≥ 0 , 𝑗 = 1,⋯ , 𝑛
𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
Maximize 𝑏𝑖𝑦𝑖𝑚𝑖=1
Subject to 𝑎𝑖𝑗𝑦𝑖𝑚𝑖=1 ≤ 𝑐𝑗 ,
𝑗 = 1,⋯ , 𝑛 𝑦𝑖 ≥ 0 , 𝑖 = 1,⋯ ,𝑚 𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
95
![Page 96: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/96.jpg)
Minimize 𝑐1𝑋1 +⋯+ 𝑐𝑛𝑋𝑛 Subject to 𝑎1,1𝑋1 +⋯+ 𝑎1,𝑛𝑋𝑛 ≥ 𝑏1 ⋯ 𝑎𝑚,1𝑋1 +⋯+ 𝑎𝑚,𝑛𝑋𝑛 ≥ 𝑏𝑚 𝑋1, ⋯ , 𝑋𝑛 ≥ 0
Minimize 7𝑋1 + 𝑋2 + 5𝑋3 Subject to 𝑋1 − 𝑋2 + 3𝑋3 ≥ 10 5𝑋1 + 2𝑋2 − 𝑋3 ≥ 6 𝑋1, 𝑋2, 𝑋3 ≥ 0
𝑌1(𝑎1,1𝑋1 +⋯+ 𝑎1,𝑛𝑋𝑛) + ⋯ +𝑌𝑚(𝑎𝑚,1𝑋1 +⋯+ 𝑎𝑚,𝑛𝑋𝑛) ≥ 𝑌1𝑏1 +⋯+ 𝑌𝑚𝑏𝑚 (1)
𝑎1,1𝑌1 +⋯+ 𝑎𝑚,1𝑌𝑚 𝑋1 +⋯+ (𝑎1,𝑛𝑌1 +⋯+ 𝑎𝑚,𝑛𝑌𝑚) 𝑋𝑛 ≥ 𝑌1𝑏1 +⋯+ 𝑌𝑚𝑏𝑚 (2)
Assume: 𝑎1,1𝑌1 +⋯+ 𝑎𝑚,1𝑌𝑚 ≤ 𝑐1
⋯ 𝑎1,𝑛𝑌1 +⋯+ 𝑎𝑚,𝑛𝑌𝑚 ≤ 𝑐𝑛
𝑐1𝑋1 +⋯+ 𝑐𝑛𝑋𝑛 ≥ 𝑎1,1𝑌1 +⋯+ 𝑎𝑚,1𝑌𝑚 𝑋1 +⋯+ (𝑎1,𝑛𝑌1 +⋯+ 𝑎𝑚,𝑛𝑌𝑚) 𝑋𝑛≥ 𝑏1𝑌1 +⋯+ 𝑏𝑚𝑌𝑚
(3)
Maximize 𝑏1𝑌1 +⋯+ 𝑏𝑚𝑌𝑚 Subject to 𝑎1,1𝑌1 +⋯+ 𝑎𝑚,1𝑌𝑚 ≤ 𝑐1 ⋯ 𝑎1,𝑛𝑌1 +⋯+ 𝑎𝑚,𝑛𝑌𝑚 ≤ 𝑐𝑛 𝑌1, ⋯ , 𝑌𝑚 ≥ 0
Maximize 10𝑌1 + 6𝑌2 Subject to 𝑌1 + 5𝑌2 ≤ 7 −𝑌1 + 2𝑌2 ≤ 1 3𝑌1 − 𝑌2 ≤ 5 𝑌1, 𝑌2 ≥ 0
96
![Page 97: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/97.jpg)
Weak duality theorem
If 𝑋 =(𝑋1, ⋯,𝑋𝑛) and 𝑌 =(𝑌1, ⋯,𝑌𝑚) are feasible solutions for the primal and dual program, respectively, then
𝑏𝑖𝑦𝑖
𝑚
𝑖=1
≤ 𝑐𝑗𝑥𝑗
𝑛
𝑗=1
97
![Page 98: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/98.jpg)
Weak duality theorem - proof
𝑐𝑗𝑥𝑗
𝑛
𝑗=1
≥ 𝑏𝑖𝑦𝑖
𝑚
𝑖=1
So, we proof that
Minimize 𝑐𝑗𝑥𝑗𝑛𝑗=1
Subject to 𝑎𝑖𝑗𝑥𝑗𝑛𝑗=1 ≥ 𝑏𝑖 ,
𝑖 = 1,⋯ ,𝑚 𝑥𝑗 ≥ 0 , 𝑗 = 1,⋯ , 𝑛
𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
Maximize 𝑏𝑖𝑦𝑖𝑚𝑖=1
Subject to 𝑎𝑖𝑗𝑦𝑖𝑚𝑖=1 ≤ 𝑐𝑗 ,
𝑗 = 1,⋯ , 𝑛 𝑦𝑖 ≥ 0 , 𝑖 = 1,⋯ ,𝑚 𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
Since 𝑥 is primal feasible and 𝑦𝑗 ’s are nonnegative,
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖 ≥ 𝑏𝑖𝑦𝑖
𝑚
𝑖=1
Since 𝑦 is dual feasible and 𝑥𝑗 ’s are nonnegative,
𝑐𝑗𝑥𝑗
𝑛
𝑗=1
≥
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗
Obviously,
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗 =
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖
98
![Page 99: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/99.jpg)
LP-duality theorem
If 𝑋∗ = (𝑋1∗, ⋯ ,𝑋𝑛
∗) and 𝑌∗ = 𝑌1∗, ⋯ ,𝑌𝑚
∗ are optimal solutions for the primal and dual programs, respectively, then
𝑐𝑗𝑥𝑗∗
𝑛
𝑗=1
= 𝑏𝑖𝑦𝑖∗
𝑚
𝑖=1
99
![Page 100: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/100.jpg)
Complementary slackness conditions
Let 𝑋 and 𝑌 be primal and dual feasible solutions, respectively. Then, 𝑋 and 𝑌 are both optimal iff all o𝑓 the following conditions are satisfied: • Primal complementary slackness conditions For each 1 ≤ 𝑗 ≤ 𝑛: either 𝑥𝑗 = 0 or 𝑎𝑖𝑗𝑦𝑖
𝑚𝑖=1 = 𝑐𝑗 ;
And • Dual complementary slackness conditions For each 1 ≤ 𝑖 ≤ 𝑚: either 𝑦𝑖 = 0 or 𝑎𝑖𝑗𝑥𝑗
𝑛𝑗=1 = 𝑏𝑖.
100
![Page 101: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/101.jpg)
Complementary slackness conditions -proof Proof how these two conditions comes up
From the proof of weak duality theorem:
𝑐𝑗𝑥𝑗∗
𝑛
𝑗=1
= 𝑏𝑖𝑦𝑖∗
𝑚
𝑖=1
𝑐𝑗𝑥𝑗∗
𝑛
𝑗=1
=
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗∗ =
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖∗ = 𝑏𝑖𝑦𝑖
∗
𝑚
𝑖=1
𝑐𝑗𝑥𝑗
𝑛
𝑗=1
≥
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖 ≥ 𝑏𝑖𝑦𝑖
𝑚
𝑖=1
By the LP-duality theorem, x and y are both optimal solutions iff:
These happens iff (1) and (2) hold with equality:
(1)
(2)
101
![Page 102: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/102.jpg)
𝑐𝑗𝑥𝑗∗
𝑛
𝑗=1
=
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗∗ =
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖∗ = 𝑏𝑖𝑦𝑖
∗
𝑚
𝑖=1
(𝑐𝑗− 𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
)𝑥𝑗∗ = 0
𝑛
𝑗=1
For each 1 ≤ 𝑗 ≤ 𝑛
If 𝑥𝑗∗ > 0 then 𝑐𝑗 − 𝑎𝑖𝑗𝑦𝑖
𝑚𝑖=1 = 0
If𝑐𝑗 − 𝑎𝑖𝑗𝑦𝑖𝑚𝑖=1 > 0 then 𝑥𝑗
∗ = 0
Same Process
Dual complementary slackness conditions
Primal complementary slackness conditions For each 1 ≤ 𝑗 ≤ 𝑛: either 𝑥𝑗 = 0 or 𝑎𝑖𝑗𝑦𝑖
𝑚𝑖=1 = 𝑐𝑗
102
![Page 103: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/103.jpg)
Set Cover via Dual Fitting
Wang Zixiao
103
![Page 104: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/104.jpg)
Set Cover via Dual Fitting
• Dual Fitting: help analyze combinatorial algorithms using LP-duality theory
• Analysis of the greedy algorithm for the set cover problem
• Give a lower bound
104
![Page 105: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/105.jpg)
Dual Fitting
• Minimization problem: combinatorial algorithm
• Linear programming relaxation, Dual
• Primal is fully paid for by the dual
• Infeasible Feasible (shrunk with factor)
• Factor Approximation guarantee
105
![Page 106: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/106.jpg)
Formulation
U: universe S: {S1, S2, …, Sk}
C: S —> Q+
Goal:sub-collection with minimum cost
106
![Page 107: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/107.jpg)
LP-Relaxation
• Motivation: NP-hard Polynomial
• Integer program Fractional program
• Letting 𝑥𝑆: 0 ≤ 𝑥𝑆
107
![Page 108: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/108.jpg)
LP Dual Problem
108
![Page 109: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/109.jpg)
LP Dual Problem
OPT: cost of optimal integral set cover OPTf: cost of optimal fractional set cover
109
![Page 110: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/110.jpg)
Solution
ye = price(e)? Not feasible!
U = {1, 2, 3} S = {{1, 2, 3}, {1, 3}} C({1, 2, 3}) = 3 C({1, 3}) = 1
•Iteration 1: {1, 3} chosen price(1) = price(3) = 0.5 •Iteration 2: {1, 2, 3} chosen price(2) = 3
price(1) + price(2) + price(3) = 4 > C({1, 2, 3})
violation
110
![Page 111: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/111.jpg)
Solution
𝑦𝑒 =𝑝𝑟𝑖𝑐𝑒(𝑒)
𝐻𝑛
The vector y defined above is a feasible solution for the dual program
There is no set S in S overpacked
111
![Page 112: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/112.jpg)
Proof
Consider a set S∈S | S | = k
Number the elements in the order of being covered:
e1, e2, …, ek
Consider the iteration for ei: e1, e2, …, ei, …, ek
At least k-i+1 elements uncovered in S
Select S:
𝑝𝑟𝑖𝑐𝑒 𝑒𝑖 ≤𝐶(𝑆)
𝑘 − 𝑖 + 1
Select S’:
𝑝𝑟𝑖𝑐𝑒 𝑒𝑖 <𝐶(𝑆)
𝑘 − 𝑖 + 1
𝑝𝑟𝑖𝑐𝑒 𝑒𝑖 ≤𝐶(𝑆)
𝑘 − 𝑖 + 1
𝑦𝑒𝑖 =𝑝𝑟𝑖𝑐𝑒(𝑒𝑖)
𝐻𝑛≤𝐶 𝑆
𝐻𝑛∗1
𝑘 − 𝑖 + 1
𝑦𝑒𝑖 ≤𝐶(𝑆)
𝐻𝑛
𝑘
𝑖=1
∗1
𝑘+1
𝑘 − 1+⋯+
1
1= 𝐻𝑘𝐻𝑛∗ 𝐶(𝑆) ≤ 𝐶(𝑆)
112
![Page 113: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/113.jpg)
The approximation of guarantee of the greedy set cover algorithm is 𝐻𝑛
Proof: The cost of the set cover picked is:
𝑝𝑟𝑖𝑐𝑒 𝑒 = 𝐻𝑛( 𝑦𝑒)
𝑒∈𝑈𝑒∈𝑈
≤ 𝐻𝑛 ∗ 𝑂𝑃𝑇𝑓 ≤ 𝐻𝑛𝑂𝑃𝑇
113
![Page 114: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/114.jpg)
Constrained Set Multicover
• Constrained Set Multicover: Each element e has to be covered 𝑟𝑒 times
• Greedy algorithm: Pick the most cost-effective set until all elements have been covered by required times
114
![Page 115: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/115.jpg)
Analysis of the greedy algorithm
115
![Page 116: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/116.jpg)
Analysis of the greedy algorithm
116
![Page 117: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/117.jpg)
Analysis of the greedy alrogithm
117
![Page 118: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/118.jpg)
Analysis of the greedy algorithm
118
![Page 119: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/119.jpg)
Analysis of the greedy algorithm
119
![Page 120: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/120.jpg)
Rounding Applied to LP to solve Set Cover
Jiao Qing
120
![Page 121: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/121.jpg)
Why rounding?
• Previous slides show LP-relaxation for the set cover problem, but for set cover real applications, they usually need integral solution.
• Next section will introduce two rounding algorithms and their approximation factor to 𝑂𝑃𝑇𝑓 and 𝑂𝑃𝑇.
121
![Page 122: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/122.jpg)
Rounding Algorithms
• A simple rounding algorithm
• Randomized rounding
122
![Page 123: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/123.jpg)
A simple rounding algorithm
• Algorithm Description
1. Find an optimal solution to the LP-relaxation.
2. Pick all sets 𝑆 for which 𝑥𝑠 ≥1
𝑓 in this solution.
• Apparently, its algorithm complexity equals to LP problem.
123
![Page 124: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/124.jpg)
A simple rounding algorithm
• Proving that it solves set cover problem. 1. Remember the LP-relaxation:
2. Let 𝐶 be the collection of picked sets. For ∀𝑒 ∈ 𝑈, 𝑒 is in at most 𝑓 sets, one of these sets
must has 𝑥𝑠 ≥1
𝑓, therefore, this simple algorithm
at least solve the set cover problem.
124
![Page 125: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/125.jpg)
A simple rounding algorithm
• Firstly we prove that it solves set cover problem.
• Then we estimate its approximation factor to 𝑂𝑃𝑇𝑓 and 𝑂𝑃𝑇 is 𝑓.
125
![Page 126: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/126.jpg)
Approximation Factor
• Estimating its approximation factor
1. The rounding process increases 𝑥𝑠 by a factor of at most 𝑓, and further it reduces the number of sets.
2. Thus it gives a desired approximation guarantee o𝑓 𝑓.
126
![Page 127: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/127.jpg)
Randomized Rounding
• This rounding views the LP-relaxation coefficient 𝑥𝑠 of sets as probabilities.
• Using probabilities theory it proves this rounding method has approximation factor 𝑂(log 𝑛).
127
![Page 128: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/128.jpg)
Randomized Rounding
• Algorithm Description: 1. Find an optimal solution to the LP-relaxation.
2. Independently picks 𝑣 log 𝑛 subsets of full set 𝑆.
3. Get these subsets’ union 𝐶′, check whether 𝐶′ is a valid set cover and has cost ≤ 𝑂𝑃𝑇𝑓 × 4𝑣 log 𝑛. If not, repeat the step 2 and 3 again.
4. The expected number of repetitions needed at most 2.
• Apparently, its algorithm complexity equals to LP problem.
128
![Page 129: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/129.jpg)
Proof Approximation Factor
• Next,we prove its approximate factor is 𝑂(log 𝑛).
1. For each set 𝑆, its probability of being picked is 𝑝𝑠(equals to 𝑥𝑠 coefficient).
2. Let 𝐶 be one collection of sets picked. The expected cost of 𝐶 is:
𝐸 𝑐𝑜𝑠𝑡 𝐶 = 𝑝𝑟 𝑠 𝑖𝑠 𝑝𝑖𝑐𝑘𝑒𝑑 × 𝑐𝑠 = 𝑝𝑠𝑠∈𝒔𝑠∈𝒔
× 𝑐𝑠 = 𝑂𝑃𝑇𝑓
129
![Page 130: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/130.jpg)
Proof Approximation Factor
3. Let us compute the probability that an element 𝑎 is covered by 𝐶. • Suppose that 𝑎 occurs in 𝑘 sets of 𝑆, with the probabilities
associated with these sets be 𝑝1,... 𝑝𝑘. Because their sum greater than 1. Using elementary calculus, we get:
𝑝𝑟 𝑎 𝑖𝑠 𝑐𝑜𝑣𝑒𝑟𝑒𝑑 𝑏𝑦 𝐶 ≥ 1 − 1 −1
𝑘
𝑘≥ 1 −
1
𝑒
and thus,
𝑝𝑟 𝑎 𝑖𝑠 𝑛𝑜𝑡 𝑐𝑜𝑣𝑒𝑟𝑒𝑑 𝑏𝑦 𝐶 ≤1
𝑒
where 𝑒 is the base of natural logarithms.
• Hence each element is covered with constant probability by 𝐶.
130
![Page 131: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/131.jpg)
Proof Approximation Factor
4. And then considering their union 𝐶′, we get:
5. Summing over all elements 𝑎 ∈ 𝑈, we get
6. With:
𝐸 𝑐𝑜𝑠𝑡 𝐶′ ≤ 𝐸 𝑐𝑜𝑠𝑡 𝑐𝑖𝑖 =𝑂𝑃𝑇𝑓 × 𝑣 log 𝑛 = 𝑂𝑃𝑇𝑓 × 𝑣 log 𝑛
Applying Markov’s Inequality with 𝑡=𝑂𝑃𝑇𝑓 × 4𝑣 log 𝑛 , we get:
𝑝𝑟 𝑐𝑜𝑠𝑡 𝐶′ ≥ 𝑂𝑃𝑇𝑓 × 4𝑣 log 𝑛 ≤1
4
𝑝𝑟 𝑎 𝑖𝑠 𝑛𝑜𝑡 𝑐𝑜𝑣𝑒𝑟𝑒𝑑 𝑏𝑦 𝑐′ ≤ 1
𝑒
𝑣 log 𝑛 ≤1
4𝑛
𝑝𝑟 𝑐′𝑖𝑠 𝑛𝑜𝑡 𝑎 𝑣𝑎𝑙𝑖𝑑 𝑠𝑒𝑡 𝑐𝑜𝑣𝑒𝑟 = 1 − 1 −
1
4𝑛
𝑛
≤1
4
With 1
𝑒
𝑣 log 𝑛≤1
4𝑛
131
![Page 132: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/132.jpg)
Proof Approximation Factor
7. With
Hence,
𝑝𝑟 𝑐′𝑖𝑠 𝑛𝑜𝑡 𝑎 𝑣𝑎𝑙𝑖𝑑 𝑠𝑒𝑡 𝑐𝑜𝑣𝑒𝑟 ≤
1
4
𝑝𝑟 𝑐𝑜𝑠𝑡 𝐶′ ≥ 𝑂𝑃𝑇𝑓 × 4𝑣 log𝑛 ≤1
4
𝑝𝑟 𝐶′𝑖𝑠 𝑎 𝑣𝑎𝑙𝑖𝑑 𝑠𝑒𝑡 𝑐𝑜𝑣𝑒𝑟 𝑎𝑛𝑑 ℎ𝑎𝑠 𝑐𝑜𝑠𝑡 ≤ 𝑂𝑃𝑇𝑓 × 4𝑣 log 𝑛 ≥
3
4× 3
4≥ 12
132
![Page 133: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/133.jpg)
Approximation Factor
• The chance one could find a set cover and has a cost smaller than 𝑂(log 𝑛)𝑂𝑃𝑇𝑓 is bigger
than 50%, and the expected number of iteration is two.
• Thus this randomized rounding algorithm provides a factor 𝑂(log 𝑛) approximation, with a high probability guarantee.
133
![Page 134: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/134.jpg)
Summary
• Those two algorithm provide us with factor 𝑓 and 𝑂(log 𝑛) approximation, which remind us the factor of greedy and layering algorithms’.
• Even through LP-relaxation, right now we could only find algorithm with factor of 𝑓 and 𝑂 log 𝑛 .
134
![Page 135: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/135.jpg)
Set Cover via the Primal-dual Schema
Zhang Hao
135
![Page 136: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/136.jpg)
Primal-dual Schema?
• A broad outline for the algorithm
The details have to be designed individually to specific problems
• Good approximation factors and good running times
136
![Page 137: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/137.jpg)
Primal-dual Program(Recall)
The primal program The dual program
Minimize 𝑐𝑗𝑥𝑗𝑛𝑗=1
Subject to 𝑎𝑖𝑗𝑥𝑗𝑛𝑗=1 ≥ 𝑏𝑖 ,
𝑖 = 1,⋯ ,𝑚 𝑥𝑗 ≥ 0 , 𝑗 = 1,⋯ , 𝑛
𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
Maximize 𝑏𝑖𝑦𝑖𝑚𝑖=1
Subject to 𝑎𝑖𝑗𝑦𝑖𝑚𝑖=1 ≤ 𝑐𝑗 ,
𝑗 = 1,⋯ , 𝑛 𝑦𝑖 ≥ 0 , 𝑖 = 1,⋯ ,𝑚 𝑎𝑖𝑗, 𝑏𝑖 , 𝑐𝑗 are given rational numbers
137
![Page 138: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/138.jpg)
Let 𝐱 and 𝐲 be primal and dual feasible solutions, respectively. Then, 𝐱 and 𝐲 are both optimal iff all o𝑓 the following conditions are satisfied: • Primal complementary slackness conditions For each 1 ≤ 𝑗 ≤ 𝑛: either 𝑥𝑗 = 0 or 𝑎𝑖𝑗𝑦𝑖
𝑚𝑖=1 = 𝑐𝑗 ;
And • Dual complementary slackness conditions For each 1 ≤ 𝑖 ≤ 𝑚: either 𝑦𝑖 = 0 or 𝑎𝑖𝑗𝑥𝑗
𝑛𝑗=1 = 𝑏𝑖.
Standard Complementary slackness conditions (Recall)
138
![Page 139: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/139.jpg)
Let 𝐱 and y be primal and dual feasible solutions, respectively. • Primal complementary slackness conditions For each 1 ≤ 𝑗 ≤ 𝑛: either 𝑥𝑗 = 0 or 𝒄𝒊 𝜶 ≤ 𝑎𝑖𝑗
𝑚𝑖=1 𝑦𝑖 ≤ 𝑐𝑖;
And • Dual complementary slackness conditions For each 1 ≤ 𝑖 ≤ 𝑚: either 𝑦𝑖 = 0 or 𝑏𝑖 ≤ 𝑎𝑖𝑗𝑥𝑗
𝑛𝑗=1 ≤ 𝛽𝑏𝑖.
𝛼, 𝛽 => The optimality of x and y solutions If 𝛼 = 𝛽 = 1 => standard complementary slackness conditions
Relaxed Complementary slackness conditions
139
![Page 140: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/140.jpg)
Overview of the Schema
• Pick a primal infeasible solution x, and a dual feasible solution y, such that the slackness conditions are satisfied for chosen 𝛼 and 𝛽 (usually x = 0, y = 0).
• Iteratively improve the feasibility o𝑓 x (integrally) and the optimality o𝑓 y, such that the conditions remain satisfied, until x becomes feasible.
140
![Page 141: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/141.jpg)
Primal-dual Schema
Proposition An approximation guarantee of 𝛼𝛽 is achieved using this schema.
Proof:
(𝒄𝒊 𝜶 ≤ 𝒂𝒊𝒋𝒎𝒊=𝟏 𝒚𝒊) ( 𝒂𝒊𝒋𝒙𝒋
𝒏𝒋=𝟏 ≤ 𝜷𝒃𝒊)
(𝒑𝒓𝒊𝒎𝒂𝒍 𝒂𝒏𝒅 𝒅𝒖𝒂𝒍 𝒄𝒐𝒏𝒅𝒊𝒕𝒊𝒐𝒏)
𝑐𝑗𝑥𝑗
𝑛
𝑗=1
≤ 𝛼
𝑛
𝑗=1
𝑎𝑖𝑗𝑦𝑖
𝑚
𝑖=1
𝑥𝑗 = 𝛼
𝑚
𝑖=1
𝑎𝑖𝑗𝑥𝑗
𝑛
𝑗=1
𝑦𝑖 ≤ 𝛼𝛽 𝑏𝑖𝑦𝑖
𝑚
𝑖=1
𝑐𝑗𝑥𝑗
𝑛
𝑗=1
≤ 𝛼𝛽 𝑏𝑖𝑦𝑖 ≤ 𝛼𝛽
𝑚
𝑖=1
∙ 𝑂𝑃𝑇𝑓≤ 𝛼𝛽 ∙ 𝑂𝑃𝑇
141
![Page 142: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/142.jpg)
Primal-dual Schema Applied to Set Cover
Set Cover(Recall)
Standard Primal Program The Dual Program
minimize 𝒄(S)s∈𝑺 𝒙s maximize 𝒚ee∈𝑼
subject to 𝒙s𝒆:e ∈S ≥ 1, 𝑒 ∈ 𝑈
𝒙s ∈ {0,1}, 𝑆 ∈ 𝑺
subject to 𝒚ee:e ∈S ≤ 𝑐 𝑆 , 𝑆 ∈ 𝑺 𝒚e ≥ 0, 𝑒 ∈ 𝑼
142
![Page 143: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/143.jpg)
Primal-dual Schema Applied to Set Cover Relaxed Complementary Slackness Conditions
Definition: Set S is called tight if 𝑦𝑒 = 𝑐(𝑆)𝑒:𝑒∈𝑆 Set 𝛼 = 1, 𝛽 = 𝑓(to obtain approximation factor 𝑓) Primal Conditions – “Pick only tight sets in the cover”
∀S ∈ 𝑺: 𝒙S ≠ 𝟎 ⇒ 𝒚𝒆 = 𝒄(S)
𝒆:𝒆∈S
Dual Conditions – “Each e, 𝒚𝒆 ≠ 𝟎, can be covered at most 𝑓 times” - trivially satisfied
∀𝒆: 𝒚𝒆 ≠ 𝟎 ⇒ 𝒙𝑺 ≤ 𝒇
𝑺:𝒆∈𝑺
143
![Page 144: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/144.jpg)
Primal-dual Schema Applied to Set Cover Algorithm (Set Cover – factor 𝑓)
• Initialization: x = 0, y = 0.
• Until all elements are covered, do
Pick an uncovered element e, and raise 𝑦𝑒 until some set goes tight.
Pick all tight sets in the cover and update x.
Declare all the elements occuring in these sets as “covered”.
• Output the set cover x. 144
![Page 145: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/145.jpg)
Primal-dual Schema Applied to Set Cover Theorem The algorithm can achieve an approximation factor of 𝑓.
Proo𝑓
• Clearly, there will be no uncovered and no overpacked sets in the end. Thus, primal and dual solutions will be feasible.
• Since they satisfy the relaxed complementary slackness conditions with 𝛼 = 1, 𝛽 = 𝑓, the approximation factor is 𝑓.
145
![Page 146: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/146.jpg)
Conclusion
• Combinatorial algorithms are greedy and local.
• LP-based algorithms are global.
146
![Page 147: Approximation Algorithms - NUS Computingrahul/allfiles/cs6234... · Approximation Algorithms Group Members: 1. Geng Xue (A0095628R) 2. Cai Jingli (A0095623B) 3. Xing Zhe (A0095644W)](https://reader033.fdocuments.in/reader033/viewer/2022042302/5ecce758e8355a7b3b2fa92a/html5/thumbnails/147.jpg)
Conclusion
• Combinatorial algorithms
– Greedy algorithms Factor: H𝑛
– Layering algorithms Factor: 𝑓
• LP-based algorithms
– Rounding Factor: 𝑓, H𝑛
– Primal–Dual Schema Factor: 𝑓
147