Introduction
A couple of days ago we did the santa secret ('amigo invisible').
We wrote each name in a small paper and put them in a box.
Each participant had to take one small paper from the box.
We repeated the draw five times before to obtain a name different than our own.
What is the probability that each one obtain a different name?
The response has a limit in 1/e (Euler's number) and exists a similar probability game (the hat-check problem).
I found the hat-check problem after write a C program and observe that the result is similar beyond five friends/hats.
C program
# cat hat_game.c
# gcc -O3 -march=native -o hat_game hat_game.c
# ./hat_game 10
0.3678794503
References
http://www.proofwiki.org/wiki/Hat-Check_Problem
http://en.wikipedia.org/wiki/Derangement
No comments:
Post a Comment