Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
prove that 2^n is O(n!)?
I am confused about proving something is true...can someone explain to me how you would prove this true. I know that n! = n(n-1)(n-2)...(1)(2).
2 Answers
- 1 decade agoFavorite Answer
We say that f(x) is O(g(x)) iff there exist M and N such that
|f(x)| ≤ M|g(x)| for all x > N
So we want to show that there exist some M and N such that
2^n ≤ M n! for all n > N
I claim that M = 1, N = 3 works, and I will prove this by induction.
Note that 4! = 24 > 16 = 2^4, so it is true for n = 4.
Now suppose that for some n > 3, we have
n! > 2^n
Then (n + 1)! = (n + 1) n! > (n + 1) * 2^n (since n + 1 is positive)
Now n + 1 > 2 since n > 3, so (n + 1) * 2^n > 2 * 2^n = 2^[n + 1]
Hence if n! > 2^n for some n > 3, then (n + 1)! > 2^[n + 1] and hence, since 4! > 2^4, by the principle of mathematical induction, n! > 2^n for all n > 3.
So we have
2^n < n! for all n > 3, and hence 2^n is O(n!)