180 likes | 300 Views
Advanced Approximation Algorithms I. Weighted Vertex Cover Set Cover Coloring 3-colorable Graphs. Weighted Vertex Cover. Given an undirected graph G=(V,E) and vertex weights w:V->R , find subset S of V such that and is as small as possible. Weighted Vertex Cover. 2. 2. 4.
E N D
Advanced Approximation AlgorithmsI WeightedVertex Cover Set Cover Coloring 3-colorable Graphs
WeightedVertex Cover • Given an undirectedgraph G=(V,E) and vertexweightsw:V->R, find subset S of V such that and is as small as possible.
WeightedVertex Cover 2 2 4 7
Vertex Cover is NP-hard • Reduction from 3SAT.
PricingMethod • Introduce a ”price” for eachedgeijdenotedpij. • Postulate a fairnesscriteria for eachvertex i: Ifequalityholdswesay that vertex i is tight.
Algorithm • Set all pricespij to zero. • Whilethereexistssomeedgeijwhoseendpointsaren’t tight, increase the pricepijuntilone of them is. • Output the set of tight vertices as the vertex cover.
CorrectnessAnalysis • Claim: The tight vertices form a vertex cover S.
Approximation Guarantee • Fairness lemma: For everyvertex cover S and all fair pricespij it holds that Proof:
Set Cover Family of m subsets of the universe Universe of n elements
Set Cover is NP-hard • Reduction from vertex cover. Wefound 2-approximation for vertex cover, weshould be able to find 2-approximation for set cover? Wrong!
Algorithm • Repeatedly, greedilyadd the subset to the approximation solution that covers as many as possible of the universe elements not covered so far.
Analysis • Let ni be the number of elements in the universe not covered by the i:th first chosen sets in the worstcase. • Clearly n0=n. • Let k* denote the optimum. • n1<=n0-n0/k* • ni+1<=ni-ni/k* • nk<=n(1-1/k*)k • Wewant nk<1 |=> k = k* ln n
3-Coloring is NP-hard • Reduction from Not-All-Equal-3SAT (NAESAT)
Algorithm • As long as there is a vertex of degree >=sqrt(n), usetwo new colors to coloritsneighborhood. Remove the coloredneighborhood from the graph. • Usegreedycoloring on the remaininggraph.
Analysis • Step one is run at mostsqrt(n) timesintroducingtwo new colorseach time. • Step twoadds at mostsqrt(n) new colors. • In total O(sqrt(n)) colors!