Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

**Scribd will begin operating the SlideShare business on December 1, 2020**
As of this date, Scribd will manage your SlideShare account and any content you may have on SlideShare, and Scribd's General Terms of Use and Privacy Policy will apply. If you wish to opt out, please close your SlideShare account. Learn more.

Successfully reported this slideshow.

Like this presentation? Why not share!

- Np complete by Dr. C.V. Suresh Babu 11697 views
- Interesting applications of graph t... by Tech_MX 50853 views
- Randomized Algorithm by Kanishka Khandelwal 12674 views
- Social Piggybacking: Leveraging Com... by Marco Serafini 844 views
- Efficient Primary-Backup replicatio... by Marco Serafini 594 views
- Réplication de base de données orac... by Mor THIAM 6010 views

25,451 views

Published on

Download the presentation for a better experience...

Published in:
Education

No Downloads

Total views

25,451

On SlideShare

0

From Embeds

0

Number of Embeds

7

Shares

0

Downloads

515

Comments

13

Likes

14

No embeds

No notes for slide

- 1. VERTEX COVER PROBLEM -Gajanand Sharma
- 2. APPROXIMATION ALGORITHMS Definition: Approximation algorithm An approximation algorithm for a problem is a polynomial-time algorithm that, when given input i, outputs an element of FS(i). Feasible solution set A feasible solution is an object of the right type but not necessarily an optimal one. FS(i) is the set of feasible solutions for i.
- 3. Vertex Cover Problem • In the mathematical discipline of graph theory, “A vertex cover (sometimes node cover) of a graph is a subset of vertices which “covers” every edge. • An edge is covered if one of its endpoint is chosen. • In other words “A vertex cover for a graph G is a set of vertices incident to every edge in G.” • The vertex cover problem: What is the minimum size vertex cover in G?
- 4. Vertex Cover Problem Problem: Given graph G = (V, E), find smallest s. t. if (u, v) E, then u V′ or v V′ or both. VV '
- 5. Idea: Keep finding a vertex which covers the maximum number of edges. Step 1: Find a vertex v with maximum degree. Step 2: Add v to the solution and remove v and all its incident edges from the graph. Step 3: Repeat until all the edges are covered. Vertex Cover : Greedy Algorithm(1)
- 6. Greedy Algorithm(1): Analysis Optimal Solution = 6, select all red vertices. Greedy approach does not always lead to the best approximation algorithm.
- 7. Greedy Algorithm(1): Analysis Unfortunately if we select the vertices in following order, then we will get worst solution for this vertex cover problem- First we might choose all the green vertices. Then we might choose all the blue vertices. And then we might choose all the orange vertices. Solution=11;
- 8. APPROX-VERTEX-COVER 1: C ← Ø ; 2: E′ ← E 3: while E′ ≠ Ø; do 4: let (u, v) be an arbitrary edge of E′ 5: C ← C {(u, v)} 6: remove from E′ all edges incident on either u or v 7: end while Vertex Cover : Algorithm(2)
- 9. 4 1 2 3 65 7 Algorithm(2): Example 8 Initially C = Ø E′ = {(1,2) (2,3) (1,4) (2,5) (3,6) (5,6) (3,7) (3,8)}
- 10. 4 1 2 3 65 7 Algorithm(2): Example 8 C = E′ = {(3,6) (5,6) (3,7) (3,8)} 1 2 3 6
- 11. 4 1 2 3 65 7 Are the red vertices a vertex-cover? No………. why? Edge (3, 7) is not covered by it. Algorithm(2): Example (Cont…)
- 12. 4 1 2 3 65 7 Are the red vertices a vertex-cover? Yes What is the size? Size = 4 Algorithm(2): Example (Cont…)
- 13. 4 1 2 3 65 7 Are the red vertices a vertex-cover? Of course…….. What is the size? Size = 7 Algorithm(2): Example (Cont…)
- 14. 4 1 2 3 65 7 Are the red vertices a vertex-cover? Yes What is the size? Size = 5 Algorithm(2): Example (Cont…)
- 15. 4 1 2 3 65 7 Are the red vertices a vertex-cover? Yes What is the size? Size = 3 Algorithm(2): Example (Cont…)
- 16. A set of vertices such that each edge of the graph is incident to at least one vertex of the set, is called the vertex cover. Greedy algorithm may or may not produce optimal solution. Approximation algorithm does not always guarantee optimal solution but it’s aim is to produce a solution which is as close as possible to the optimal solution. Conclusion

No public clipboards found for this slide

Login to see the comments