Do the expansions (book calls this the substition method). The text notes,
it can be shown that
How does this compare?
T (n) = aT(n/b)+f(n)
T(n) = 8 T(n/2) + n3 so a = 8 and b = 2 and f(n)is n3
T(n) = n3[T(1) + u(n)]
where u(n)=
so looking at h(n), n3/n3 = 1. How nice h(n) = 1
so u(n) =
but what is k? log2n
We have T(n) = n3[T(1) + u(n)] so T(n) = n3[T(1) + log2n]
T(1) = 1 so T(n) = n3[ 1 + log2n] = n3 + n3log2n