Help with bounds / proof by induction for T(n) = ...

29 Views Asked by At

I have the following practice problem: T(n) = 3T(n/2) + n

I need to find the bound by recursion tree. This is what I have. I feel uneasy with my answer...I'm not sure if I'm going about it correctly.

Recursion Tree:

                                      n 
                    T(n/2)    T(n/2)    T(n/2)    n 
     T(n/4)    T(n/4)    T(n/4)    T(n/4)    T(n/4)    T(n/4)    n 
                         T(n/8) ...(27 times...)    n 
                                    ... 
                                    T(0) 

I believe the upper bound will then be O(n^(log2^3)), as each level splits T(n/2) by 3. Is that the correct way to go about looking at this?

Also, my next practice problem is to prove by induction, which I'm very uneasy with still (I'm still reading more about doing the proof by induction for this). Any tips on how to go about starting that would also be appreciated! Thanks all!