Riddle similar to the 100 prisoners riddle, but different

1.6k Views Asked by At

The riddle goes like this:

$\qquad$ There are $100$ prisoners standing in line, each with a number on their back. The numbers are all different, and range from $1$ to $101$ (i.e. one number is missing). The person in the back of the line can see all 99 prisoners ahead of him's numbers. The prisoner in the front of the line sees no numbers. Starting with the prisoner in the back, each prisoner must shout the number on their own back, but each number can be said aloud only once.

$\qquad$The first prisoner clearly only has a $50$% chance of guessing his number correctly. However, once he has guessed his number correctly, the remaining 99 prisoners have a $100$% chance of correctly guessing the number on their backs.

What is their strategy to achieve this?

Update:

I have been given a hint that the solution "does not just involve modulo sums." There is more to the solution than just a modular trick.

2

There are 2 best solutions below

3
On

I can think of a strategy that works if the whole bunch of people are allowed to make at most one error (a reasonable assumption, I think, given that no matter what strategy he uses, the last guy gets the answer correct with probability at most 0.5): have the last guy shout out the sum modulo 101 of the two missing numbers. Then every person in front of him will have to choose between 3 missing numbers (having eliminated the ones that have already been shouted out), and they just need to see which two of the three numbers, when summed, give the one that the last person shouted out. This leaves them with only one possibility, which they shout out. Note: this only works because for any 3 distinct numbers (a,b,c), the sum of any two distinct pairs of them cannot be the same (even if the sum is modulo some integer).

0
On

The back prisoner imagines another behind with the missing number. He then guesses the number that will make the list an even permutation of the numbers $1$ to $101$. The person in front of him (assuming the first guess is correct) knows all the numbers but two and can select the one that makes the permutation even. Each prisoner in turn has just two choices (assuming the previous shouts are correct) and one of those will make the permutation even.

Second solution: back person shouts the number on the front person. As he has failed to state his number correctly, there is no requirement that the others are correct.