Proving n log n is Big-Oh of log(n!)

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
Kartik Yadav
Messages
1
Reaction score
0
Moved from a non-homework section, so missing the template
To prove that n log n is big oh of log(n!), I did:
n log n <= C log(n!)
n log n/ log(n!) <= C

Let k = 1
n > k, so for n = 2
2 log 2 / log 2 <= C
2 <= C
C is an element of [2, infinity)
Taking C = 2 and k = 1
can we say, n log n <= 2 log(n!)
and hence n log n is big oh of log(n!) ?
 
Physics news on Phys.org
Hi,
You can use Stirling's approximation as follows:
log(n)≅nlog(n)-n ∈O(nlog(n)) .