'Asymptotic complexity between 2 functions

Hello this is my first question here, It's about the running time.

We have 2 functions:

f(n) = n!

g(n) = log(n)^(n+1)

I'm having trouble understanding the relation between them

Is f(n) = θ(g(n))?

Thanks!



Solution 1:[1]

Frist, you can take a log from both functions, like the following:

log(f(n)) = log(n!) = Theta(n log(n))
log(g(n)) = log(log(n)^(n+1)) = (n+1) log(log(n))

Hence, log(g(n)) is in o(log(f(n))) (little-oh). Therefore, we can say e^(log(g(n))) = g(n) is in o(e^(log(f(n))) = o(f(n)).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OmG