Ch3: Growth of Functions Flashcards
Asymptotic efficiency of an algorithm
How the running time of the algorithm increases as the size of the input increases without bound
Asymptotic notation actually applies to…
mathematical functions (e.g. f(n) = an^2 + bn + c)
Asymptotic notation usually applies to…
functions that characterize the running times of algorithms
Asymptotic notation can also be applied to…
functions that characterize the space used by an algorithm (or any other function having nothing to do with algorithms!)
A function f(n) belongs to Big-Theta(g(n)) if…
…there exist positive constants c1 and c2 such that it can be sandwiched between c1*g(n) and c2*g(n) for sufficiently large n
This means…?
f(n) is equal to g(n) within a constant factor
If f(n) = Big-Theta(g(n)), g(n) is a…
asymptotically tight bound for f(n)
If f(n) = Big-O(g(n)), g(n) is a…
asymptotic upper bound for f(n)
This means…?
g(n) is an upper bound on f(n) to within a constant factor
Big-Theta implies
Big-O and Big-Omega
When we use Big-O on the worst-case running time, we have…
a bound on the running time of the algorithm on every input
If f(n) = Big-Omega(g(n)), g(n) is a…
asymptotic lower bound for f(n)
When we say the running time of an algorithm is Big-Omega(g(n)), we are…
giving a lower bound on the best-case running time of an algorithm
When asymptotic notation appears in a formula, in general we interpret it as…
standing for some anonymous function we don’t care to name (e.g. 2n^2 + O(n))
Asymptotically tight (definition)
Big-Theta is the definition of an asymptotically tight bound