There is a combinatoric riddle which goes as follows: In this problem, 100 numbered prisoners must find their own numbers in one of 100 drawers in order to survive. The rules state that each prisoner may open only 50 drawers and cannot communicate with other prisoners.
The best solution found thus far is one where: 1. Each prisoner first opens the drawer with his own number. 2. If this drawer contains his number he is done and was successful. 3. Otherwise, the drawer contains the number of another prisoner and he next opens the drawer with this number. 4. The prisoner repeats steps 2 and 3 until he finds his own number or has opened 50 drawers.
Through this process, as long as a cycle of more than 50 does not exist, there is a fairly high (roughly 30%) chance that the prisoners succeed. This is because there is a roughly 70% chance that a cycle of 51 or more exists.
When trying to calculate the probability of there being a cycle of 51 or larger, I had a prisoner start at his own drawer. The probability that the drawer didn't contain his number should be 99/100. In such a case, he goes to the second drawer (whose number was found in the first drawer). The probability that this drawer doesn't contain his number is 98/99. Thus the probability of him going through 51 or more drawers before finding his own number, I assume, should be 99/100 * 98/99 * 97/98 *...*49/50. Hence, the probability of there being a cycle of size 51 or more by this chain of reasoning would be 49/100.
I was hoping to ask if someone here could let me know the flaw in my line of reasoning.
Thank you.
Let me provide a method for calculating the number of permutations in $S_{n}$ that contain a $k$-cycle when $2k>n$.
Clearly at most one of these cycles can exist, we can select it in $\binom{n}{k}\times (k-1)!$ ways and then permute the remaining elements in $(n-k)!$ ways.
We also note that the probability a $51,52,\dots$ or $100$-cycle exists is just the individual sum of probabilities as these events are mutually exclusive.
Therefore the probability the prisoners fail is:
$$\sum\limits_{k=51}^{100} \frac{\frac{100!(k-1)!(100-k)!}{k!(100-k)!}}{100!}=\sum\limits_{k=51}^{100} \frac{(k-1)!}{k!}=\sum\limits_{k=51}^{100} \frac{1}{k}\approx 0.688$$