Objective
When learning computer algorithms, knowing the time complexity of inserting sorting is O (N2), what does the O notation mean? This paper mainly introduces several algorithms used in the analysis of the notation.
Big O Mark
Definition: O (g (n)) = {f (n): There are normal numbers C and n0, so that for all n >= n0, there are 0 <= f (n) <= CG (N)}. The large O notation gives the progressive upper bounds of the function.
, it can be represented as f (n) = O (n2). Prove:
To make the 0 <= f (n) <= CG (N)
The presence of C = 9/2, N0 = 1, makes 0 <= f (n) <= CG (n) for all n >= n0.
O (g (n) and subsequent tokens represent the set, while f (n) = O (n2) is the actual meaning of f (n) ∈o (n2).
Assuming there is,
then g (n) = O (N2), f (n) = O (n2)
Big Omega Mark
Definition: Ω (g (n)) = {f (n): There are normal numbers C and n0, so that for all n >= n0, there are 0 <= CG (n) <= f (N)}. The large Ω notation gives the progressive lower bounds of the function.
Assuming there is,
then g (n) =ω (n), f (n) =ω (n)
Big Theta Sign
Definition: Θ (g (n)) = {f (n): There are normal numbers C1 and C2 and N0, so that for all n >= n0, there are 0 <= c1g (n) <= f (n) <= c2g (N)}. The large θ notation gives the progressive certainty of the function.
Assuming there is,
then g (n) =θ (n), f (n) =θ (n2)
Small o mark
Definition: O (g (n)) = {f (n): for any normal number C, there is a n0, so that for all n >= n0, there are 0 <= f (n) <= CG (N)}. The small O notation gives the upper bounds of the non-progressive tightening of the function.
Assuming there is,
then g (n) = O (N2), f (n) O (n2)
Small Mark
Definition: (g (n)) = {f (n): for any normal number C, there is a n0, so that for all n >= n0, there are 0 <= CG (n) <= f (N)}. A small mark gives the lower bound of a function's non-progressive compact.
Assuming there is,
then g (n) (n), f (n) = (n)
Summarize
Not all functions can be progressively compared, if the limit value does not exist (not equal to 0, constant and infinity). Like what
The limit does not exist and is not equal to infinity.
Transferred from: http://www.cnblogs.com/zabery/archive/2011/07/19/2110994.html
Progressive notation in the algorithm