2021 AMC 10 B Problem 24

AMC 10 Post-Exam Webinar

Plan Your Next Step: AMC 10, AMC 12, or AIME.

Tue. Nov.17

AMC 10 Post-Exam Webinar

Plan Your Next Step: AMC 10, AMC 12, or AIME.

Tue. Nov.17

One Page to Learn. One Point to Earn.

In This Page:

To help you master 2021 AMC 10 B Problem 24, this page includes:

  • The original AMC problem to try, plus the correct answer
  • Clear, step-by-step solutions using different methods
  • Key ideas, useful formulas, and takeaways you can apply to similar problems
  • Related problems from past AMC exams, plus new practice problems that build the same skills

Want more practice? Scroll down to download Think Academy’s AMC 10 practice packs and keep building your AMC 10 B skills.

2021 AMC10 B Problem 24

AMC 10 B · 2021 · Question 24
Hard
CombinatoricsGame TheoryGames, Algorithms & Strategy

24.

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 and can be changed into any of the following by one move: or 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?

Diagram for the problem

Choose one answer · Attempt 1 of 3

Small Hint

For a wall of length , list the two smaller wall lengths that remain after every possible removal, and combine their previously computed values.

Choose one answer · Attempt 2 of 3

Small Hint

For a wall of length , list the two smaller wall lengths that remain after every possible removal, and combine their previously computed values.

Choose one answer · Attempt 3 of 3

Small Hint

For a wall of length , list the two smaller wall lengths that remain after every possible removal, and combine their previously computed values.

Solution

Sprague-Grundy and XOR Method

Replace each wall by a number that records the strategic behavior of that wall. Because gaps separate the bricks into independent walls, combine these numbers with XOR and look for the unique configuration having total XOR .

For a finite game in which both players have the same moves and the last player to move wins, each position has a Sprague-Grundy value. The value is the smallest nonnegative integer missing from the values of all positions reachable in one move. Independent components combine by XOR, denoted . A total XOR of means the next player is in a losing position under perfect play.

Step 1: Define the value of one wall

Let the value assigned to a wall depend only on its length. An empty wall has value zero. For every positive length, examine every position reachable in one move and take the smallest nonnegative integer that does not occur among those resulting values.

Step 2: Translate a removal into smaller walls

If one brick is removed, the remaining bricks form a left wall and a right wall whose lengths add to one less than the original length. If two adjacent bricks are removed, those lengths add to two less than the original length. The value of the resulting pair is the XOR of the two wall values.

Step 3: Compute the wall values through length six

Starting with the empty wall, use the recurrence one length at a time. The middle column lists all distinct values reachable by one legal move. The missing smallest nonnegative integer gives the value in the last column.

Step 4: Evaluate the five starting configurations

The walls in each choice are independent, so XOR their individual values. Beth plays second, so she needs Arjun to begin with total value zero.

Step 5: Explain why zero XOR guarantees Beth’s win

Choice B starts with zero XOR. Any move by Arjun changes exactly one component and makes the total XOR nonzero. The Sprague-Grundy theorem then guarantees that Beth can make a move restoring the XOR to zero. She repeats this response after every Arjun move. Since the game must eventually end, Beth makes the final move. As an additional check, every other choice lets Arjun move immediately to zero XOR.

Correct answer: B.
Only choice B has total Sprague-Grundy XOR equal to , so Arjun begins in a losing position and Beth can always return the game to XOR . The displayed first moves for A, C, D, and E confirm that Arjun can win from each of those configurations. Therefore the answer is .

Similar Problems in Real Exams

The following five AMC 10 B problems are closely related to AMC 10 B 2021 Question 24. These real AMC 10 B problems test the same key concept—Combinatorics. Click any problem to learn and practice, then continue to the adapted practice section later in this article for more problems to try.

2020 AMC 10 B Problem 15

2020 AMC 10 B Problem 16

2025 AMC 10 B Problem 16

2025 AMC 10 B Problem 21

2024 AMC 10 B Problem 12

Adapted Problems to Practice

