According to my understand,Detail to see OLCRS chapter 4.
Master Method:
T(n)=aT(n/b)+f(n)
base Master Theorem, the Solution can be divide into 3 cases.Each case compare N^(loga/logb) with f(n).
CASE 1: N^(loga/logb) > f(n) than T(n)=O(N^(loga/logb) );
CASE 2: N^(loga/logb) < f(n) than T(n)=O(f(n));
CASE 3: N^(loga/logb) = f(n) than T(n)=O(N^(loga/logb)*logn);
Notes:
1.here >,< means 多项式>,<. (Eg,n^3多项式>n^2; n*logN NOT 多项式大于 n
2.here T(n) can be 确切上下界 not only O.
本文介绍了递归算法分析中的大师定理,并详细阐述了其三种情况的适用条件与解的形式。通过对N^(loga/logb)与f(n)的比较,可以判断递归公式的渐进时间复杂度。
1万+

被折叠的 条评论
为什么被折叠?



