next up previous
Next: Up: Previous:

Example:

T(n) = 2T(n/2) + 1



Guess: T(n) = O(n)



Show: T(n) <= cn



Assume: T(n/2) <= cn/2



T(n) $\leq$ 2cn/2 + 1
= cn + 1 $\not\leq$ cn



But, we cannot remove the +1.


next up previous
Next: Up: Previous: