Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: November 24, 2026, 4:15 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One Hundred Prisoners
#1
One Hundred Prisoners
OK, this isn't the standard 100 Prisoners problem that has become so YouTube famous that it obscures the solution to all other 100 Prisoner problems. There will be no boxes.

The Problem:

There are 100 Prisoners being condemned to prison for all eternity.

Everybody in this scenario behaves purely logically and flawlessly, including not dying unless told to by the rules.

Prior to being incarcerated, the Prisoners are allowed to strategize. They will have no direct communication once their sentence begins.

Once their sentence begins, one prisoner will be selected purely at random* each day. That prisoner will be taken to a room with a light and a switch. The light may be turned on or off, but may not be manipulated in any other manner**.

Once they are certain*** that every prisoner has been in the room at least once, they may ask to be released. If they're right then they'll be freed, but if they're wrong they'll be executed.

OK, that's it. I think that I have both a brute force and an optimized solution. The brute force approach works, but it takes geological time. The optimized strategy might be viable within a human lifespan, maybe faster. I was wondering if there were quicker approaches and if anybody with a math/computing background knew how to calculate the time for the strategy to succeed.

Brute Force Strategy:
Optimized Strategy:
Reply
#2
RE: One Hundred Prisoners
A simple exact improvement is the standard counter scheme: pick one prisoner as counter. Every other prisoner turns the light on only on their first visit when it is off, then never touches it again; the counter turns it off and increments a count. At 99 the counter can declare certainty. This removes day-number alignment, though the expected wait is still on the order of 10,000 days, roughly 27 years, so it may not beat a more optimized schedule by much.
Reply





Users browsing this thread: 1 Guest(s)