11.12.2012 Views

Fast Steiner tree computation in polynomial space - Lita

Fast Steiner tree computation in polynomial space - Lita

Fast Steiner tree computation in polynomial space - Lita

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

partitions (which determ<strong>in</strong>e the runn<strong>in</strong>g time) conta<strong>in</strong> a balanced number of term<strong>in</strong>als,<br />

and such partitions are conta<strong>in</strong>ed both <strong>in</strong> B(s, T )and<strong>in</strong>P(s, T ). The<br />

situation changes drastically <strong>in</strong> the top-down recursive implementation of the algorithm:<br />

here the runn<strong>in</strong>g time is essentially determ<strong>in</strong>ed by the most unbalanced<br />

partitions. Hence, replac<strong>in</strong>g P(s, T )withB(s, T ) has a tremendous impact on<br />

the performance of the algorithm.<br />

The follow<strong>in</strong>g <strong>Ste<strong>in</strong>er</strong> <strong>tree</strong> algorithm summarizes the discussion above:<br />

• (base case) If T = {v}, returnv. IfT = {v, w}, return the shortest path<br />

from v to w.<br />

• (recursive case) For every s ∈ V and for every partition (T1,T2) ofT \{s},<br />

|T1| ≤|T2| ≤2k/3, compute recursively optimal <strong>Ste<strong>in</strong>er</strong> <strong>tree</strong>s S1 and S2 over<br />

T1 ∪{s} and T2 ∪{s}, respectively. Return the cheapest <strong>Ste<strong>in</strong>er</strong> <strong>tree</strong> S1 ∪ S2<br />

obta<strong>in</strong>ed.<br />

Theorem 1. The <strong>Ste<strong>in</strong>er</strong> <strong>tree</strong> algorithm above takes time O((27/4) k n O(log k) )<br />

and <strong>polynomial</strong> <strong>space</strong>.<br />

Proof. The correctness of the algorithm follows from the discussion above, and<br />

its <strong>space</strong> complexity is trivially <strong>polynomial</strong>. Let P (k) be the number of base<br />

<strong>in</strong>stances generated by the algorithm to solve the problem. The time complexity<br />

of the algorithm is O(P (k)n O(1) log k) =O(P (k)n O(1) ), where we used the fact<br />

that each branch<strong>in</strong>g step takes <strong>polynomial</strong> time and the depth of the recursion<br />

is O(log k).<br />

It rema<strong>in</strong>s to bound P (k). We will show by <strong>in</strong>duction that P (k) ≤ Cn c ln k α k ,<br />

for some constants C>0, c>0, and α ≥ 4. Clearly the condition is true for<br />

k ≤ 2. Now assume it is satisfied for every h ≤ k − 1, and consider an <strong>in</strong>stance<br />

with k term<strong>in</strong>als. For a given partition (T1,T2), the number of base <strong>in</strong>stances<br />

generated is P (|T1| +1)+P (|T2| + 1). By construction, k/2 ≤|T2| ≤2k/3 and<br />

|T1| + |T2| ≤k. Hence, for sufficiently large constants C and c and for α =8,the<br />

follow<strong>in</strong>g <strong>in</strong>equalities hold:<br />

P (k) ≤ n<br />

2k/3 �<br />

i=k/2<br />

≤ 2nP(2k/3+1)<br />

� �<br />

k<br />

(P (i +1)+P (k − i +1))≤2n i<br />

2k/3 �<br />

i=k/2<br />

� �<br />

k<br />

i<br />

≤ Cn c ln k (2α 2/3 ) k ≤ Cn c ln k α k .<br />

2k/3 �<br />

i=k/2<br />

� �<br />

k<br />

P (i +1)<br />

i<br />

≤ 2nCn c ln(2k/3+1) α 2k/3+1 2 k<br />

Aboveweusedthefactthat2α 2/3 = α for α = 8. In order to obta<strong>in</strong> a better<br />

value of α, we use the follow<strong>in</strong>g observation.<br />

Fact 1 For every fixed x ≥ 4, function f(y) =<br />

<strong>in</strong>terval (0, 2/3].<br />

x y<br />

y y (1−y) 1−y is <strong>in</strong>creas<strong>in</strong>g on

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!