Analysis 1.6

# Analysis 1.6 - Definition of Big Oh cg(n f(n f(n O(g(n g(n...

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

Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 26 - Definition of “Big Oh” , 00 0 : , ( ) ( ) c n n n f n cg n > ∀ ≥ () fn gn cg n n ( ) ( ( )) f n O g n

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

View Full Document
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 27 - Big-Oh Example Example: the function n 2 is not O ( n ) n 2 cn n c – The above inequality cannot be satisfied since c must be a constant
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 28 - More Big-Oh Examples 7n-2 7n-2 is O(n) need c > 0 and n 0 1 such that 7n-2 c•n for n n 0 this is true for c = 7 and n 0 = 1 3n 3 + 20n 2 + 5 3n 3 + 20n 2 + 5 is O(n 3 ) need c > 0 and n 0 1 such that 3n 3 + 20n 2 + 5 c•n 3 for n n 0 this is true for c = 4 and n 0 = 21 3 log n + 5 3 log n + 5 is O(log n) need c > 0 and n 0 1 such that 3 log n + 5 c•log n for n n 0 this is true for c = 8 and n 0 = 2

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

View Full Document
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 29 - Big-Oh and Growth Rate The big-Oh notation gives an upper bound on the
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

Analysis 1.6 - Definition of Big Oh cg(n f(n f(n O(g(n g(n...

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

View Full Document
Ask a homework question - tutors are online