Master's theorem with f(n)=log n

后端 未结 3 1754
半阙折子戏
半阙折子戏 2020-12-11 18:54

For master\'s theorem T(n) = a*T(n/b) + f(n) I am using 3 cases:

  1. If a*f(n/b) = c*f(n) for some constant c > 1 then
3条回答
  •  独厮守ぢ
    2020-12-11 19:38

    When f(n)=log(n), the Master theorem is not applicable. You should use the more generalized theorem, Akra–Bazzi.

    In result, T(n)=O(n).

    source.

    Another way to find a more specific proof of this result is looking for the proof of the computational complexity of the "Optimal Sorted Matrix Search" algorithm.

提交回复
热议问题