next up previous
Next: Up: Previous:

Now let's try subtracting a lower-order term:



We know cn - b $\in$ O(n).



Guess: T(n) = O(n)



Show: T(n) <= cn - b



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



T(n) = 2T(n/2) + 1
T(n) $\leq$ 2(cn/2 - b) + 1
= cn - 2b + 1 $\leq$ cn - b
True if b - 1 $\geq$ 0, b $\geq$ 1 (okay)


next up previous
Next: Up: Previous: