Presentation is loading. Please wait.

Presentation is loading. Please wait.

MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta

Similar presentations


Presentation on theme: "MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta"— Presentation transcript:

1 MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta ngupta@cs.du.ac.in

2 Table of Contents Approximation Algorithm for Vertex Cover Reference: Vazirani

3 Factor-2 algorithm Find a maximal matching in the graph and output the matched vertices. Let S be this set of vertices. Claim 1: S forms a vertex cover. Proof: Suppose not. Then there exists an edge e = (u,v) such that neither u nor v is in S. This implies that the matching could have been extended by this edge e and hence was not maximal --- a contradiction. Claim 2: |S| <= 2 OPT

4 Lower bounding the OPT Claim: OPT >= size of any (maximal) matching Proof: Let M be a (maximal) matching. For every e = (u,v ) in M, any vertex cover must pick at least one of u and v. Hence size of any vertex cover >= |M|. Hence, in particular, OPT > = |M| Hence Claim2 follows: |S| = 2* |maximal matching| <=2 * OPT.

5 Can the approximation guarantee be improved? Following Qs need to be addresses – Can the approximation guarantee be improved by a better analysis? – Can an approximation algorithm with a better guarantee be designed using the lower bounding scheme of maximal matching? – Is there some other lower bounding technique that can give an improved guarantee for vertex cover?

6 Tight Example What is the meaning of Q1? Can we get a solution S using the above algorithm such that |S| < 2* OPT (for every instance of the problem)? Say |S| = 3/2 * OPT? Answer to the Q is No. Here is an example of an instance on which the above algorithm will always give a solution whose cost = 2*OPT. Complete Bipartite Graph: K n,n : OPT = n, |S| = 2n. (Figure needed)

7 Q2 i.e. Can we design an algorithm that gives a vertex cover solution S such that |S| < 2* |maximal matching| (for every instance of the problem)? Say |S| < 3/2* |maximal matching|? Ans: No. Here is an example of an instance where the size of any vertex cover is at least 2 * |maximal matching|. Example: K n : Complete graph of size n, n odd. |Size of maximal matching| is (n-1)/2 and OPT = n-1. Thus the size of any vertex cover >= OPT = n – 1 = 2 * |maximal matching|.

8 Q3 Still an Open Problem!!!

9 Min-Max Relations Consider the following two pair of problems: one of minimization and one of maximization. Minimum Vertex Cover: Is the size of MinVC in G at most k? Maximum Matching: Is the size of MaxM in G at least l? We have already seen that for a general graph MaxM < = MinVC König-Egerváry Theorem : For a bipartite graph: MaxM = MinVC

10 Well Characterized Problems MinVC and MaxM are both in NP as they have a “yes” certificate. Do these problems also have a “No” certificate? For bipartite graphs: answer to the above Q is yes: If the answer to MinVC problem is “No”, i.e. if minimum vertex cover is >k then the maximum matching is also >k. i.e. there exists a MaxM of size k+1. This serves as the certificate which can be used to verify “No” to MinVC in polynomial time (because the converse is also true). (Notice that a VC of size k+1 does not serve the purpose, minVC could still be <=k). Thus MinVC is in Co-NP for bipartite graphs

11 Well Characterized Problems Similarly, a VC of size l-1 will serve as a “NO” certificate for the MaxM problem. MaxM is in Co-NP for bipartite graphs. Catch: “No” certificate for MaxMM does not come from the VC but from a different structure. Such problems that have a “yes” as well as a “No” certificate are said to be well characterized. Importance of well characterized problems comes from the fact that the search for polynomial time algorithm for matching started with the realization that it is well characterized.

12 Min-Max Relations Such Min-Max relations are some of the most powerful and beautiful tools in combinatorics and some of the most fundamental polynomial time algorithms have been designed around such relations. Remember: Min-Cut, Max-Flow relation?

13 NP-hard problems do not possess a “No” certificate unless NP = Co-NP Let Q be an NP-hard problem Let P be in NP we can reduce an instance I P of P to an instance I Q of Q such that a “yes (I Q )” iff “yes (I P )”. Thus a “No” certificate to Q will serve as a “No” certificate to P also (by reduction) and hence NP is contained in Co-NP.

14 Let P be in Co-NP. Then P’ = P complement is in NP. we can reduce an instance I P’ of P’ to an instance I Q of Q such that a “yes (I Q )” iff “yes (I P’ )” or “No (I P )”. Thus a “No” certificate to Q will serve as a “Yes” certificate to P and hence P is in Co-NP. Thus Co- NP is contained in NP.

15 What if the graph is not bipartite? For general graphs, – MaxMM is strictly < MinVC (we have seen this in K n, odd n) – MinVC is NP-hard – MaxMM is polynomial time solvable.

16 For general graphs We have seen that for our algorithm |S| = 2* |maximal matching| <=2 * OPT (MinVC) Which implies, |maximal matching|> = IS|/2 >= MinVC/2 Thus we have, MinVC/2 <= MaxMM <= MinVC and, MaxMM <= MinVC <= 2*MaxMM Such a relation is called approximate min-max relation.


Download ppt "MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta"

Similar presentations


Ads by Google