next up previous
Next: Now let's try subtracting Up: l2 Previous: Making a Good Guess

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: Now let's try subtracting Up: l2 Previous: Making a Good Guess