8. 99 wise men sat at a round table. They know that fifty of them are wearing hats of one of two colors, and the other forty-nine are wearing hats of the other color (but it is not known in advance which of the two colors 50 hats are, and which 49 are). Each wise man can see the colors of all the hats except his own. All the wise men must simultaneously write down (each on their own piece of paper) the color of their hat. Can the wise men agree in advance to answer in such a way that at least 74 of them give the correct answer? (U. Feige, proposed by K. Knop)
Solution. Let there be 50 white and 49 black hats among the hats. It is clear that the 49 sages who see 50 white and 48 black hats know that they are wearing black hats. Now let each of those who see 49 white and black hats name the color that predominates among the 49 people following them clockwise. If A is one of these sages, and B is the 25th sage from A clockwise wearing a white hat. If there are no more than 48 people between A and B, A will say that he is wearing a white hat; otherwise, B will say that he is wearing a white hat. Since all 50 sages in white hats are divided into 25 such pairs (A, B), 25 of them will correctly name the color of their hat, and in the end, there will be at least $49+25=74$ correct answers.