Problem 4.7. At the festival of namesakes, 45 Alexanders, 122 Borises, 27 Vasily, and several Gennady arrived. At the beginning of the festival, all of them stood in a row so that no two people with the same name stood next to each other. What is the minimum number of Gennady that could have arrived at the festival?
Answer: 49.

Solution. Since there are a total of 122 Boris, and between any two of them stands at least one non-Boris (Alexander/Vasily/Gennady), there are at least 121 non-Boris. Since there are a total of 45 Alexanders and 27 Vasilies, there are at least $121-45-27=49$ Gennadys.

Note that there could have been exactly 49 Gennadys at the festival. Suppose in the line stood 122 Boris. Then 121 gaps between them were filled by other people: the first 45 gaps were filled by one Alexander each, the next 27 by one Vasily each, and the next 49 by one Gennady each. It is easy to see that all conditions of the problem are satisfied.