📜 ⬆️ ⬇️

Difficult task about prisoners

They recently told me a super-task, it took several days to solve.

There are infinitely many prisoners (a countable number) numbered with natural numbers. Each prisoner knows all the numbers, including his own. Prisoners are able to think infinitely quickly, and they have infinitely a lot of memory. First they have time to discuss the algorithm.
They are arranged in order, so that the first looks in the back of the second, the second in the back of the third, etc. They are simultaneously put on caps of two colors. Each prisoner sees which caps are worn on prisoners with large numbers (the first sees all caps except his own, the second sees everything except his and the first, etc.). They no longer share information. Then each of them should simultaneously tell everyone what cap it is on. Who does not guess - that shot. How to make so that only a finite number of prisoners were shot?

PS Not enough karma to move to the blog "Entertaining puzzles." Thanks for the karma, transferred to the blog "Entertaining puzzles."
')
UPD Solution in the comments .

Source: https://habr.com/ru/post/54824/


All Articles