Date of the Problem
December 19, 2022

The holidays are here, and it’s not uncommon for offices and classrooms to do a gift exchange. These often work as follows: the names of all participants are put into a hat, and everyone draws a name. Of course, if you draw your own name, you put it back and draw another. This concept, of course, leads to all kinds of good mathematics.

Let’s say you work in a twelve-person office, and all twelve people’s names are put into a hat. Further, let’s say that you’re the twelfth person to draw a name from the hat. It would be very bad if you drew your own name, since returning it and drawing another would be impossible. What’s the probability that when you draw a name from the hat, you’ll draw your own name? 

Since there were 12 names in the hat initially, everybody has a 1/12 chance of picking a particular name. Thus, the probability is 1/12 that any person will choose their own name.

If that explanation is a little too simple and doesn’t sit well with you, here’s a more math-y rationale. Let’s say the names are A, B, C, ..., L. When the first person chooses a name, there are 12 names they could choose. There are then 11 names for the second person to choose, and so on. In total, there are 12 × 11 × 10 × ... × 1 = 12! ways for the names to be chosen. Using similar logic, if your name is to be left for last, then the first person can choose any of 11 names (they can’t choose your name), 10 ways for the second person to choose a name, and so on. Hence, there are 11 × 10 × 9 × ... × 1 = 11! ways for the names to be chosen so that your name is left for last. That means that the probability of selecting last and choosing your own name is the number of ways of choosing names so that yours is last, divided by the total number of ways of choosing a name, which is 11!/12! = 1/12.

In a four-person classroom, they decide to do a gift exchange as described above. What’s the likelihood that no one will choose their own name from the hat?

Since it’ll help to establish a pattern for the next question, let’s also consider this with 2-person and 3-person gift exchanges. With a two-person gift exchange, it’s pretty easy to see, either both people get the right name, or they both get the wrong name. Hence, the probability is 1/2 that neither will choose their own name.

With three people, it’s a little more difficult. Let’s call the people A, B and C. The names can be chosen in six different ways: ABC, ACB, BAC, BCA, CAB and CBA. Now, let’s assume that the first letter in an arrangement was chosen by A, the second by B and the third by C. For example, if the arrangement is ABC, each person would have chosen their own name. Of the six arrangements listed, ABC, ACB, BAC and CBA all have at least one person selecting their own name. Hence, only two of the six arrangements will result in no one choosing their own name, so the probability is 2/6 = 1/3.

So now, the four-person case. There are 24 possible arrangements of the names:







Those underlined above will have at least one person select their own name, and there are 15 of those arrangements. Hence, there are 9 arrangements in which no person will select their own name, so the probability that no one selects their own name is 9/24 = 3/8.

Can you predict the probability that no one will select their own name from the hat, regardless of the number of people participating? That is, can you find a formula in terms of n when n people participate in a gift exchange?

For two people, there is a 1/2 probability that neither draws their own name.

For three people, there is a 2 out of 6, or 1/3, probability that no one draws their own name.

For four people, as we found, there is a 9 out of 24, or 3/8, probability that no one draws their own name.

For n people, there is an (n – 1)/(2n) probability that no one draws their own name.

Let’s say that there are n people: A, B, C, and so on. If A is put in the first position, all possibilities fail no matter how the other n − 1 people are arranged. If B is in the first position, however, only 1/2 of the (n − 1)! arrangements with B first fail. Similarly, if C, D, E, and so on, are in the first position, only 1/2 of the (n − 1)! arrangements fail in each of those situations, too. There are (n − 1) people, other than A, who can be put in the first position; hence, there are (n − 1) × (1/2((n − 1)!)) successful arrangements. In total, there are n! possible arrangements of n people. The probability, then, is (n − 1) × (1/2((n − 1)!))/n! = (n − 1)/(2n).

Page 1 of the linked PDF contains PROBLEMS & SOLUTIONS.

Page 2 contains ONLY PROBLEMS. ♦

CCSS (Common Core State Standard)
PDF Download