Denote $S$ as the subset of $\{1,2,3,\dots,1000\}$ with the property that none of the sums of two different elements in $S$ is in $S$. Find the maximum number of elements in $S$.
Problem
Source: CentroAmerican & Caribbean MO 1999 Q6
Tags: floor function, induction, combinatorics proposed, combinatorics
25.01.2007 10:16
25.01.2007 19:40
That's not a solution, it's an answer lacking justification. A solution would include a proof that no set with 335 elements is possible. Unfortunately, that result is false. In particular, taking all numbers larger than or equal to 500 gives an $S$ with 501 elements. (Another reason that result is false is that your set actually contains 335 elements, not 334.)
26.01.2007 16:14
Here's a solution outline: if 1000 is replaced by $n$, the answer is $\left\lfloor \frac{n}{2}\right\rfloor+1$. We actually prove something more, by induction: * If 1000 is replaced by $2n$, the max is $n+1$, and in every maximal set there are a pair of elements which sum to $2n+1$. * If 1000 is replaced by $2n+1$, the max is $n+1$, and there is some maximal set in which no pair of elements sum to $2n+2$. Together with the base cases 1, 2, these are not very hard to prove, and they induct to give us the answer above.
30.12.2010 21:50
I'm sure it's just 501 as JBL's formula would give us: The set would be $ \{500, 501, 502,\dots,1000\} $
25.08.2020 03:01
The answer is $501$, which can be achieved with the set $$\{500, 501, 502, \dots 1000\}$$Now, let's prove that this is the maximum. Let $C$ be the greatest element of $S$. Consider the $\left\lfloor \dfrac{C}{2}\right\rfloor$ pairs $$(1, C-1), (2, C-2), \dots \bigg(\left\lfloor \dfrac{C}{2}\right\rfloor, \left\lceil \dfrac{C}{2}\right\rceil\bigg)$$As there are not two elements in $S$ that add up to $C$ (as it belongs to $S$), we can have at most one number of each pair. Note that every number smaller than $C$ is in one of such pairs, and that there can't be an element greater than $C$ in $S$, as $C$ is the greatest. Thus, counting $C$, we can have at most $$\left\lfloor \dfrac{C}{2}\right\rfloor+1\le\left\lfloor \dfrac{1000}{2}\right\rfloor+1=501$$numbers in $S$. We are done. $\square$
25.08.2020 07:43
We call a number "special" if it is in $S$. First notice that the set $S = \{500, 501, ..., 999, 1000\}$ is a valid set, and has $501$ elements. Now we prove that $501$ is the maximal amount of elements that $S$ can have. Let $d$ denote the smallest special number. It is clear that for any number $n$, if $n$ is special then $n - d$ cannot be special without contradicting the defining property of $S$. The only exception to this rule, however, is if $n = 2d$, in which case the contradiction does not occur. Now we define: $I = \{1, 2, ..., 999, 1000\}\backslash\{d, 2d\}$. Notice that $I$ contains at least $|S| - 2$ special numbers. This occurs in the case where $2d$ is special also. Let $x$ denote the amount of special numbers in $I$. We proceed to show that the function $f(n) = n - d$ is an injective function between special numbers in $I$ and non-special numbers in $I$. This can be done by noticing that in $I$, it is always true that if $n$ is special then $n - d$ cannot be, since $I$ does not include the exception $n = 2d$. Furthermore, we know that $n - d$ is in the set $\{1, ..., 1000\}$ because, by definition, $1000 > n > d$ which implies $1000 > n - d > 0$. Lastly, it is clear that, since all special numbers are distinct, then their images under this function are distinct, and the injection is complete. This injection tells us that, for every one of the special number in $I$ there is a distinct non-special number in $I$. And it is clear that the intersection of all these pairs is smaller than the set $I$. That is, $2(|S|-2) \leqslant 2x \leqslant |I| = 1000 - 2$, from which we obtain $2|S| - 4 \leqslant 998$ $|S| \leqslant 501$ Which completes our proof. $\square$