I am trying to show the following:
Prove, using Stirling's approximiation, that (log(logn))! is O(nk) for some positive constant k. Stirling's approximation is
n!=√2πn(ne)n(1+Θ(1n)).
By the given formula,
(log(logn))!=√2πlog(logn)(log(logn)e)log(logn)(1+Θ(1log(logn))).
I can show that √2πlog(logn) is O(n1/2) and that 1+Θ(1log(logn)) is O(1), but I am having trouble showing that (log(logn)e)log(logn) is O(nk).
I can take the logarithm of this term and get ≈(log(logn))(log(log(logn))), but I am not sure where to go from here.
Answer
It's easier if you redefine t=loglogn, then RHS becomes eekt. Now apply Stirling's approximation to the LHS and take logarithm. You'll see that lhs is tlogt−t+O(logt), which is of course O(ekt).
No comments:
Post a Comment