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

Click For Summary
SUMMARY

The discussion confirms that n log n is Big-Oh of log(n!) by demonstrating that n log n ≤ C log(n!) for a constant C. The proof utilizes specific values, such as C = 2 and k = 1, to establish the relationship. Additionally, Stirling's approximation is introduced, showing that log(n) is asymptotically equivalent to n log(n) - n, reinforcing the conclusion that n log n is indeed in O(log(n!)).

PREREQUISITES
  • Understanding of Big-Oh notation
  • Familiarity with logarithmic functions
  • Knowledge of Stirling's approximation
  • Basic algebraic manipulation skills
NEXT STEPS
  • Study the formal definition of Big-Oh notation
  • Learn about Stirling's approximation in detail
  • Explore the properties of logarithmic functions
  • Investigate other asymptotic notations like Big-Theta and Big-Omega
USEFUL FOR

Mathematicians, computer scientists, and students studying algorithm analysis or complexity theory will benefit from this discussion.

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
  • Like
Likes   Reactions: Pepper Mint
Hi,
You can use Stirling's approximation as follows:
log(n)≅nlog(n)-n ∈O(nlog(n)) .
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
7
Views
2K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K