next up previous
Next: Iteration Up: l2 Previous: Master

Substitution

T(n) = O($n^3$) $\leq$ c$n^3$, Assume T(n/2) $\leq$ c$(n/2)^3$
T(n) $\leq$ 2c$(n/2)^3$ + $n^3$
= 1/4c$n^3$ + $n^3$
= (1 + c/4)$n^3$
$\leq$ c$n^3$ when
1 + c/4 $\leq$ c, 3/4c $\geq$ 1, c $\geq$ 4/3



T(n) = $\Omega$($n^3$) $\geq$ c$n^3$, T(n/2) $\geq$ c$(n/2)^3$
T(n) $\geq$ 2c$(n/2)^3$ + $n^3$
= 1/4c$n^3$ + $n^3$
= (1 + c/4)$n^3$
$\geq$ c$n^3$ when
1 + c/4 $\geq$ c, 3/4c $\leq$ 1, c $\leq$ 4/3



Thus, T(n) = $\Theta(n^3)$.


next up previous
Next: Iteration Up: l2 Previous: Master