
97.1. Let A be a set of seven positive numbers. Determine the maximal number of triples $(x, y, z)$ of elements of A satisfying $x<y$ and $x+y=z$.


Solution. Let $0<a_{1}<a_{2}<\ldots<a_{7}$ be the elements of the set $A$. If $\left(a_{i}, a_{j}, a_{k}\right)$ is a triple of the kind required in the problem, then $a_{i}<a_{j}<a_{i}+a_{j}=a_{k}$. There are at most $k-1$ pairs $\left(a_{i}, a_{j}\right)$ such that $a_{i}+a_{j}=a_{k}$. The number of pairs satisfying $a_{i}<a_{j}$ is at most $\left\lfloor\frac{k-1}{2}\right\rfloor$. The total number of pairs is at most

$$
\sum_{k=3}^{7}\left\lfloor\frac{k-1}{2}\right\rfloor=1+1+2+2+3=9
$$

The value 9 can be reached, if $A=\{1,2, \ldots, 7\}$. In this case the triples $(1,2,3),(1,3,4)$, $(1,4,5),(1,5,6),(1,6,7),(2,3,5),(2,4,6),(2,5,7)$, and $(3,4,7)$ satisfy the conditions of the problem.
