## Task A-3.5.

The base of the pyramid is a regular $n$-sided polygon. Each side of the base is painted black, while each diagonal of the base and each lateral edge of the pyramid is painted either red or blue. Determine the smallest natural number $n \geqslant 4$ for which there necessarily exists a triangle whose vertices are vertices of the pyramid and all three sides are of the same color.
## Solution.

The answer is $n=9$.

Let the apex of the pyramid be $V$. If $n=9$, then by the Pigeonhole Principle, we conclude that at least five lateral edges are painted the same color. Without loss of generality, let this color be red and let these edges be $\overline{V A}, \overline{V B}, \overline{V C}, \overline{V D}$, and $\overline{V E}$.

If $X$ and $Y$ are different points from the set $\{A, B, C, D, E\}$ such that the length $\overline{X Y}$ is red, then the sides of the triangle $X Y V$ are of the same color.

Otherwise, all segments determined by the points $A, B, C, D, E$ are blue or black. Among these five points, there must be two that are not adjacent vertices of the nonagon, and between which none of these points appear. Assume these are $A$ and $E$, and that the points $A, B, C, D, E$ are arranged in this order clockwise.

The segments $\overline{A C}, \overline{C E}$, and $\overline{E A}$ are diagonals of the nonagon at the base of the pyramid, so they are all blue. Thus, the triangle $A C E$ is monochromatic.

We will now show that for $n=8$, there exists a coloring of the diagonals of the base of the pyramid and the lateral edges for which there is no monochromatic triangle. Note that removing vertices from the base of this example gives us an example of a pyramid with the same property for $n-1$, then the segments $\overline{A_{i} B_{j}}$ and $\overline{A_{k} B_{j}}$ are of different colors, so the triangle is not monochromatic.

## COUNTY COMPETITION IN MATHEMATICS

4th grade - high school - A variant
March 5, 2020.

IF A STUDENT HAS A DIFFERENT APPROACH TO SOLVING THE PROBLEM, THE COMMITTEE IS OBLIGED TO GRADE AND EVALUATE THAT APPROACH APPROPRIATELY.