Question

Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that...

Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that T(n) is constant for n≤2. Make your bounds as tight as possible, and justify your answer.
*Hint : You can use Master method to obtain Θ(.).

(a) T(n) = 4T(n/4) + 5n
(b) T(n) = 4T(n/5) + 5n
(c) T(n) = 5T(n/4) + 4n
(d) T(n) = 25T(n/5) + n^2
(e) T(n) = 4T(n/5) + lg n
(f) T(n) = 4T(n/5) + lg^5 n sqrt(n)
(g) T(n) = 4T(sqrt(n)) + lg^5 n
(h) T(n) = 4T(sqrt(n)) + lg^2 n
(i) T(n) = T(sqrt(n)) + 5

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Master theorem :

T(n) = aT(n/b) + Θ(nklogbp n ) where a >= 1, b >= 1, k >= 0 and p is any real number

1. If a > bk then T(n) = Θ(nlogab)

2. If a = bk and

a. p > -1 then T(n) = Θ(nlogab logbp+1 n)

b. p = -1 then T(n) = Θ(nlogab logblogb n)

c. p < -1 then T(n) =  Θ(nlogab)

3. If a < bk and

a. p > 0 then T(n) =  Θ(nk logbp n)

b. p <= 0 then T(n) =  Θ(nk)

Add a comment
Know the answer?
Add Answer to:
Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT