How to compute the time complexity for a recurrence relationship?

97 Views Asked by At

I have to compute the time complexity for this recurrence relationship:


T(n) = \begin{cases} c1, & \mbox{if } n\mbox{ = 1} \\ 8T(n/4) +n +c2, & \mbox{if } n\mbox{ > 1} \end{cases}


Can someone please show me how to do it using substitution method?
I know the final result but I don't know the steps of getting to it.

The result should be: \begin{array}{rcl} O(n^\frac{3}{2} ) \end{array}

Thank you!!

1

There are 1 best solutions below

0
On BEST ANSWER

For simplicity let n be a power of 4 say n = 4^i then substitute this expression in the recurrence relation and use repeated substitution.