AMC 10 · 2024 · #6

Grade 4 counting
pattern-recognitionsystematic-enumerationsequences-arithmetic easier-related-problempattern-recognitionoptimization-counting ↑ Prerequisites: systematic-enumerationmulti-digit-arithmetic
📏 Medium solution 💡 3 insights

Problem

What is the minimum number of successive swaps of adjacent letters in the string ABCDEFABCDEF that are needed to change the string to FEDCBA?FEDCBA? (For example, 33 swaps are required to change ABCABC to CBA;CBA; one such sequence of swaps is
ABCBACBCACBA.ABC\to BAC\to BCA\to CBA.)

Pick an answer.

(A)
~6
(B)
~10
(C)
~12
(D)
~15
(E)
~24
View mode:

Toolkit + CCSS Solution

Understand

Restated: Starting from the string $ABCDEF$, you may swap any two adjacent letters at a time. What is the smallest number of such swaps that turns the string into its reverse, $FEDCBA$?

Givens: Start string: $ABCDEF$ (length $6$); Target string: $FEDCBA$ (the reverse); Each move swaps two letters that sit next to each other; Worked example: $ABC \to BAC \to BCA \to CBA$ takes $3$ swaps; Answer choices: (A) $6$, (B) $10$, (C) $12$, (D) $15$, (E) $24$

Unknowns: The minimum number of adjacent swaps to reverse a string of $6$ letters

Understand

Restated: Starting from the string $ABCDEF$, you may swap any two adjacent letters at a time. What is the smallest number of such swaps that turns the string into its reverse, $FEDCBA$?

Givens: Start string: $ABCDEF$ (length $6$); Target string: $FEDCBA$ (the reverse); Each move swaps two letters that sit next to each other; Worked example: $ABC \to BAC \to BCA \to CBA$ takes $3$ swaps; Answer choices: (A) $6$, (B) $10$, (C) $12$, (D) $15$, (E) $24$

Plan

Primary tool: #9 Solve an Easier Related Problem

Secondary: #5 Look for a Pattern

A length-$6$ reversal is too big to swap-and-count from scratch with confidence. Tool #9 (Solve an Easier Related Problem) says: shrink the string. The problem already tells us $ABC$ (length $3$) takes $3$ swaps; we can quickly do length $2$, $4$, and $5$ ourselves. Once those small cases are in hand, Tool #5 (Look for a Pattern) lines them up — $1, 3, 6, 10, \ldots$ — and the rule (each new length adds the next whole number) gives the length-$6$ answer without any algebra.

Execute — Answer: D

#9 Solve an Easier Related Problem 3.OA.D.8 Step 1
  • Easier case: length $2$.
  • Reversing $AB$ to $BA$ takes one swap.
  • Record: length $2 \Rightarrow 1$ swap.
$AB \to BA$ ($1$ swap)

💡 Start at the smallest case so the counting can't go wrong.

#9 Solve an Easier Related Problem 3.OA.D.8 Step 2
  • Easier case: length $3$.
  • The problem already shows $ABC \to BAC \to BCA \to CBA$, which is $3$ swaps.
  • Record: length $3 \Rightarrow 3$ swaps.
$ABC \to BAC \to BCA \to CBA$ ($3$ swaps)

💡 Using the example the problem hands you saves a step and confirms the counting style.

#9 Solve an Easier Related Problem 3.OA.D.8 Step 3
  • Easier case: length $4$.
  • Move the last letter $D$ to the front (takes $3$ swaps), then reverse the leftover $ABC$ inside (takes $3$ more swaps from the length-$3$ case).
  • Total: $3 + 3 = 6$ swaps.
$ABCD \to ABDC \to ADBC \to DABC \to DBAC \to DBCA \to DCBA$ ($6$ swaps)

💡 Bringing the last letter to the front always costs (length $-1$) swaps, then the rest is the same problem one size smaller.

#9 Solve an Easier Related Problem 3.OA.D.8 Step 4
  • Easier case: length $5$.
  • Same plan: bring $E$ to the front in $4$ swaps, then reverse $ABCD$ in $6$ swaps.
  • Total: $4 + 6 = 10$ swaps.
