The answer: pick one prisoner to be the counter. Every other prisoner turns the light bulb ON exactly once, on their first visit to the room, and never touches it again. The counter turns the bulb OFF every time he finds it on, and keeps a running tally. The moment his tally reaches 99, he announces that all 100 prisoners have visited the room. They walk free.
This is the 100 prisoners light bulb puzzle, a classic investment banking and quant interview brain teaser. One room, one bulb, one hundred prisoners, and a single announcement that has to be right. Here is the full walkthrough.
The Puzzle, Restated Simply
One hundred prisoners sit in solitary cells. There is a central room with one light bulb, and the prisoners are told the bulb starts OFF. Each day, the warden picks one prisoner at random and brings him to the room. The visitor may toggle the bulb if he wishes, and he may also announce that every prisoner has now visited the room.
The stakes are absolute. If the announcement is correct, all 100 prisoners go free. If it is wrong, all 100 are shot. So the announcement must only be made when someone is completely certain.
Before the first day, the prisoners get one night together to agree on a plan. After that, there is no communication except through the state of the bulb. What plan guarantees they eventually walk free?
The 100 Prisoners Light Bulb Puzzle, Solved Step by Step
The plan has two roles: one counter and 99 signalers.
Step 1: Elect the counter. The prisoners choose one person, say Prisoner 1. He is the only one who will ever turn the bulb OFF, and the only one who will ever make the announcement.
Step 2: The signalers get one signal each. Every other prisoner follows this rule for the rest of the game: the first time you visit the room and the bulb is OFF, turn it ON. After that, never touch the bulb again. If you visit and the bulb is already ON, do nothing.
Step 3: The counter tallies. Every time the counter visits the room and finds the bulb ON, he turns it OFF and adds 1 to his tally. If he finds it OFF, he does nothing.
Step 4: Announce at 99. When the counter’s tally reaches 99, he announces that all 100 prisoners have visited the room. Everyone is freed.
A small example makes it concrete. Suppose there are 4 prisoners: A is the counter, B, C, and D are signalers. Day 1: B visits, finds the bulb off, turns it on. Day 2: B is picked again, finds it on, does nothing. Day 3: A visits, finds it on, turns it off, tally = 1. The bulb now waits for the next signaler. Each time A clears an ON bulb, exactly one new prisoner has checked in. When A’s tally hits 3, all of B, C, and D have visited, and A is standing in the room himself. That is all four.
Why This Plan Cannot Fail
The whole trick is information discipline. The bulb carries exactly one bit of information: on or off. Because signalers turn it on only once each, and only the counter ever turns it off, every ON that the counter clears corresponds to exactly one distinct prisoner visiting for the first time. There is no double counting.
So the tally always equals the number of distinct non-counter prisoners who have visited. When it reaches 99, all 99 signalers have visited, and the counter has obviously visited too. That is 100 out of 100, with certainty.
One assumption matters, and good interviewers probe it: the prisoners must know the bulb starts OFF. If the initial state were unknown, a bulb already glowing on day one would corrupt the tally. The standard fix is the two-signal version: each signaler turns the bulb on twice (on their first two visits when it is off), and the counter tallies to 198. Mention this upgrade and the interviewer will know you think about edge cases.
The Trap Most Candidates Fall Into
The most common wrong answer is “everyone turns the light on whenever they visit, and the counter counts to 100.” That fails because the counter cannot tell a first visit from a repeat visit. The tally races ahead of reality, the announcement fires early, and everyone is shot.
Another wrong answer: “each prisoner counts his own visits and announces when his personal count is high.” That tells you nothing about the other 99 prisoners. Random selection means you can be picked ten times while someone else is never picked.
The real insight is role asymmetry. The puzzle looks symmetric, all prisoners are equal, but the solution breaks the symmetry on purpose: one coordinator, 99 signalers, and a strict rule that one visit equals one signal, sent exactly once.
What the Interviewer Is Testing in the 100 Prisoners Light Bulb Puzzle
First, structured thinking under ambiguity. Strong candidates restate the constraints, notice the one-bit communication channel, and design a protocol instead of guessing.
Second, assumption discipline. The best answers begin with “assuming we know the bulb starts off” and then handle the unknown-initial-state case. In banking and trading interviews, unstated assumptions are where real money gets lost.
Third, practicality. Mathematicians who simulated this plan put the average wait at roughly 28 years before the counter reaches 99. If the interviewer asks “how long will this take,” the honest answer is: a very long time, because the counter is picked at random like everyone else. Faster variants exist, such as token-passing schemes that cut the wait to about a decade, but the clean counter version is what the interviewer wants to hear first.
Finally, communication. Walk through the plan out loud, explain why each rule exists, and name the failure mode each rule prevents. That is the whole game.
Try the Next Puzzle
If you enjoyed this one, keep the streak going:
- 8 Balls Puzzle: Find the Heavier Ball in 2 Weighings (Solved)
- Burning Rope Puzzle: Measure Exactly 45 Minutes (Solved)
- McKinsey Light Bulb Puzzle: 3 Switches, One Visit (Solved)
- Goldman Sachs Interview Puzzle: 4 Cars 1000 Miles Question (Solved)

Lauren Brooks is a finance professional writing on professional exams, study strategies, and finance careers.
Leave a Reply