This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: >0, and if a f(n/b) cf(n) for some constant c > 1 Master Method Examples 1. T(n) = 9T(n/3) + n a = 9, b = 3, f(n) = n n log b a = n log 3 9 = n 2 Let = 1 f(n) = O(n log b a ) = O(n log 3 91 ) = n T(n) = O(n 2 ) 2. T(n) = T(2n/3) + 1 a = 1, b = 3/2, f(n) = 1 n log b a = n log 3/2 1 = 1 = f(n) T(n) = (n log b a lg n) = (lg n) 1. T(n) = 3T(n/4) + n lg n a = 3, b = 4, f(n) = n lg n n log b a = n log 4 3 2245 (n 0.8 ) Let = 0.2 (n log b a+ ) = (n log 3 .8 + .2 ) = n n lg n = f(n)...
View
Full
Document
This note was uploaded on 06/09/2008 for the course CS 310 taught by Professor Furmanhaddix during the Spring '08 term at Minnesota State University, Mankato.
 Spring '08
 FurmanHaddix

Click to edit the document details