# The Surprising Solution to the 100 Prisoners Riddle

Have you heard of the 100 prisoners riddle? This brain teaser, proposed by computer scientist Peter Bro Miltersen in a 2003 paper, challenges individuals to come up with a plan to find their designated box in a room full of 100 labeled boxes. There are 100 convicts numbered from 1 to 100, and they must locate their number in at most 50 boxes in order to be freed. However, they can only talk before the challenge begins to agree on a strategy. The riddle asks to determine the chances of success for the convicts.

## The Naive Approach: Low Probability of Success

At first glance, it may seem that the convicts have little chance of winning. Each convict has a 50% chance (50 out of 100 boxes) of finding their number by opening random boxes. However, each prisoner’s game is independent of the others, so the overall probability of success is the multiplication of the individual probabilities (50% x 50% x â€¦). In other terms, the odds of winning are 1 in 2^100. To put this in perspective, the estimated number of sand grains on Earth is 2^60. The probability of winning the game using this strategy is orders of magnitude lower than two people finding the same grain of sand.

## The Counterintuitive Solution: Increased Probability of Success

Surprisingly, there is a strategy that significantly increases the convicts’ chances of winning. In fact, this method can achieve a probability of success greater than 30%. And the procedure is incredibly simple. Each prisoner starts by opening the box labeled with their number. If the box contains their number, they win. Otherwise, they proceed to open the box labeled with the number found inside the last box. This process repeats until the convict either finds their number or opens 50 boxes.

### Moving in Circles: The Key to Success

The key to this solution is that the procedure creates circuits of boxes that eventually lead to the convict’s number. For example, suppose convict 47 starts by opening box 47. They find the number 23 and proceed to open box 23. Continuing this process, they open box 72 and discover the number 51. Now, let’s consider the number that may be inside the following box. Of course, they could find number 47 and return to the initial box. In this case, they have created a circuit of boxes: 47, 23, 72, 51, and 47 again. But they could also find other numbers. However, which numbers could they find? They can only discover new numbers that have not yet been discovered. Think about it. They are at box 51. Is 23 inside of it? No, it is inside box 47. What about 72? Again, no. It was found in box 23. And the same goes for 51. Therefore, the only available numbers are the ones that have not yet been encountered. If we apply this line of reasoning for each box, we see that the procedure will eventually lead to the number 47. It is just a matter of how many boxes compose the circuit. In other words, the length of these circuits directly affects the probability of success. To define the odds, it suffices to calculate the chances for a circle to be no longer than 50 boxes.

### Calculating the Probability of Success

The theoretical probability of having a circuit of h boxes is given by: P(h) = (1/2)^h * (1 – (1/2)^h)^(100-h) The first term (1/2)^h represents the probability of finding your number in h boxes. The second term (1 – (1/2)^h)^(100-h) represents the probability of not finding your number in the remaining 100-h boxes. The probability of success is the sum of the probabilities for all values of h from 1 to 50. P = âˆ‘ P(h) from h=1 to h=50 The probability of success is approximately 31.7%.

## Conclusion

The 100 prisoners riddle may seem impossible at first, but with the right strategy, the convicts can significantly increase their chances of success. By following the procedure of creating circuits of boxes and using the formula to calculate the probability of success, the convicts can solve the riddle and win their freedom.

If you enjoyed this article and found it informative or entertaining, please consider sharing it with your friends and followers. Sharing helps to spread the word and allows more people to discover and engage with the content. You can share the article on social media, through email, or by word of mouth. Every share helps to increase the reach and impact of the article, and I would be grateful for your support in helping to spread the word. Thank you for your consideration!

[sc name=”ad3″]

100 prisoner puzzle

100 prisoners problem light bulb

100 prisoner riddle

100 prisoners riddle

prisoner light switch riddle

100 prisoners and a light bulb

100 prisoners riddle answer

100 prisoners light switch riddle

100 prisoner puzzle light switch

100 prisoner puzzle