lg(n!)=Θ(nlgn)求解Big-theta

时间:2014-10-26 10:36:39

标签: big-theta

显示lg(n!)=Θ(nlgn)如何证明它?我使用限制来确定顺序,但我坚持在某一点lim n到+ inf lg(n ^ n)/ lg(n!)

1 个答案:

答案 0 :(得分:0)

log(n!) = log(n) + log(n-1) + log(n-2) + .... + log(2)
Which can be directly seen as 
log(n!) < n*log(n)
log(n!) < c1*n*log(n)
log(n!) > c2*n*log(n)
for n > n0
We have some value of c1 and c2 such that
c1*n*log(n) <= log(n!) <= c2*n*log(n)

Sum ( i =1 to n) i > (n/2)log(n/2) = (n/2)log(n) - (n/2)log(2)

hence we can say that
log(n!) = Big-Theta(nlog(n))