0

We have a potluck party of 5 people, and we plan to arrange a gift exchange game. Each one brings a gift and puts it in the pool, then we pick the gift randomly. Since this is a gift exchange game, we want to make sure that everyone will pick the gift from others, not from themselves. What is the probability that everyone can pick a gift from others? Is there a general solution for a party with $n$ people?

I have some basic solutions. But I don't know the final explicit expression of the answer.

We can first label the people from $p_1$ to $p_n$, and also label their gifts from $g_1$ to $g_n$. This is a permutation problem.

We suppose the number of all proper permutations for $n$ people is $K_n$.

The total permutations, including improper cases (at least one person picks his or her own gift), is $n!$. For the proper case, with $0$ $p_i$ matches $g_i$, the number is $K_n$.

For the improper cases, we can analyze. For the cases with only $1$ $p_i$ matches $g_i$, there should be $C_n^1$ situations, for each situation, the problem is reduced as the problem with $n-1$, so for each situation, the corresponding number is $K_{n-1}$. The total number is $C_n^1 K_{n-1}$. By using same method, for the cases with $k$ $p_i$ matches $g_i$, the total number is $C_n^k K_{n-k}$. So we can have the relation: $$ K_n + C_n^1 K_{n-1} + \dots +C_n^{n-2}K_2 = n!-1 $$ Note here we need to subtract $1$ in the RHS, since this is the case in which all $p_i$ matches $g_i$. $$ \sum_{i=0}^{i=n-2}C_n^{n-i} K_i =n! -1 $$ Obviously, $K_2=1, n \ge 2$.

By using this relation, it is not difficult to use the computer to get $K_n$. The problem is whether we can get the explicit expression of $K_n$.

The probability is ${K_n \over n!}$.

The numerical solution can be solved by matlab. The interesting thing is that the probability will get close to a finite value, which is $0.3679$. The figure of results can be seen here. Total number and probability

RobPratt
  • 50,938

0 Answers0