The exact time complexity function for any algorithm may very complicated and require too much detail to specify precisely.
Big O notation ignores the difference between multiplicative factors. Letting be the complexity of an algorithm based on the RAM Model of Computation, we have:
notation: means is an upper bound on . Thus, there exists some constant such that for every large enough .
notation: means is an lower bound on . Thus, there exists some constant such that for every large enough .
notation: means is an upper bound on and is a lower bound on . Thus, there exists some constant and such that and for every large enough . This means that provides a nice, tight bound on .
Example
Is ?
iff there exists a constant such that . This holds for because for .
iff there exists a a constant such that . This would be satisfied for .
Together the and bounds imply .
Dominance Relations of Big O classes
Faster growing functions dominate slower growing ones. When two functions and belong to different classes, we say dominates when , written as . For the standard Big O classes, we have: