Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prove that n! is not in O(n^p) for any constant natural number p

Tags:

math

proof

proofs

How can I prove that n! is not in O(n^p) for any constant natural number p? And is (n k)(n choose k) in O(n^p), for all k?


2 Answers

Stirling's approximation says that

log (n!) = n log n - n + O(log n) = O(n log n)

But

log (n^p) = p log n = O(log n)

for constant p. Clearly n! grows faster than n^p and hence it is not O(n^p).

like image 83
casablanca Avatar answered Dec 07 '25 22:12

casablanca


You can prove that n! is not in O(n^p) for any constant natural number p, by showing that you can always choose n (for a fixed constant p), so that n! > n^p.

(to get an idea, pick a few low values of p and plot n! against n^p)

The reasoning for the second part follows the same lines. Bound (n choose k) and then use first part.

Hint: as Casablanca noted, you can use Stirling's approximation

like image 42
Mitch Wheat Avatar answered Dec 07 '25 20:12

Mitch Wheat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!