Binomial coefficients
Now let us modify Benjawan's example a bit. She wants to buy four distinct chocolates for the best performing student in class.1 How many possibilities are there? Notice that now the answer would be different from giving four chocolates to four students: What only matters now is the combination but not the order, so the answer should be much less than . Here the answer is exactly the same as the number of four-element subsets of .
For any finite set , denote by the set of all -element subsets of , e.g., . Define the binomial coefficient as
The following theorem formally proves a basic fact in counting that everyone has used.
For any finite set , the number of -element subset of equals to .
Denote . We use the accounting method. For each , we create a ``bin'' . Let be the total number of bins. We will show that . Each one-to-one mapping can be viewed as an ordered -tuple where all elements are distinct. For each such , we pay a coin into the bin . The total number of coins in the system is . Notice that the number of coins a bin receives is exactly the number of permutations of a -element set, and thus each bin receives exactly coins (e.g., when the bin receives coins from and ), so in total we have which implies that .
The number has led to many interesting, surprising, and beautiful results. For instance, an immediate corollary is the following:
For all non-negative integer , we have that divides the product of consecutive integers.
If the consecutive integers involve zero, the product is always zero, so the claim is trivial. So let us represent the product of consecutive integers as and (without loss of generality) all these numbers are positive. Do you notice something? We need to argue that the ratio is an integer. But this is exactly , which is always an integer 😊
Without using the binomial coefficient, proving the above fact is much more complicated.
Let be a prime and be a natural number. Prove: .
📄️ Partition
Another situation where the binomial coefficient shows up naturally is the following setting. We have $n$ non-negative integer variables $x1,\ldots, xn$. How many possible solutions satisfy
📄️ Binomial theorem
In mathematics (and computer science), we often encounter multiple proofs for the same result. The proofs we have seen so far are classified as "combinatorial" proofs (e.g. relying on counting, bijections, etc). Another famous proof technique is called algebraic proofs which rely on algebraic properties of objects. We will see the first set of examples here (and some more later in these notes).
📄️ Application: Analyzing recursion
Counting can sometimes be used to analyze the running time of recursive algorithms. For instance, look at the following recursion. Let $d$ be some positive integer.
Footnotes
-
This does not sound fair, we know, but aren't we all living in a 🐶-eat-🐶 world? ↩