$$10 = 4 + 6$$

💡 Each new letter at the back costs (length $-1$) swaps to ship to the front, then the smaller answer takes over.

#5 Look for a Pattern 4.OA.C.5 Step 5
  • Look for the pattern.
  • Lay the answers out and watch the differences.
$$\begin{array}{c|c|c} \text{length} & \text{swaps} & \text{added} \\ \hline 2 & 1 & - \\ 3 & 3 & +2 \\ 4 & 6 & +3 \\ 5 & 10 & +4 \end{array}$$

💡 Each row adds one more than the previous row. These are the triangular numbers $1, 3, 6, 10, 15, \ldots$

#5 Look for a Pattern 4.OA.A.3 Step 6
  • Extend the pattern one more step to length $6$.
  • The next addition is $+5$, so the count is $10 + 5 = 15$.
$$\text{swaps}(6) = 10 + 5 = 15 \;\Rightarrow\; \textbf{(D)}$$

💡 The same rule (bring the last letter to the front in $5$ swaps, then reverse the front $5$ letters in $10$ swaps) gives the same total: $5 + 10 = 15$.

[1] #9 3.OA.D.8 Easier case: length $2$. Reversing $AB$ to $BA$ takes one swap. Record: length $
[2] #9 3.OA.D.8 Easier case: length $3$. The problem already shows $ABC \to BAC \to BCA \to CBA$
[3] #9 3.OA.D.8 Easier case: length $4$. Move the last letter $D$ to the front (takes $3$ swaps)
[4] #9 3.OA.D.8 Easier case: length $5$. Same plan: bring $E$ to the front in $4$ swaps, then re
[5] #5 4.OA.C.5 Look for the pattern. Lay the answers out and watch the differences.
[6] #5 4.OA.A.3 Extend the pattern one more step to length $6$. The next addition is $+5$, so th

Review

Reasonableness: Cross-check with a different counting style: how many pairs of letters end up in opposite order? In $ABCDEF$ every pair is in alphabetical order; in $FEDCBA$ every pair is in reverse order. So every pair must cross exactly once during the swaps, and each adjacent swap flips exactly one pair. The number of pairs from $6$ letters is $\dfrac{6 \cdot 5}{2} = 15$, so the minimum number of swaps is exactly $15$. Matches (D). Also, (A) $6$ and (B) $10$ are too small (length-$5$ alone takes $10$), (E) $24$ is wastefully large, and (C) $12$ has no natural counting story — only (D) lands on the triangular-number rung.

Alternative: Tool #5 (Look for a Pattern) reading the same data straight off as a formula: lengths $2, 3, 4, 5, 6$ give $1, 3, 6, 10, 15$, the triangular numbers $T_{n-1} = \dfrac{(n-1)n}{2}$. Plug in $n = 6$: $T_5 = \dfrac{5 \cdot 6}{2} = 15$, again (D). This is the same idea as the pair-counting check, just stated as a closed form.

CCSS standards used (min grade 4)

  • 3.OA.D.8 Solve two-step word problems using the four operations (Counting swaps in the small cases (length $2$, $3$, $4$, $5$) by breaking each reversal into "bring the last letter to the front, then reverse the rest.")
  • 4.OA.C.5 Generate a number pattern that follows a given rule and identify apparent features (Lining up the small-case answers $1, 3, 6, 10$ and noticing each next term adds one more than the previous — the triangular-number rule.)
  • 4.OA.A.3 Solve multistep word problems with whole numbers using the four operations (Extending the pattern by one step: $10 + 5 = 15$ to finish at length $6$.)

⭐ When the string feels too long, shrink it first. Lengths $2, 3, 4, 5$ need $1, 3, 6, 10$ swaps — the next stair adds $5$, so length $6$ needs $15$.

⭐ When the string feels too long, shrink it first. Lengths $2, 3, 4, 5$ need $1, 3, 6, 10$ swaps — the next stair adds $5$, so length $6$ needs $15$.