🔴 Riddle #62 of 240
One hundred prisoners are called one at a time into a room containing a single light bulb (initially off) and nothing else. Each visit, a prisoner may toggle the bulb or leave it. The prisoners may plan in advance but cannot communicate in any other way. How can one of them eventually declare, with complete certainty, that all 100 prisoners have visited the room?
Think about it first. When you're ready:
Counter strategy with the bulb
Non-counters switch the bulb on only the first time they find it off; the counter switches it off and counts, so after 99 counts every other prisoner has visited.