Problem 6.8. In the country of Dragonia, there live red, green, and blue dragons. Each dragon has three heads, each of which always tells the truth or always lies. Moreover, each dragon has at least one head that tells the truth. One day, 530 dragons sat around a round table, and each of them said:

- 1st head: “To my left is a green dragon.”
- 2nd head: “To my right is a blue dragon.”
- 3rd head: “There is no red dragon next to me.”

What is the maximum number of red dragons that could have been at the table?
Answer: 176.

Solution. Consider an arbitrary red dragon. To the right of this dragon, at least one head must tell the truth. Note that the 1st and 3rd heads cannot tell the truth (since there is a red dragon to the left), so the 2nd head must tell the truth, and to the right of this dragon, there must be a blue dragon. Now consider the dragon to the left of the chosen red dragon. By similar reasoning, we understand that only the 1st head can tell the truth, and to the left of this dragon, there must be a green one.

From the previous reasoning, we get that for any red dragon, one position to the right there is definitely a blue dragon, and one position to the left - a green one. For each red dragon, we combine these three dragons into one group. Note that any dragon can be in at most one such group. Then we get that there are no more than $530 / 3$ < 177, i.e., no more than 176 such groups. Therefore, there are no more than 176 red dragons.

Now let's provide an example. Arrange 176 red dragons in a circle, and in 175 gaps between them, place a green and a blue dragon: ...RGRB..., and in one gap, place two blue and two green dragons: ...RBGBGR.... It is easy to check that all conditions are met: each dragon has at least one head that will tell the truth, and there are exactly 530 dragons in total.

![](https://cdn.mathpix.com/cropped/2024_05_06_8af0c885427e3e323cf9g-17.jpg?height=492&width=525&top_left_y=852&top_left_x=464)

## 7th grade