## Task A-3.5.

How many integers can a finite set $S$ contain at most such that among any three elements of the set $S$ there are two different numbers whose sum is also in $S$?
## Solution.

Let $S$ be a finite set of integers such that among any three elements of the set $S$, there exist two distinct numbers whose sum is also in $S$. We will show that $S$ cannot have more than 7 elements.

Assume that $S$ has at least three positive elements. Let $a, b, c$ be the three smallest positive elements of $S$ with $a < b < c$. Since $a + b > b$ and $a + b < c$, it must be that $a + b \in S$. Since $a + b > b$ and $a + b \in S$, it must be that $a + b = c$.

Let $x$ be the largest element of $S$ that is less than $a$. Consider the elements $x, b, c$. If $x > 0$, then $x + c > c$ and $b + c > c$, so it must be that $x + b \in S$. Since $x + b > b$, it must be that $x + b = c = a + b$, i.e., $a = x$, which is not possible. Therefore, $x$ cannot be positive, i.e., $S$ contains exactly 3 positive numbers.

Similarly, we show the implication: if $S$ contains at least 3 negative numbers, then $S$ contains exactly 3 negative numbers. In other words, the set $S$ can contain at most 3 numbers of the same sign. Therefore, $S$ can contain at most 7 elements (three positive, three negative, and the number 0).

An example of a set $S$ with 7 elements that has the desired property is

$$
S = \{-3, -2, -1, 0, 1, 2, 3\}
$$

## COUNTY COMPETITION IN MATHEMATICS

## 4th grade - high school - A variant

28th February 2017.

## IF A STUDENT HAS A DIFFERENT APPROACH TO SOLVING THE TASK, THE COMMITTEE IS OBLIGED TO GRADE AND EVALUATE THAT APPROACH IN AN APPROPRIATE MANNER.