handout7

handout7 - | f ( x ) | C | g ( x ) | whenever x...

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

View Full Document Right Arrow Icon
ECS20 Handout 7 January 20, 2011 The Growth of Functions 1. Big- O notation Let f ( x ) and g ( x ) be functions from the set of integers or the set of real numbers to the set of real numbers. We write f ( x ) = O ( g ( x )) and read as “ f ( x ) is big- O of g ( x )”, if there are constants C and k such that | f ( x ) | ≤ C | g ( x ) | whenever x > k. Note: C and k are not unique! 2. Theorem: Let f ( x ) = a n x n + a n - 1 x n - 1 + ··· + a 1 x + a 0 , where a n , . . . , a 0 are real numbers. Then f ( x ) = O ( x n ). Proof: If x > 1 | f ( x ) | ≤ | a n | x n + | a n - 1 | x n - 1 + ··· + | a 1 | x + | a 0 | ( | a n | + | a n - 1 | + ··· + | a 1 | + | a 0 | ) x n Cx n 3. Examples: show that f ( x ) = x 2 + 2 x + 1 = O ( x 2 ) 1 + 2 + 3 + ··· + n is O ( n 2 ). f ( n ) = n ! = O ( n n ) g ( n ) = log n ! = O ( n log n ). 4. Theorem: If f 1 ( x ) = O ( g 1 ( x )) and f 2 ( x ) = O ( g 2 ( x )), then ( f 1 + f 2 )( x ) = O (max( | g 1 ( x ) | , | g 2 ( x ) | )). ( f 1 f 2 )( x ) = O ( g 1 ( x ) g 2 ( x )). 5. Example: give a big O -notation estimate for f ( n ) = 3 n log( n !) + ( n 2 + 3) log n 6. Big- Ω notation Let f and g be functions from the set of integers or the set of real numbers to the set of real numbers. We write f ( x ) = Ω( g ( x )) and read as “ f ( x ) is big-Omega of g ( x )”, if there are constants C and k such that
Background image of page 1

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

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

Unformatted text preview: | f ( x ) | C | g ( x ) | whenever x > k. e.g.: Since 8 x 3 + 5 x 2 + 6 8 x 3 for all x 0. Therefore, 8 x 3 + 5 x 2 + 6 = ( x 3 ). 1 7. Big- notation Let f and g be functions from the set of integers or the set of real numbers to the set of real numbers. f ( x ) = ( g ( x )) if f ( x ) = O ( g ( x )) and f ( x ) = ( g ( x )) . It is read as f ( x ) is big-Theta of g ( x ), or f ( x ) is of order g ( x ). e.g. 1 + 2 + + n is of order n 2 , i.e., 1 + 2 + + n = ( n 2 ) . 8. Theorem: Let f ( x ) = a n x n + a n-1 x n-1 + + a 1 x + a , where a n , . . . , a are real numbers and a n n = 0. Then f ( x ) is of order x n , i.e. f ( x ) = ( x n ). 2...
View Full Document

This note was uploaded on 05/31/2011 for the course ECS 20 taught by Professor Staff during the Winter '08 term at UC Davis.

Page1 / 2

handout7 - | f ( x ) | C | g ( x ) | whenever x...

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

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