Midterm Review 1.0

Midterm Review 1.0 - Midterm Review CSE 2011 Prof. J. Elder...

Info iconThis preview shows page 1. Sign up to view the full content.

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

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 N-Log-N n log n Quadratic Cubic log n n2 n3 Exponential 2n In a log-log 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(b-c) b = a logab bc = a c*logab CSE 2011 Prof. J. Elder -4- Last Updated: 1/7/10 10:14 AM Big-Oh 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

Ask a homework question - tutors are online