100Prisoners.com

This website is dedicated to exploring the intriguing 100 prisoners problem, a mathematical challenge that seems astronomically impossible at first, yet can leverage mathematics to raise the chances one hundred octillion.

Hover to see part of the loop.
Click to hide boxes outside the loop and see more of the loop.

This thought experiment presents a scenario in which a group of 100 prisoners are tasked with finding their own numbered slip among a collection of 100 boxes, each containing a random permutation of the numbers 1 through 100.

  • Each prisoner is allowed to open 50 boxes.
  • Each prisoner must find their own number within a box, or they fail.
  • All prisoners must be successful - if even one fails, they all lose.
  • Prisoners cannot mark boxes, relay information or in any way communicate with each other.

Given the premise, the lack of options, and the incredibly tiny odds, one would presume this challenge to be impossible - but it turns out there is a strategy that guarantees a 31% chance of success!

Here's how it works:
  1. Go to the box with your number labeled on top of it. Open it.
  2. If the number inside is not your slip, then go to the box with the number you just found.
  3. Repeat until you find your number.
Due to an interesting mathematical quirk of some (assumed) properties of the game, the boxes have an interesting structure to their existence.

No matter what number of configuration of boxes is given, a loop, a sequence of numbers that will return to the first one you picked, will exist.
Given that there are only 100 boxes, you won't find a loop that goes on forever, and you won't find a box without a number under it (one that goes nowhere).

Essentially, by following the boxes, it is certain that you will find your slip.

Created by Ryan Walters