Problem 10.4. There are 40 knights in a kingdom. Every morning they fight in pairs (everyone has exactly one enemy to fight with) and every evening they sit around a table (during the evening they do not change their sits). Find the least number of days such that:

a) the fights can be arranged in a way that every two knights have fought at least once;

b) round the table arrangements can be done in a way that every two knights have been neighbors around the table.

Ivailo Kortezov
10.4. a) There are $\frac{40.39}{2}=20.39$ pairs of knights. Since there are 20 pairs every morning we need at least 39 days. For 39 days the arrangement of the fights can be done in the following way: place 39 of the knights $A_{1}, A_{2}, \ldots, A_{39}$ at the vertices of a regular 39-gon and place the last knight $B$ at its center.

Let $B$ fight $A_{i}$ on the day $i$ and the remaining fights be $A_{i-j}$ against $A_{i+j}$ (the chord $A_{i-j} A_{i+j}$ is perpendicular to $B A_{i}$, where the indices are taken modulo 39. Since 39 is an odd number every chord is perpendicular to one radius and therefore every pair fights in a certain day.

б) The neighboring pairs are $\frac{40.39 .2}{2}=40.39$. Since there are 40 pairs we need at least 39 evenings. Using a) the needed arrangement for 39 days can be done in the following way: connect all segments corresponding to the fights on days $i$ and $i+1$ (the days are numbered modulo 39). We obtain the closed broken line

$$
B A_{i} A_{i+2} A_{i-2} A_{i+4} A_{i-4 \ldots} A_{i+38} A_{i-38}
$$

(note that $A_{i-38}=A_{i+1}$ ), which includes 40 points without repetition (no two indices differ by 39 because of parity arguments and since the largest difference equals $38-(-38)<2.39)$.

Therefore this broken line contains all 40 points and we take this distribution of the knights around the table at evening $i$. According to a) every two knights are neighbors on the day before their fight and on the day of the fight.