Question

prove that logn! is O(nlogn) using integration

prove that logn! is O(nlogn) using integration

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Proof : log(n!) ∈ O(nlog(n))

log(n!) = log(1.2.3.4..........(n-1).n)

Using the property log(ab) = log(a) + log(b) we have,

log(n!) = log(1) + log(2) + log(3) + ....log(n-1) + log(n)

Looking at each term individually, we can say that each term is ≤ log(n). So,

log(n!) ≤ log(n) + log(n) + log(n) + ..................................+ log(n)

Since we are adding n number of log(n)'s we get,

log(n!) ≤ nlog(n)

we know that f(n) = O(g(n)) means there are positive constants c and k, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ k. The values of c and k must be fixed for the function f and must not depend on n.

Using this we can say that,

log(n!) ∈ O(nlog(n)) where c = 1

Hence Proved.

Add a comment
Know the answer?
Add Answer to:
prove that logn! is O(nlogn) using integration
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT