CS 310 Unit 2a Master Method Recurrences

CS 310 Unit 2a Master Method Recurrences - >0,...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 310 Unit 2a Master Method Recurrences Furman Haddix Ph.D. Assistant Professor Minnesota State University, Mankato
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 310 Unit 2a Master Method Recurrences Objectives Master Method Master Method Examples Text, Chapter 4
Background image of page 2
Master Method – Another Recurrence Tool Works for recurrences of the form: T(n) = a T(n/b) + f(n), where a 1, b > 1, and f(n) is asymptotically positive positive for n n 0 Master Method: 1. If f(n) = O(n log b a- ε ) for some constant ε >0, then T(n) = Θ (n log b a ) 2. If f(n) = Θ (n log b a ), then T(n) = Θ (n log b a lg n) 3. If f(n) = (n log b a+ ε ) for some constant
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the 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 9-1 ) = 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.

Page1 / 4

CS 310 Unit 2a Master Method Recurrences - >0,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online