Math Core

Module 2.7 · Counting and Probability

Combinatorial identities

Sums of binomial coefficients show up all over the AIME, sometimes in plain sight and sometimes hidden inside a counting or probability problem. The strongest way to handle them is to prove identities by counting one set in two ways: if two expressions count the same thing, they're equal, and you never have to push algebra around.

Double counting

To prove LHS=RHS\text{LHS} = \text{RHS}, find a set of objects and a question about it so that one way of answering gives the left side and another way gives the right side.

For example, ∑k=0n(nk)=2n\displaystyle\sum_{k=0}^{n} \binom{n}{k} = 2^n: both sides count the subsets of an nn-element set. The right side decides "in or out" for each element; the left side sorts subsets by their size kk.

The identities to know

  • Pascal: (nk)=(n−1k)+(n−1k−1)\dbinom{n}{k} = \dbinom{n-1}{k} + \dbinom{n-1}{k-1} (is element nn chosen?).
  • Hockey stick: ∑j=rn(jr)=(n+1r+1)\displaystyle\sum_{j=r}^{n} \binom{j}{r} = \binom{n + 1}{r + 1} (sort by the largest element chosen).
  • Vandermonde: ∑k(mk)(nr−k)=(m+nr)\displaystyle\sum_{k} \binom{m}{k}\binom{n}{r - k} = \binom{m + n}{r} (choose rr people from mm boys and nn girls).
  • Committee with a chair: k(nk)=n(n−1k−1)k\dbinom{n}{k} = n\dbinom{n-1}{k-1}, so ∑kk(nk)=n⋅2n−1\displaystyle\sum_k k\binom{n}{k} = n \cdot 2^{n-1}.
  • Subset of a subset: (nk)(km)=(nm)(n−mk−m)\dbinom{n}{k}\dbinom{k}{m} = \dbinom{n}{m}\dbinom{n - m}{k - m}, so ∑k(nk)(km)=(nm)2n−m\displaystyle\sum_k \binom{n}{k}\binom{k}{m} = \binom{n}{m}2^{n - m}.

Why the hockey stick works

Count the (r+1)(r + 1)-element subsets of {1,2,…,n+1}\{1, 2, \dots, n + 1\}. There are (n+1r+1)\dbinom{n+1}{r+1} of them. Now sort them by their largest element. If the largest element is j+1j + 1, the other rr elements come from {1,…,j}\{1, \dots, j\}, in (jr)\dbinom{j}{r} ways. Adding over j=r,…,nj = r, \dots, n gives the left side.

Why Vandermonde works

Count the ways to choose rr people from a group of mm boys and nn girls: (m+nr)\dbinom{m + n}{r}. Sorting by the number of boys kk gives (mk)(nr−k)\dbinom{m}{k}\dbinom{n}{r - k} for each kk. A common special case uses (nk)=(nn−k)\dbinom{n}{k} = \dbinom{n}{n - k}:

∑k=0n(nk)2=∑k=0n(nk)(nn−k)=(2nn).\sum_{k=0}^{n} \binom{n}{k}^2 = \sum_{k=0}^{n}\binom{n}{k}\binom{n}{n - k} = \binom{2n}{n}.

Common mistake

Vandermonde needs the lower indices to add to a constant. In ∑k(ak)(bk+s)\sum_k \binom{a}{k}\binom{b}{k + s}, first rewrite (ak)=(aa−k)\binom{a}{k} = \binom{a}{a - k}. Now the lower indices add to a+sa + s, and the sum is (a+ba+s)\binom{a + b}{a + s}.

Turning powers of kk into binomials

