Vertex Cover, Dominating set, Clique, Independent set

Slides:



Advertisements
Similar presentations
Approximation algorithms for geometric intersection graphs.
Advertisements

Chapter 4 Partition I. Covering and Dominating.
NP-Hard Nattee Niparnan.
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Approximation Algorithms
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
Bart Jansen, Utrecht University. 2  Max Leaf  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
P-Center & The Power of Graphs A part of the facility location problem set By Kiril Yershov and Alla Segal For Geometric Optimizations course Fall 2010.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Perfect Graphs Lecture 23: Apr 17. Hard Optimization Problems Independent set Clique Colouring Clique cover Hard to approximate within a factor of coding.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Approximation Algorithms
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Fixed Parameter Complexity Algorithms and Networks.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Kernel Bounds for Structural Parameterizations of Pathwidth Bart M. P. Jansen Joint work with Hans L. Bodlaender & Stefan Kratsch July 6th 2012, SWAT 2012,
Design Techniques for Approximation Algorithms and Approximation Classes.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
1 Treewidth, partial k-tree and chordal graphs Delpensum INF 334 Institutt fo informatikk Pinar Heggernes Speaker:
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.
Approximation Algorithms
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Approximation algorithms for TSP with neighborhoods in the plane R 郭秉鈞 R 林傳健.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
Data Structures & Algorithms Graphs
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
The Dominating Set and its Parametric Dual  the Dominated Set  Lan Lin prepared for theory group meeting on June 11, 2003.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Exponential time algorithms Algorithms and networks.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Introduction to Graph Theory
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Approximation Algorithms Greedy Strategies. I hear, I forget. I learn, I remember. I do, I understand! 2 Max and Min  min f is equivalent to max –f.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The NP class. NP-completeness
Haim Kaplan and Uri Zwick
Algorithms and networks
Vertex Cover, Dominating set, Clique, Independent set
Computability and Complexity
ICS 353: Design and Analysis of Algorithms
Coverage Approximation Algorithms
Approximation Algorithms
CS154, Lecture 16: More NP-Complete Problems; PCPs
Complexity Theory in Practice
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Vertex Cover, Dominating set, Clique, Independent set Set problems Vertex Cover, Dominating set, Clique, Independent set

This lecture Several basic graph problems: Approximation Algorithms Finding subsets of vertices or edges with simple property – as small or as large as possible Relations Approximation Algorithms Special cases and a brief introduction to some important graph classes Set problems

1 Stating the problems

Vertex cover Set of vertices W Í V with for all {x,y} Î E: x Î W or y Î W. Vertex Cover problem: Given G, find vertex cover of minimum size Set problems

Dominating Set Set of vertices W such that for all v Î V: v Î W or v has a neighbor w with w ÎW. Dominating Set problem: find dominating set of minimum size E.g.: facility location problems Set problems

Clique and Independent Set Clique: Set of vertices W with for all v, w Î W: {v,w} Î E. Independent set: Set of vertices W with for all v, w Î W: {v,w} Ï E. Clique problem: find largest clique. Independent set problem: find largest independent set Set problems

Relations The following are equivalent G has an independent set with at least k vertices The complement of G has a clique with at least k vertices G has a vertex cover with at most n-k vertices Set problems

NP-complete Each of the following problems is NP-complete: Decide if given graph G has vertex cover of size at most a given integer K Decide if given graph G has dominating set of size at most a given integer K Decide if given graph G has independent set of size at least a given integer K Decide if given graph G has clique of size at least a given integer K Proofs omitted in this lecture Set problems

On approximation 1: Clique and Independent Set 2 On approximation 1: Clique and Independent Set

Approximation Clique, IS are very hard to approximate Ratio 2 approximation algorithm for Vertex Cover H = G, S = Æ repeat until H is empty Select an edge {v,w} Î E. Put v and w in S, and remove v, w, and all adjacent edges from H Proof of ratio: for each selected two vertices, at least one belongs to optimal solution Set problems

Warning The vertex cover approximation does NOT give a ratio for an approximation for Clique or Independent Set E.g., take a graph with 1000 vertices and a vertex cover of size 498. Set problems

Approximating Set Cover and Dominating Set 3 Approximating Set Cover and Dominating Set

Approximating Dominating Set on general graphs Can be done with ratio O( log n) Here: algorithm for generalization: set covering problem Given: set X, collection C of subsets of X Find: smallest number of sets from C such that its union is X. From DS to Set Covering: For each vertex v, take a set Sv in the collection, with Sv = {v} È N(v). Set problems

Greedy approximation of Set Covering problem U = X A = Æ while U ¹ Æ do Select an S from C with maximum | S Ç U| A = A È {S} U = U – S Output A Set problems

Ratio H(n) = Si=1…n 1/i Theorem. Greedy algorithm gives a number of sets that is at most H( max{|S| | S Î C}) times the optimal number of sets. Corollary: Greedy algorithm has ratio O(log n). Set problems

