Lecture 2. Counting Subsets. Let S be a set with |S| = n. Last time we learned how to count k-permutations in S, that is, ordered subsets of k elements of S. But how about counting the number of k element unordered subsets? That task will be the focus of this Lecture. We begin, though, with a familiar, but related, question: How many subsets does S have? That is, what is the number |P(S)| of elements in the power set P(S) of the n-element set S? As you saw (see page 142 of the text) If |S| = n, then |P(S)| = 2n . Let |S| = n and let 1 ≤ r ≤ n. Then the number of k-element subsets of the n-set S is denoted by the binomial coefficient n . k The reason for the name will be clear a bit later. But for now let’s see how to evaluate it and put it to use. So let T ⊆ S be a k-element subset of S. Then there are P (k, k) = k! permutations of T . But each of the P (n, k) permutations of S is, first, the choice of some k-element set T of S, followed by a permutation of T . So, by the product Rule, the number of k-permutations of S must satisfy: n n n! P (n, k) = P (k, k) = k! and P (n, k) = , k k (n − k)! so solving n n! 1 n! = = . k (n − k)! k! (n − k)!k! is Example 2.1. Recall, first, that 0! = 1. So, if S is an n-set, then the number of empty subsets n n! = 1. = (n − 0)!0! 0 and, of course, we know that this one subset is just ∅. And the number of n-sets of S is n n! = = 1, n (n − n)!n! and, of course, that one n-element subset of S is just S itself. Also, since the power set P(S) is the disjoint union of the k-element subsets of S for k = 0, 1, 2, . . . , n, we have the interesting formula n |P(S)| = 2 = n X n k=0 k . Finally, the above formula for nk fails whenever k < 0 or k > n, but in those cases n = 0 whenever k < 0 or k > n. k Example 2.2. Suppose a group G consists of 24 students, 15 juniors and 9 seniors. We want to form an executive committee consisting of 7 of these students. The number of different ways to create that committee is just the number of 7-element subsets of the 24-element set G, that is, 24 24! = = 346, 104. 7 17!7! (Wow!) On the other hand, if the by-laws require that this committee must have 4 juniors and 3 seniors, then by the Product Rule the number of possible committees is 15 9 · = 1365 × 84 = 114, 660. 4 3 Example 2.3. Before worrying about this example, you should master Example 10 of Section 5.1 on page 187 of the text. This is one of the premier illustrations of this general counting procedure. Okay. With that behind us, let’s play a slightly different game. Suppose now we select 4 cards at random from a standard 52 card bridge deck. We ask, first, how many different hands are possible? Since here order is not an issue, the solution is easy, namely 52 52! 52 · 51 · 50 · 49 = = = 270, 725. 4 48!4! 4·3·2·1 Here are a couple of more specific questions: (a) How many of these 270 thousand some hands consist of 3 cards of one suit and 1 of another? One natural way to attack this problem is first to specify the suits, so say we start by asking for 3 clubs and 1 diamond. Well, there are 13 clubs of which we need 3, and 13 diamonds of which we need 1. So the number of such club-diamond hands is 13 13 = 169. 3 1 And, of course,the same number applies to any pair of suits. But there are 4 suits, so there 4 3 are 1 = 4 ways to choose the dominant suit and then 1 = 3 ways to choose the lesser suit. Then by the Product Rule there are 4 · 3 = 12 ways to choose the two suits, one dominant. Finally, by the Union Rule the total number of such 4 card hands is 4 3 13 13 = 2028. 1 1 3 1 (b) How many of all of these 4 card hands consist of two pair? Again, suppose we begin with a specific case, say a pair of 8’s and a pair of 9’s. The deck holds exactly 4 cards of each denomination, and we want 2 of each. So there are exactly 4 4 = 36, 2 2 pairs of pairs involving just 8’s and 9’s. Finally, there are 13 different denominations, hence 13 2 ways to choose two denominations, so by the Union Rule the number of such 4 card hands is 13 4 4 = 78 × 6 × 6 = 2808. 2 2 2 2 Here are a couple of examples that we will not solve now. Instead we urge you to view these as challenges and take them on. If nesessary, we can discuss them in class. Example 3.4. How many different 8 letter words are there that use exactly 5 a’s and 3 b’s? [Hint: You could think of how many ways you could distribute these letters in a row of 8 blanks.] Example 3.5. Draw 35 cards from a standard 52 card deck. (a) In how many way can you wind up with no aces? (b) In how many way can you wind up with exactly 2 aces? (c) In how many way can you wind up with at least one ace? Example 3.6. This time craw the cards in order — a first, second, third, etc. (a) How many ways can you hit an ace on the first draw? On the second but not the first? (b) In how many ways will you get no aces or kings on the five draws? How many with at least one ace or king? 3