Скачать презентацию MCS 312 NP Completeness and Approximation Algorithms Instructor Скачать презентацию MCS 312 NP Completeness and Approximation Algorithms Instructor

f9a667339d58e07de903406fc1460d2a.ppt

  • Количество слайдов: 16

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

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

Factor-2 algorithm • Find a maximal matching in the graph and output the matched 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

Lower bounding the OPT Claim: OPT >= size of any (maximal) matching Proof: Let 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 Claim 2 follows: |S| = 2* |maximal matching| <=2 * OPT.

Can the approximation guarantee be improved? • Following Qs need to be addresses – 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?

Tight Example • What is the meaning of Q 1? • Can we get Tight Example • What is the meaning of Q 1? • 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: Kn, n : OPT = n, |S| = 2 n. (Figure needed)

Q 2 • i. e. Can we design an algorithm that gives a vertex Q 2 • 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: Kn : 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|. •

Q 3 • Still an Open Problem!!! Q 3 • Still an Open Problem!!!

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

Well Characterized Problems • Min. VC and Max. M are both in NP as Well Characterized Problems • Min. VC and Max. M 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 Min. VC problem is “No”, i. e. if minimum vertex cover is >k then the maximum matching is also >k. i. e. there exists a Max. M of size k+1. This serves as the certificate which can be used to verify “No” to Min. VC in polynomial time (because the converse is also true). (Notice that a VC of size k+1 does not serve the purpose, min. VC could still be <=k). • Thus Min. VC is in Co-NP for bipartite graphs

Well Characterized Problems • Similarly, a VC of size l-1 will serve as a Well Characterized Problems • Similarly, a VC of size l-1 will serve as a “NO” certificate for the Max. M problem. Max. M is in Co-NP for bipartite graphs. Catch: “No” certificate for Max. MM 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.

Min-Max Relations • Such Min-Max relations are some of the most powerful and beautiful 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?

NP-hard problems do not possess a “No” certificate unless NP = Co-NP • Let 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 IP of P to an instance IQ of Q such that a “yes (IQ )” iff “yes (IP )”. • 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.

 • Let P be in Co-NP. Then P’ = P complement is in • Let P be in Co-NP. Then P’ = P complement is in NP. • we can reduce an instance IP’ of P’ to an instance IQ of Q such that a “yes (IQ )” iff “yes (IP’ )” or “No (IP )”. • 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.

What if the graph is not bipartite? • For general graphs, – Max. MM What if the graph is not bipartite? • For general graphs, – Max. MM is strictly < Min. VC (we have seen this in Kn , odd n) – Min. VC is NP-hard – Max. MM is polynomial time solvable.

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