partial vertex cover - rutgers universitycrab.rutgers.edu/~rajivg/studenttalks/partialvc.pdfpartial...
TRANSCRIPT
Partial Vertex Cover
Joshua Wetzel
Department of Computer ScienceRutgers University–Camden
April 2, 2009
Joshua Wetzel Partial Vertex Cover 1 / 48
Vertex Cover
Input:Given G = (V , E)Non-negative weights on vertices
Objective:Find a least-weight collection of vertices such that eachedge in G in incident on at least one vertex in the collection
Joshua Wetzel Partial Vertex Cover 2 / 48
Vertex Cover: Example
24
15
50
30
12
10
18
6
COST = 97
24
15
50
30
10
18
6
12
COST = 108
Joshua Wetzel Partial Vertex Cover 3 / 48
Vertex Cover: IP Formulation
xv ← 1 if v is in our cover, 0 otherwise
min∑
v∈V
wvxv
s.t.
xa + xb ≥ 1, ∀ e = (a, b)
xv ∈ {0, 1}, ∀ v ∈ V
Joshua Wetzel Partial Vertex Cover 4 / 48
LP Relaxation
Integer programs have been shown to be NP-hard
Relax the integrality constraints xv ∈ {0, 1}, ∀ v ∈ V
min∑
v∈V
wvxv
s.t.
xa + xb ≥ 1, ∀ e = (a, b)
xv ≥ 0, ∀ v ∈ V
Joshua Wetzel Partial Vertex Cover 5 / 48
Constructing the Dual LP
Primal LP:
min∑
v∈V
wvxv
s.t.
xa + xb ≥ 1, ∀ e = (a, b) (ye)
xv ≥ 0, ∀ v ∈ V
Joshua Wetzel Partial Vertex Cover 6 / 48
Primal LP and Dual LP
Primal LP:
min∑
v∈V
wvxv
s.t.
xa + xb ≥ 1, ∀ e = (a, b)
xv ≥ 0, ∀ v ∈ V
Dual LP:
max∑
e∈E
ye
s.t. ∑
e : e hits v
ye ≤ wv , ∀ v ∈ V
ye ≥ 0, ∀ e ∈ E
Joshua Wetzel Partial Vertex Cover 7 / 48
Primal-Dual Method
DualFeasible ≤ DualOPT = PrimalOPT
PrimalOPT ≤ OPTIP
Construct the dual LP
Construct an algorithm that manually tightens dualconstraints to obtain a ’maximal’ dual solution
Joshua Wetzel Partial Vertex Cover 8 / 48
Clarkson’s Algorithm
Inititally all edges are uncovered.While ∃ an uncovered edge in G:
raise ye for all uncovered edges simultaneouslty until avertex, v , becomes full (i.e
∑e:e hits v
ye = wv )
C ← C ∪ {v}any e that touches v is covered.
Return C as our vertex cover
Joshua Wetzel Partial Vertex Cover 9 / 48
Clarkson’s Algorithm: Example
∑
e:e hits v
ye ≤ wv
24
15
50
30
12
10
18
00
0
00
0
0
0
0
0
6
Raise each ye uniformly until a vertex is full.
Joshua Wetzel Partial Vertex Cover 10 / 48
Clarkson’s Algorithm: Example
∑
e:e hits v
ye ≤ wv
24
15
50
30
12
10
18
22
2
22
2
2
2
2
2
6
Joshua Wetzel Partial Vertex Cover 11 / 48
Clarkson’s Algorithm: Example
∑
e:e hits v
ye ≤ wv
24
15
50
30
12
10
18
22
2
33
3
3
3
3
3
6
Joshua Wetzel Partial Vertex Cover 12 / 48
Clarkson’s Algorithm: Example
∑
e:e hits v
ye ≤ wv
24
15
50
30
12
10
18
22
2
33
3
3
12
12
12
6
Joshua Wetzel Partial Vertex Cover 13 / 48
Clarkson’s Algorithm: Example∑
e:e hits v
ye ≤ wv
24
15
50
30
12
10
18
22
2
33
3
3
12
19
19
6
COST = 83
Joshua Wetzel Partial Vertex Cover 14 / 48
Clarkson’s Algorithm: Analysis
24
15
50
30
12
10
18
22
2
33
3
3
12
19
19
6
∑
e:e hits v
ye ≤ wv
Dual Obj. Fn:
max∑
e
ye
Our Cost = wt(red vertices)
≤ 2∑
e hits red
ye
≤ 2∑
e
ye
= 2DFS
≤ 2OPT
Joshua Wetzel Partial Vertex Cover 15 / 48
Clarkson’s Algorithm: Tight Example
1 1
1
11
1 6
COSTOPT = 6
1 1
1
11
1 61
11
1
1 1
COSTClarkson = 12
Joshua Wetzel Partial Vertex Cover 16 / 48
Partial Vertex Cover
Input:Graph, G = (V , E)Non-negative integer weights for verticesInteger, k
Objective:Find the least cost set of vertices in G that will cover atleast k edges.
Joshua Wetzel Partial Vertex Cover 17 / 48
Key Issue
In full vertex cover OPT covers all edges and hence weknow which edges to cover.
In partial vertex cover, we do not know which k edges OPTcovers.
When k is part of the input, the techniques forfull-coverage do not directly apply.
Joshua Wetzel Partial Vertex Cover 18 / 48
Clarkson’s Algorithm Fails
Input: k = 1
1
1
1
1
1
1
5
COSTOPT = 1
1
1
1
5/6
5/6
5/65/6
5/6
5/6
5
1
1
1
COSTClarkson = 5
Joshua Wetzel Partial Vertex Cover 19 / 48
Related Work
Bshouty & Burroughs 1998: solve the LP, modify it andthen round the modified solution. 2-approximation forpartial vertex cover.
Hochbaum 1998: 2-approximation for partial vertex cover.
Bar-Yehuda 1999: “local ratio” method, 2-approximationfor partial vertex cover.
Mestre 2005: 2-approximation primal-dual algorithm forpartial vertex cover with improved running time
Joshua Wetzel Partial Vertex Cover 20 / 48
Vertex Cover: IP Formulation
xv ← 1 if v is in our cover, 0 otherwise
min∑
v∈V
wvxv
s.t.
xa + xb ≥ 1, ∀ e = (a, b)
xv ∈ {0, 1}, ∀ v ∈ V
Joshua Wetzel Partial Vertex Cover 21 / 48
Partial Vertex Cover: IP formulation
xv ← 1 if vertex v is chosen in the cover, 0 otherwise.ye ← 1 if edge e is not covered, 0 otherwise.
min∑
v∈V
wvxv
s.t.
ye + xa + xb ≥ 1,∀e = (a, b)∑
e∈E
ye ≤ m − k
xv ∈ {0, 1}, ∀v ∈ V
ye ∈ {0, 1}, ∀e ∈ E
Joshua Wetzel Partial Vertex Cover 22 / 48
Patial Vertex Cover: LP formulation
Relax the integrality constraints.
xv ∈ {0, 1} → xv ≥ 0, ∀ v ∈ V
ye ∈ {0, 1} → ye ≥ 0, ∀ e ∈ E
Joshua Wetzel Partial Vertex Cover 23 / 48
Constructing the Dual LP
min∑
v∈V
wvxv
s.t.
ye + xa + xb ≥ 1, ∀ e = (a, b) (ue)∑
e∈E
ye ≤ (m − k) (z)
xv ≥ 0, ∀ v ∈ V
ye ≥ 0, ∀ e ∈ E
Joshua Wetzel Partial Vertex Cover 24 / 48
Primal LP and Dual LP
Primal LP:
min∑
v∈V
wvxv
s.t.
ye + xa + xb ≥ 1, ∀e∑
e∈E
ye ≤ m − k
xv ≥ 0, ∀ v ∈ V
ye ≥ 0, ∀ e ∈ E
Dual LP:
max∑
e∈E
ue − z(m − k)
s.t. ∑
e : e hits v
ue ≤ wv ,∀v ∈ V
ue ≤ z, ∀ e ∈ E
ue ≥ 0, ∀ e ∈ E
z ≥ 0
Joshua Wetzel Partial Vertex Cover 25 / 48
Intuition for Primal-Dual
Input: k = 1
1
1
1
1
1
1
5
COSTOPT = 1
1
1
1
5/6
5/6
5/65/6
5/6
5/6
5
1
1
1
COSTClarkson = 5
In last iteration, Clarkson’s Alg. may choose more edgesthan we need at a very high cost
We must somehow bound the cost of last vertex chosen
Joshua Wetzel Partial Vertex Cover 26 / 48
Primal-Dual Algorithm
For each vertex, v , in GGuess v to be the heaviest vertex in OPT , called vh
Cv ← {vh}Raise weight of all heavier vertices in G to∞Remove all edges touching vh from Gk ′ ← k − deg(vh)Run Clarkson on this instance until k ′ edges are covered.Cchoices ← Cchoices ∪ CV
Return the lowest cost cover, C
Joshua Wetzel Partial Vertex Cover 27 / 48
Primal-Dual Algorithm: Example
24
15
50
15
12
10
17
18
Input: G = (V , E ), k = 8
Joshua Wetzel Partial Vertex Cover 28 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
15
100
0
0 0
0
0
0
0
INF
INF
12
Vh
k ′ = 6
Joshua Wetzel Partial Vertex Cover 29 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
15
12
104
4
4 4
4
4
4
4
INF
INF
Vh
Joshua Wetzel Partial Vertex Cover 30 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
15
12
106
4
4 4
6
6
6
6
INF
INF
Vh
Joshua Wetzel Partial Vertex Cover 31 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
15
12
1011
4
4 4
11
6
11
11
INF
INF
Vh
Joshua Wetzel Partial Vertex Cover 32 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
15
12
1011
4
4 4
INF
6
INF
INF
Vh
INF
INF
COST =∞
Joshua Wetzel Partial Vertex Cover 33 / 48
Primal-Dual Algorithm: Example∑
e:e hits v
ue ≤ wv
INF
INF
INF
INF
10INF
INF
10
INF
INF
INF
INF
12
INF
Vh
COST =∞
Joshua Wetzel Partial Vertex Cover 34 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
10
4
4
6
11
11
17
4
11
12
INF
INF
15
11
Vh
15
COST = 69
Joshua Wetzel Partial Vertex Cover 35 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
10
4 4
INF
6
INF
INF
INF
INF
12
11
4
Vh
15
COST =∞
Joshua Wetzel Partial Vertex Cover 36 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
INF
INF
INF
10INF
INF
INFINF
INF
INF
INF
INF
INF
INF
INF
Vh
COST =∞
Joshua Wetzel Partial Vertex Cover 37 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
INF
15
INF
INF12
3
3 3
12
12
17
18
12
3
Vh
15
COST = 60
Joshua Wetzel Partial Vertex Cover 38 / 48
Primal-Dual Algorithm: Example
∑
e:e hits v
ue ≤ wv
24
15
INF
1012
3
3 3
12
7
3
17
18
12
12
Vh
15
COST = 76
Joshua Wetzel Partial Vertex Cover 39 / 48
Primal-Dual Algorithm: Example∑
e:e hits v
ue ≤ wv
24
15
15
10
3
3 3
6
6
6
17
18
123
50
Vh
COST = 80
Joshua Wetzel Partial Vertex Cover 40 / 48
Primal-Dual Algorithm: Example
24
15
50
15
12
10
17
18
Heaviest Vertex Cost
15 ∞12 ∞17 6915 ∞10 ∞18 6024 7650 80
Return cover with cost of 60
Joshua Wetzel Partial Vertex Cover 41 / 48
Analysis: Cost of OPT
Ih: inst. in which we correctly guess heaviest vertex in OPT
24
15
50
15
10
17
18
12
Vh
OPT
INF
15
INF
1012
3
3 3
12
12
17
12
3
15
Ih
OPT = OPT (Ih) + w(vh)
Joshua Wetzel Partial Vertex Cover 42 / 48
Analysis: Our Cost
OPT = OPT (Ih) + w(vh)
24
15
50
15
10
17
18
12
Vh
OPT (Ih) + w(vh) = 45
INF
15
INF
1012
3
3 3
12
12
17
18
12
3
Vh
15
COST (Ih) + w(vh) = 60
Joshua Wetzel Partial Vertex Cover 43 / 48
Analysis: What is z?
INF
15
INF
1012
3
3 3
12
12
17
18
12
3
Vh
Vl
15
Ih
INF
15
INF
10Z
3
3 3
Z
Z
17
18
12
3
VlVh
15
ue ≤ z, ∀ e
z = 12
Num of edges for which ue = z is at least m′ − k ′
Joshua Wetzel Partial Vertex Cover 44 / 48
Analysis: Our Cost
INF
15
INF
10Z
3
3 3
Z
Z
17
18
12
3
VlVh
15
Ih
OPT = OPT (Ih) + w(vh)
Our Cost ≤ Cost(Ih) + w(vh)
= w(RedVert) + w(vl) + w(vh)
≤ w(RedVert) + 2w(vh)
≤ 2∑
e hits red
ue + 2w(vh)
≤ 2[∑
e
ue − z(m′ − k ′)] + 2w(vh)
≤ 2DFS(Ih) + 2w(vh)
≤ 2OPT (Ih) + 2w(vh)
≤ 2OPT
Joshua Wetzel Partial Vertex Cover 45 / 48
Primal LP and Dual LP
Primal LP:
min∑
v∈V
wvxv
s.t.
ye + xa + xb ≥ 1, ∀e∑
e∈E
ye ≤ m − k
xv ≥ 0, ∀ v ∈ V
ye ≥ 0, ∀ e ∈ E
Dual LP:
max∑
e∈E
ue − z(m − k)
s.t. ∑
e : e hits v
ue ≤ wv ,∀v ∈ V
ue ≤ z, ∀ e ∈ E
ue ≥ 0, ∀ e ∈ E
z ≥ 0
Joshua Wetzel Partial Vertex Cover 46 / 48
Reference
K. L. Clarkson. A modification of the greedy algorithm forthe vertex cover. Information Processing Letters 16:23-25,1983.
R. Gandhi, S. Khuller, and A. Srinivasan.Approximation Algorithms for Partial Covering Problems.Journal of Algorithms, 53(1):55-84, October 2004.
Joshua Wetzel Partial Vertex Cover 47 / 48
Thank You.
Joshua Wetzel Partial Vertex Cover 48 / 48