{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

COT5407-Class04

# COT5407-Class04 - Master Method Some of the slides are from...

This preview shows pages 1–6. Sign up to view the full content.

Master Method Some of the slides are from Prof. Plaisted’s resources at University of North Carolina at Chapel Hill

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

View Full Document
COT5407 The Master Method Based on the Master theorem . “Cookbook” approach for solving recurrences of the form T ( n ) = aT ( n / b ) + f ( n ) a 1, b > 1 are constants. f ( n ) is asymptotically positive. n / b may not be an integer, but we ignore floors and ceilings. Requires memorization of three cases.
COT5407 The Master Theorem Theorem 4.1 Let a 1 and b > 1 be constants, let f ( n ) be a function , and Let T ( n ) be defined on nonnegative integers by the recurrence T ( n ) = aT ( n / b ) + f ( n ) , where we can replace n / b by n / b or n / b . T ( n ) can be bounded asymptotically in three cases: 1. If f ( n ) = O ( n ) for some constant ε > 0, then T ( n ) = Θ ( n ) .

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

View Full Document
COT5407 Recursion tree view Θ(1) f ( n ) f ( n / b ) f ( n / b ) f ( n / b ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) f ( n / b 2 ) a a a a a a a a a a Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) Θ(1) f ( n ) af ( n/b ) Total: - = + Θ = 1 log 0 log ) / ( ) ( ) ( n j j j a b b b n f a n n T
COT5407

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 16

COT5407-Class04 - Master Method Some of the slides are from...

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

View Full Document
Ask a homework question - tutors are online