By Stirling's Approximation $n! = \sqrt{2*\pi*n} * [n/e]^n * e^\alpha$
Therefore $T(n!) = O(n^n)$
$O(n^n) \neq O(2^{n \lg n})$
Is this correct? Is there another way to get this result if it is correct? Thanks.
By Stirling's Approximation $n! = \sqrt{2*\pi*n} * [n/e]^n * e^\alpha$
Therefore $T(n!) = O(n^n)$
$O(n^n) \neq O(2^{n \lg n})$
Is this correct? Is there another way to get this result if it is correct? Thanks.
Remember, big-O is essentially an upper bound so we do have $$ n! = O(n^n) $$ in the sense that there is a constant $c$ for which $n!\le c\;n^n$ eventually. [Note, by the way, that there's no function $T(\cdot)$ involved here.]
Now let's see if $n!=O(2^{n\log n})$. We can argue this way (assuming the log is base-2): $$ 2^{n\log n} = 2^{(\log n) n} = \left(2^{\log n}\right)^n = n^n $$ so we can conclude that the two sets $O(n^n)$ and $O(2^{n\log n})$ are in fact equal.