Unformatted text preview: Midterm Review CSE 2011
Prof. J. Elder 1 Last Updated: 1/7/10 10:14 AM Asymptotic Analysis CSE 2011
Prof. J. Elder 2 Last Updated: 1/7/10 10:14 AM Seven Important Functions
Seven functions that often
appear in algorithm analysis:
Constant 1 Logarithmic
Linear n NLogN n log n Quadratic
Cubic log n n2 n3 Exponential 2n In a loglog chart, the slope of
the line corresponds to the
growth rate of the function.
CSE 2011
Prof. J. Elder 3 Last Updated: 1/7/10 10:14 AM Some Math to Review
Summations
Logarithms and Exponents
Existential and universal operators
Proof techniques
Basic probability properties of logarithms:
logb(xy) = logbx + logby
logb (x/y) = logbx  logby
logbxa = alogbx
logba = logxa/logxb • existential and universal
operators properties of exponentials:
a(b+c) = aba c g b Loves(b, g ) abc = (ab)c g b Loves(b, g ) ab /ac = a(bc)
b = a logab
bc = a c*logab CSE 2011
Prof. J. Elder 4 Last Updated: 1/7/10 10:14 AM BigOh Notation
Given functions f(n) and g(n),
we say that f(n) is O(g(n)) if
there are positive constants
c and n0 such that
f(n) 10,000
3n
1,000 2n+10 cg(n) for n n0
2n + 10 n 100 Example: 2n + 10 is O(n)
cn 10 (c 2) n 10
n 10/(c 2) 1 Pick c = 3 and n0 = 10 1 CSE 2011
Prof. J. Elder 5 10 n 100 1,000 Last Updated: 1/7/10 10:14 AM ...
View
Full
Document
This note was uploaded on 02/14/2012 for the course CSE 2011Z taught by Professor Elder during the Fall '11 term at York University.
 Fall '11
 Elder
 Data Structures

Click to edit the document details