P - Harvard CS 121 and CSCI E-207 Lecture 19: Polynomial...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Harvard CS 121 and CSCI E-207 Lecture 19: Polynomial Time Harry Lewis November 17, 2009 Harvard CS 121 & CSCI E-207 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 E-207 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 E-207 November 17, 2009 More Examples Exponential Functions: g ( n ) = 2 n (1) ....
View Full Document

Page1 / 14

P - Harvard CS 121 and CSCI E-207 Lecture 19: Polynomial...

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

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