1) 2.3^(n-1) - 1
2) 1/2*(3^(n-1) + 15)
3) 3n.2^(n-1) -1 - 6n + 6.2^(n-1)
4) 1 + (lg n)*6n
Nice one Alba. It was really a while since I last solved all these.
Keep pouring in.
Jaideep


Solve the following recurrences:
When you're done let me know and I'll put up more.Code:1. T(1) = 1 T(n) = 3T(n-1) + 2 for n>= 2 2. T(1) = 8 T(n) = 3T(n-1) -15 for n>= 2 3. T(1) = 5 T(n) = 2T(n-1) + 3n + 1 for n>= 2 4. T(1) = 1 T(n) = 2T(n/2) + 6n - 1 for n = 2^k, k > 0
Have fun !!!!
AlbaLed



for those who forgot how to solve these, here is a nice explanation:
http://fmt.cs.utwente.nl/courses/adc/lec2.pdf (pages 35-45)


Thanks for the link vik. That lecture has lots of useful info
Why not try to solve some of these
Have fun !!!!Code:5. T(1) = 1 T(n) = 3T(n/2) +n^2 - n for n = 2^k, k > 0 6. T(1) = 1 T(n) = T(n) + sqrt(n) + 1 for n = 4^k, k > 0 7. T(0) = 1 T(1) = 6 T(n) = T(n-2) +3n+4 for n >=3 8. T(1) = 1 T(n) = nT(n-1) +n for n >=2
AlbaLed










There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks