Docsity

Master Theorem Worksheet, Slides of Algorithms and Programming

Toggle sidebar
bg1
Massachusetts Institute of Technology Handout 9
6.046J/18.410J: Introduction to Algorithms February 15, 2002
Professors Michel Goemans and Piotr Indyk
Master Theorem Worksheet
This is a worksheet to help you master solving recurrence relations using the Master Theorem.
For each recurrence, either give the asympotic solution using the Master Theorem (state
which case), or else state that the Master Theorem doesn’t apply. You should be able to go
through these 25 recurrences in 10 minutes.
Problem 1-1. T(n) = 3T(n/2) + n2
Problem 1-2. T(n) = 7T(n/2) + n2
Problem 1-3. T(n) = 4T(n/2) + n2
Problem 1-4. T(n) = 3T(n/4) + nlg n
Problem 1-5. T(n) = 4T(n/2) + lg n
Problem 1-6. T(n) = T(n−1) + n
pf3
pf4

Partial preview of the text

Download Master Theorem Worksheet and more Slides Algorithms and Programming in PDF only on Docsity!

Massachusetts Institute of Technology Handout 9 6.046J/18.410J: Introduction to Algorithms February 15, 2002 Professors Michel Goemans and Piotr Indyk

Master Theorem Worksheet

This is a worksheet to help you master solving recurrence relations using the Master Theorem. For each recurrence, either give the asympotic solution using the Master Theorem (state which case), or else state that the Master Theorem doesn’t apply. You should be able to go through these 25 recurrences in 10 minutes.

Problem 1-1. T (n) = 3T (n/2) + n^2

Problem 1-2. T (n) = 7T (n/2) + n^2

Problem 1-3. T (n) = 4T (n/2) + n^2

Problem 1-4. T (n) = 3T (n/4) + n lg n

Problem 1-5. T (n) = 4T (n/2) + lg n

Problem 1-6. T (n) = T (n − 1) + n

Problem 1-7. T (n) = 4T (n/2) + n^2 lg n

Problem 1-8. T (n) = 5T (n/2) + n^2 lg n

Problem 1-9. T (n) = 3T (n/3) + n/ lg n

Problem 1-10. T (n) = 2T (n/4) + c

Problem 1-11. T (n) = T (n/4) + lg n

Problem 1-12. T (n) = T (n/2) + T (n/4) + n^2

Problem 1-13. T (n) = 2T (n/4) + lg n

Problem 1-14. T (n) = 3T (n/3) + n lg n

Problem 1-23. T (n) = 7T (n/3) + n^2

Problem 1-24. T (n) = 8T (n/3) + 2n

Problem 1-25. T (n) = 16T (n/4) + n