2012 AMC 10B Problem 22
Let be a list of the first 10 positive integers such that for each either or or both appear somewhere before in the list. How many such lists are there?
Show solution without answering
Key insight
The numbers written so far always form a run of consecutive numbers. Reading the list backward, each number removed must be an end of the run: 2 choices, nine times.
Solution
1. Try a small case. Use the numbers . Check all six orders:
- , , , work;
- fails ( comes second, but neither nor is before it);
- fails ( comes second, but is not before it).
So there are lists.
2. What the rule really says. Look at the numbers written so far. At the start there is one number, a "run" of consecutive numbers of length . Each new number must be more or less than something already written, and it can't repeat a number. So it must be just below the smallest number so far or just above the largest. Either way the numbers written so far are still a run of consecutive numbers, like .
3. Read the list backward. All ten numbers form the run . The first nine must also form a run, so the last number must be an end: or . That is choices.
4. Take away. The remaining nine numbers are a run, and must be one of its two ends: choices again.
5. This keeps going for : nine numbers, each with choices. At the end one number is left, and it has to be .
6. Total:
This matches the small case: with numbers there are lists.
The answer is .
Why this works
The rule only talks about neighbors, but it has a big effect: the numbers used so far are always a solid run. Counting backward makes every step look the same (always ends to choose from). Counting forward, the number of choices changes once the run hits or , which makes the count messy. When a count is awkward in one direction, try the other.
Alternative approach
Build the pattern from small cases: number gives list, numbers give lists ( and ), numbers give lists. Doubling each time suggests for numbers, and is one of the choices. The backward argument above shows why the doubling always continues.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
The rule says every new entry is a neighbor of something already listed. So the set is always a block of consecutive integers: it starts as a single number, and attaching a neighbor to a block of consecutive integers produces a longer block. Conversely, any list in which each prefix is a block satisfies the rule, because a new number that extends a block is adjacent to the block's end.
Now count by reading the list backwards. The full set is a block, and must be one of its two ends ( or ), otherwise the first nine entries would not form a block. Removing leaves a block of nine numbers, and must be one of its two ends. This continues: each of is an end of the current block, giving choices each, and is whatever single number remains.
Total:
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.5)
- Intermediate Counting & Probability, Chapter 10: Recursion (§10.2, §10.3)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.4)
- Intermediate Counting & Probability, Chapter 4: Constructive Counting and 1-1 Correspondences (§4.4, §4.5, §4.6)
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.