Faster Algorithm for Optimum Steiner Trees Jens Vygen University of Bonn Aussois 2010
The Steiner Tree Problem Given an undirected graph G with weights c : E(G) R +, and a terminal set T V (G),
The Steiner Tree Problem Given an undirected graph G with weights c : E(G) R +, and a terminal set T V (G), find a Steiner tree Y for T in G (a tree which is a subgraph of G containing all terminals) such that e E(Y ) c(e) is minimum.
The Steiner Tree Problem Given an undirected graph G with weights c : E(G) R +, and a terminal set T V (G), find a Steiner tree Y for T in G (a tree which is a subgraph of G containing all terminals) such that e E(Y ) c(e) is minimum. The problem is NP-hard (Karp [1972]) and even MAXSNP-hard (Bern, Plassmann [1989])
The Steiner Tree Problem Given an undirected graph G with weights c : E(G) R +, and a terminal set T V (G), find a Steiner tree Y for T in G (a tree which is a subgraph of G containing all terminals) such that e E(Y ) c(e) is minimum. The problem is NP-hard (Karp [1972]) and even MAXSNP-hard (Bern, Plassmann [1989]) Sufficient to consider the metric closure.
The Dreyfus-Wagner Algorithm For X T and v V (G) \ X: σ(x {v}) = σ(x {w}) + σ((x \ X ) {w}) + c({v, w}) v w
The Dreyfus-Wagner Algorithm For X T and v V (G) \ X: σ(x {v}) = σ(x {w}) + σ((x \ X ) {w}) + c({v, w}) v w due to Dreyfus and Wagner [1972] and Levin [1971] running time O(3 k n + 2 k (m + n log n)), where n = V (G), m = E(G), k = T (Erickson, Monma and Veinott [1987])
Recent Improvements Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: Find a set X of vertices that split an optimum Steiner tree into subtrees ( with few terminals (by enumeration). O (2 + δ) k n (ln(1/δ)/δ)ζ) for ζ > 1 2 and sufficiently small δ > 0.
Recent Improvements Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: Find a set X of vertices that split an optimum Steiner tree into subtrees ( with few terminals (by enumeration). O (2 + δ) k n (ln(1/δ)/δ)ζ) for ζ > 1 2 and sufficiently small δ > 0. This ( bound is at least O 2 k+(k/2)1/3 (ln n) 2/3).
Recent Improvements Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: Find a set X of vertices that split an optimum Steiner tree into subtrees ( with few terminals (by enumeration). O (2 + δ) k n (ln(1/δ)/δ)ζ) for ζ > 1 2 and sufficiently small δ > 0. This ( bound is at least O 2 k+(k/2)1/3 (ln n) 2/3). Fomin, Grandoni, Kratsch [2008]: O(5.96 k n O(log k) )-time algorithm with polynomial space Björklund, Husfeldt, Kaski, Koivisto [2007], Fomin, Grandoni, Kratsch [2008], Nederlof [2009]: algorithms for special case (edge weights are small integers)
Algorithms for Optimum Steiner Trees Erickson, Monma, Veinott [1987]: O ( 3 k n + 2 k (m + n log n) ) Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: O (2 k+(k/2)1/3 (ln n) 2/3) enumeration: O ( mα(m, n)2 n k)
Algorithms for Optimum Steiner Trees Erickson, Monma, Veinott [1987]: O ( 3 k n + 2 k (m + n log n) ) Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: O (2 k+(k/2)1/3 (ln n) 2/3) here: O ( nk2 k+(log 2 k)(log 2 n)) enumeration: O ( mα(m, n)2 n k)
Algorithms for Optimum Steiner Trees Erickson, Monma, Veinott [1987]: O ( 3 k n + 2 k (m + n log n) ) fastest if k < 4 log n Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: fastest if 4 log n < k < 2 log n(log log n) 3 O (2 k+(k/2)1/3 (ln n) 2/3) here: O ( nk2 k+(log 2 k)(log n)) 2 fastest if 2 log n(log log n) 3 < k < (n log 2 n)/2 enumeration: fastest if k > (n log 2 n)/2 O ( mα(m, n)2 n k)
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15, v 16, v 17 },, 1) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15, v 16, v 17 },, 1) = c({v 17, v 16 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15, v 16 },, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15, v 16 },, 1) = c({v 16, v 14 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15 }, {v 14 }, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13, v 15 }, {v 14 }, 1) = c({v 15, v 14 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13 }, {v 14 }, 2) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13 }, {v 14 }, 2) = c({v 14, v 10 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13 }, {v 10 }, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12, v 13 }, {v 10 }, 1) = c({v 13, v 11 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12 }, {v 10, v 11 }, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9, v 12 }, {v 10, v 11 }, 1) = c({v 12, v 11 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 10, v 11 }, 2) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 10, v 11 }, 2) = c({v 11, v 10 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 10 }, 2) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 10 }, 2) = c({v 10, v 8 })+ σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 8 }, 1) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6, v 7, v 9 }, {v 8 }, 1) = c({v 9, v 8 })+ σ({, v 1, v 3, v 5, v 6, v 7 }, {v 8 }, 2) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6, v 7 }, {v 8 }, 2) = c({v 8, v 7 })+ σ({, v 1, v 3, v 5, v 6, v 7 },, 1) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6, v 7 },, 1) = c({v 7, v 2 })+ σ({, v 1, v 3, v 5, v 6 }, {v 2 }, 1) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5, v 6 }, {v 2 }, 1) = c({v 6, v 4 })+ σ({, v 1, v 3, v 5 }, {v 2, v 4 }, 1) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 σ({, v 1, v 3, v 5 }, {v 2, v 4 }, 1) = c({v 5, v 4 })+ σ({, v 1, v 3 }, {v 2, v 4 }, 2) v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3 }, {v 2, v 4 }, 2) = c({v 4, v 2 })+ σ({, v 1, v 3 }, {v 2 }, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1, v 3 }, {v 2 }, 1) = c({v 3, v 2 })+ σ({, v 1 }, {v 2 }, 2) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1 }, {v 2 }, 2) = c({v 2, v 1 })+ σ({, v 1 },, 1) v 13 v 17
New Algorithm For X T and B V (G) \ T : v 5 v 6 σ(x, B, i) = σ(x, B, i ) + c(e). v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 σ({, v 1 },, 1) = c({v 1, })+ σ({ },, 1) v 13 v 17
Recursion formulas For X T and B V (G) \ T : { 0 B = σ(x, B, 1) := B { σ(x, B, 1) := min if X = 1, min{σ(x\{x}, B, i)+c(u, x) : x X, u (X\{x}) B, i {1, 2}}, } min{σ(x\{x}, B {u}, 1)+c(u, x) : x X, u V (G)\(X B)} if X 2, σ(x, B, 2) := if B =, { σ(x, B, 2) := min min{σ(x, B\{b}, i)+c(u, b) : b B, u X (B\{b}), i {1, 2}}, } min{σ(x, B\{b} {u}, 1)+c(u, b) : b B, u V (G)\(T B)} if B.
Observation Theorem Let G be a complete graph. Let c : E(G) R + satisfy the triangle inequality. Let T V (G). Then σ(t,, 1) is the minimum length of a Steiner tree for T.
How many boundary points are needed? Theorem Let Y be a tree and T V (Y ) such that each vertex in V (Y ) \ T has degree at least three. Let n := V (Y ), k := T 3, and β := 1 + log 2 (k/3). Then we can number V (Y ) = {,..., v n 1 } and E(Y ) = {e 1,..., e n 1 } such that the following conditions hold: v i e i {,..., v i } for i = 1,..., n 1. n 1 {v 0,..., v i } e h β for i = 0,..., n 1. h=i+1
Proof (Sketch)
Proof (Sketch)
Proof (Sketch)
Proof (Sketch)
Proof (Sketch)
Proof (Sketch)
Proof (Sketch) v 1
Proof (Sketch) v 2 v 1
Proof (Sketch) v 3 v 2 v 1
Proof (Sketch) v 4 v 3 v 2 v 1
Proof (Sketch) v 5 v 4 v 3 v 2 v 1
Proof (Sketch) v 5 v 6 v 4 v 3 v 2 v 1
Proof (Sketch) v 5 v 6 v 4 v 3 v 2 v 7 v 1
Proof (Sketch) v 5 v 6 v 4 v 3 v 2 v 7 v 8 v 1
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1 v 10
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1 v 10 v 11
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1 v 10 v 12 v 11
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1 v 10 v 12 v 11 v 13
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 1 v 10 v 14 v 12 v 11 v 13
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 13
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13
Proof (Sketch) v 5 v 6 v 4 v 9 v 3 v 2 v 7 v 8 v 15 v 1 v 10 v 14 v 12 v 11 v 16 v 13 v 17
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage.
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: b j b 4 b 3 b 2 b 1
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: b j b 4 b 3 b 2 b 1 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 2 b j b 4 b 3 b 2 b 1 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 2 b j b 4 b 3 b 2 b 1 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 4 2 b j b 4 b 3 b 2 b 1 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 4 2 b j b 4 b 3 b 2 b 1 8 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 8 4 2 b j b 4 b 3 b 2 b 1 8 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 8 4 2 b j b 4 b 3 b 2 b 1 2 j 1 8 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 2 j 1 8 4 2 b j b 4 b 3 b 2 b 1 2 j 1 8 4 2
Proof (Sketch) We have to show that the number of boundary points is at most β = 1 + log 2 (k/3) at any stage. If there are j boundary points b 1,..., b j at some stage, then: 2 j 1 8 4 2 b j b 4 b 3 b 2 b 1 2 j 1 8 4 2 2 j 1 3 2 j 1 k j β.
The theorem is best possible In general we need 1 + log 2 (k/3) boundary points: r = 1 : r = 2 : 3 2 r terminals; need r + 1 boundary vertices
Recursion formulas (1) For X T, X, and B V (G) \ T, B β: { 0 B = σ(x, B, 1) := B if X = 1, { σ(x, B, 1) := min min{σ(x\{x}, B, i)+c(u, x) : x X, u (X\{x}) B, i {1, 2}}, } min{σ(x\{x}, B {u}, 1)+c(u, x) : x X, u V (G)\(X B)} if X 2 and B < β, σ(x, B, 1) := min{σ(x\{x}, B, i)+c(u, x) : x X, u (X\{x}) B, i {1, 2}} if X 2 and B = β,
Recursion formulas (2) For X T, X, and B V (G) \ T, B β: σ(x, B, 2) := if B =, { σ(x, B, 2) := min min{σ(x, B\{b}, i)+c(u, b) : b B, u X (B\{b}), i {1, 2}}, } min{σ(x, B\{b} {u}, 1)+c(u, b) : b B, u V (G)\(T B)} if B. Theorem Let G be a complete graph, let c : E(G) R + satisfy the triangle inequality. Let T V (G), k := T 3, and β := 1 + log 2 (k/3). Then σ(t,, 1) is the minimum length of a Steiner tree for T.
Algorithm 1. Compute the metric closure (Ḡ, c) of (G, c). 2. Compute the values σ(x, B, i) with respect to (Ḡ, c). 3. Collect the edges of an optimum Steiner tree for T in (Ḡ, c). 4. Replace each of these edges by a shortest path in (G, c).
Algorithm 1. Compute the metric closure (Ḡ, c) of (G, c). 2. Compute the values σ(x, B, i) with respect to (Ḡ, c). 3. Collect the edges of an optimum Steiner tree for T in (Ḡ, c). 4. Replace each of these edges by a shortest path in (G, c). Step 2 dominates the running time: k ( ) β ( ) O k n k (in + jn) = O i j i=1 j=0 Now use β = 1 + log 2 (k/3) log 2 k. ( nk2 k n β).
Main result Theorem Our algorithm computes a minimum weight Steiner tree for a terminal set T in a weighted graph (G, c) in O (nk2 k+(log 2 k)(log n)) 2 time, where n = V (G) and k = T.
Main result Theorem Our algorithm computes a minimum weight Steiner tree for a terminal set T in a weighted graph (G, c) in O (nk2 k+(log 2 k)(log n)) 2 time, where n = V (G) and k = T. Remark This is the fastest known algorithm if 2 log n (log log n) 3 < k < (n log 2 n)/2.
Summary Erickson, Monma, Veinott [1987]: O ( 3 k n + 2 k (m + n log n) ) fastest if k < 4 log n Fuchs, Kern, Mölle, Richter, Rossmanith, Wang [2007]: fastest if 4 log n < k < 2 log n(log log n) 3 O (2 k+(k/2)1/3 (ln n) 2/3) here: O ( nk2 k+(log 2 k)(log n)) 2 fastest if 2 log n(log log n) 3 < k < (n log 2 n)/2 enumeration: fastest if k > (n log 2 n)/2 O ( mα(m, n)2 n k)