A former student of mine was TA-ing an algorithms class last quarter and asked students to solve this famous recurrence relation:
$$T(n) = \sqrt n T(\sqrt{n}) + n$$
There are several ways to solve this recurrence relation and this question has already been asked here.
I was talking to my student about this problem and mentioned that it's quite hard to solve and is pretty dependent on the particular choices being made. As an example, I suggested this variant of a recurrence relation that was less simple to solve:
$$T(n) = \sqrt n T(\sqrt{n}) + \sqrt{n}$$
The TA and I tried solving this recurrence for about an hour and a half without making any progress. Here are a few things we tried:
My approach to solving the initial recurrence relation was to draw out a recursion tree and notice that each level of the tree contributes $n$ to the total and that there are $O(\log \log n)$ layers, so the recurrence solves to $O(n \log \log n)$. When I tried doing this here, I noticed that the work per layer was no longer constant; instead, the top layer sums to $\sqrt{n}$, the second layer to $n^{3/4}$, the third to $n^{7/8}$, etc. We got stuck working with the summation $n^{1/2} + n^{3/4} + n^{7/8} + ...$.
We tried using the iteration method to unroll the recurrence. With the original recurrence relation, this works out nicely; here, we got stuck at the same summation given above.
I'm completely stuck trying to figure out how to solve this recurrence relation. There's nothing riding on it per se - I don't need to solve it for any particular reason - but the fact that we arrived at it by a straightforward modification of a common algorithms problem set question makes it all the more enticing.
Any idea how to solve this recurrence?
Thanks!