Proof (1) Assign a cost 1 to each selected set. Spread this cost evenly over the newly covered elements, cx. Say A* is optimal solution, A solution by algorithm. |A| = Sx Î X cx £ SS Î A* Sx Î S cx We’ll proof: Sx Î S cx £ H(|S|) That proves the theorem. Set problems

Sx Î S cx £ H(|S|) Consider some S in C. Write ui = number of elements of S that still are in U after i sets have been taken = |S – (S1 È … È Si)|. u0 = |S|. Suppose uk = 0; uk-1 >0. ui-1 – ui > 0 elements from S were covered for the first time by Si. Sx Î S cx = Si=1…k (ui-1 – ui)* 1/|Si –(S1 È … È Si-1)| £ Si=1…k (ui-1 – ui)/ ui-1 Set problems

Proof continues Sx Î S cx £ Si=1…k (ui-1 – ui)/ ui-1 £ Si=1…k (H(ui-1) – H(ui)) = H(u0) – H(uk) = H(|S|) – 0. Use H(b) – H(a) ³ (b – a)/b Now we showed: Sx Î S cx £ H(|S|) Set problems

Comments (I)LP methods work also: log n ratio O(log n) is the best one can hope for unless P=NP Set problems

4 Bipartite graphs

Vertex cover in bipartite graphs In a bipartite graph: the minimum size of a vertex cover equals the maximum size of a matching If we have a matching: each edge must have an endpoint in the vertex cover In the other direction: Let X be a vertex cover. Take flow model. Look at the edges from s to vertices in X, and from vertices in X to t. These form a cut. Now use the min-cut max-flow theorem. Set problems

Bipartite graphs We saw: min vertex cover in bipartite graph equals maximum matching Corollary: Independent Set in bipartite graphs is polynomial time computable Set problems

Special cases for Independent Set For many types of graphs (e.g., planar) IS stays NP-complete when restricted to these graphs. Some special cases are polynomial Trees, bounded treewidth Bipartite graphs Interval graphs, circular arc graphs Set problems

Interval graphs and generalizations 5 Interval graphs and generalizations

Interval graphs Each vertex represents an interval Edge between two vertices when their intervals have non-empty intersection Independent set on interval graphs models room-booking problem Set problems

Greedy algorithms on interval graphs Greedy algorithm for IS on interval graphs is optimal: Repeat: Select vertex v with leftmost right-endpoint of interval Remove v and its neighbors Clique is trivial on interval graphs Set problems

