Master method/Master theorem

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.

 

 

 

 

 

你可能感兴趣的:(算法与数据结构)