0

I get how to solve recurrence relations for t(n)= t(n-1) etc etc.

But how would you solve the recurrence of t(n) = t(n/2) + log2(n), such that T(1)=0? I don't understand how the log would behave in this situation.

  • you can solve the recurrence either by direct application of master theorem or you could just recurse and find out the summation . The summation will look something like this :

    T(n) = T(n/2^i) + [log n+log(n /2)+⋯+log(n/2^log n)] .

    you just need to find the sum of the series with the log terms to find the upper bound of the recurrence

    – Shubham Singh rawat Oct 18 '16 at 04:24
  • Calculate t (1024), then you can figure it out easily. – gnasher729 Oct 18 '16 at 08:49

0 Answers0