Circular arc graphs Like interval graphs, but now `intervals on a circle’ (model of repeating time…) If we remove a vertex and its neighbors from an circular arc graph, then we get an interval graph Algorithm, e.g.: for all vertices v do Compute the maximum independent set of G minus v and its neighbors If the largest i.s. is found for v*, output that set with v* added. Set problems

Perfect graphs A graph G is perfect if for each induced subgraph H of G: the size of the maximum clique in H equals the chromatic number of H (nb. of colors needed to `vertex color H’). Strong perfect graph theorem (conjectured Berge 1966, proven Chudnowsky et al., 2002). G is perfect, if and only if G does not contain an induced subgraph that is a cycle without additional edges of odd length at least four, and the complement of G also does not contain such a cycle. (`No odd hole or antihole’) Set problems

Coloring and independent set in perfect graphs Polynomial time algorithm for finding the maximum independent set and the coloring number of a perfect graph Grötschel, Lovasz, Schrijver (1981) Uses Linear Programming methods Set problems

Approximating facility location 6 Approximating facility location

Facility location In a town, we want to place a number of facilities (e.g., fire stations, hospitals, …), such that the maximum distance to a facility is small Models as a graph problem Set problems

Facility location problem Given: complete graph G, distances d between vertices fulfilling triangle inequality, integer k Question: find a set S of k vertices, such that the maximum over all vertices v of minw ÎS d(v,w) is as small as possible Set problems

Restating the problem Find the smallest r and a set S such that S is a dominating set of size at most k for the graph Gr formed by the edges of length at most r. OPT is smallest r. G2 is square of a graph: edge in G2 when there is a path of length 2 Set problems

A Lemma Let I be an independent set in H2. Then |I| is at most the minimum size of a dominating set in H. Proof: Let D be a minimum dominating set of H. For each v Î D, N(v)È {v} contains at most one vertex from I. Set problems

Approximation algorithm for facility location Sort the values of the lengths of the edges in G, say d1 £ … £ dm for i = 1 to m do Compute Gx with x = di Compute Gx2 Find a maximal independent set I in Gx2 If it has size at most k, then return I; stop. Set problems

Analysis The optimal solution has cost at least x=di For y<x: the minimum size of a dominating set in Gy is k+1 or more (use lemma) Ratio of algorithm is 2 Each maximal independent set is a domination set, so I is a dominating set in Gx2. Each vertex has a path of length at most 2 to a vertex in I in Gx: so, I is a k-center with `cost’ at most 2x. Set problems

Graphs that are not complete Given: graph G, distance for each edge d(e), integer k. Question: find a set S of k vertices, such that the maximum over all vertices of the length of the shortest path to a vertex in S is as small as possible. Can be translated to previous problem: make complete graph with d(v,w) the length of the shortest path from v to w Set problems

7 Conclusions

Conclusions Several techniques for approximation problems like vertex cover, dominating set, independent set Work often for other problems too (with modifications) Set problems

Omitted parts After this some omitted parts in 2010 NP-completeness Unit disk graphs Set problems

Proof of NP-completeness of Dominating Set (omitted in 2010) Theorem: Dominating Set is NP-complete Membership in NP: OK Transformation from 3-Sat. One vertex for x(i) = true One vertex for x(i) = false, with edge to the above One vertex extra per x(i) with edges to the two above One vertex per clause with edges to literals in it Ask for a dominating set of size n (= nb of variables) This will not be discussed in the 2007 course Set problems

NP-completeness of Vertex Cover (proof omitted in this lecture) In NP: OK Transformation from 3-sat One triangle per clause One edge per variable Take edge between occurrence of variable in variable-edge and in clause-triangle Ask for vertex cover of size 2r+n, when r clauses and n variables This will not be discussed in the 2007 course Set problems

Corollaries (omitted in 2010) Clique and independent set are NP-complete By equivalence lemma This will not be discussed in the 2007 course Set problems

Unit disk graphs Vertices are disks on plane with radius 1 Edge when disks intersect Model radio transmitters and inferences or connections Set problems

More on unit disk graphs Finding the intersection model is hard (NP-hard; not yet known to be in NP). Approximation algorithms for Independent Set, Dominating Set, … Greedy algorithm is a 5-approximation Simple modification gives 3 approximation (next) Set problems

3-approximation for Independent set on Unit Disk graphs W = V S = Æ repeat until W = Æ Choose a vertex v from W whose center is as much as possible to the left S = S È {v} W = W – N(v) – {v} Return S Leftmost Greedy Algorithm Set problems

Ratio 3 The maximum independent set is never larger than 3 times the set, given by the leftmost greedy algorithm. If we choose v, then N(v) has an independent set of size at most 3 Between successive nonintersecting neighbors, there is an angle that is larger than p/3 Set problems

Polynomial Time Approximation A PTAS For every e>0, there is a polynomial time algorithm for Independent set that gives an independent set of size at least (1-e)*OPT. Uses geometric separation technique PTAS = Polynomial Time Approximation Scheme Set problems

Bounded regions Suppose all disks are in a region of size r by r. Then the maximum size of an independent set in this graph is at most 4r2/p2. Each disk takes space p2/4. The disks in the solution do not overlap. Then, the maximum independent set problem can be solved in O(nO(r*r)) time. Check each subset of size at most 4r2/p2. Take the largest independent one of these. Set problems

Removing strips and getting small area subgraphs Remove, at steps of r+1, for a 1-wide horizontal strip all disks intersecting the strip. Remove, at steps of r+1, for a 1-wide vertical strip all disks intersecting the strip. On the remaining graph, each connected component fits in an r by r area Set problems

Each connected component fits in one white area All disks intersecting a green strip are removed. We end up with the graph, formed by the disks fitting in the white area For fixed r, we can solve the IS problem on the remaining graph in polynomial time Each connected component fits in one white area Set problems

Set problems

Graphs Gi,j Remove horizontal strips at spaces i, i+(r+1), i + 2*(r+1), … (I.e., start at i.) Remove vertical strips at spaces j, j+(r+1), j + 2*(r+1), … (I.e., start at j.) Let Gi,j = (Vi,j,Ei,j) be the resulting graph Algorithm: try all (r+1)2 choices for (i,j), for each solve IS optimally for Gi,j and output the largest IS from these. Set problems

Quality of heuristic (1) Let X be an independent set of maximum size. Let v Î X. There are at most 4(r+1) graphs Gi,j that do not contain v. v can be removed by a horizontal strip (upside, downside intersects) or a vertical strip (left side, right side intersects) . Set problems

Quality of heuristic (2) Total size over all m.i.s.’s over all Gi,j is at least the sum over all |Vi,j Ç X| ³ (r+1)2 *|X| - 4(r+1)*|X| There must be at least one Gi,j that contains an independent set of size at least ((r+1)2 – 4)/(r+1)2 * |X| Maximum is at least average Set problems

Setting r Let r be the smallest integer such that For fixed e, this is a constant – gives a polynomial time algorithm: PTAS Set problems

Variants Other type of intersecting objects Other type of surfaces Other problems Example: Dominating set. Instead of removing strips, we duplicate vertices in strips giving them to the left, and right area Leads also to PTAS Set problems