Let's start with a VERY classical problem and move on to the less well-known :)
The king decided to check the wise men and, of course, decided to make a check by putting caps on them and forcing each wise man to determine the color of his own cap.
In all tasks, a sage can NOT see the color of his own cap.
In all tasks, unless otherwise stated, the wise men cannot say a word.
In all tasks, the wise men are VERY smart, and, moreover, each of the wise men knows that the rest are not more stupid than him.
')
So let's get started ...
Task number one (classic from classic).
The king decided to check his two wise men. The king told them:
- I have three caps - one black and two white.
They'll tie you up, put a cap on your head, and I will throw out the third cap and you will never see it again. Then untie the eyes, so that every sage will see the color of the cap of the other, but will not see his own. After that, at any time, any of you may try to name the color of your cap. If he guesses, I gilt both; if not, I chop into sausage.
The wise men have managed for a while, but how?
Task number two.
The same task, but there were three wise men; there were three white caps, like the wise men, and two black caps. Three caps dressed on the wise men, the other two thrown away. How could any of them guess? Consider all cases :)
Task number three.
The king gathered 1000 wise men and said:
“In three days I will line you all up one after another.” I'll put on each cap - either black or white, and the number of blacks and whites is unknown to you. The last person in the column sees the colors of all the caps except his, the penultimate - all but his and the last, and so on. (the first does not see any).
The check will go like this. The executioner will ask each wise man in turn, starting with the last and ending first, the color of his cap (the wise men answer loudly and the answer is heard to everyone standing in the column). Whoever calls the color of his cap correctly - lives, incorrectly - dies (the execution takes place immediately and is also audible to everyone).
Come up with a strategy that guarantees the survival of the greatest number of sages.