## Task 1.

Determine the smallest real number $C$ such that for all positive real numbers $a_{1}, a_{2}, a_{3}, a_{4}$ and $a_{5}$, it is possible to choose distinct indices $i, j, k, l$ such that

$$
\left|\frac{a_{i}}{a_{j}}-\frac{a_{k}}{a_{l}}\right| \leqslant C
$$
## Solution.

The answer is $C=\frac{1}{2}$. Consider the numbers $1,2,2,2, n$, where $n>5$, all the fractions we can get from these numbers are

$$
\frac{1}{n}<\frac{2}{n}<\frac{1}{2}<1<2<\frac{n}{2}<n
$$

The smallest two fractions cannot be obtained simultaneously (both use the number $n$). The difference between any larger than $\frac{1}{2}$ and any other is at least $\frac{1}{2}$, so the smallest difference we can get is $\frac{1}{2}-\frac{2}{n}$. This shows that $C \geqslant \frac{1}{2}-\frac{2}{n}$ for any natural number $n$, which implies that $C \geqslant \frac{1}{2}$.

Let $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}$ be arbitrary positive real numbers. Without loss of generality, we can assume $a_{1} \leqslant a_{2} \leqslant a_{3} \leqslant a_{4} \leqslant a_{5}$. The numbers

$$
\frac{a_{1}}{a_{2}}, \frac{a_{3}}{a_{4}}, \frac{a_{1}}{a_{5}}, \frac{a_{2}}{a_{3}}, \frac{a_{4}}{a_{5}}
$$

lie in the interval $[0,1]$. There are five of them, so at least three lie in one of the intervals $\left[0, \frac{1}{2}\right]$ or $\left[\frac{1}{2}, 1\right]$. This means that some two consecutive (where the first and last are also considered consecutive) lie in that interval. The numbers in these two fractions have different indices and the fractions are at most $\frac{1}{2}$ apart. This gives us that $C \leqslant \frac{1}{2}$ and the proof is complete.