1

I'm trying to solve a recursion problem using the substitution method, but I'm having some issues. The recursion in question is $T(n) = \sqrt{n}T(\sqrt{n}) + \sqrt{n}$, and I've been asked to compute a upper bound tighter than $O(n\log(n))$ for the running time by making a recursion tree and guessing a bound from it. Constructing a tree was no issue, but I ran into a problem because the root layer contributes $n^{1/2}$, the next one $n^{3/4}$, the one after that $n^{7/8}$, etc. I have no idea how to make an educated guess from that series.

I then tried to do an induction proof that $O(n)$ was an upper bound (which was just a random guess), by assuming $T(n) \leq cn - d$ for some constant $d$. This seemed to work with $d=1$.

$ p(n) \leq \sqrt{n}c(\sqrt{n}-d) + \sqrt{n} = cn - cd\sqrt{n} + \sqrt{n} = cn - (cd-1)\sqrt{n} $

If we pick $d=1$, we get that $p(n)\leq cn - (c-1)\sqrt{n} \leq cn-1$ for sufficiently large $c$, as desired.

I'd like to know both how to make a proper guess via a recursion tree in this case, and whether or not my induction is correct.

zucian
  • 151
  • That one has something strange going on in the accepted answer. Not sure why a series containing n is equal to a series not containing n, for example. – Elswyyr Feb 27 '21 at 21:33

0 Answers0