Introduction-Approximations Algorithms-Lecture 01 Notes-Computer Science, Study notes of Approximation Algorithms

This lecture is delivered by Shuchi Chawla, who also have published many papers about Approximations Algorithms. Introduction, Vertex Cover, Travelling Salesperson Problem, Steiner Tree, Steiner Tree Problem, Approximations Algorithms, Shuchi Chawla, Lecture Notes, University of Wisconsin, United States of America

Typology: Study notes

2011/2012

Uploaded on 02/14/2012

alexey
alexey 🇺🇸

4.7

(20)

325 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS880: Approximations Algorithms
Scribe: Michael Kowalczyk Lecturer: Shuchi Chawla
Topic: Intro, Vertex Cover, TSP, Steiner Tree Date: 1/23/2007
Today we discuss the background and motivation behind studying approximation algorithms and
give a few examples of approximations for classic problems.
1.1 Introduction
Approximation algorithms make up a broad topic and are applicable to many areas. In this course
a variety of different techniques for crafting approximation algorithms will be covered. Since there
is no fixed procedure that will always work when attempting to solve new problems, the aim of this
course is to achieve a solid understanding of the most relevant techniques and to get a feel for when
they are likely to apply. For those with a particular interest in theory, another goal of this course
is to provide enough background in the area so that current research papers on approximation
algorithms can be read with relative ease.
1.2 Motivation
In practice, many important problems are NP-hard. If we want to have a good chance at solving
them, we need to modify our goal in some way. We could use heuristics, but these are approaches
that make no guarantees as to their effectiveness. In some applications, we may only need to solve a
special case of the NP-hard problem, and this loss of generality may admit tractibilty. Alternately,
average case analysis may be useful; since NP-hardness is a theory of worst case behavior, a problem
can be NP-hard and yet very easy to solve on most instances. Finally, if the NP-hard problem
deals with optimizing some parameter then we can try to design an approximation algorithm that
efficiently produces a sub-optimal solution. It turns out that we can often design these algorithms
in such a way that the quality of the output is guaranteed to be, say, within a constant factor of
an optimal solution. This is the approach that we will investigate throughout the course.
1.3 Terminology
In order for approximations to make sense, we need to have some quality measure for the solutions.
We will use OP T to denote the quality associated with an optimal solution for the problem at
hand, and ALG to denote the (worst case) quality produced by the approximation algorithm under
consideration. We would like to guarantee ALG(I)1
αOP T (I) on any instance Ifor maximization
problems, where αis known as the approximation factor. Note that α1, and we allow αto be
a function of some property of the instance, such as its size. For minimization problems, we write
ALG(I)αOP T (I) instead. In other words, we usually state approximations in such a way that
α1, although this standard is not universal.
Different problems exhibit different approximation factors. One class of problems have the property
1
pf3
pf4
pf5

Partial preview of the text

Download Introduction-Approximations Algorithms-Lecture 01 Notes-Computer Science and more Study notes Approximation Algorithms in PDF only on Docsity!

CS880: Approximations Algorithms Scribe: Michael Kowalczyk Lecturer: Shuchi Chawla Topic: Intro, Vertex Cover, TSP, Steiner Tree Date: 1/23/

Today we discuss the background and motivation behind studying approximation algorithms and give a few examples of approximations for classic problems.

1.1 Introduction

Approximation algorithms make up a broad topic and are applicable to many areas. In this course a variety of different techniques for crafting approximation algorithms will be covered. Since there is no fixed procedure that will always work when attempting to solve new problems, the aim of this course is to achieve a solid understanding of the most relevant techniques and to get a feel for when they are likely to apply. For those with a particular interest in theory, another goal of this course is to provide enough background in the area so that current research papers on approximation algorithms can be read with relative ease.

1.2 Motivation

