After drawing the recursion tree,the longest path can be found,which is $1\to 3n/4\to\cdots\to(3n/4)^k$. So the length is $\log_{4/3} n+1$. Thus $T(n)\le cn[1+25/28+...+(25/28)^{\log_{4/3} n+1}]$. That is $\frac{28cn}{3}[1-(25/28)^{\log_{4/3} n+1}]$. So $T(n)=O(n)$. Is this correct?
Asked
Active
Viewed 285 times
0
-
T(n) is O(n). See my question for a proof: https://math.stackexchange.com/questions/506489/if-tn-un-sum-i-t-lfloor-r-i-n-rfloor-show-that-tn-thetan – marty cohen Jan 01 '19 at 00:36
-
Well,thanks a lot,it's pretty helpful for me. – MickyZr Jan 01 '19 at 05:34