0
$\begingroup$

I'm learning about $\log_2$ for an algorithms class and theres a problem in the book that is confusing me.
It asks:

Find a formula for $\log_2(n!)$ using Stirling's approximation for $n!$, for large $n$.

Stirling's approximation for $n!$ is $\sqrt{2\pi n}(\frac{n}{e})^n$

Does anyone have guidance on how to go about creating this formula?

Thanks

  • 0
    See [Stirling Approximation on wiki](http://en.wikipedia.org/wiki/Stirling%27s_approximation)2012-02-03

1 Answers 1

1

$\log{n!} \simeq \log{\sqrt{2\pi n}\left(\frac{n}{e}\right)^n}=\frac{1}{2}+\frac{1}{2}\log\pi n+n\log n -n\log e=$

$\frac{1}{2}(1+\log\pi)-n\log e+\log n \left(\frac{1}{2}+n\right)$

  • 0
    You're right. Edited.2011-11-05