This digest is part of the article linked below: http://blog.csdn.net/xiazdong/article/details/8491622
For a relatively simple algorithm, we can sometimes accurately analyze the complexity of the algorithm, such as the complexity of the algorithm is 5n^2+10n+6, but in fact, it is not necessary, because when n is large enough, you can ignore the lower order and the highest degree of the coefficients, so the "asymptotic complexity", and the " Asymptotic notation "to denote" asymptotic complexity ".
The asymptotic notation includes:
(1) Θ (theta): Tight bound. Equivalent to "="
(2) O (Greater Europe): upper bound. Equivalent to "<="
(3) O (Small Europe): the upper bound of the non-tight. Equivalent to "<"
(4) Ω (large Omega): Nether. Equivalent to ">="
(5) Ω (small Omega): the lower bound is not tight. Equivalent to ">"
Give the definition of these tokens:
Note for the definition: (1) The premise of these definitions is that f (n) and g (n) are asymptotically nonnegative, and asymptotic nonnegative means "when n tends to infinity, f (n) and g (n) are non-negative". (2) For definitions 4th and 5th, it is important to note that for any c.
The relationship of these 5 symbols is represented by a set theory:
As can be seen from the above figure: (1) if f (n) =θ (g (n)), then f (n) = O (g (n)) and f (n) =ω (g (n)). (2) if f (n) = O (g (n)), then f (n) = O (g (n)). (3) if f (n) =ω (g (n)), then f (n) =ω (g (n)). (4) if f (n) = O (g (n)), either f (n) = O (g (n)) or F (n) =θ (g (n)). (5) if f (n) =ω (g (n)), then either f (N) =ω (g (n)), or F (n) =θ (g (n)).