Abstract & Overview
Proof. Consider an alphabet consisting of r ordinary letters and one special letter, say ∗. We count the number of possible codewords of length n in two ways. First, since there are a total of 1 + r symbols available and there are n slots to fill, the Multiplication Principle shows that the number of codewords is (1 + r)n. On the other hand, we can partition the codewords according to the number of non-∗’s that appear. Let this number be k, so that 0 ≤ k ≤ n. Constructing a codeword with k non-∗’s consists of selecting n − k of the n slots for the ∗’s, and then selecting a codeword of length k containing no ∗’s. The Multiplication Rule says that the number of ways of constructing such codewords is the product of the number of ways of making each of the two selections. The first selection is made in ( n n−k ) = (nk) ways. The second, using the Multiplication Rule again, is made in r k ways. Summing on k from k = 0 to k = r by the Sum Rule completes the calculation of the number of codewords of length n. Since both sides of the Binomial Theorem count the same quantity, we therefore have equality and have proved the theorem.