Presentation is loading. Please wait.

Presentation is loading. Please wait.

Steiner trees: Approximation Algorithms

Similar presentations


Presentation on theme: "Steiner trees: Approximation Algorithms"— Presentation transcript:

1 Steiner trees: Approximation Algorithms
CS4407

2 Topics Steiner trees NP-completeness Approximation algorithms
Preprocessing Steiner Trees

3 Steiner tree Given: connected undirected graph G=(V,E), length for each edge l(e) Î N, set of vertices N: terminals Question: find a subtree T of G, such that each vertex of N is on T and the total length of T is as small as possible Steiner tree spanning N Steiner Trees

4 Minimum Steiner tree The Minimum Steiner Tree Problem:
Given an undirected graph G with nonnegative edge costs and whose vertices are partitioned into two sets, required vertices and Steiner vertices, find a minimum cost tree in G that contain all the required vertices and any subset of the Steiner vertices.

5 Applications Wire routing of VLSI
Customer’s bill for renting communication networks Other network design and facility location problems Computer networks VLSI circuit design Steiner Trees

6 Variants Points in the plane Vertex weights Directed graphs
Steiner Trees

7 Special cases |N| = 1: trivial |N| = 2: shortest path
N = V: minimum spanning tree Steiner Trees

8 Special cases |N| = 2: shortest path Only two required vertices,
just a shortest path. N=V Every vertex is required, just a minimum spanning tree. The general problem is NP-complete.

9 Special cases: useless edges
We must use Steiner vertices in order to construct a good solution, because edges connecting required vertices could be very expensive (or even don’t exist). 2 1 2 10 10 1 1 10 2 Would I ever use an edge of weight 10 (an expensive edge)? The purpose of using such an edge is to connect two required vertices, but we can always use a path of length 2 (which passes through the Steiner vertices and has a total cost of 2) for the same purpose!

10 NP-completeness Decision version is NP-complete
Reduction from Vertex cover = terminal Steiner Trees

11 Proof of reduction Membership of ST in NP: trivial
Certificate: subset of edges Can test Steiner property in poly-time Hardness: take instance G=(V,E), k of Vertex Cover Build G’ by subdividing each edge Set N = set of new vertices All edges length 1 G’ has Steiner Tree with |E|+k – 1 edges, if and only if G has vertex cover with k vertices Steiner Trees

12 Approximation algorithms
Several different algorithms that guarantee ratio 2 more precisely: 2 – 2/n Shortest paths heuristic Ratio 2 – 2/n Bases on Prim’s minimum spanning tree algorithm Steiner Trees

13

14 Metric Closure In general, we can always replace the cost of an edge
2 1 2 10 10 1 1 10 2 In general, we can always replace the cost of an edge by the cost of a cheapest (shortest) path. We call the resulting graph the metric closure of the original graph.

15 Metric Closure Claim. In the metric closure, the edge costs satisfy triangle inequalities. v (Proof by contradiction:) Suppose c(vw) < c(uv) + c(uw). There is a path P(uv) between u and v with cost c(uv), and a path P(uw) between u and w with cost c(uw). The union of P(uv) and P(uw) contains a path P* from v to w with cost at most c(uv) + c(uw). This contradicts that c(vw) represents the cost of a shortest path from v to w (since P* is shorter). c(uv) u c(vw) c(uw) w Note that the metric closure is a complete graph.

16 Metric Closure Lemma The cost of a minimum Steiner tree in a graph G =
the cost of a minimum Steiner tree in its metric closure. First The cost of a minimum Steiner tree in a graph G ≥ the cost of a minimum Steiner tree in its metric closure. Just take the same tree in the metric closure in G (Proof): Let T be a minimum Steiner tree in G. For each edge uv, The cost of uv in the metric closure is at most the cost of uv in G. So, the same T in the metric closure is no more expensive.

17 Metric Closure Next The cost of a minimum Steiner tree in a graph G ≤
the cost of a minimum Steiner tree in its metric closure. in G in metric closure take the union of the shortest paths (Proof): Let T be a minimum Steiner tree in the metric closure. Consider the union U of the shortest paths in the original graph G. The union U has cost at most the cost of T. Clearly, U connects all the required vertices. So, U contains a Steiner tree T*. Hence, T* has cost at most the cost of T.

