+2 votes
513 views
asked | 513 views

2 Answers

+7 votes
Best answer
I think it is sterling's approximation

$$\ln N! = N \ln N - N + \ln \sqrt{2 \pi n}$$
answered by (227 points)
selected by
+2 votes
n! corresponds to n*(n-1)*(n-2)*....*1 which is $\Theta (n^n)$. So by taking $\log$ to both terms, the answer comes out to be $\Theta(n \log n)$.
answered by (31 points)
It is true for big O. But for $\Theta$ notation can we say $n! = \Theta (n^n)$?
no such constant exists for n^n, whereas for the nlogn I think it is 1/2

0 votes
1 answer
1
0 votes
0 answers
2
0 votes
2 answers
3