## Problem B1

Call a set of 3 distinct elements which are in arithmetic progression a trio. What is the largest number of trios that can be subsets of a set of $n$ distinct real numbers?

## Answer  $(\mathrm{m}-1) \mathrm{m}$ for $\mathrm{n}=2 \mathrm{~m}$  $\mathrm{m}^{2}$ for $\mathrm{n}=2 \mathrm{~m}+1$


## Solution

Let $\mathrm{X}$ be one of the elements. What is the largest number of trios that can have $\mathrm{X}$ as middle element? Obviously, at most $\max (\mathrm{b}, \mathrm{a})$, where $\mathrm{b}$ is the number of elements smaller than $\mathrm{X}$ and a is the number larger. Thus if $n=2 m$, the no. of trios is at most $0+1+2+\ldots+m-1+m-1+$ $\mathrm{m}-2+\ldots+1+0=(\mathrm{m}-1) \mathrm{m}$. If $\mathrm{n}=2 \mathrm{~m}+1$, then the no. is at most $0+1+2+\ldots+\mathrm{m}-1+\mathrm{m}+\mathrm{m}-$ $1+\ldots+1+0=\mathrm{m}^{2}$

These maxima can be achieved by taking the numbers $1,2,3, \ldots, \mathrm{n}$.