18 Metric Steiner Tree Lemma The cost of a minimum Steiner tree in a graph G = the cost of a minimum Steiner tree in its metric closure. Claim. In the metric closure, the edge costs satisfy triangle inequalities. Without loss of generality, we can consider the metric TSP problem. Metric Steiner Tree Problem: Given a complete graph with edge costs satisfying triangle inequalities, find a minimum Steiner tree (which connect all the required vertices).

19 Metric Steiner Tree A Steiner tree connects all the required vertices.
2 1 2 10 10 Can we just find a minimum spanning tree connecting all the required vertices? 1 1 10 2 In other words, forget about all Steiner vertices! How bad can it be?

20 Spanning vs. Steiner Tree
b d c Cost of a minimum Steiner tree MST ≤ a + b + b + c + c + d + d + e ≤ 2a + 2b + 2c + 2d + 2e = 2(a +b + c + d + e) MST ≤ 2OPT

21 Spanning vs. Steiner Tree
How to formalize the idea? Let the cost of this Steiner tree be OPT.

22 Spanning vs. Steiner Tree
How to formalize the idea? Key idea: double all the edges and find an Eulerian tour. This graph has cost 2OPT.

23 Spanning vs. Steiner Tree
How to formalize the idea? Key idea: double all the edges and find an Eulerian tour. This graph has cost 2OPT.

24 Spanning vs. Steiner Tree
Strategy: shortcut this Eulerian tour.

25 Spanning vs. Steiner Tree
By triangle inequalites, the shortcut tour is not longer than the Eulerian tour. So, the cost of MST ≤ the cost of Eulerian graph ≤ 2OPT.

26 2-Approximation for Metric Steiner Tree
(Metric Steiner Tree – Factor 2) Compute the metric closure G* of G. Find a minimum spanning tree T* of G*. Construct the union U of the shortest paths in G which correspond to edges in T*. 4. Output the Steiner tree T contained in U. Analysis: cost(T) ≤ cost(U) (because T is contained in U) cost(U) ≤ cost(T*) (because G* is the metric closure of G) cost(T*) ≤ 2OPT (because of triangle inequalities, shortcutting) So, cost(T) ≤ 2OPT

27

28 Shortest paths heuristic
Start with a subtree T consisting of one terminal While T does not span all terminals Select a terminal x not in T that is closest to a vertex in T. Add to T the shortest path that connects x with T. Steiner Trees

29 Improving the shortest paths heuristic
Take the solution T from the heuristic Build the subgraph of G, induced by the vertices in T Compute a minimum spanning tree of this subgraph Repeat Delete non-terminals of degree 1 from this spanning tree Until there are no such non-terminals Steiner Trees

30 Distance networks Distance network of G=(V,E) (induced by X)
Take complete graph with vertex set X Cost of edge {v,w} in distance network is length shortest path from v to w in G. For set of terminals N, the minimum cost of a Steiner tree in G equals the minimum cost of a Steiner tree in the distance network of G (induced by V). Steiner Trees

31 Distance network heuristic
Construct the distance network DG(N) (induced by N) Determine a minimum spanning tree of DG(N) Replace each edge in the minimum spanning tree by a corresponding shortest path. Let TD be the corresponding subgraph of G It can be done such that TD is a tree Make the subgraph of G induced by the vertices in TD Compute a minimum spanning tree of this subgraph Remove non-terminals of degree 1 from this spanning tree, until there are no such non-terminals. Steiner Trees

32 Distance network heuristic has ratio 2
Look at optimal Steiner tree T* Take closed walk L around T* visiting each edge twice See this as a collection of paths between successive terminals Delete the longest of these, and we get a walk L’ cost of L’ £ cost(T*) * (2 – 2/r) cost(TD) £ cost(L’). L’ is a spanning tree in DG(N) Final network has cost at most cost(TD). Steiner Trees

33 Example where bound is met
1 1 = terminal 1 1 2-e 2-e 1 1 1 1 2-e 2-e 2-e Steiner Trees

34 Better Approximation (Robin Zelikovsky)
There is a 1.55 approximation algorithm for minimum Steiner tree. Just for fun 1: Show that the 2-approximation algorithm is equivalent to the following algorithm: Find a cheapest path that connects two required vertices which are not yet connected. - Repeat until all required vertices are connected. Just for fun 2: Design a polynomial time algorithm to find a minimum Steiner tree for k required vertices, when k is fixed.

