算法导论(第三版)参考答案:练习4.5-1,练习4.5-2,练习4.5-3,练习4.5-4,练习4.5-5
Exercise 4.5-1
Use the master method to give tight asymptotic bounds for the following recurrences:
- T(n)=2T(n/4)+1
- T(n)=2T(n/4)+n√
- T(n)=2T(n/4)+n
- T(n)=2T(n/4)+n2
a=2,b=4,f(n)=1.log42>0 ,满足情况一;解为
T(n)=Θ(nlog42)=Θ(n√)
a=2,b=4,f(n)=n√.log42=12 ,满足情况二;解为 T(n)=Θ(