Solving a recurrence T(n) = 2T(n/2) + sqrt(n)

algorithmdiscrete-mathematics

Need a little help! This is what I have so far using backward substitution:

T(n) = 2T(n/2) + sqrt(n), where T(1) = 1, and n = 2^k
T(n) = 2[2T(n/4) + sqrt(n/2)] + sqrt(n) = 2^2T(n/4) + 2sqrt(n/2) + sqrt(n)
T(n) = 2^2[2T(n/8) + sqrt(n/4)] + 2sqrt(n/2) + sqrt(n)
     = 2^3T(n/8) + 2^2sqrt(n/4) + 2sqrt(n/2) + sqrt(n)

In general

T(n) = 2^kT(1) + 2^(k-1) x sqrt(2^1) + 2^(k-2) x sqrt(2^2) + ... + 2^1 x sqrt(2^(k-1)) + sqrt(2^k)

Is this right so far? If it is, I can not figure out how to simplify it and reduce it down to a general formula.

I'm guessing something like this? Combining the terms

= 1 + 2^(k-(1/2)) + 2^(k-(2/2)) + 2^(k-(3/2)) + ... + 2^((k-1)/2) + 2^(k/2)

And this is where I'm stuck. Maybe a way to factor out a 2^k?
Any help would be great, thanks!

Best Solution

You're half way there. The expression can be simplified to this: