1: Progressive notation
We mainly use progressive notation to describe the running time of the algorithm.
Θ notation: if θ (g (n)) is a progressive compact boundary of a function
O notation: If O (g (n)) is a progressive tight upper bound of a function
O notation: If O (g (n)) is a progressive tight upper bound of a function
Omega notation: If ω(g (n)) is a progressive tight bound of the function
W Mark: If W (g (n)) is a progressive tight bound of a function
Progressive Function Properties:
Transitivity:
F (n) =Ω(g (n)) and g (n) =θ (h (n)) implies f (n) =θ (h (n ))
F (N) =o (g (n)) and g (n) =o (h (n)) containing f (n) =o (h (n))
f (n) =ω (g (n)) and g (n) =ω (H (n)) implies F (n) =ω (H (n))
f (n) = o (g (n)) and g (n) = o (h (n)) implies F (n = o (h (n))
f (n) = w (g (n)) and g (n) = w (h (n)) implies F (n = w (h (n))
reflexivity:
f (n) =θ (f (n))
f (n) = o (f (n))
f (n) = ω (f (n))
Symmetry:
F (n) =θ (g (n)) if and only if g (n) =θ (f (n ))
Transpose symmetry:
F (N) =o (g (n)) if and only if g (n) =Ω(f (n ))
F (N) =o (g (n)) if and only if G (n) =w (f (n))
An analogy between the progressive comparison of two functions f and G and the comparison of two real A and B comparisons
F (N) =o (g (n)) similar to A<=b
F (N) =o (g (n)) similar to A<b
f (n) = Θ (g (n)) similar to A=b
F (n) =Ω(g (n)) similar to A>=b
f (n) =Ω(g (n)) similar to A>b
three-point sex:For any two functions, A and b the following three cases must be established a<b, a=b, or a>b
However, the progressive function does not hold true: because, it is possible that the value of the function ┗ is swinging back and forth in the middle, instead of taking a unique value
Standard notation and common functions:
Monotonicity, rounding down, rounding up, modulo operations, exponent, logarithm, factorial, multiple functions, multiple logarithm functions
modulo operations : The value of N,a mod n for any integer A and any integer is the remainder of the upper a/n
A mod n = a-n└╁a/n┘
0<=a mod n <n
Special notation for equal remainder: if (a mod n) = (b mod n) a≡b (M od n) and modulo n is equivalent to B
If modulo n is not equivalent to B, then a ≡/b (mod n)
The growth of functions