AMC 10 Step by Step

2025 AMC 10A Problem 21

P21-25~5 minPrint

A set of numbers is called sum-free if whenever xx and yy are (not necessarily distinct) elements of the set, x+yx+y is not an element of the set. For example, {1,4,6}\{1,4,6\} and the empty set are sum-free, but {1,4,5}\{1,4,5\} is not. What is the greatest possible number of elements in a sum-free subset of {1,2,3,...,20}\{1,2,3,...,20\} ?

Log in to save your progress.
Show solution without answering

Key insight

Look at the largest number in the set. Pair up the smaller numbers so each pair adds to it; the set can hold at most one number from each pair.

Solution

This is a "greatest possible" question, so it has two halves: find a set that works, then show nothing bigger can work.

Part 1: ten numbers is possible.

  1. Take the top half, 11,12,…,2011, 12, \ldots, 20. The smallest sum you can make is 11+11=2211 + 11 = 22, which is bigger than 2020. So no sum lands back in the set. That is 1010 numbers.
  2. (Another set that works: the odd numbers 1,3,5,…,191, 3, 5, \ldots, 19. Odd plus odd is always even, so a sum is never one of them.)

Part 2: eleven numbers is impossible.

  1. The largest number in the set is the one that limits everything, so look at it first. Suppose the largest number is 2020.
  2. Pair up the numbers below 2020 so that each pair adds to 2020:
1,191, 192,182, 183,173, 174,164, 165,155, 156,146, 147,137, 138,128, 129,119, 11

The number 1010 is left over without a partner.

  1. Because 2020 is in the set, the set cannot contain both numbers of any pair. For example, if it had 33 and 1717, then 3+17=203 + 17 = 20 would be in the set, which breaks the rule.
  2. The set cannot contain 1010 either, because 10+10=2010 + 10 = 20. (The problem says the two numbers may be the same.)
  3. So below 2020 the set has at most one number from each of the 99 pairs. Adding 2020 itself gives at most 9+1=109 + 1 = 10 numbers.
  4. If the largest number is smaller than 2020, the same pairing works, with even fewer numbers below it to choose from. For example, if the largest is 1919, the pairs 1+18,2+17,…,9+101{+}18, 2{+}17, \ldots, 9{+}10 give at most 99 numbers below it, and again at most 1010 in total.

Ten is possible and eleven is not, so the greatest size is 1010.

The answer is (C) 10\boxed{\textbf{(C)}\ 10}.

Why this works

When a question asks how many numbers you can pick without breaking a rule, look at one special number (here the largest) and see what it forbids. Pairing the other numbers so that each pair "fights" over one spot turns the question into counting pairs. The same idea shows that from 11 to nn you can never pick more than about half the numbers, and the top half always works.

Alternative approach

Count forbidden numbers instead of pairs. Say the set has kk numbers and the largest is mm. For each of the other k−1k - 1 numbers xx, the number m−xm - x cannot be in the set (otherwise x+(m−x)=mx + (m - x) = m). These k−1k - 1 "forbidden" numbers are all different from each other, because different values of xx give different values of m−xm - x. So there are kk numbers in the set, plus k−1k - 1 different numbers that are not in the set, all between 11 and 2020. That is 2k−1≤202k - 1 \le 20, so k≤10k \le 10.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Ten is attainable. Two different sets of size 1010 work.

  • The top half {11,12,…,20}\{11, 12, \ldots, 20\}: any two of its elements (equal or not) sum to at least 2222, which is outside {1,…,20}\{1, \ldots, 20\} altogether.
  • The odd numbers {1,3,5,…,19}\{1, 3, 5, \ldots, 19\}: a sum of two odd numbers is even, so it is never one of them.

Eleven is impossible. Let SS be sum-free with ∣S∣=k|S| = k and let mm be its largest element, so m≤20m \le 20.

For any x∈Sx \in S we cannot have m−x∈Sm - x \in S, since then x+(m−x)=mx + (m-x) = m would be an element of SS. So the "mirror" map x↦m−xx \mapsto m - x sends SS into the complement of SS.

Apply this to the k−1k-1 elements of S∖{m}S \setminus \{m\}. Each such xx satisfies 1≤x≤m−11 \le x \le m-1, so its mirror m−xm - x also lies in {1,2,…,m−1}\{1, 2, \ldots, m-1\}, and the map is injective. We therefore have two sets inside {1,2,…,m−1}\{1, 2, \ldots, m-1\}:
S∖{m}and{ m−x:x∈S∖{m} },S \setminus \{m\} \quad \text{and} \quad \{\,m - x : x \in S \setminus \{m\}\,\},
each of size k−1k-1, and by the previous paragraph they are disjoint. Counting,
2(k−1)≤m−1≤19,2(k-1) \le m - 1 \le 19,
so k−1≤9.5k - 1 \le 9.5, and since kk is an integer, k≤10k \le 10.

The greatest possible size is 1010.

The answer is (C) 10\boxed{\textbf{(C)}\ 10}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.