AMC 10 Step by Step

2022 AMC 10A Problem 22

P21-25~7 minPrint

Suppose that 1313 cards numbered 1,2,3,…,131, 2, 3, \ldots, 13 are arranged in a row. The task is to pick them up in numerically increasing order, working repeatedly from left to right. In the example below, cards 1,2,31, 2, 3 are picked up on the first pass, 44 and 55 on the second pass, 66 on the third pass, 7,8,9,107, 8, 9, 10 on the fourth pass, and 11,12,1311, 12, 13 on the fifth pass. For how many of the 13!13! possible orderings of the cards will the 1313 cards be picked up in exactly two passes?

figure

Log in to save your progress.
Show solution without answering

Key insight

Two passes means cards 1 to k appear in increasing order and so do cards k+1 to 13. Choosing which k spots hold the first group decides the whole row.

Solution

Step 1: a small case. With 33 cards, check all 66 rows:

RowPasses
1 2 31\,2\,311
1 3 21\,3\,222 (first 1,21, 2, then 33)
2 1 32\,1\,322 (first 11, then 2,32, 3)
2 3 12\,3\,122 (first 11, then 2,32, 3)
3 1 23\,1\,222 (first 1,21, 2, then 33)
3 2 13\,2\,133

So 44 rows take exactly two passes. Notice that in each of them the first pass takes 1,…,k1, \ldots, k and the second pass takes the rest.

Step 2: what two passes means. A pass picks up cards in increasing order while moving to the right. So if the first pass collects 1,2,…,k1, 2, \ldots, k, those cards appear from left to right in increasing order. If the second pass collects all the rest, then k+1,…,13k + 1, \ldots, 13 also appear from left to right in increasing order. Here kk is between 11 and 1212.

Step 3: count rows made of two increasing groups. Fix kk. To build such a row, choose which kk of the 1313 spots hold the small cards. Then the small cards fill those spots in increasing order, and the big cards fill the other spots in increasing order. So there are (13k)\binom{13}{k} such rows.

Step 4: remove the one row that takes a single pass. One of those rows is 1,2,…,131, 2, \ldots, 13 itself. Every other one takes exactly two passes. The first pass collects 11 to kk; could it keep going to k+1k + 1? Only if k+1k + 1 is to the right of kk. But kk is the rightmost small card and k+1k + 1 is the leftmost big card, so that would put every big card after every small card, which is the sorted row. So in every other row the first pass stops at kk, and the second pass sweeps up k+1k + 1 to 1313 in order. That gives (13k)−1\binom{13}{k} - 1 rows for this kk.

Step 5: add over kk. Different kk give different rows, since kk is how many cards the first pass collects. So the total is
∑k=112((13k)−1).\sum_{k=1}^{12} \left(\binom{13}{k} - 1\right).
All the (13k)\binom{13}{k} from k=0k = 0 to 1313 add to 213=81922^{13} = 8192 (the number of ways to pick any group of the 1313 spots). Leaving out k=0k = 0 and k=13k = 13 gives 8192−2=81908192 - 2 = 8190. Then subtract the 1212 sorted rows: 8190−12=81788190 - 12 = 8178.

Check with 33 cards: ((31)−1)+((32)−1)=2+2=4\left(\binom31 - 1\right) + \left(\binom32 - 1\right) = 2 + 2 = 4, matching the table.

The answer is (D) 8178\boxed{\textbf{(D)}\ 8178}.

Why this works

"Picked up in one pass" means "appears in increasing order", so a two-pass row is two increasing groups mixed together, and mixings are counted by choosing spots. The details to watch are the one sorted row for each kk, which needs only one pass, and the fact that each row has only one possible kk, so nothing is counted twice.

Concise solution

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

Suppose the first pass collects exactly the cards 1,2,…,k1, 2, \dots, k and the second pass collects k+1,…,13k+1, \dots, 13, where 1≤k≤121 \le k \le 12. A pass picks up cards in increasing order while scanning left to right, so in the row the cards 1,…,k1, \dots, k appear in increasing order, and so do the cards k+1,…,13k+1, \dots, 13.

Conversely, take any row in which both blocks {1,…,k}\{1,\dots,k\} and {k+1,…,13}\{k+1,\dots,13\} appear in increasing order. The first pass certainly collects 1,…,k1, \dots, k. It continues to k+1k+1 only if k+1k+1 sits to the right of kk. But kk is the rightmost card of the first block and k+1k+1 the leftmost of the second, so that would put the entire second block to the right of the entire first block, making the row 1,2,…,131, 2, \dots, 13, which is collected in one pass. Every other such row takes exactly two passes, with the first pass ending at kk.

For a fixed kk, a row with both blocks increasing is determined by choosing which kk of the 1313 positions hold the first block: (13k)\binom{13}{k} rows, of which one (the sorted row) must be excluded. Different kk give different rows, since kk is the number of cards collected in the first pass. Therefore the count is
∑k=112((13k)−1)=(213−2)−12=8192−14=8178.\sum_{k=1}^{12} \left(\binom{13}{k} - 1\right) = \left(2^{13} - 2\right) - 12 = 8192 - 14 = 8178.

The answer is (D) 8178\boxed{\textbf{(D)}\ 8178}.

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.