How many -element subsets of an -element set are there? This question arises all the time in various guises:
- In how many ways can I select 5 books from my collection of 100 to bring on vacation?
- How many different 13-card bridge hands can be dealt from a 52-card deck?
- In how many ways can I select 5 toppings for my pizza if there are 14 available toppings?
This number comes up so often that there is a special notation for it:
The expression is read " choose ." Now we can immediately express the answers to all three questions above:
I can select 5 books from 100 in ways.
There are different bridge hands.
There are different 5-topping pizzas, if 14 toppings are available.
The Subset Rule
We can derive a simple formula for the choose number using the Division Rule. We do this by mapping any permutation of an -element set into a -element subset simply by taking the first k elements of the permutation. That is, the permutation will map to the set .
Notice that any other permutation with the same first elements in any order and the same remaining elements elements in any order will also map to this set. What’s more, a permutation can only map to if its first elements are the elements in some order. Since there are possible permutations of the first elements and permutations of the remaining elements, we conclude from the Product Rule that exactly permutations of the -element set map to the particular subset, . In other words, the mapping from permutations to -element subsets is -to-1.
But we know there are permutations of an -element set, so by the Division Rule, we conclude that
which proves:
Rule 14.5.1 (Subset Rule). The number of -element subsets of an -element set is
Notice that this works even for 0-element subsets: . Here we use the fact that is a product of 0 terms, which by convention2 equals 1.
Bit Sequences
How many -bit sequences contain exactly ones? We’ve already seen the straightforward bijection between subsets of an n-element set and -bit sequences. For example, here is a 3-element subset of and the associated 8-bit sequence:
Notice that this sequence has exactly 3 ones, each corresponding to an element of the 3-element subset. More generally, the -bit sequences corresponding to a -element subset will have exactly ones. So by the Bijection Rule,
Corollary 14.5.2. The number of -bit sequences with exactly ones is .
Also, the bijection between selections of flavored donuts and bit sequences of Lemma 14.1.1 now implies,
Corollary 14.5.3. The number of ways to select donuts when flavors are available is
2We don’t use it here, but a sum of zero terms equals 0.