Approximation Algorithms

Approximation
Algorithms
Lecture 2
10/19/10
1
(Metric) Steiner Tree
Problem: Steiner Tree.
Given an undirected graph G=(V,E) with non-negative edge
costs c : E → Q+ whose vertex set is partitioned into
required and Steiner vertices, find a minimum cost tree in G
that contains all required vertices.
In the metric Steiner Tree Problem, G is the complete graph
and edge costs satisfy the triangle inequality, i.e.
c(u, w) ≤ c(u, v) + c(v, w)
for all u, v, w ∈ V .
2
(Metric) Steiner Tree
Steiner
required
3
(Metric) Steiner Tree
Steiner
required
4
Metric Steiner Tree
Let Π1 , Π2 be minimization problems. An approximation factor
preserving reduction from Π1 to Π2 consists of two poly-time
computable functions f, g , such that
• for any instance I1 of
Π1 , I2 = f (I1 ) is an instance of Π2
such that optΠ2 (I2 ) ≤ optΠ1 (I1 ) , and
• for any solution t of I2 , s = g(I1 , t) is a solution of I1
such that objΠ1 (I1 , s) ≤ objΠ2 (I2 , t).
Proposition 1
There is an approximation factor preserving reduction from
the Steiner Tree Problem to the metric Steiner Tree Problem.
5
Metric Steiner Tree
Algorithm 3: Metric Steiner Tree via MST.
Given a complete graph G=(V,E) with metric edge costs, let
R be its set of required vertices. Output a spanning tree of
minimum cost (MST) on vertices R.
Theorem 2
Algorithm 3 is a factor 2 approximation algorithm for the
metric Steiner Tree Problem.
6
Metric Steiner Tree
7
Metric Steiner Tree
Algorithm 3: Metric Steiner Tree via MST.
Given a complete graph G=(V,E) with metric edge costs, let
R be its set of required vertices. Output a spanning tree of
minimum cost (MST) on vertices R.
Theorem 2
Algorithm 3 is a factor 2 approximation algorithm for the
metric Steiner Tree Problem.
Corollary 1
Together with the approximation preserving reduction from
the previous slide we obtain a factor 2 approximation
algorithm for the Steiner Tree Problem.
8
Steiner Tree
An example that our analysis is tight:
c(u, v) = 1
Steiner
required (×n)
c(u, v) = 2
Every MST on the required vertices has cost 2(n-1). Using the
Steiner vertex yields a tree of cost n.
9
Traveling Salesman Problem
Problem: Traveling Salesman Problem (TSP).
Given a complete graph G=(V,E) with non-negative edge
costs c : E → Q+ for all, find a minimum cost cycle visiting
every vertex exactly once.
In the metric TSP, edge costs are required to satisfy the
triangle inequality.
Theorem 3
For any poly-time computable function α(n), TSP cannot be
approximated within a factor of α(n), unless P=NP.
10
Metric TSP
Algorithm 4: Metric TSP.
1. Find an MST of G, say T.
2. Compute a minimum cost perfect matching, say M, on the
set of odd-degree vertices of T. Add M to T to obtain an
Eulerian graph.
3. Find an Euler tour, say Q, of this graph.
4. Output the tour that visits the vertices of G in order of
their first appearance in Q.
Theorem 4
Algorithm 4 is a factor 3/2 approximation algorithm for the
metric TSP.
11
Metric TSP
Lemma 2
Let V � ⊆ V , such that |V � | is even, and let M be a minimum
cost perfect matching on V �. Then cost(M ) ≤ opt/2 .
An example that our analysis is tight:
...
1
1
1
1
1
1
1
1
...
1
1
�n/2�
Thick edges indicate the MST found in step 1.
12
1
1
Multiway Cut
Problem: Multiway Cut.
Given an undirected graph G=(V,E) with non-negative edge
weights w : E → Q+ and a set S = {s1 , . . . , sk } ⊆ V of
terminals, a multiway cut is a set of edges whose removal
disconnects the terminals from each other. The Multiway Cut
Problem asks for such a set of minimum total weight.
13
Multiway Cut
Problem: Multiway Cut.
Given an undirected graph G=(V,E) with non-negative edge
weights w : E → Q+ and a set S = {s1 , . . . , sk } ⊆ V of
terminals, a multiway cut is a set of edges whose removal
disconnects the terminals from each other. The Multiway Cut
Problem asks for such a set of minimum total weight.
14
Multiway Cut
For k=2, i.e. given just 2 terminals, this is the standard Min-Cut
problem.
Recall that the Min-Cut problem can be solved in polynomial
time by computing a maximum flow between the terminals
(“Min-Cut / Max-Flow Theorem”).
The Multiway Cut Problem is NP-hard for any fixed k ≥ 3.
15
Multiway Cut
We define an isolating cut for si to be a set of edges whose
removal disconnects si from all sj , j �= i .
Minimum weight isolating cuts can be found in poly time:
1. Merge all terminals in S\{si } into a single vertex s∗.
2. Compute a min-cut separating si and s∗.
si
merge terminals into supernode
16
Multiway Cut
We define an isolating cut for si to be a set of edges whose
removal disconnects si from all sj , j �= i .
Minimum weight isolating cuts can be found in poly time:
1. Merge all terminals in S\{si } into a single vertex s∗.
2. Compute a min-cut separating si and s∗.
si
compute min-cut
17
Multiway Cut
We define an isolating cut for si to be a set of edges whose
removal disconnects si from all sj , j �= i .
Minimum weight isolating cuts can be found in poly time:
1. Merge all terminals in S\{si } into a single vertex s∗.
2. Compute a min-cut separating si and s∗.
si
18
Multiway Cut
Algorithm 5: Multiway Cut.
1. For each i=1,...,k, compute a minimum weight isolating cut
for si , say Ci .
2. Discard the heaviest of these cuts and output the union of
the rest, say C.
Theorem 5
Algorithm 5 is a factor 2-2/k approximation algorithm for the
Multiway Cut Problem.
19