Binomial coefficients

Today I’m going to talk about something pretty nifty called binomial coefficients. It may not be immediately apparent to you why they’re so nifty, but take my word for it: they show up all over the place in mathematics! [And yes, if you’re wondering, we’re still on our way towards a formula for tetrahedral numbers. It will become apparent what binomial coefficients have to do with it later.]

In general, a binomial coefficient looks like this: \binom{n}{k}. You pronounce that as “n choose k“, since the simplest way to understand this binomial coefficient is that it tells you how many ways there are to choose k things out of n possible choices. This is known as the number of combinations. (On many calculators, you enter binomial coefficients using a key or function like nCr — C for Combinations.) This definition is enough to let us figure out what some binomial coefficients are for small values of n and k. For example, if I have three things (say, a guava, a starfruit, and a mango) and tell you to choose one, how many different choices do you have? Obviously, three. So \binom{3}{1} = 3. How about if I have four things (say, an Apple, a Banana, a Cherry, and a Date) and ask you to choose any two — how many ways can you make your choice? If we use the first letter of each fruit as an abbreviation, you have six choices: AB, AC, AD, BC, BD, or CD. (Notice that the order in which you pick the two fruits doesn’t matter: AB is the same as BA.) So, \binom{4}{2} = 6.

When we start getting into bigger numbers, however, this gets cumbersome: how can we be sure that we haven’t missed a possible choice? What if the number of choices is so large that it would take us ten years to count them? What we need is a formula which can tell us the value of \binom{n}{k} directly.

To get there, let’s start with something a bit simpler. Say you have n different fruits (an Apple, a Banana, a Cherry, a Date, a… um… an Egg… uh…). How many ways can you line them up in a row, putting one particular fruit first, one second, and so on? Imagine placing them one by one. For the first fruit, you can choose any one of them, so you have n choices. For the second fruit in the line, you can no longer choose the one that’s first, so you only have (n – 1) choices. Then for the third fruit you have (n – 2) choices, and so on, until for the last fruit you only have one choice, since it’s the only one left. In total, then, you have n \cdot (n-1) \cdot (n-2) \cdots 2 \cdot 1 = n! ways of putting your fruits in order. (The exclamation point represents the factorial function.) So, for example, if you have only three fruits, you have 3 \cdot 2 \cdot 1 = 3! = 6 ways of putting them in order: ABC, ACB, BAC, BCA, CAB, CBA. For four fruits, there are 4 \cdot 3 \cdot 2 \cdot 1 = 4! = 24 ways of putting them in order. I won’t bother writing them all out here, but feel free to verify this for yourself. It should be obvious that this argument extends to non-fruit objects as well. =)

Now for another, related question: suppose you take your n fruits, and you want to line them up as before, but you only want to make a line of k fruits out of the total n? Again, you have n choices for the first fruit, (n – 1) choices for the second, and so on, except this time you stop after the kth fruit, for which there will be (nk + 1) choices — so the total number of ways to do this is n \cdot (n-1) \cdot (n-2) \cdots (n-k+1). Notice we can write this as \frac{n!}{(n-k)!}:

\begin{array}{rcl} \frac{n!}{(n-k)!} & = & \frac{n \cdots (n-k+1) \cdot (n-k) \cdots 1}{(n-k) \cdots 1} \\ & = & n \cdots (n-k+1). \end{array}

For example, 6 \cdot 5 \cdot 4 = \frac{6!}{3!} = \frac{6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{3 \cdot 2 \cdot 1}. What we’re doing here is counting permutations; often on calculators you will see this function called nPr.

We’re almost there. We now have a way of counting the number of ways to choose k things out of a total of n, when we consider each possible order of the k things to be different. But really what we want is a way to count the number of ways to choose k things out of n when the order doesn’t matter. Starting with what we have (counting each order separately), it’s clear that we’re counting each possible group of k things multiple times, one for each possible order. Well, how many ways are there to put k things in order? You got it, k!. So we’re counting each group of k things k! times when we really only want to count it once. Well, that’s easy to fix: just divide everything by k!. Here, finally, is our formula for finding a binomial coefficient:

\displaystyle \binom{n}{k} = \frac{n!}{k! \cdot (n-k)!}

Let’s check to make sure this formula squares with the small examples we did before. \binom{3}{1} = \frac{3!}{1! \cdot 2!} = \frac{3 \cdot 2 \cdot 1}{1 \cdot 2 \cdot 1} = 3, check! \binom{4}{2} = \frac{4!}{2! \cdot 2!} = \frac{4 \cdot 3 \cdot 2 \cdot 1}{2 \cdot 2} = 2 \cdot 3 = 6, check!

Hmm… I wonder how many ways there are to choose 4 things out of 10 possibilities? Let’s see: \binom{10}{4} = \frac{10!}{4! \cdot 6!} = \frac{10 \cdot 9 \cdot 8 \cdot 7}{4 \cdot 3 \cdot 2 \cdot 1} = 10 \cdot 3 \cdot 7 = 210. Now you know. I sure wouldn’t have wanted to count all those possibilities by hand!

Now hold onto your hats — now that we know the basics, next time I’ll show you something truly amazing about binomial coefficients!

About these ads
This entry was posted in computation, counting, famous numbers. Bookmark the permalink.

6 Responses to Binomial coefficients

  1. That is pretty nifty. Too bad about the line justification. BTW, an eggplant counts as a fruit.

  2. Brent says:

    By ‘line justification’ do you mean the couple lines that only have four words stretched across the whole line? Or do you mean the fact that much of the math is incorrectly aligned with the baseline of the surrounding text? Not much I can do about the former, unfortunately, but as for the latter there’s actually a newer version of the math-rendering plugin which correctly handles baseline alignment, but I haven’t had a chance to upgrade it yet.

    Hmm, I guess an eggplant does count as a fruit. =)

  3. Steve Gilberg says:

    I’d meant the former.

  4. Pingback: Triangular number formula (Challenge #8) | The Math Less Traveled

  5. Pingback: Distributing cookies: solutions | The Math Less Traveled

Comments are closed.