This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Vertex CoverLinear Progamming and Approximation Algorithms
Joshua Wetzel
Department of Computer ScienceRutgers University–Camden
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 Vertex Cover 10 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
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 Vertex Cover 11 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Approximation Algorithms
NP-hard problems.No optimal poly-time algorithms are known
β-approximation alg., A, for a minimization problem Ppoly-time algorithm.for every instance I of P, A produces solution of cost atmost β ·OPT (I)OPT (I)?
Joshua Wetzel Vertex Cover 12 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Approximation Algorithms
compute a lower bound on OPT .
compare cost of our solution with the lower bound.
lowerbound
OPT upperbound
β
Joshua Wetzel Vertex Cover 13 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
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 Vertex Cover 14 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Algorithm
Find a maximal matching in G
Include in our cover both vertices incident on each edge ofthe matching
Joshua Wetzel Vertex Cover 15 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Example
11
1
1
1
1
1
1
Joshua Wetzel Vertex Cover 16 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Example
1
1
1
1
1
1
1
1
Joshua Wetzel Vertex Cover 17 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Example
1
1
1
1
1
1
1
1
Joshua Wetzel Vertex Cover 18 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Example
1
1
1
1
1
1
1
1
Cost = 6
Joshua Wetzel Vertex Cover 19 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Analysis: Feasibility
1
1
1
1
1
1
1
1
Every black edge shares a vertex with a green edge
Joshua Wetzel Vertex Cover 20 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Analysis: Approximation Guarantee
1
1
1
1
1
1
1
1
OPT has to choose atleast one endpoint fromeach green edge.
We choose both endpointsfor each green edge.
Hence:
Our Cost ≤ 2OPT
Joshua Wetzel Vertex Cover 21 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Unweighted Vertex Cover: Tight Example
1
1
1
1
1
1
1
1
OPT = 3
1
1
1
1
1
1
1
1
COSTAlg = 6
Joshua Wetzel Vertex Cover 22 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Bad Example
200 1 200
OPT = 1
200 1 200
CostAlg = 201
Joshua Wetzel Vertex Cover 23 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
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 Vertex Cover 24 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
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 Vertex Cover 25 / 52
Linear Programming TheoryVertex CoverLP-Rounding
Primal-Dual
Why Do This?
LP can be solved in polynomial time
Every solution to the IP is also a solution to the LP