Remember the old cartoon? A professor stands by the blackboard as his student chalks out a complex formula. Right in the center of this mathematical masterpiece is a gap, in which the kid has written “AND THEN A MIRACLE OCCURS.”

Yesterday, Ray revealed the answer to his “Prisoners and Light Switches” puzzler of two weeks ago. My family and I listened with keen interest, having already firmly established for ourselves that there is no solution to this puzzler.

At that sensitive juncture, Ray did unfortunately sidestep his sworn duty and obligation to announce the answer (and receive the inevitable rotten tomatoes). Perhaps some may feel he chickened out; I don’t think so at all. I’m sure he’d simply realized there was a LOT of work to do on LAST week’s puzzler, and he meant to get right down to it!

Quick to fill a looming gap in the show, Ray also stepped up with some powerhouse misdirection. He suggested we could ignore his previous misdirection such as the prologue about Hungarian mathematicians; it’s just a simple old puzzler! “A 6th-grader could do it”, he assured us, and maybe we poor idiots who hadn’t yet figured it out should “try with three prisoners instead of 23” (if you do, you’ll see it still doesn’t work). Tommy got into the act by exclaiming these inmates have life sentences (uh, not last week they didn’t), then casually mentioning that 23’s status as a prime number is irrelevant to the problem. (He’s right. Three being a prime number is also irrelevant. Both of them being ODD numbers is downright kind, but this puzzler needs wayyy more help than that!)

Thus were we gifted with a nice extra spot of time to cudgel our brains some more over this thing, just in case we’d missed some arcane tidbit or ray of hope in what seemed to be a pretty straightforward insoluble math problem.

So, HA! Fast forward through the cruel and unusual two-week wait, and we’re rewarded with “the Answer,” and here it is:

One prisoner will act as the “counter” (let’s call him Carlo) who will visit the switch room 44 times, track the switch position changes made by the other 22 prisoners according to instructions, and conclude that all have visited the room at least once. Carlo tells the Warden, who frees our happy inmates!

… but …

Um, one of the stated variables in this puzzler is that the Warden will bring prisoners in randomly: maybe he’ll pick one guy three times in a row, and/or he could have two inmates alternating visits for a week before moving on to others, and so on.

First, let’s review what the Warden says we can count on:

Each of the 23 prisoners must move one switch, but never two switches.

Each prisoner will visit the room.

Each will visit the same number of times as any other prisoner. Eventually.

And then the variables - a.k.a. UNKNOWNS - in this Warden’s rather diabolical riddle:
(1) Initial position of switches,
(2) Number of each prisoner’s visits,
(3) Order of visits,
(4) Time between visits, and
(5) Time span for all visits (a.k.a. Eventuality).

PROBLEM: Ensure that Carlo gets at least one switch room trip after his pals have all visited.
SOLUTION: {Empty Field!} No idea! What’s he supposed to do, wear lame’ and sing “save the last dance for me” every time the Warden strolls by??

Even with the assistance of a really clever 6th-grader, there’s no way to predict or control Carlo’s place in the Warden-designed series of prisoner visits to the switch room. He might be brought there four times early on (with or without other prisoner visits interspersed with his), then never see the room again as the other inmates proceed to complete their own visits while Carlo sits in growing dread that he’s somehow missed the signal…

OK, let’s work with it for a moment. We’ll hypothesize that Carlo gets unbelievably lucky and is called to the switch room 44 times AND kept good books on the switch signal AND has seen the right signal come up AND is about to turn to the Warden and open his mouth.

… but, but…

We were also told that eventually, all prisoners will have visited the switch room an equal number of times!

PROBLEM: How does Carlo determine that each prisoner has visited an equal number of times? And does he have to? And… how long is “eventually?”
SOLUTION: {Empty Field!} Oh, come on! After eight or ten visits by each inmate, the Warden might tire of his little game, give up, and go back to golf. Even if we posit endless Warden patience with the process, most of the inmates will be either released or dead of old age by the time the math dice roll up on a Carlo-verifiable equal number of visits!

Sorry, Ray! That answer ain’t makin’ it unless you want to go back to it yet again & add a constant or two to the mix (like, Divine Intervention)!

Real Answer? Only the Warden knows for sure. Even IF THE NUMBER IS TWO, Carlo’s life is about to get harder. His sentence will be served and he’ll be out in the world looking over his shoulder for those ex-con buddies a little sore at him for not doing the job he was supposed to do for them!

I disagree with StormyBlueMerc… I think.
That post was so long and confusing, that I’m not entirely sure. What I do know is that the answer to the puzzler, although correct, was overly complicated as well.

The same result could be achieved without having to count all the way up to 44. If all of the prisoners were instructed to flip the “A” switch to the on position once and only once, and the prisoner with the title of “the counter” simply counted to 23, that would account for all 23 prisoners, including himself (huh?!). Let me break it down.

Let’s suppose that the “A” switch is already in the on position and the counter is the first prisoner to enter the switch room. He simply counts one. The remaining 22 counts will account for the remaining 22 prisoners (wow!). Now let’s suppose that in fact the “A” switch is in the on position as a result of another prisoner’s prior visit to the switch room. In this case a count to 22 would be sufficient, but as the counter is unaware of who was the first prisoner in the switch room, he still counts to 23. Sure he over counted, but only by 1 and not by 22.

Although I wasn’t one of the few that got this puzzler correct before it was answered on the air, I could tell right away that the answer that was given was excessive.

By the way my screen name is M@rs not Mrs but for some reason the @ isn’t showing. Can we get that fixed please. I’m a guy.

@Mrs - You still haven’t addressed the situaton where the counter takes all of his trips to the switch room very early in the game. How does he count all the prisoners that go after him? If he never goes back, how can he count or move the switch?

The other part that can’t work is the warden’s statement that all prisoners will eventually visit the switch room the same number of times. If the warden doesn’t know when the prisoners will end it, he can’t possibly make sure that they have all visited the same number of times.

The original puzzler did NOT say that any prisoner would have a limited amount of visits to the switch room, but that the visits would be random and potentially unlimited. The answer given on the air simply stated that every prisoner would be required to flip the “A” switch to the on position twice. So even if the counter took 1,000 trips before any of the other prisoners, he could still have 1,000 more after the other prisoners took theirs.

Secondly, the statement from the warden is irrelevant. He is not trying, nor is it in his best interest, to help them reach a point at which every prisoner would have visited the switch room the same number of times. Because these visits are at random, the statement could be made that “given enough time, everyone will eventually visit the switch room an equal number of times”. The key words here are: “given enough time”. The most likely scenario is that they will NOT have enough time to achieve this, nor is that their goal. All they care about is that they each visit the switch room at least once.

" So even if the counter took 1,000 trips before any of the other prisoners, he could still have 1,000 more after the other prisoners took theirs." You say he COULD have 1,000 more, but what if he doesn’t? You haven’t addressed how he knows anything that happens after he’s done visiting .If the visits are truly random, all of his visits can be before the others have made theirs, no matter how many. “Infinity” can be tricky. I guess “potentially unlimited” means this could go on long after all the prisoners are dead.

I think the OP has a point. This is the exact language from the 2.8.2014 puzzler:

"No one else will enter the switch room until I lead the next prisoner there, and he’ll be instructed to do the same thing. I’m going to choose prisoners at random. I may choose the same guy three times in a row, or I may jump around and come back.

"But, given enough time, everyone will eventually visit the switch room as many times as everyone else. At any time anyone of you may declare to me, ‘We have all visited the switch room.’

The second paragraph is the problem. It should have been left out, as there is no need for it, and it imposes an unneeded restriction (that everyone visits the same number of times). That could imply there is a fixed limit on visits, which could potentially prevent a solution. For the puzzler to be solvable in the manner prescribed by Ray, there can be no fixed upper limit to the number of visits.

It’s a subtle point surely. But I think with the language given, whether Ray’s solution is a solution or not remains ambiguous. In my opinion, if the second paragraph were elided, and maybe some more precision provided to the def’n of “random” instead of what was provided in the deleted paragraph, then Ray’s solution would work.

"But, given enough time, everyone will eventually visit the switch room as many times as everyone else. At any time anyone of you may declare to me, ‘We have all visited the switch room.’
"If it is true, then you will all be set free. If it is false, and somebody has not yet visited the switch room, you will be fed to the alligators."
Here’s the question:
What is the strategy the prisoners devise?

I’ll agree that in a possible but highly improbable scenario, the prisoners may never go free; BUT, they also won’t get fed to the alligators! The question is what is their strategy? The answer is certainly a reasonable strategy.

The expression “given enough time, everyone will eventually visit the switch room an equal number of times” is not a restriction or requirement and the only thing it implies is that it’s RANDOM. It is simply a fact of RANDOMNESS. The purpose of that statement is to shed a little bit of light on what RANDOM means for those that don’t know. It is a law of probability that can be said for any instance of RANDOM selection. But, again, no one is saying that everyone MUST visit the switch room an equal number of times. He could have simply said that prisoners will be chosen at RANDOM to visit the switch room and went on with it, and it would have been the exact same puzzler. The only difference being that without the extra explanation of RANDOMNESS, it wouldn’t have been confusing to those of you that don’t get it.

Furthermore, the counter is never “done visiting” the switch room until he declares that all the prisoners have been there. He may have to wait a million years before he gets back in the switch room, but the rules of RANDOMNESS say he will be back.

One final note. The counter must go to 44 per Ray’s original solution. If you instruct each non-counter to turn switch A [ON] only once, and A is initially [OFF], the count will go to 22 and stop with no decision made. Therefore, this “23” strategy has a 50% chance of failing to win the prisoners’ freedom.

Let’s put some numbers on this. First, the warden gets a lottery-type machine with 23 ping-pong balls that are continually mixed and will present one ball, at random, on demand. He writes each prisoner’s name on a ball, loads the machine, and leaves it running. Every 15 minutes he has his guards get one ball and take that prisoner to the switch room (returning the ball to the machine). He does this 24 hours/day for one year. This gives 96 visits to the switch room per day or a total of 35,040 visits to the switch room. On average, each prisoner will visit the switch room 1523 times. Remember, the probability of random events tends toward the average with large samples. It is highly probable that the prisoners will get their freedom before the year is up.

Thanks guys, it looks like most of you have nailed the problems with this puzzle.

Dan L was first to emphasize the most important point in my original post.

Warden doesn’t promise mechanically-driven randomness. He says he MIGHT skip around among them, and he MIGHT choose one prisoner a few times, then move on to others in the same or different fashion.

He also says that given enough time, everyone will have visited the switch room an equal number of times. Given the fact we don’t know the length of “enough time,” we know it’s possible that one prisoner might have visited 5 - OR MORE - times while another hasn’t been there at all. We also don’t know whether Warden’s planning to run this thing beyond the first time one of the prisoners is released. He might, if some are in for only, say, six months…

The prisoners take up this challenge because it’s worthwhile. It has to shorten their terms without the risk of landing them in with the alligators.

Sorry, SBM, the puzzler states that prisoners WILL be chosen randomly. I simply suggested a mechanical way that could be accomplished. Who said 44 visits will guarantee a safe answer for Carlo? The answer is that 44 visits where Carlo finds the A switch [ON] and turns it [OFF] will guarantee a safe answer. Carlo will certainly visit the switch room many more than 44 times. You are wrong, as I and others have demonstrated.

Thanks guys, it looks like most of you have nailed the problems with this puzzle.

David L was first to emphasize the most important point in my original post.

Warden doesn’t promise mechanically-driven randomness. He says he MIGHT skip around among them, and he MIGHT choose one prisoner a few times, then move on to others in the same or different fashion.

He also says that given enough time, everyone will have visited the switch room an equal number of times. Given the fact we don’t know the length of “enough time,” we know it’s possible that one prisoner might have visited 5 - OR MORE - times while another hasn’t been there at all. We also don’t know whether Warden’s planning to run this thing beyond the first time one of the prisoners is released. He might, if some are in for only, say, six months…