2021 AMC 10A Problem 25
How many ways are there to place indistinguishable red chips, indistinguishable blue chips, and indistinguishable green chips in the squares of a grid so that no two chips of the same color are directly adjacent to each other, either vertically or horizontally?
Show solution without answering
Key insight
The center touches all four edge squares, so its color's other two chips must go in corners. The empty squares then form paths the other two colors alternate along.
Solution
Name the squares like this:
| TL | T | TR |
|---|---|---|
| L | M | R |
| BL | B | BR |
The center touches more squares than any other, so it limits the most. Start there.
1. Say the center chip is red. (At the end, multiply by for the three possible center colors.)
2. touches , , and , so none of those can be red. The other two red chips must go in corners. Corners never touch each other, so any two corners are allowed. Of the pairs of corners, are on the same side of the grid and are opposite each other.
3. Case 1: red corners on the same side, for example and .
- Square touches only , and , which are all red. So can take either blue or green without touching another empty square.
- The other five empty squares form a chain – – – – , each touching the next. With only blue and green allowed, the colors along the chain must alternate: blue, green, blue, green, blue, or green, blue, green, blue, green.
- The first way uses blues and greens, so must be green. The second way forces to be blue. That is ways.
- With choices of side: arrangements.
4. Case 2: red corners opposite, for example and .
- The empty squares form two separate chains: – – and – – .
- Each chain alternates, so it looks like . To use exactly blues and greens, one chain must be blue, green, blue and the other green, blue, green: ways.
- With choices of diagonal: arrangements.
5. With a red center there are arrangements. With any of the colors in the center, there are .
The answer is .
Why this works
Start with the square that touches the most others: its color is forced into the corners. Removing those squares breaks the grid into short chains, and a chain colored with two colors that can't repeat must alternate, so it is fixed once you pick its first color. All that remains is making the color counts come out to each, which is what separates the two cases.
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 center chip is red (multiply by at the end for the center's color). The center is adjacent to all four edge-middle squares, so the other two red chips must occupy two of the four corners; corners are never adjacent to each other, so any pair of corners is allowed.
Case 1: the two red corners share a side of the grid (4 choices, e.g. top-left and top-right). The top-middle square is then surrounded by red on all three sides and is isolated. The other five empty squares, left-middle, bottom-left, bottom-middle, bottom-right, right-middle, form a path of length . Coloring a path with blue and green so no neighbors match means alternating, so the path is with of color and of ; the isolated square takes the third . Choosing gives colorings. Subtotal .
Case 2: the two red corners are opposite (2 choices, e.g. top-left and bottom-right). The empty squares split into two paths of length : top-middle, top-right, right-middle; and left-middle, bottom-left, bottom-middle. Each path alternates as ; to use exactly three blues and three greens, one path is and the other : colorings. Subtotal .
With a red center there are arrangements, so in total .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 5: More With Combinations (§5.2)
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.5)
- Introduction to Algebra, Chapter 22: Special Manipulations (§22.3)
- Introduction to Counting & Probability, Chapter 3: Correcting for Overcounting (§3.2, §3.4)
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.