5. Let be a natural number and a convex polygon with vertices. Each of the sides and diagonals of this polygon is colored either blue or red. Determine the smallest such that, for any such coloring, there exist three vertices of the observed polygon that are mutually connected by segments of the same color.
Problem 854
Official solution
5. For , we color the sides in one color, for example, blue, and the diagonals in another - red. It is then obvious that there does not exist a triangle whose vertices are the vertices of this quadrilateral, and all sides are colored in the same color.
!
For , we color the sides in one color, for example, blue, and the diagonals in another - red. It is then obvious that there does not exist a triangle whose vertices are the vertices of this pentagon, and all sides are colored in the same color.
This proves that the desired .
!
Now, let's prove that for any hexagon, no matter how we color each of the sides and diagonals of a regular hexagon in blue or red, there must exist at least one triangle whose vertices are also vertices of the hexagon and whose sides are all colored in the same color.
Consider one vertex of the hexagon, let's call it A. From it, there are five connections to other vertices, which are colored either blue or red.
Since , by the Dirichlet principle, there exists a color such that at least three of these connections are colored in that color. For example, let's say it is red.
!
Label the vertices that determine these connections with vertex as , and , so the red connections are , and .
If at least one of the connections , or is colored red, we have a monochromatic (red) triangle.
If not, then the triangle is monochromatic (blue).
Note: If a student does not consider the case but does consider the case and shows that it is possible to color the pentagon such that no triangle has monochromatic sides, they do not lose points.