1 00:00:00,970 --> 00:00:02,790 PROFESSOR: So let's do a basic example 2 00:00:02,790 --> 00:00:06,230 of counting that illustrates the use 3 00:00:06,230 --> 00:00:09,870 of these new generalized rules of the Division 4 00:00:09,870 --> 00:00:12,140 Rule and the Generalized Product Rule. 5 00:00:12,140 --> 00:00:16,040 And let's count some particular kind of poker hands 6 00:00:16,040 --> 00:00:17,590 called a 2-pair. 7 00:00:17,590 --> 00:00:21,980 So poker is a game where each player is dealt five cards 8 00:00:21,980 --> 00:00:25,260 from a deck of 52 cards. 9 00:00:25,260 --> 00:00:27,800 And the definition of a 2-pair hand 10 00:00:27,800 --> 00:00:33,030 is that there are 2 cards of some rank. 11 00:00:33,030 --> 00:00:37,190 The ranks are Ace, Deuce, up through King, 12 00:00:37,190 --> 00:00:41,090 so the ranks are 13 possible ranks. 13 00:00:41,090 --> 00:00:44,120 Ace is 1, 2, 3, up through 10, and then Jack, Queen, King 14 00:00:44,120 --> 00:00:45,910 is 11, 12, 13. 15 00:00:45,910 --> 00:00:48,050 So there are 13 possible ranks. 16 00:00:48,050 --> 00:00:50,450 We're going to choose 2 cards of some rank-- that's 17 00:00:50,450 --> 00:00:51,860 called a pair. 18 00:00:51,860 --> 00:00:55,110 Then we're going to choose 2 cards of a different rank-- 19 00:00:55,110 --> 00:00:56,800 a second rank. 20 00:00:56,800 --> 00:00:59,190 And finally, we're going to choose 21 00:00:59,190 --> 00:01:01,410 a card of still a third rank. 22 00:01:01,410 --> 00:01:05,400 So I get a pair, and another pair, 23 00:01:05,400 --> 00:01:09,220 and another card that does not match the ranks of either 24 00:01:09,220 --> 00:01:10,420 of the first two. 25 00:01:10,420 --> 00:01:12,630 And that is the definition of a hand that, 26 00:01:12,630 --> 00:01:15,960 in poker, is called 2-pair. 27 00:01:15,960 --> 00:01:17,790 Let's take an example. 28 00:01:17,790 --> 00:01:19,620 Here's a typical 2-pair hand. 29 00:01:19,620 --> 00:01:21,130 I've got 2 Kings. 30 00:01:21,130 --> 00:01:22,820 They both have rank 13. 31 00:01:22,820 --> 00:01:26,330 One is a King of Diamonds, the other is a King of Hearts. 32 00:01:26,330 --> 00:01:29,680 There are four of these suits, so-called-- Diamonds, Hearts, 33 00:01:29,680 --> 00:01:32,090 Spades, Clubs. 34 00:01:32,090 --> 00:01:34,547 There are 2 Aces, a pair of Aces. 35 00:01:34,547 --> 00:01:36,880 One is an Ace of Diamonds, the other's an Ace of Spades. 36 00:01:36,880 --> 00:01:40,250 And finally, there hanging loose, this third rank 37 00:01:40,250 --> 00:01:43,905 that doesn't match the Kings or the Aces-- namely a 3 of Clubs. 38 00:01:46,510 --> 00:01:48,370 Now, the way that I'm going to propose 39 00:01:48,370 --> 00:01:50,820 to count the number of 2-pair hands 40 00:01:50,820 --> 00:01:52,110 is to think about it this way. 41 00:01:52,110 --> 00:01:56,790 I'm going to begin by choosing the rank for the first pair, 42 00:01:56,790 --> 00:02:00,970 and there are 13 possible ranks that the first pair might have. 43 00:02:00,970 --> 00:02:03,790 Once I've fixed the rank for the first pair, 44 00:02:03,790 --> 00:02:06,370 the second pair has to have a different rank. 45 00:02:06,370 --> 00:02:09,449 So there are 12 ranks left. 46 00:02:09,449 --> 00:02:15,110 And once I've picked the ranks for the 2 pairs, 47 00:02:15,110 --> 00:02:18,370 then I have the rank of the last card, 48 00:02:18,370 --> 00:02:22,200 which is 11 possible choices. 49 00:02:22,200 --> 00:02:24,067 Then, in addition, once I've chosen 50 00:02:24,067 --> 00:02:26,400 the rank of the first pair, the rank of the second pair, 51 00:02:26,400 --> 00:02:31,910 and the rank of the loose card, the fifth card, 52 00:02:31,910 --> 00:02:37,241 I select a pair of suits to go for the first pair. 53 00:02:37,241 --> 00:02:39,490 So let's say if the first pair, I've figured out we're 54 00:02:39,490 --> 00:02:40,810 going to be 2 Aces. 55 00:02:40,810 --> 00:02:42,600 Which two aces should they be? 56 00:02:42,600 --> 00:02:45,000 Well, pick two of the four suits. 57 00:02:45,000 --> 00:02:48,650 And there are four choose two ways to choose 58 00:02:48,650 --> 00:02:52,460 the suits for the pair of aces. 59 00:02:52,460 --> 00:02:55,480 Likewise, there are four choose two ways to choose the two 60 00:02:55,480 --> 00:02:58,630 suits for the pair of kings. 61 00:02:58,630 --> 00:03:01,160 And finally, there are four possible suits 62 00:03:01,160 --> 00:03:06,440 I can choose for the rank of the last card. 63 00:03:06,440 --> 00:03:12,770 So that says that I might, for example, specify 64 00:03:12,770 --> 00:03:15,290 a two-pair hand by saying, OK, let's 65 00:03:15,290 --> 00:03:18,800 choose a pair of kings to come first and a pair of aces 66 00:03:18,800 --> 00:03:21,950 to be the second pair and a three to be the loose card. 67 00:03:21,950 --> 00:03:24,170 Let's choose the set of two elements diamonds 68 00:03:24,170 --> 00:03:27,140 and hearts for the kings, the two elements 69 00:03:27,140 --> 00:03:31,380 diamonds and spades for the aces, and a club for the three. 70 00:03:31,380 --> 00:03:33,970 This sequence of choices specifies 71 00:03:33,970 --> 00:03:37,130 exactly the two-pair hand that we illustrated 72 00:03:37,130 --> 00:03:39,503 on the previous slide, namely two kings, a diamond 73 00:03:39,503 --> 00:03:42,700 and a hearts; two aces, a diamond and a space; 74 00:03:42,700 --> 00:03:45,950 and the three of clubs. 75 00:03:45,950 --> 00:03:49,750 So I can count the number of two-pair her hands fairly 76 00:03:49,750 --> 00:03:50,910 straightforwardly. 77 00:03:50,910 --> 00:03:53,280 There were 13 choices for the rank of the first pair, 78 00:03:53,280 --> 00:03:56,410 12 for the second, 11 for the rank of the third card, 79 00:03:56,410 --> 00:03:59,290 four choose way to choose the suits of the first pair, 80 00:03:59,290 --> 00:04:01,490 four choose way to choose two ways to choose 81 00:04:01,490 --> 00:04:04,280 the suits of the second pair, and four ways 82 00:04:04,280 --> 00:04:06,680 to choose the suits for the last pair. 83 00:04:06,680 --> 00:04:10,620 So this is the total-- 13 times 12 times 11 times 4 choose 2 84 00:04:10,620 --> 00:04:12,930 twice times 4. 85 00:04:12,930 --> 00:04:13,990 And that's not right. 86 00:04:13,990 --> 00:04:15,650 There's a bug. 87 00:04:15,650 --> 00:04:18,110 What's the bug? 88 00:04:18,110 --> 00:04:21,050 Well, the problem is that what I've 89 00:04:21,050 --> 00:04:25,260 described in this number on the previous slide, that number, 90 00:04:25,260 --> 00:04:30,160 is exactly the set of six tuples, 91 00:04:30,160 --> 00:04:33,900 consisting of the first card ranks and the second card ranks 92 00:04:33,900 --> 00:04:36,140 and the last card rank and the first card suits 93 00:04:36,140 --> 00:04:38,370 and the second card suits and the last card suit. 94 00:04:38,370 --> 00:04:44,500 That is, if it's counting the number of possible ranks 95 00:04:44,500 --> 00:04:46,870 for a first choice, the number of possible 96 00:04:46,870 --> 00:04:48,690 ranks for a second choice, third, 97 00:04:48,690 --> 00:04:53,540 and so on, this set of six things 98 00:04:53,540 --> 00:04:56,090 are being counted correctly by the formula 99 00:04:56,090 --> 00:04:57,740 on the previous page. 100 00:04:57,740 --> 00:05:03,160 The difficulty is that counting these six tuples 101 00:05:03,160 --> 00:05:07,890 is not the same as counting the number of two-pair hands. 102 00:05:07,890 --> 00:05:10,790 We've counted the number of six tuples of this kind correctly, 103 00:05:10,790 --> 00:05:14,440 but not the number of two-pair, because this mapping 104 00:05:14,440 --> 00:05:19,060 from six tuples to two-pair hands is not a bijection. 105 00:05:19,060 --> 00:05:22,440 Namely, if I look at the six tuple, 106 00:05:22,440 --> 00:05:25,220 choose kings and then aces and a three 107 00:05:25,220 --> 00:05:27,840 with these suits and those suits and final suit 108 00:05:27,840 --> 00:05:31,321 for the three, which determines this hand-- the king 109 00:05:31,321 --> 00:05:33,820 of diamonds, king of hearts, ace of diamonds, ace of spades, 110 00:05:33,820 --> 00:05:37,470 three of clubs-- there's another six tuple that 111 00:05:37,470 --> 00:05:40,360 would also yield the same hand. 112 00:05:40,360 --> 00:05:43,060 Namely, what I can do is I'll keep 113 00:05:43,060 --> 00:05:46,350 the three of clubs specified. 114 00:05:46,350 --> 00:05:50,140 But instead of choosing the kings and their suits 115 00:05:50,140 --> 00:05:51,790 and the aces and their suits, I'll 116 00:05:51,790 --> 00:05:56,400 choose the aces and their suits and the kings and their suits. 117 00:05:56,400 --> 00:05:59,800 So I'm just switching these two entries and those two entries. 118 00:05:59,800 --> 00:06:03,170 And if I do that, here's a different six tuple 119 00:06:03,170 --> 00:06:09,300 that's specifying the same two-pair hand. 120 00:06:09,300 --> 00:06:12,150 That is, this tuple is specifying 121 00:06:12,150 --> 00:06:15,080 a pair of aces and a pair of kings, where the aces have 122 00:06:15,080 --> 00:06:19,330 suits diamonds spades and the kings have suits diamonds 123 00:06:19,330 --> 00:06:22,830 hearts and the three has suits clubs. 124 00:06:22,830 --> 00:06:26,690 So the bug in our reasoning was that when we were counting 125 00:06:26,690 --> 00:06:29,660 and we said there are 13 possible ranks 126 00:06:29,660 --> 00:06:31,760 for the first pair and there are 12 127 00:06:31,760 --> 00:06:33,950 possible ranks for the second pair 128 00:06:33,950 --> 00:06:35,860 and we were distinguishing the first pair 129 00:06:35,860 --> 00:06:38,080 from the second pair, that was a mistake. 130 00:06:38,080 --> 00:06:40,900 There isn't any first pair and second pair. 131 00:06:40,900 --> 00:06:43,660 There are simply two pairs. 132 00:06:43,660 --> 00:06:45,560 And there's no way to tell which is first 133 00:06:45,560 --> 00:06:47,380 and which is second, which is why 134 00:06:47,380 --> 00:06:52,450 we got two different ways from our sextuples of mapping 135 00:06:52,450 --> 00:06:59,430 to the same two-pair, depending in the sextuple which 136 00:06:59,430 --> 00:07:01,880 of the two-pair I wanted to list first. 137 00:07:01,880 --> 00:07:04,920 So in fact, since either pair might be first 138 00:07:04,920 --> 00:07:09,790 what I get is this map, from six tuples to two-pair hands, 139 00:07:09,790 --> 00:07:12,670 is actually a two-to-one mapping. 140 00:07:12,670 --> 00:07:15,430 It's not a bijection, because there's 141 00:07:15,430 --> 00:07:18,440 no difference between the first pair and the second pair. 142 00:07:18,440 --> 00:07:21,290 There's just a couple of pair. 143 00:07:21,290 --> 00:07:24,460 If I do that, then I can fix this formula. 144 00:07:24,460 --> 00:07:26,740 Now that I realize that the mapping from these six 145 00:07:26,740 --> 00:07:28,660 tuples, which I've counted correctly 146 00:07:28,660 --> 00:07:31,390 to the things I want to count-- namely, the two-pair hands-- is 147 00:07:31,390 --> 00:07:34,420 two to one, then, by the generalized product rule, 148 00:07:34,420 --> 00:07:36,470 or by the division rule, all I need to do 149 00:07:36,470 --> 00:07:39,410 is divide this number by a half. 150 00:07:39,410 --> 00:07:44,943 And that is really the answer of the number of two-pair hands.