AMC 10 · 2013 · #18

Grade 6 logicpattern
modular-arithmeticpattern-recognitionlogical-deductioncasework work-backwardspattern-recognitioneasier-related-problem ↑ Prerequisites: modular-arithmeticpattern-recognition
📏 Long solution 💡 3 insights
Problem
Two players remove different allowed amounts and whoever takes the last piece wins. Decide the winner for two pile sizes.

Pick an answer.

(A)
Barbara will win with $2013$ coins and Jenna will win with $2014$ coins
(B)
Jenna will win with $2013$ coins, and whoever goes first will win with $2014$ coins
(C)
Barbara will win with $2013$ coins, and whoever goes second will win with $2014$ coins
(D)
Jenna will win with $2013$ coins, and Barbara will win with $2014$ coins
(E)
Whoever goes first will win with $2013$ coins, and whoever goes second will win with $2014$ coins
How to solve
Strategy Work Backwards

Nobody can play 2013 coins forward. But the end of the game is fully known — taking the last coin wins — so the outcome of every position can be pushed backwards from there: a position is a win for the player to move exactly when at least one legal move hands the opponent a position that is a loss for the opponent. Because the two players have different move sets, a position must be recorded as a pair (pile size, whose turn), and the two cases have to be tracked side by side. Running that backward sweep on small piles produces a table, and the table repeats with period 5. That repetition is the whole problem, and it must be proved rather than trusted: an observed pattern in the first ten rows says nothing about row 2013. So the plan is to read a characterisation off the table, write it in terms of the remainder n mod 5, and then prove it by strong induction, which is what upgrades "it looks periodic" into "it is periodic forever". Only then are 2013 and 2014 safe to reduce to remainders. Each pile size gets its own verdict for each possible first mover — four verdicts in all — because the answer choices distinguish 'X wins' from 'whoever goes first wins', and those two statements are settled by different data.

1STEP 1

Name the positions

Each pile size has two positions to label.

B(n) from {J(n-2), J(n-4)}, J(n) from {B(n-1), B(n-3)}
2STEP 2

Fill the small piles by hand

Small piles fill in by hand.

n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 ; B(n) & J & B & J & B & J & J & B & J & B & J ; J(n) & J & J & J & J & B & J & J & J & J & B
3STEP 3

Read the pattern as remainders

The pattern reads as a remainder rule.

Conjecture: B(n) = Barbara ⇔ n ≡ 2, 4 (mod 5); J(n) = Jenna ⇔ n ≢ 0 (mod 5)
4STEP 4

Prove Barbara's half by induction

Induction proves one player's half.

n ≥ 6: Barbara wins ⇔ n-2 ≡ 0 or n-4 ≡ 0 (mod 5) ⇔ n ≡ 2, 4 (mod 5)
5STEP 5

Prove Jenna's half by induction

The same argument covers the other half.

n ≥ 6: {n-1, n-3} ∩ {0,1,3} ≠ ∅ (mod 5) ⇔ n ∈ {1,2,3,4} (mod 5) ⇔ n ≢ 0 (mod 5)
6STEP 6

Divide 2013 and 2014 by 5

The two pile sizes leave remainders 3 and 4.

2013 = 5 · 402 + 3 ≡ 3, 2014 = 5 · 402 + 4 ≡ 4 (mod 5)
7STEP 7

Match the two verdicts to a choice

That names the two verdicts, choice (B).

2013 coins → Jenna; 2014 coins → first mover
Answer
Jenna will win with 2013 coins, and whoever goes first will win with 2014 coins
Three separate checks. First, the characterisation is self-consistent as a fixed point, which is a strong sign it is the right one: call {0,1,3} Barbara's losing residues and {0} Jenna's. Barbara wins from n exactly when n-2 or n-4 is ≡ 0, giving n ≡ 2, 4, so her losing set is {0,1,3} as assumed; Jenna wins from n exactly when n-1 or n-3 lies in {0,1,3}, giving n ≢ 0, so her losing set is {0} as assumed. The two sets reproduce each other. Second, the period-5 claim can be confirmed without any guessing about residues at all. For n ≥ 6 the pair (B(n), J(n)) is determined by the four preceding pairs through a rule that does not depend on n itself. So the window of four consecutive pairs at n = 6,7,8,9 determines the entire future. That window is (J,J), (B,J), (J,J), (B,J), and the window at n = 11,12,13,14 is the same four pairs; since the update rule is the same at every step, the sequence must repeat with period 5 from there on forever. That is an independent route to the periodicity, using only pigeonhole-style reasoning about repeated states. Third, extending the hand table to n = 48 and n = 49, which have the same remainders 3 and 4 as 2013 and 2014, gives Jenna winning both ways at 48 and the first mover winning at 49 — matching the verdicts for 2013 and 2014. The letter alone would have been weak evidence here, since (B) and (D) agree completely about 2013 and only the 2014 analysis separates them; both halves were settled independently, so (B) is safe.
💡Key takeaway

Barbara takes 2 or 4 and Jenna takes 1 or 3, and both pairs add to 5, so all that matters is the pile's remainder when divided by 5 and whose turn it is.

  • Name the positions
  • Fill the small piles by hand
  • Read the pattern as remainders
  • Prove Barbara's half by induction
  • Prove Jenna's half by induction
  • Divide 2013 and 2014 by 5
  • Match the two verdicts to a choice