Maths problem/puzzel – Why does the solution work?
Here is the puzzle:
Ten prisoners are brought into a room and each is given a random number between 1 and 10. The same number may be given to more than one person. They can see the numbers of the others, but not their own. They are not allowed to communicate. After a certain amount of time, they must all say a number between 1 and 10 at the same time. They will survive if at least one of them says the number they were given. Before entering the room, they have a short time to think of a strategy. What is this strategy?
Solution:
>!Each person adds up all the numbers they can see that the others have. Let’s say the numbers are 2, 2, 3, 5, 5, 6, 7, 8, 8, 10. The first person has the number 2. The sum of the other numbers is 54. The first person now adds a number so that the last digit is 1. So 54 + 7 = 61. This means the number the first person says is 7. The second person does the same, except the last digit must be a 2. And so it goes on. Eventually, the correct number will be named. !< (Contains spoilers if you want to solve it yourself)
The question now is: Why does this work?