In practice, many important problems are NP-hard. If we want to have a good chance at solving them, we need to modify our goal in some way. We could use heuristics, but these are approaches that make no guarantees as to their effectiveness. In some applications, we may only need to solve a special case of the NP-hard problem, and this loss of generality may admit tractibilty. Alternately, average case analysis may be useful; since NP-hardness is a theory of worst case behavior, a problem can be NP-hard and yet very easy to solve on most instances. Finally, if the NP-hard problem deals with optimizing some parameter then we can try to design an approximation algorithm that efficiently produces a sub-optimal solution. It turns out that we can often design these algorithms in such a way that the quality of the output is guaranteed to be, say, within a constant factor of an optimal solution. This is the approach that we will investigate throughout the course.

1.3 Terminology

In order for approximations to make sense, we need to have some quality measure for the solutions. We will use OP T to denote the quality associated with an optimal solution for the problem at hand, and ALG to denote the (worst case) quality produced by the approximation algorithm under consideration. We would like to guarantee ALG(I) ≥ (^1) α OP T (I) on any instance I for maximization problems, where α is known as the approximation factor. Note that α ≥ 1, and we allow α to be a function of some property of the instance, such as its size. For minimization problems, we write ALG(I) ≤ αOP T (I) instead. In other words, we usually state approximations in such a way that α ≥ 1, although this standard is not universal.

Different problems exhibit different approximation factors. One class of problems have the property

that given any positive constant , we can give a (1 + )-approximation algorithm for it (although the runtime of the approximation algorithm is efficient for fixed , it may get much worse as  becomes small). Problems with this property are said to have a polynomial time aproximation scheme, or P T AS. This is one of the best scenarios for approximation algorithms. At the other extreme, we can prove in some cases that it is NP-hard to give an approximation algorithm with α any better than, say n. We can then categorize optimization problems in terms of how well they can be approximated by efficient algorithms.

Approximation factor (α) Approximability 1 +  (P T AS) Very approximable

  1. 1 2 constant c log n Somewhat approximable log √^2 n n n n Not very approximable

Figure 1.3.1: Some various degrees to which a problem can be approximated

We will also study the limits of approximability. Hardness of approximation results are proofs that no approximation better than a certain factor exists for a particular problem, under some hardness asumption. For example, set cover cannot be approximated to within an o(log n) factor, where n is the number of nodes, unless N P = P (in which case we can solve it exactly). For some problems like set cover, we can get tight results, i.e. any improvement over the currently best known factor of approximation would imply P = N P or refute another such complexity assumption. Other problems have a huge gap between the upper and lower approximability bounds currently known, so there is much variation from problem to problem.

1.4 Vertex Cover

One important step in finding approximation algorithms is figuring out what OP T is. But having a method for calculating OP T exactly is often enough to get a full solution for the problem. Vertex cover has this property.

Definition 1.4.1 (Vertex cover) Given an undirected graph G = (V, E), find a smallest subset S ⊆ V such that every edge in E is incident on at least one of the vertices in S.

Now assume that we have an algorithm that can tell us how many vertices are in an optimal vertex cover for any given graph. Then we can use this procedure to efficiently find a solution that is optimal. The idea is to observe how removing a vertex effects the size of an optimal vertex cover. If the number of vertices needed to make a vertex cover in the induced subgraph is reduced, then we know that we need to include the removed vertex in S. If the count remains the same, then we know that there is no harm in leaving that vertex out of S. We continue in this way to determine

mum weight tour that visits each vertex at least once.

This is called metric TSP because it is equivalent to solving the original TSP (without revisiting vertices) on the “metric completion” of the graph. By metric-completion, we mean that we put an edge between every pair of nodes in the graph with length equal to the length of the shortest path between them. The shortest path function on a connected graph forms a metric. A metric is an assignment of length to every pair of nodes such that the following hold for all u, v, and w.

d(u, v) ≥ 0 d(u, v) = 0 if and only if u = v d(u, v) = d(v, u) d(u, v) ≤ d(u, w) + d(w, v) (the triangle inequality)

This is a minimization problem, so now we look for lower bounds on OP T. Some possibilities include minimum spanning tree, the diameter of the graph, and TSP-path (i.e. a Hamiltonian path of minimum weight).

