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
 Spring '08
 FurmanHaddix

Click to edit the document details