AMC 10 Step by Step

2012 AMC 10B Problem 22

P21-25~6 minPrint

Let (a1,a2,…,a10)(a_1,a_2, \dots ,a_{10}) be a list of the first 10 positive integers such that for each 2≤i≤102 \le i \le 10 either ai+1a_i+1 or ai−1a_i-1 or both appear somewhere before aia_i in the list. How many such lists are there?

Log in to save your progress.
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 1,2,31, 2, 3. Check all six orders:
- 123123, 213213, 231231, 321321 work;
- 132132 fails (33 comes second, but neither 22 nor 44 is before it);
- 312312 fails (11 comes second, but 22 is not before it).
So there are 44 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 11. Each new number must be 11 more or 11 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 4,5,6,74, 5, 6, 7.
3. Read the list backward. All ten numbers form the run 1,…,101, \ldots, 10. The first nine must also form a run, so the last number a10a_{10} must be an end: 11 or 1010. That is 22 choices.
4. Take a10a_{10} away. The remaining nine numbers are a run, and a9a_9 must be one of its two ends: 22 choices again.
5. This keeps going for a10,a9,…,a2a_{10}, a_9, \ldots, a_2: nine numbers, each with 22 choices. At the end one number is left, and it has to be a1a_1.
6. Total:
29=512.2^9 = 512.

This matches the small case: with 33 numbers there are 22=42^2 = 4 lists.

The answer is (B) 512\boxed{\textbf{(B)}\ 512}.

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 22 ends to choose from). Counting forward, the number of choices changes once the run hits 11 or 1010, which makes the count messy. When a count is awkward in one direction, try the other.

Alternative approach

Build the pattern from small cases: 11 number gives 11 list, 22 numbers give 22 lists (1212 and 2121), 33 numbers give 44 lists. Doubling each time suggests 29=5122^9 = 512 for 1010 numbers, and 512512 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 {a1,…,ai}\{a_1, \dots, a_i\} 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 {1,…,10}\{1, \dots, 10\} is a block, and a10a_{10} must be one of its two ends (11 or 1010), otherwise the first nine entries would not form a block. Removing a10a_{10} leaves a block of nine numbers, and a9a_9 must be one of its two ends. This continues: each of a10,a9,…,a2a_{10}, a_9, \dots, a_2 is an end of the current block, giving 22 choices each, and a1a_1 is whatever single number remains.

Total:
29=512.2^9 = 512.

The answer is (B) 512\boxed{\textbf{(B)}\ 512}.

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.