One desirable property for a lower bound is that it is as close to OP T as possible. Suppose we had a property Π such that there exist arbitrarily large instances I such that OP T (I) = 100 · Π(I). Then we can’t hope to get α better than 100. In our case, if I is the complete graph with unit edge weights, and Π(I) is the diameter of the graph then we see that OP T (I) = n · Π(I), so we won’t be able to use graph diameter as a lower bound for metric TSP.

Another quality of a good lower bound is that the property is easier to understand or calculate than OP T itself. We may run into this trouble with TSP-path. However, minimal spanning tree can be computed efficiently, so we will try to use this as our lower bound (to see that it is a lower bound, note that an optimal tour with one edge removed is a tree).

If we use a depth first search tour of our tree as an approximation then we see that ALG = 2 · M ST ≤ 2 · OP T so we have a 2-approximation of metric TSP.

Can this analysis be improved upon? The answer is no, because we can find a family of instances where OP T (I) = 2 · Π(I). The line graph suffices as an example of this. That is, let I be a graph on n vertices where each vertex connects only to the “next” and “previous” vertices (there will be a total of n − 1 edges, each with edge weight 1). Then OP T (I) = 2(n − 1) = 2 · Π(I). This example shows that we cannot get a better approximation for TSP using only the MST lower bound. But it doesn’t preclude the possibility of a different algorithm using a different lower bound.

The crucial observation in improving this algorithm is to observe that our approach was really to convert the tree into an Eulerian graph and then use the fact there is an Eulerian tour. If we can find a more cost-effective way to transform the tree into an Eulerian graph, we could improve the approximation factor. An Eulerian tour exists if and only if every vertex has even degree (given that we want to start and end at the same vertex). Thus it suffices to find a matching between all nodes of odd degree in the minimal spanning tree and add these edges to the tree.

Lemma 1.5.3 Given a weighted graph G = (V, E) and a subset of vertices S ⊆ V with even cardinality, a minimum cost perfect matching for S has weight at most half of a minimum cost metric TSP tour on G.

Proof: Let S as in the statement of the lemma and consider a minimum cost TSP tour on S. Because of the metric property, this tour has a cost at most OP T. It also induces 2 matchings (take every other edge), and the smaller matching has cost at most 12 OP T.

Approximate Metric TSP(G = (V, E) - a weighted undirected graph) Let M = minimal spanning tree in G Let U = set of vertices with odd degree in M Let P = minimum cost perfect matching on U in G return Eulerian tour on M ∪ P

Theorem 1.5.4 The above algorithm is a 32 -approximation to metric TSP.

Proof: Since there must be an even number of vertices of odd degree in the minimal spanning tree M , we can use a minimum cost perfect matching beteween these vertices to complete an Eulerian graph. We know the minimum cost perfect matching has weight at most 12 OP T , thus ALG ≤ M ST + M AT CHIN G ≤ 32 OP T. We have a 32 -approximation for metric TSP.

Note that we used two lower bounds in our approximation. Each lower bound on its own isn’t fantastic but combining them together produced a more impressive result. As an exercise, find a family of instances for which there is a big gap between the matching lower bound and the optimal TSP tour. This simple approximation algorithm has been known for over 30 years [1] and no improvements have been made since its discovery.

1.6 Steiner Tree

Next time we will talk about the Steiner tree problem.

Definition 1.6.1 (Steiner tree problem) Given a weighted graph G = (V, E) and a subset T ⊆ V of nodes in a graph, find a least cost tree connecting all of the nodes in T (the “helper nodes” that are in the graph but not in in T are known as Steiner nodes).

Applications of Steiner trees arise in computer networks. We will discuss this problem next lecture.

References

[1] N. Christofides. Worst-case analysis of a new heuristic for the traveling salesman problem. In Technical report no. 388, Graduate School of Industrial Administration, Carnegie-Mellon Uni- versity, 1976.