Secret Santa

This Christmas, all 7 billion people on earth decides to participate in a huge Secret Santa event. The event will proceed as follows: Everyone will create 1 gift, and put it under a huge Christmas tree. Then, each person will receive exactly 1 gift at random from the gifts under the tree.

If p p is the chance that somebody receives their own gift, what is 10000 p 10000p , rounded down to the nearest integer?


The answer is 6321.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Ivan Koswara
Nov 27, 2016

Since p p is the probability that someone receives their own gift, 1 p 1-p is the probability that nobody receives their own gift. This is known as a derangement , a permutation of elements where no element ends up in their original position. If we interpret the gifts as elements as the people as positions, where an element is in its original position if the gift was one's own gift, the fact that this is a derangement is clear.

I won't prove it here, but there is a very interesting formula for the number of derangements: the number of derangements of n n elements is the integer closest to n ! e \frac{n!}{e} . (This can be derived from the formula n ! i = 1 n ( 1 ) i i ! n! \sum_{i=1}^n \frac{(-1)^i}{i!} by taking the power series of e x e^x , which in turn is derived by PIE.) Since n n is very big, we can effectively treat the number as n ! e \frac{n!}{e} ; the loss of accuracy is insignificant. The number of permutations overall is n ! n! , so the probability that nobody receives their own gift is simply n ! / e n ! \frac{n!/e}{n!} , the probability that we pick a derangement out of all possible permutations. This simplifies to 1 e \frac{1}{e} , no matter the value of n n (as long as it's large enough).

Finally, we have 1 p = 1 e 1-p = \frac{1}{e} , so p = 1 1 e p = 1 - \frac{1}{e} . Using calculator, we can compute that p = 0.63212 p = 0.63212 \ldots , so 10000 p = 6321 \lfloor 10000p \rfloor = \boxed{6321} .

Kushal Bose
Nov 26, 2016

Let there are n n persons who will participate in this game.

So number of ways thay can not receive their own gifts is n ! r = 0 n ( 1 ) r r ! \displaystyle n! \sum_{r=0}^{n} \dfrac{(-1)^r}{r!}

Number of ways one person can take any gifts from n n gifts is n ! n! .

So p p is the probability that on can not receive their own gifts is p = n ! r = 0 n ( 1 ) r r ! n ! p=\dfrac{n! \sum_{r=0}^{n} \dfrac{(-1)^r}{r!}}{n!}

p = r = 0 n ( 1 ) r r ! p=\sum_{r=0}^{n} \dfrac{(-1)^r}{r!}

So, probability that one person receive their own fifts is p = 1 p = 1 r = 0 n ( 1 ) r r ! = 1 1 e = 0.63208 p'=1-p=1 -\sum_{r=0}^{n} \dfrac{(-1)^r}{r!}=1-\frac{1}{e}=0.63208

So number of ways thay can not receive their own gifts is n ! r = 0 n ( 1 ) r r ! \displaystyle n! \sum_{r=0}^{n} \dfrac{(-1)^r}{r!}

Can you explain this?

Pi Han Goh - 4 years, 6 months ago

Log in to reply

This is the formula of de-arrangements where each person can not receive their own gift

Kushal Bose - 4 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...