1 / 15

Vertex Cover Problem

Vertex Cover Problem. Given a graph G=(V, E), find V' ⊆ V such that for each edge (u, v) ∈ E at least one of u and v belongs to V ’ and |V’| is minimized . V' is called the vertex cover. The problem is NP-hard. A ratio-2 algorithm exists for vertex cover problem. Ratio-2 Algorithm.

klanda
Download Presentation

Vertex Cover Problem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Vertex Cover Problem • Given a graph G=(V, E), find V'⊆V such that for each edge (u, v)∈E at least one of u and v belongs to V’ and |V’| is minimized. • V' is called the vertex cover. • The problem is NP-hard. • A ratio-2 algorithm exists for vertex cover problem.

  2. Ratio-2 Algorithm • A ratio-2 algorithm for vertex cover: • for each edge that is not covered by any vertex do select the two ends of the edge 2. if there is any edge that is not covered by any selected vertices then go to step 1 else stop. Proof: for each edge, we have to use at least one vertex. Now, we use two, thus, the ratio is 2.

  3. Non-approximatility for TSP without triangle inequality(Remember the Theorem) Theorem: For any number x>0, TSP problem without triangle inequality cannot be approximated within ratio x. • In fact, x can be any polynomial of input size n, e.g., n, n2, n5, n,which is considered to be very bad. • It can be even worse, e.g., x=2n. The Reduction is still polynomial.

  4. Proof • The basic idea: Show that if there is an approximation algorithm A with ratio x for TSP problem without triangle inequality, then we can use the approximation algorithm A for TSP to solve the Hamilton Circuit problem, which is NP-hard. Since NP-hard problems do not have any polynomial time algorithms, the ratio x approximation algorithm can not exist.

  5. Given an instance of Hamilton Circuit problem G=(V,E), where there are n nodes in V, we assign weight 1 to each edge in E. (That is, the distance between any pair of vertices in G is 1 if there is an edge connecting them.) • Add edges of cost 2+xn to G such that the resulting graph G'=(V,E∪E') is a complete graph.

  6. 3. Now, we call the approximation algorithm A for TSP to find a solution for TSP. 4. Now, we want to show that if the cost of the solution obtained from A is not greater than 1+xn, then there is a Hamilton circuit in G, otherwise, there is no Hamilton Circuit in G.

  7. If A gives a solution of cost not greater than 1+xn, then no added edge (weight 2+xn) is used. • Thus, G has a Hamilton circuit. • If the cost of the solution given by A is greater than 1+xn, then at least one added edge is used. • If there is a circuit in G, the cost of an optimal solution is n. The approximation algorithm A should give a solution with cost ≤ xn. • Otherwise, there is no Hamilton circuit in G.

  8. 1 1 1 1 Example: • Solid edges are the original edges in the graph G. • Dashed edges are added edges. • OPT=n if a Hamilton circuit exists. Otherwise, OPT>2+xn. • Since ratio=x, if our solution<2+xn, Hamilton circuit exists.(In fact, if cost <2+xn, cost=n since no dashed edge is used and solid edges have cost 1.)

  9. Pseudo-polynomial time algorithm(The concept and the terminology are important) Partition Problem: Input: Finite set A=(a1, a2, …, an} and a size s(a) (integer) for each aA. Question: Is there a subset A’A such that  a A’ s(a) =  a A –A’ s(a)? Theorem: Partition problem is NP-complete (Karp, 1972). An dynamic algorithm: For in and j 0.5  a A s(a) , define t(i, j) to be true if and only if there is a subset Ai of {a1, a2, …, ai} such that  a Ai s(a)=j. Formula: T(i,j)=true if and only if t(i-1, j)=true or t(i-1, j-s(ai))=true.

  10. Example j Figure 4.8 Table of t(i,j) for the instance of PARTITION for which A={a1,a2,a3,a4,a5}, s(a1)=1, s(a2)=9, s(a3)=5, s(a4)=3, and s(a5)=8. The answer for this instance is "yes", since t(5,13)=T, reflecting the fact that s(a1)+s(a2)+s(a4)=13=26/2.

  11. Time complexity The algorithm takes at most O(nB) time to fill in the table. (Each cell needs constant time to compute). Do we have a polynomial time algorithm to solve the Partition Problem and thus all NP-complete problems? No. O(nb) is not polynomial in terms of the input size. S(ai)=2n=10000…0 . (binary number of n+1 bits , n 0’s). So B is at least O(2n). The input size is O(n) if there some ai with S(ai)=2n. B is not polynomial in terms of n (input size) in general. However, if any upper bound is imposed on B, (e.g., B is Polynomial), the problem can be solved in polynomial time for this special case. (This is called pseudo-polynomial.)

  12. Bottleneck Steiner Trees(Fun part, not required.) (Wang and Du 2002) Problem: Given a set P={p1, p2, …, pn} in the plane of n terminals and a positive integer k, find a Steiner tree with at most k Steiner points such that the length of the longest edges in the tree is minimized. Theorem: The problem cannot be approximated within ratio less than 2 if the distance between two terminals is rectilinear distance. Rectilinear distance between two points in the plane (x1,y1) and (x2, y2) is |x1-x2|+|y1-y2|.(x1,y1) (x2,y2)

  13. Theorem 1: There exists a spanning tree T for P such that by adding k Steiner points to T, the longest edge in the resulting steinerized spanning tree is at most twice that of the optimum for the bottleneck Steiner tree problem. Example:

  14. Theorem 2: Let e1, e2, …, en-1 be all edges in a spanning tree T for P and e*1, e*2, …, e*n-1 be all edges in a minimum spanning tree T* for P. Suppose c(ei)c(e i+1) and c(e*i)c(e*i+1) for all 1  i  n-2. Then c(e*i)  c(ei) for all 1  i  n-2.

  15. Ratio-2 Approximation algorithm Step 1: Compute an minimum spanning tree T (e1,e2, …e n-1 edges) Setp 2: Compute l(ei) for each edge ei. Step 3: Sort the edges in T in a non-increasing order based on l(e). Step 4: Add a degree-2 Steiner point into the edge with the largest l() such that Steiner points on the edge are uniformly distributed. Step 5: Update l(e) for the updated edge in Step 4. Step 6: Re-sort edges based on l() and repeat Steps 4-6 until k degree-2 Steiner points are added.

More Related