1 / 10

What Formulas Do You Need for This Problem?

  • Minimum excluded value:

is the smallest nonnegative integer not contained in the set .

is the set of Sprague-Grundy values of all positions reachable in one move. The value of a wall is defined by applying this operation to all positions that can result from removing one brick or two adjacent bricks.

  • Single-wall Sprague-Grundy recurrence:

using all legal integer values of . is the value of a wall of length . In the first set, ; in the second set, . The two sets represent removing one brick and two adjacent bricks, respectively. Every legal move leaves at most two walls, and the lengths of those walls determine the resulting game position.

  • Sprague-Grundy XOR theorem:

For independent components with values , the total value is . The position is losing for the next player exactly when this total is .

The game must be finite, both players must have the same legal moves from any position, and the player making the last move must win. All walls follow the same removal rules, gaps make separate walls independent, and every move removes at least one brick, so the game is finite.

  • Zero-XOR response strategy:

Begin with total XOR and, after the opponent changes it to a nonzero value, make a legal move that restores total XOR .

This strategy is guaranteed by the Sprague-Grundy theorem for a nonempty zero-XOR position. Choice B has initial total XOR , so Beth can restore zero after every move by Arjun and eventually make the final move.

Key Takeaway: Remember This Strategy for Next Time

A move can split one object into several independent pieces.

Try: Assign a Sprague-Grundy value to each piece and combine the values using XOR.

Why: Sprague-Grundy values preserve the winning and losing behavior of independent game components.

The second player needs a guaranteed win in a finite impartial game.

Try: Look for the starting position whose total XOR is .

Why: Every move from a zero-XOR position gives a nonzero-XOR position, and the responding player can restore zero.

Removing bricks may leave walls on both sides of the removed section.

Try: Include both remaining wall lengths when computing a move's value.

Why: The two sides become independent walls, so their values must be XORed rather than treated as one wall.


Unlock More Targeted AMC 10 Practice Resource

Build Stronger Skills. Practice with Purpose. Prepare with Confidence.

Get a complete set of module-focused AMC 10 practice workbooks designed to help students strengthen core concepts, improve problem-solving strategies, and feel more confident on test day.

With 250+ practice problems organized across six essential AMC 10 modules, students can focus on one skill area at a time and learn from clear, step-by-step solutions.

AMC10 Practice Resource Pack

Download the Free AMC 10 Practice Resource Pack

Inside, You’ll Find:

  • 6 module-focused practice workbooks: Algebra, Geometry, Number Theory, Combinatorics, and Probability & Statistics.
  • 250+ AMC 10-style practice problems covering essential concepts and common competition question types.
  • Complete answer keys and step-by-step solutions to help students understand the reasoning behind each answer.
  • Organized, print-ready materials for independent study, guided practice, or extra preparation at home.

Get Instant Access: Fill out the form below to receive our exclusive resource pack.

*Please enter a valid email address to access the materials and receive future prep updates.

 AMC 10 Practice Resource Pack
Free Download

After submission, the download link is in the confirmation message on this page.


About Think Academy

Think Academy US Online, part of TAL Education Group (NYSE: TAL), provides structured math and ELA programs that help students build strong academic foundations and grow with confidence. With expert teachers, proven methods, and innovative AI tools, we nurture learning ability, curiosity, and healthy study habits that support long-term growth and a lifelong love of learning.

Check our programs:

Want more insights on Math & ELA learning and parenting? Fill out the form on this page and subscribe to our newsletter for weekly tips and the latest resources. Join 100,000+ families in our Parent Community!

Leave a Comment & Share Your Thoughts!

Published On: November 4, 2026
Post Content
Think Academy 2026 AMC 10 Post-Exam Planning Webinar (1)

Get expert PreK–12 insights in your inbox every week

To support your child’s learning, confidence, and growth:
✓ Competition & Test Prep
✓ Printable Worksheets
✓ Webinar Invites

Join 100,000+ subscribers in our parent community.

Share This Story, Choose Your Platform!

Related Posts