Skip to main content
Logo image

Applied Combinatorics

Section 3.4 Binomial Coefficients Revisited

The binomial coefficient \(\binom{n}{k}\) was originally defined in terms of the factorial notation, and with our recursive definitions of the factorial notation, we also have a complete and legally-correct definition of binomial coefficients. The following recursive formula provides an efficient computational scheme.
Let \(n\) and \(k\) be integers with \(0\le k\le n\text{.}\) If \(k=0\) or \(k=n\text{,}\) set \(\binom{n}{k}=1\text{.}\) If \(0\lt k\lt n\text{,}\) set
\begin{equation*} \binom{n}{k}=\binom{n-1}{k-1}+\binom{n-1}{k}. \end{equation*}
This recursion has a natural combinatorial interpretation. Both sides count the number of \(k\)-element subsets of \(\{1,2,\dots,n\}\text{,}\) with the right-hand side first grouping them into those which contain the element \(n\) and then those which don’t. The traditional form of displaying this recursion is shown in Figure 3.2. This pattern is called “Pascal’s triangle.” Other than the \(1\)s at the ends of each row, an entry of the triangle is determined by adding the entry to the left and the entry to the right in the row above.
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
Figure 3.2. Pascal’s Triangle
Xing was intrigued by the fact that he now had two fundamentally different ways to calculate binomial coefficients. One way is to write \(\binom{n}{m}=P(n,m)/(n-m)!\) and just carry out the specified arithmetic. The second way is to use the recursion of Pascal’s triangle, so that you are just performing additions. So he experimented by writing a computer program to calculate binomial coefficients, using a library that treats big integers as strings. Which of the two ways do you think proved to be faster when \(n\) say was between \(1800\) and \(2000\) and \(m\) was around \(800\text{?}\)