Problem

Source: Balkan MO 2013, Problem 4

Tags: search, induction, extremal principle, graph theory, set theory, combinatorics proposed



In a mathematical competition, some competitors are friends; friendship is mutual, that is, when $A$ is a friend of $B$, then $B$ is also a friend of $A$. We say that $n \geq 3$ different competitors $A_1, A_2, \ldots, A_n$ form a weakly-friendly cycle if $A_i$ is not a friend of $A_{i+1}$ for $1 \leq i \leq n$ (where $A_{n+1} = A_1$), and there are no other pairs of non-friends among the components of the cycle. The following property is satisfied: "for every competitor $C$ and every weakly-friendly cycle $\mathcal{S}$ of competitors not including $C$, the set of competitors $D$ in $\mathcal{S}$ which are not friends of $C$ has at most one element" Prove that all competitors of this mathematical competition can be arranged into three rooms, such that every two competitors in the same room are friends. (Serbia)