35 Better Approximation W = Æ ; w = maxint; D = DG(N) repeat
Identify set of three terminals A={a,b,c} such that w= cost(TD(N)) – cost(TD’(N’)) – cost(TG(A)) is as large as possible D’ (N’) is obtained from D (N) by contracting A to one vertex TD(N) denotes min spanning tree of D TG(A) denotes min steiner tree in G with terminals A if (w = = 0) then apply distance network heuristic with terminal set W È N; stop else add to W the non-terminal of degree 3 in TG(A); D=D’ Steiner Trees

36 On upgrading heuristic
Correctness: when no non-terminal vertex of degree 3 in TG(A), then w=0 TD(N) can be constructed using edges of the other two Ratio: 11/7 Other method: (Robins, Zelikowsky, 2000) Steiner Trees

37 Small number of terminals
Suppose |N|= r is small. Compute distance network DG(V) There is a minimum cost Steiner tree in DG(V) that contains at most r – 2 non-terminals. Any Steiner tree has one that is not longer without non-terminal vertices of degree 1 and 2 A tree with r leaves and internal vertices of degree at least 3 has at most r – 2 internal vertices Polynomial time algorithm for Steiner tree when we have O(1) terminals. Steiner Trees

38 Solving O(1) terminals Polynomial time algorithm for Steiner tree when we have O(1) terminals: Enumerate all sets W of at most r – 2 non-terminals For each W, find a minimum spanning tree in the distance network of N È W Take the best over all these solutions Takes polynomial time for fixed r. Heuristics to do this more clever? Steiner Trees

39 Simple preprocessing Steiner tree can be solved separately on each biconnected component Non terminals of degree at most 2: Reduce graph: Delete non-terminal of degree 1 Connect neighbors of non-terminals of degree 2 Edge length is sum of lengths of 2 edges Long edges can be deleted If l(v,w) > d(v,w) then delete edge {v,w}. Steiner Trees

40 Bottleneck Steiner distance
Path between v and w can be seen as number of successive elementary paths Pieces ending/starting at v, w or terminal Steiner distance of path: length of largest elementary path Bottleneck Steiner distance: minimum Steiner distance over all paths between v and w Can be computed with modification of shortest paths algorithm Steiner Trees

41 Reducing non-terminals
Consider non-terminal z. Consider network B(z), with vertex set N[z] and lengths the bottleneck Steiner distances. Write B(z)[W] for subnetwork of B(z) induced by W. Lemma. If for every subset W of N(z) of size at least 3, the cost of the minimum spanning tree of B(z)[W] is at most the cost of the edges {z,w} over all w Î W, then z has degree at most 2 in at least one minimum cost Steiner Tree Steiner Trees

42 Use of lemma Remove z For pairs of neighbors v, w of z
If {v,w} Î E, set length of edge to minimum of cost(v,w), cost(v,z)+cost(z,w) Otherwise, add edge {v,w} with cost cost(v,z)+cost(z,w) Steiner Trees

43 Long edges If d(v,w) < cost(v,w), then edge {v,w} can be removed.
If d(v,w) = cost(v,w), and there is a shortest path not via edge {v,w}, then edge can be removed. Steiner Trees

44 Paths with one terminal
Suppose {v,w} is an edge, and there is a terminal z with cost(v,w) > max(d(v,z),d(w,z)) then {v,w} can be removed. A Steiner tree with {v,w} can be improved: how can we repair a Steiner tree – {v,w}? Steiner Trees

45 PTm-test (paths with many terminals)
Let b(v,w) the bottleneck Steiner distance from v to w. If cost(v,w) > b(v,w) then edge {v,w} can be removed. Proof. Consider Steiner tree T1 with such edge {v,w}. Look at T1 – {v,w}. Splits in two trees T2 and T3. Consider bottleneck shortest path from v to w. Take elementary path P0 with one edge in T2 and T3. Length of P0 at most b(v,w). T1 – {v,w}+ P0 has length less than T1 and spans all terminals Take subgraph of P0 that spans all terminals and is a tree Steiner Trees

46 Polynomial solvable cases
When bounded treewidth E.g., for series parallel graphs Compute for part with terminals s and t Minimum cost subtree in part spanning s and t Minimum cost subtree in part spanning s, but not t Minimum cost subtree in part spanning t, but not s Minimum cost subtree in part spanning neither s and t Minimum cost of two subtrees, one spanning s and one spanning t Strongly chordal graphs with unit costs Steiner Trees


Download ppt "Steiner trees: Approximation Algorithms"

Similar presentations


Ads by Google