Sums like ∑k(nk)\sum k \binom{n}{k} or ∑k(k+1)(k+2)\sum k(k+1)(k+2) become easy once the polynomial in kk is written with binomial coefficients:

  • k(nk)=n(n−1k−1)k\dbinom{n}{k} = n\dbinom{n-1}{k-1} and k(k−1)(nk)=n(n−1)(n−2k−2)k(k - 1)\dbinom{n}{k} = n(n - 1)\dbinom{n-2}{k-2}.
  • k(k+1)(k+2)=6(k+23)k(k + 1)(k + 2) = 6\dbinom{k + 2}{3}, which is ready for the hockey stick.
  • 1k+1(nk)=1n+1(n+1k+1)\dfrac{1}{k + 1}\dbinom{n}{k} = \dfrac{1}{n + 1}\dbinom{n + 1}{k + 1}.

Worked example: Hockey stick

Find (33)+(43)+⋯+(103)\dbinom{3}{3} + \dbinom{4}{3} + \dots + \dbinom{10}{3}.

By the hockey stick identity, the sum is (114)=330\dbinom{11}{4} = 330.

Worked example: Vandermonde

Find ∑k=05(5k)(7k)\displaystyle\sum_{k=0}^{5} \binom{5}{k}\binom{7}{k}.

Rewrite (7k)=(77−k)\dbinom{7}{k} = \dbinom{7}{7 - k}. Now the lower indices add to 77, so the sum is (127)=792\dbinom{12}{7} = 792. (Choose 77 of 1212 people, sorting by how many of the first 55 are chosen.)

Worked example: Counting committees with a chair

Find ∑k=08k(8k)\displaystyle\sum_{k=0}^{8} k\binom{8}{k}.

Count pairs (committee, chair) from 88 people. Choosing the committee first gives the sum. Choosing the chair first (88 ways) and then any subset of the other 77 people gives 8⋅27=10248 \cdot 2^7 = 1024.

Worked example: Subsets of subsets

Find ∑k=06(6k)(k2)\displaystyle\sum_{k=0}^{6}\binom{6}{k}\binom{k}{2}.

Count pairs (S,T)(S, T) with T⊆S⊆{1,…,6}T \subseteq S \subseteq \{1, \dots, 6\} and ∣T∣=2|T| = 2. Choosing SS first gives the sum. Choosing TT first ((62)=15\binom{6}{2} = 15 ways), each of the other 44 elements is in SS or not: 24=162^4 = 16. The sum is 15⋅16=24015 \cdot 16 = 240.

Tip

Check any identity on a tiny case. For ∑k(nk)2=(2nn)\sum_k \binom{n}{k}^2 = \binom{2n}{n} with n=2n = 2: 1+4+1=6=(42)1 + 4 + 1 = 6 = \binom{4}{2}. A thirty-second check catches most index errors.

Practice

Practice 1

Find (22)+(32)+(42)+⋯+(122)\dbinom{2}{2} + \dbinom{3}{2} + \dbinom{4}{2} + \dots + \dbinom{12}{2}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Find ∑k=06(6k)2\displaystyle\sum_{k=0}^{6} \binom{6}{k}^2.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find the remainder when ∑k=09k(9k)\displaystyle\sum_{k=0}^{9} k\binom{9}{k} is divided by 10001000.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Find ∑k=04(4k)(6k+1)\displaystyle\sum_{k=0}^{4} \binom{4}{k}\binom{6}{k+1}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

The sum ∑k=061k+1(6k)\displaystyle\sum_{k=0}^{6} \frac{1}{k+1}\binom{6}{k} equals mn\dfrac{m}{n} in lowest terms. Find m+nm + n.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find ∑k=06k2(6k)\displaystyle\sum_{k=0}^{6} k^2\binom{6}{k}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Find the remainder when 1⋅2⋅3+2⋅3⋅4+3⋅4⋅5+⋯+12⋅13⋅141 \cdot 2 \cdot 3 + 2 \cdot 3 \cdot 4 + 3 \cdot 4 \cdot 5 + \dots + 12 \cdot 13 \cdot 14 is divided by 10001000.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Find the remainder when ∑k=412(12k)(k4)\displaystyle\sum_{k=4}^{12}\binom{12}{k}\binom{k}{4} is divided by 10001000.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice