Big-Theta provides an asymptotic bound for a given growth function using a combination of Big-O Notation and Big-Omega Notation.
Formal Definition
Big-Theta Notation
Note
- = Growth Function
- = Big-O Notation for
- = Big-Omega Notation for
- = Initial n value for which is bounded by both and
- = Scaling constant for
Keep in note that there must be the same value of for both ceiling and growth functions.
Common Big-O Functions
(and where they are found)
Time Complexity | Found In |
---|---|
Running time independent of input. | |
Typical for “divide and conquer” solutions, for example, lookup in a balanced search tree. | |
Linear. When each input element must be processed once. | |
Each input element processed once and processing involves other elements too, for example, sorting. | |
Quadratic, cubic. Processing all pairs (triples) of elements. | |
Exponential. Processing all subsets of elements. |