06_approx_I - Chapter 6 Approximation algorithms via...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 6 Approximation algorithms via Greediness By Sariel Har-Peled , September 17, 2007 Version: 0.2 6.1 Greedy algorithms and approximation algorithms A natural tendency in solving algorithmic problems is to locally do whats seems to be the right thing. This is usually referred to as greedy algorithms . The problem is that usually these kind of algorithms do not really work. For example, consider the following optimization version of Vertex Cover : Problem: VertexCoverMin Instance: A graph G , and integer k . Output: Return the smallest subset S V ( G ), s.t. S touches all the edges of G . For this problem, the greedy algorithm will always take the vertex with the highest degree (i.e., the one covering the largest number of vertices), add it to the cover set, remove it from the graph, and repeat. We will refer to this algorithm as GreedyVertexCover . Figure 6.1: Example. It is not too hard to see that this algorithm does not output the op- timal vertex-cover. Indeed, consider the graph depicted on the right. Clearly, the optimal solution is the black vertices, but the greedy algo- rithm would pick the four white vertices. This of course still leaves open the possibility that, while we do not get the optimal vertex cover, what we get is a vertex cover which is “relatively good” (or “good enough”). Definition 6.1.1 A minimization problem is an optimization problem, where we look for a valid solution that minimizes a certain target func- tion. This work is licensed under the Creative Commons Attribution-Noncommercial 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example 6.1.2 In the VertexCoverMin problem the (minimization) target function is the size of the cover. Formally Opt( G ) = min S V ( G ) , S cover of G | S | . The VertexCover( G ) is just the set S realizing this minimum. Definition 6.1.3 Let Opt( G ) denote the value of the target function for the optimal solution. Intuitively, a vertex-cover of size “close” to the optimal solution would be considered to be good. Definition 6.1.4 Algorithm Alg for a minimization problem Min achieves an approximation factor α 1 if for all inputs G , we have: Alg ( G ) Opt( G ) α. We will refer to Alg as an α -approximation algorithm for Min . As a concrete example, an algorithm is a 2-approximation for VertexCoverMin , if it outputs a vertex-cover which is at most twice the size of the optimal solution for vertex cover. So, how good (or bad) is the GreedyVertexCover algo- rithm described above? Well, the graph in Figure 6.1 shows that the approximation factor of GreedyVertexCover is at least 4 / 3. It turns out that GreedyVertexCover performance is con- siderably worse. To this end, consider the following bipartite graph: G n = ( L R , E ), where L is a set of n vertices. Next, for i = 2 , . . . , n , we add a set R i of n / i vertices, to R , each one of them of degree i , such that all of them (i.e., all vertices of degree i at L ) are connected to distinct vertices in R . The execution of
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern