The 100 prisoner riddle - counterintuitive puzzle

It could not. You have a 1% chance of the first number being part of a loop of 1. The chance of the rest of them also being loops of one is astronomically small.

Thank you for both answers, crystal clear and easy to understand.

I’m with you. I cannot figure out how this strategy works. Perhaps somebody can explain it in really simple terms?

Lets say the warden gets wind of the first plan: he makes a 51-loop by having 1-2-3…-51-1. You don’t know exactly how the warden has messed with the sequence but you suspect he has deliberately planted a long loop somewhere, so you add 40 to every ticket: you are prisoner 23 so you go to locker 23 and see an instruction for 24, so you go to 64. 64 tells to to go to 88, so you go to 28, which sends you to 29, so you actually go to 69 etc. You are creating a completely different loop which may or may not foil the wardens plan. Everybody else is also following a different loop to the original.

You are right, of course. I misheard the video and thought that if there is a 51-loop, the prisoners could always foil the plan by adding a constant to each box. By doing so, they are breaking the warden’s 51-loop, but they might be creating another 51(or greater)-loop.

Mathematically, permutations of a number of objects form a group. This means that for any permutations we have (\pi\rho)\sigma=\pi(\rho\sigma), for any permutation e\pi=\pi e=\pi where e is the identity permutation, and it also has an inverse permutation satisfying \pi\pi^{-1}=\pi^{-1}\pi=e.

By the way, “100 prisoners” does not really specify the exact riddle—they all go like that. For example, 100 prisoners are seated in a column of chairs and each wears a red, green, or blue hat. Each prisoner can only see the color of hats in front of them, not their own. The warden asks each one in turn, let’s say starting from the back, what is the color of their hat, and if the prisoner answers correctly, he or she is spared, otherwise executed.

Another puzzle that is based around each person having only 50% chance, but together they can do better:

Ahmed, Barbara, Cristof and Dani are told that they will each be taken to separate rooms where they will have a red or a blue hat put on their head chosen fairly on a 50/50 coin flip. They will not see their own hat but will be informed about the colour of their friends’ hats, they can then independently elect to declare the colour of their own hat. If nobody declares, or anybody declares wrong, then they go back to the cells. If at least one person declares correctly and nobody declares wrong they’re set free.

Solution

A does nothing; B, C and D consider each other ignoring A, if both the hats are the same colour they declare their hat to be the other colour, if the hats are different they keep quiet: gets them released 75% of the time.

The box that is labelled with your number (call it #) has a paper inside with number N on it. The key point is that somewhere in the room there must be a box labelled X which contains a paper inside with your number on it. Box # and Box X have to be in the same closed loop. There can’t be any branches in any loop because each label and each paper are uniquely numbered with the same set of numbers.

I’d only heard this for two colors, but three is a simple variation. Suppose we say that red=0, green=1, and blue=2. The first person can’t do better than a 1/3 chance at living. But what they can do is look at all the colors ahead, and call out the value mod 3 that they get by adding together all the numbers of the hats in front of them. That person then lives or dies by random chance. But the second person can see all the colors in front of them, and can use the difference to determine the their own color with 100% confidence. Say they heard 2, but they count 1 (mod 3). Then, their own hat must be 1 (green). Or, they heard 0 and see 1–then, their hat must be a 2. Each subsequent person can keep track of the running total and so all prisoners after the first can live.

This does depend on the first person committing a “selfless” act. They don’t lose anything by it, but they also don’t benefit. Perhaps the puzzle should be rephrased so that if 99 of them guess the right color, all will be freed.

Yeah I finally got my head around it by just imagining a room of three boxes and keys and just running through all possibilities.

It became pretty clear that the starting box is always reached at the end of the loop.

Where are these weird prisons that have prisoners participate in these mathematical games? I may be going out on a limb here, but I don’t think there are that many prisoners with high level math skills that would be working out any of these problems and making it barely worth the effort, or not worth the effort at all for the warden to organize them in the first place. It would be much easier to take all 100 prisoners out in the yard and turn the machine guns on them.

Look at the problems here, do you really think the prisoners are going to leave all those envelops in the room just the way they were when they came in? No way, they’ll be lucky if all those envelopes don’t end up burning in a pile. And do you really think some warden is going to let 100 prisoners go free if by chance or design they manage to solve the puzzle? Yeah, right. Like some warden wants to go explain it to his boss.

Here’s another prisoner puzzle. .

https://www.cartalk.com/radio/puzzler/prison-switcharoo

If stating these as prisoner puzzles bothers you, change them to a class of advanced mathematics students who will only receive passing grades if they can find the correct (or best) solution

My friend (a math department chair at a community college) would argue that math students are much better cheaters than anybody found in prison.

They’re in that tiny European country whose name I can never remember, the one with spherical cows on frictionless fields that physicists talk about.

Iceland? Greece?

Must be one of those islands described by Smullyan where people sometimes, or always, or never, tell the truth, belong to various clubs, and carry unusual papers.

And are a little stabby:

I just watched the video without thinking about it and it blew my mind. I love statistics

I’ll point out another flaw with the scenario: a warden can’t decide to let prisoners go.

Prisons don’t choose to lock people up and prisons don’t choose to let people go. Those decisions are made by judges and legislators. But it’s the people who work in the prison who often get held responsible for who’s in prison.

Then a slight change. The puzzle is part of their sentence, and the warden is just the proctor.

Anyway, I’ve always thought that prisoners’ games to be a bit morbid, especially with the execution bit, but the point is that you have a group of people who have no choice but to participate, and the consequences of winning or losing are about as big as you can get.