4. At the end of a chess tournament, it was determined that each participant had earned exactly half of their points playing against the competitors who finished in the last three places. How many participants were there in the tournament?

(Each participant played one game against each of the other participants. A win earns one point, a draw earns half a point, and a loss earns no points.)
Solution. Let $n$ participants take part in the tournament. The last three participants played three matches among themselves and shared three points. These three points are half of the points they earned in the end, so the other half of their points were earned in matches against the remaining $n-3$ participants. This means that in the matches against the remaining $n-3$ participants, the last three earned three points. According to this, the remaining $n-3$ participants played $3(n-3)$ matches against the last three and earned a total of $3(n-3)-3$ points. From the condition of the problem, this number of points is equal to the number of points they shared among themselves, which is $\frac{1}{2}(n-3)(n-4)$.

Thus, we get the equation $3(n-3)-3=\frac{1}{2}(n-3)(n-4)$. Its solutions are $n_{1}=4$ and $n_{2}=9$. The case $n_{1}=4$ does not satisfy the conditions of the problem because the first participant has no one to earn half of their points with. Therefore, the tournament had nine participants.