Oh, Omega, Theta Flashcards
When describing the asymptotic efficiency, what are we actually talking about?
The “growth of functions”
Why are we focusing on the asymptotic time?
To abstract away low-order terms and constant factors.
What does Oh, Omega and Theta asymptotically correspond to?
- Oh - Less or equal
- Omega - More or equal
- Theta - Equal
Give the bounding properties of Oh, Omega and Theta.
- Oh - asymptotic upper bound
- Omega - asymptotic lower bound
- Theta - asymptotic tight bound
What is the bounding property of Oh?
Upper bound
What is the bounding property of Omega?
Lower bound
What is the bounding property of Theta?
Tight bound
With O(n^2), are these functions asymptotically upper bounded by n^2?
- 2n^2
- n^2 + n
- n^2.00001
- n^2 + 1000n
- n
- n^2 . lg(n)
- n/1000
- n^1.999999
- n^2 / lg(n)
- Yes
- Yes
- No
- Yes
- Yes
- No
- Yes
- Yes
- Yes
With Omega(n^2), are these functions asymptotically lower-bounded by n^2?
- n^1.99999
- 1/2 n^2
- n^2 / lg(n)
- n^2 + n
5 n^2 - n - n^3
- 2^2^n
- n^2 . lg(n)
- No
- Yes
- No
- Yes
- Yes
- Yes
- Yes
- Yes
What is the overall worst-case of Insertion Sort?
O(n^2) (also, Theta(n^2))
Roughly, what are the four categories growth rates typically fall into?
- Constant
- Logarithmic
- Polynomial
- Exponential