1

I want to show that the requrrence $T (n) = \sqrt{n} T(\sqrt{n}) + O (n)$ is in $O(n \log \log n)$

Here's my attempt:

If we expand the recursion tree, at a level $i$, there are $n^{1/2^k}$ subproblems each requiring work equal to $n^{1/2^k}$. There are $\log \log n$ levels in this tree.

So the summation is: $\sum_{i = 0}^{\log \log n} n^{1/2^{(k-1)}}$

Is this summation correct, and how can I show it is in $O(n \log \log n)$?

jaynp
  • 2,151
  • Got something from the answer below? – Did Feb 24 '14 at 15:52
  • @Did To be honest, your answer was a little above my comprehension level. I realized my mistake was that there aren't $n^{1/2^k}$ problems at level $i$. For example, there are $n^{3/4}$ problems at the second level. But your answer is correct, and complete so I will accept it. – jaynp Feb 24 '14 at 18:59

1 Answers1

2

For every $a\gt1$, the sequence $(S_a(k))$ defined by $$S_a(k)=a^{-2^k}\cdot T(a^{2^k}), $$ is such that $S_a(k)=S(k-1)+O(1)$, hence $S_a(k)=O(k)$, that is, $$ T(a^{2^k})=O(k\cdot a^{2^k}).$$ This means that $T(n)=O(n\log\log n)$ when $n$ is restricted to some sequence $(a^{2^k})$ but DOES NOT imply that $T(n)=O(n\log\log n)$ for the complete sequence $(T(n))$.

Did
  • 279,727