...but I finally have a plausible solution to it. That I had to slightly modify, and even then apparently it's only half as "efficient" as the usual solution. Blah!
First the problem, then what I hate about it, then (below the fold) what I finally came up with that's good enough for me to set the thing aside. And if I get around to it this weekend, some Monte Carlo simulations addressing both my proposed solution and my objection to the original premise.
Go to this page and search on "100 PRISONERS AND A LIGHT BULB"
100 prisoners are imprisoned in solitary cells. Each cell is windowless and soundproof. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Each day, the warden picks a prisoner equally at random, and that prisoner visits the central living room; at the end of the day the prisoner is returned to his cell. While in the living room, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.
Before this whole procedure begins, the prisoners are allowed to get together in the courtyard to discuss a plan. What is the optimal plan they can agree on, so that eventually, someone will make a correct assertion?
What I hate about this problem is that no matter how far out you go, there's a probability greater than zero (vanishingly small, I'll admit, but still) that at least one prisoner STILL HASN'T BEEN to the living room! Whether it's six months, one year, five years, 50 years... you can't put an upper bound on the solution time.
With that in mind, wouldn't the optimal strategy be to choose a time frame (for example two years) and assert that by that point, it's worth the risk of being shot just to get freedom from that point instead of continuing to languish?
But if you absolutely insist that any false positive whatsoever is unacceptable, yetthat you want to minimize the average time it takes to reach an ironclad-guaranteed correct solution...
Define your "first tangible visit" as follows:
1. Your first visit (if any) in the time between day 1 and 99 when the light is still off.
2. Otherwise, day 100 if that was your first visit (but the light was already on)
3. Otherwise, the first time you came and found the light off
Days 1 - 99: Keep the light in the position it's in, unless:
a) you're a repeat visitor AND
b) the light is (still) off
By Day 100, one of two things will be true:
The day 100 visitor was the 100th unique visitor, and found the light off, and solved the problem (w00t!).
-or-
The day 100 visitor found the light on (or happened to be the first repeat visitor), and turned it off left it on if this was his first tangible visit, off otherwise. At this point must be a unique "first repeat visitor," known from this point onward as the Designated Problem Solver. That person made their first repeat visit on Day N+1. That person knows that N prisoners (counting herself) have been to the room but must assume that the other (100-N) prisoners HAVE NOT. (So even if one or more of those prisoners actually did come between Day N+2 and Day 100, they must act as though they hadn't.)
From Day 101 onward:
IF YOU'RE NOT THE DESIGNATED PROBLEM SOLVER -
if the light is on, leave it on
if the light is off, AND IF this is your first tangible visit (other than between day N+2 and day 100), then turn it on
If you ARE THE DESIGNATED PROBLEM SOLVER -
if the light is on, increment your "how many of us are known to have been in this room yet?" tally by 1, otherwise leave that total unchanged
either way, turn/leave the light off