When asked whether the function f (x) exists in O (g (x)), it really compares the growth rate of these two functions. (see wikipedia: http://en.wikipedia.org/wiki/Big_O_notation )
Constant function multipliers are ignored, so 2x is in O (x). Also, the components of the function with lower growth rates are similarly ignored, so 2x ^ 2 + x + 1 is in O (x ^ 2).
So the question is: does loga n ^ b have a similar growth rate like logb n ^ a?
, :
- log x ^ b = b log x
- loga x = (logb x)/(logb a)
, , O, , , , :
O (logb n ^ a) = O (a logb n), - O-, :
O (logb n).
, :
loga n ^ b = b loga n
, :
loga n ^ b = b (logb n)/(logb a)
:
loga n ^ b = (b/logb a) logb n
, (b/logb a) - , (b/logb a) logb n O (logb n)
, - . loga n ^ b O (logb n ^ a).