Note: You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes from 2003 to 2012. Many mathematical formulas are broken, and there are likely to be other bugs as well. These will most likely not be fixed. You may be able to find more up-to-date versions of some of these notes at http://www.cs.yale.edu/homes/aspnes/#classes.

The binomial coefficient "n choose k", written

counts the number of k-element subsets of an n-element set.

The name arises from the binomial theorem, which says that

For integer n, we can limit ourselves to letting k range from 0 to n. The most general version of the theorem lets k range over all of ℕ, and relies on the binomial coefficient to zero out the extra terms. It holds for any integer n ≥ 0 or (with a suitable definition of binomial coefficients) for any n if |x/y| < 1 (which guarantees that the sum converges).

The connection to counting subsets is straightforward: expanding (x+y)n using the distributive law gives 2n terms, each of which is a unique sequence of n x's and y's. If we think of the x's in each term as labeling a subset of the n positions in the term, the terms that get added together to get xkyn-k correspond one-to-one to subsets of size k. So there are

such terms, accounting for the coefficient on the right-hand side.

# 1. Recursive definition

If we don't like computing factorials, we can also compute binomial coefficients recursively.

Base cases:

• If k = 0, then there is exactly one zero-element set of our n-element set—it's the empty set—and we have

• If k > n, then there are no k-element subsets, and we have

Recursive step: We'll use Pascal's identity, which says that

The proof of this identity is combinatorial, which means that we will construct an explicit bijection between a set counted by the left-hand side and a set counted by the right-hand side. This is often one of the best ways of understanding simple binomial coefficient identities.

On the left-hand side, we are counting all the k-element subsets of an n-element set S. On the right hand side, we are counting two different collections of sets: the (k-1)-element and k-element subsets of an (n-1)-element set. The trick is to recognize that we get an (n-1)-element set S' from our original set by removing one of the elements x. When we do this, we affect the subsets in one of two ways:

1. If the subset doesn't contain x, it doesn't change. So there is a one-to-one correspondence (the identity function) between k-subsets of S that don't contain x and k-subsets of S'. This bijection accounts for the first term on the right-hand side.
2. If the subset does contain x, then we get a (k-1)-element subset of S' when we remove it. Since we can go back the other way by reinserting x, we get a bijection between k-subsets of S that contain x and (k-1)-subsets of S'. This bijection accounts for the second term on the right-hand side.

Adding the two cases together (using the sum rule), we conclude that the identity holds.

Using the base case and Pascal's identity, we can construct Pascal's triangle, a table of values of binomial coefficients:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
...

Each row corresponds to increasing values of n, and each column to increasing values of k, with

in the upper left-hand corner. To compute each entry, we add together the entry directly above it and the entry diagonally to the left.

## 1.1. Pascal's identity: algebraic proof

Using the binomial theorem plus a little bit of algebra, we can prove Pascal's identity without using a combinatorial argument (this is not necessarily an improvement). The additional fact we need is that if we have two equal series

then ai = bi for all i.

Here's the proof:

and now we equate matching coefficients to get

# 2. Vandermonde's identity

Vandermonde's identity says that, provided r does not exceed m or n,

## 2.1. Combinatorial proof

To pick r elements of an m+n element set, we have to pick some of them from the first m elements and some from the second n elements. Suppose we choose k elements from the last n; there are

different ways to do this, and

different ways to choose the remaining r-k from the first m. This gives (by the product rule)

ways to choose r elements from the whole set if we limit ourselves to choosing exactly k from the last n. The identity follow by summing over all possible values of k.

## 2.2. Algebraic proof

Here we use the fact that, for any sequences of coefficients {ai} and {bi},

So now consider

and now equate terms with matching exponents.

Is this more enlightening than the combinatorial version? It depends on what kind of enlightnment you are looking for. In this case the combinatorial and algebraic arguments are counting essentially the same things in the same way, so it's not clear what if any advantage either has over the other. But in many cases it's easier to construct an algebraic argument than a combinatorial one, in the same way that it's easier to do arithmetic using standard grade-school algorithms than by constructing explicit bijections. On the other hand, a combinatorial argument may let you carry other things you know about some structure besides just its size across the bijection, giving you more insight into the things you are counting. The best course is probably to have both techniques in your toolbox.

# 3. Sums of binomial coefficients

What is the sum of all binomial coefficients for a given n? We can show

combinatorially, by observing that adding up all subsets of an n-element set of all sizes is the same as counting all subsets. Alternatively, apply the binomial theorem to (1+1)n.

Here's another sum, with alternating sign. This is useful if you want to know how the even-k binomial coefficients compare to the odd-k binomial coefficients.

Proof: (1-1)n = 0n = 0 when n is nonzero. (When n is zero, the 0n part still works, since 00 = 1 = (0 choose 0)(-1)0.)

By now it should be obvious that

It's not hard to construct more examples of this phenomenon.

# 4. Application: the inclusion-exclusion formula

We've previously seen that |A∪B| = |A| + |B| - |A∩B|. The generalization of this fact from two to many sets is called the inclusion-exclusion formula and says

This rather horrible expression means that to count the elements in the union of n sets A1 through An, we start by adding up all the individual sets |A1| + |A2| + ... |An|, then subtract off the overcount from elements that appear in two sets -|A1 ∩ A2| - |A1 ∩ A3| - ..., then add back the resulting undercount from elements that appear in three sets, and so on.

Why does this work? Consider a single element x that appears in k of the sets. We'll count it as +1 in (k choose 1) individual sets, as -1 in (k choose 2) pairs, +1 in (k choose 3) triples, and so on, adding up to

# 5. Negative binomial coefficients

Though it doesn't make sense to talk about the number of k-subsets of a (-1)-element set, the binomial coefficient (n choose k) has a meaningful value for negative n, which works in the binomial theorem. We'll use the lower-factorial version of the definition:

Note we still demand that k∈ℕ; we are only allowed to do funny things with the upper index n.

So for example:

This means, for example, that

In computing this sum, we had to be careful which of 1 and -z got the n exponent and which got -1-n. If we do it the other way, we get

This turns out to actually be correct: applying the geometric series formula turns the last line into

but it's a lot less useful.

What happens for a larger upper index? One way to think about (-n)k is that we are really computing (n+k-1)k and then negating all the factors (which corresponds to multiplying the whole expression by (-1)k. So this gives us the identity

So, for example,

These facts are useful when we look at GeneratingFunctions.

# 6. Fractional binomial coefficients

Yes, we can do fractional binomial coefficients, too. Exercise: Find the value of

ConcreteMathematics §5.1–5.3 is an excellent source for information about all sorts of facts about binomial coefficients.

2014-06-17 11:57