Factorial estimates
Let us start with a simple question:
There are students in class. Each student is assigned a random number in What is the probability that no two students are assigned the same number?
In other words, pick a random function . What is the probability that is a permutation? We should now know that this is . But what exactly is this number? Does it converge to zero, or is it closer to one? Let us start with a simple lemma.
We work with the square of (and will be taking the square root later). Rewrite , so we have two groups of the products. We pair (from the first group) with (from the second group), with and so on; more generally, we pair with . This implies that
Now we analyze the two directions of the inequality:
- To prove the upper bound, by AM-GM, we have , so this implies that .
- To see the lower bound, notice that for all . (do you see why? maybe try to prove this before reading the footnote 😊)1
Now let us return to the probability . Plugging in the above estimates,
Using Lemma 13, we have that , so . This simple estimate implies that the probability term converges to zero at exponential rate. Notice that we still have a very large gap between the lower and the upper bounds. Let us try to get a better estimate.
Notice that the ratio between the upper and lower bounds is exactly (which is a very low order term compared to ). Therefore, this bound is considered relatively tight and the proof is quite elementary. Now, using this theorem, the probability becomes already nicely estimated:
Prove the upper bound side of Theorem 28. Use induction on .
The Stirling formula is a very tight estimate of factorials (recall the meaning of asymptotic equality, that when is large, the two sides of the equation are practically the same). For instance, when , the error of this estimate is already less than percent.
Footnotes
-
A simple argument: When or , this is obvious. Otherwise, when , this is a product between two numbers. The smaller number is always at least and the bigger number is at least . ↩