Asymptotics
We need to measure the behavior of a function as grows larger. Here is where asymptotic notation comes to the rescue.
We have already seen a simple asymptotic equivalence example in the previous section to show that and are asymptotically equivalent, denoted as . The limit of their quotient goes to , and that's how we determined it.
If a function is asymptotically smaller than a function , then is equal to the little oh of :
That means, the limit of their quotient should go to as approaches infinity:
For example, is asymptotically smaller than .
Simplifying , we get .
And, as approaches infinity, the whole thing approaches :
Given that and are nonnegative numbers,
Let's see.
because of the given definitions: they are nonnegative and .
Therefore, as approaches infinity, will approach . That means, is little oh of .
The star of this show is the big oh notation, which is used to measure the upper bound on the growth of a function. In other words, it is to measure the worst-case scenario. If a function is big oh of a function , that is, , it means that the limit of their quotient as approaches infinity is finite. Let and be positive, if exists*, then:
An example is that :
is definitely less than infinity, it is indeed true that .
The definition generally used is with limit superior:
Also, note that with big oh, constant factors don't really matter.
*Definition taken from Criterion 2 (Finite limit of ratio implies Big Oh).
When two functions and have the same order of growth, we can use theta: .
It means that, and .
It's an equivalence relation.
One thing to keep in mind with big oh is that it defines a relation between the growth rates of two functions, not a quantity.
That's why writing it like is risky.
Let's look at an example.
Obviously, , and usually with symmetry, we are supposed to be able to write it as as well.
But, also has the same upper bound, that is, .
Now, we just wrote that , by that reasoning, it must also be that . But, that is certainly false!
So, we can't say something like "a function is at least ", because is not a quantity, it is a relation.