Solve the recurrence relation : T(n) = T(n/2) + n3, T(1)=1.
1.Draw the first three levels of the recurrence tree.
2.Solve the recurrence to find a formula and find the Big(Oh) complexity.
Expert Answer
1. The following is the recurrence tree for the given recurrence relation.
2. Let us calculate the level at which the leaf of the tree lies.
At the leaf level we have
n = 2i where i is the leaf level
=> i = log2(n)
Therefore there are log2(n) + 1 levels in this tree starting from the 0th level to the log2(n)-th level.
, which is in a geometric progression with common ratio
since there are a total of terms in the GP
Therefore by ignoring the constant terms and coefficients, the Big(oh) notation we have