AMC 10 Step by Step

2021 AMC 10B Problem 24

P21-25~10 minPrint

Arjun and Beth play a game in which they take turns removing one brick or two adjacent bricks from one "wall" among a set of several walls of bricks, with gaps possibly creating new walls. The walls are one brick tall. For example, a set of walls of sizes 44 and 22 can be changed into any of the following by one move: (3,2),(2,1,2),(4),(4,1),(2,2),(3,2),(2,1,2),(4),(4,1),(2,2), or (1,1,2).(1,1,2).

figure

Arjun plays first, and the player who removes the last brick wins. For which starting configuration is there a strategy that guarantees a win for Beth?

Log in to save your progress.
Show solution without answering

Key insight

If the walls come in identical pairs, the second player wins by copying each move on the twin wall. In every wrong choice, Arjun can make such pairs at once.

Solution

Step 1: a winning idea, the copycat strategy.

  1. Suppose the walls come in identical pairs, like (2,2)(2, 2) or (3,1,3,1)(3, 1, 3, 1). Then the player who moves second can always win: whatever the other player does to one wall, copy the same move on its twin. After each copy the walls are in identical pairs again.
  2. So the copying player always has a move, and the other player eventually runs out. The copier takes the last brick and wins.
  3. This means: if a player can move to "identical pairs," that player wins, by copying from then on.

Step 2: rule out four choices. In each of these, Arjun (moving first) can split the 66-wall so that everything comes in identical pairs. Then Arjun copies Beth and wins.

  • (6,1,1)(6, 1, 1): Arjun removes the two middle bricks of the 66 (bricks 33 and 44), leaving 22 and 22. Walls: (2,2,1,1)(2, 2, 1, 1).
  • (6,2,2)(6, 2, 2): the same move gives (2,2,2,2)(2, 2, 2, 2).
  • (6,3,1)(6, 3, 1): Arjun removes bricks 22 and 33 of the 66, leaving 11 and 33. Walls: (1,3,3,1)(1, 3, 3, 1).
  • (6,3,2)(6, 3, 2): Arjun removes brick 33 of the 66, leaving 22 and 33. Walls: (2,3,3,2)(2, 3, 3, 2).

Step 3: conclude. Arjun wins in (A), (C), (D) and (E), so the configuration where Beth can guarantee a win is (6,2,1)(6, 2, 1).

The answer is (B) (6,2,1)\boxed{\textbf{(B)}\ (6,2,1)}.

Why this works

In many two-player games, the player who can make the position symmetric wins by copying. Here a single move in the middle of the long wall can create the twin walls. The Alternative Approach below shows how to confirm directly that Beth really does win from (6,2,1)(6, 2, 1).

Alternative approach

Give each wall a "game number" and combine them.

  1. Game number of one wall. List every position you can move to from that wall, find their game numbers, and take the smallest whole number (0,1,2,…0, 1, 2, \ldots) that is not in the list.
  2. Several walls. Write each wall's game number in binary and add the columns without carrying (a column is 11 if it has an odd number of 11s). This is called XOR, written ⊕\oplus. For example, 3⊕2=112⊕102=012=13 \oplus 2 = 11_2 \oplus 10_2 = 01_2 = 1.
  3. The player about to move loses exactly when the combined number is 00.

The table of game numbers (an empty position has game number 00):

wallpositions you can reachtheir numbersgame number
11nothing left0011
22(1)(1), nothing1,01, 022
33(2),(1,1),(1)(2), (1,1), (1)2,0,12, 0, 133
44(3),(1,2),(2),(1,1)(3), (1,2), (2), (1,1)3,3,2,03, 3, 2, 011
55(4),(1,3),(2,2),(3),(1,2)(4), (1,3), (2,2), (3), (1,2)1,2,0,3,31, 2, 0, 3, 344
66(5),(1,4),(2,3),(4),(1,3),(2,2)(5), (1,4), (2,3), (4), (1,3), (2,2)4,0,1,1,2,04, 0, 1, 1, 2, 033

For (6,2,1)(6, 2, 1): 3⊕2⊕1=112⊕102⊕012=002=03 \oplus 2 \oplus 1 = 11_2 \oplus 10_2 \oplus 01_2 = 00_2 = 0. So Arjun, who moves first, loses, and Beth wins. For the other four choices the combined number is not 00.

Concise solution

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

This is a sum of independent games (the walls), so use nim-values. Assign each wall size kk a value g(k)g(k): the smallest nonnegative integer not among the values of positions reachable from a single wall of kk, where a multi-wall position's value is the XOR (⊕\oplus) of its walls' values. The player to move loses exactly when the total XOR is 00.

Compute, listing the positions reachable from one wall:

kkreachable positionstheir valuesg(k)g(k)
1()()0011
2(1),()(1), ()1,01, 022
3(2),(1,1),(1)(2), (1,1), (1)2,0,12, 0, 133
4(3),(1,2),(2),(1,1)(3), (1,2), (2), (1,1)3,3,2,03, 3, 2, 011
5(4),(1,3),(2,2),(3),(1,2)(4), (1,3), (2,2), (3), (1,2)1,2,0,3,31, 2, 0, 3, 344
6(5),(1,4),(2,3),(4),(1,3),(2,2)(5), (1,4), (2,3), (4), (1,3), (2,2)4,0,1,1,2,04, 0, 1, 1, 2, 033

Beth, the second player, wins when the starting XOR is 00:

  • (6,1,1)(6,1,1): 3⊕1⊕1=33 \oplus 1 \oplus 1 = 3.
  • (6,2,1)(6,2,1): 3⊕2⊕1=03 \oplus 2 \oplus 1 = 0. Beth wins.
  • (6,2,2)(6,2,2): 3⊕2⊕2=33 \oplus 2 \oplus 2 = 3.
  • (6,3,1)(6,3,1): 3⊕3⊕1=13 \oplus 3 \oplus 1 = 1.
  • (6,3,2)(6,3,2): 3⊕3⊕2=23 \oplus 3 \oplus 2 = 2.

Only (6,2,1)(6,2,1) is a losing position for the first player.

The answer is (B) (6,2,1)\boxed{\textbf{(B)}\ (6,2,1)}.

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.