This preview shows pages 1–5. 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: Harvard CS 121 and CSCI E207 Lecture 19: Polynomial Time Harry Lewis November 17, 2009 Harvard CS 121 & CSCI E207 November 17, 2009 More Relations Def: We say that g = o ( f ) iff for every > , n such that g ( n ) f ( n ) for all n n . Equivalently, lim n g ( n ) /f ( n ) = 0 . g grows more slowly than f . Also write f = ( g ) . Def: We say that f = ( g ) iff f = O ( g ) and g = O ( f ) . g grows at the same rate as f An equivalence relation between functions. The equivalence classes are called growth rates . Because of linear speed up, TIME ( t ) is really the union of all growth rate classes 4 ( t ) . 1 Harvard CS 121 & CSCI E207 November 17, 2009 More Examples Polynomials (of degree d ): f ( n ) = a d n d + a d 1 n d 1 + + a 1 n + a , where a d > . f ( n ) = O ( n c ) for c d . f ( n ) = ( n d ) If f is a polynomial, then lower order terms dont matter to the growth rate of f f ( n ) = o ( n c ) for c > d . f ( n ) = n O (1) . 2 Harvard CS 121 & CSCI E207 November 17, 2009 More Examples Exponential Functions: g ( n ) = 2 n (1) ....
View
Full
Document
 Fall '09

Click to edit the document details