AMC 10 Step by Step

2022 AMC 10B Problem 19

P16-20~8 minPrint

Each square in a 5×55 \times 5 grid is either filled or empty, and has up to eight adjacent neighboring squares, where neighboring squares share either a side or a corner. The grid is transformed by the following rules:

  • Any filled square with two or three filled neighbors remains filled.
  • Any empty square with exactly three filled neighbors becomes a filled square.
  • All other squares remain empty or become empty.

A sample transformation is shown in the figure below. figure Suppose the 5×55 \times 5 grid has a border of empty squares surrounding a 3×33 \times 3 subgrid. How many initial configurations will lead to a transformed grid consisting of a single filled square in the center after a single transformation? (Rotations and reflections of the same configuration are considered different.) figure

Log in to save your progress.
Show solution without answering

Key insight

Only the center's eight neighbours matter, and only two or three of them can be filled. Then check, cell by cell, that nothing else ends up with the wrong count.

Solution

Label the inner 3×33 \times 3 like this, with XX the center:

aabbcc
ddXXee
ffgghh

Call a,c,f,ha, c, f, h the corners and b,d,e,gb, d, e, g the edge cells. Every one of these eight touches XX. Besides XX:

  • a corner touches only its two edge cells (for example, aa touches bb and dd);
  • an edge cell touches every other edge cell except the opposite one, plus the two corners beside it (for example, bb touches dd, ee, aa, cc).

What must happen. Afterwards XX is filled and every other cell is empty. So:

  • if XX starts filled, it needs 22 or 33 filled neighbours; if it starts empty, exactly 33;
  • a filled cell other than XX must not have 22 or 33 filled neighbours;
  • an empty cell must not have exactly 33 filled neighbours;
  • a border cell can see at most three inner cells, and all three only if an entire side of the 3×33 \times 3 is filled, so no full side is allowed.

Case 1: XX starts filled, with 22 or 33 filled outer cells.

  1. Every filled outer cell already sees XX. If it touched even one other filled outer cell it would have 22 or more filled neighbours and survive. So no two filled outer cells may touch.
  2. An empty outer cell that touches two filled outer cells would also see XX, making 33, and would fill up. So no empty cell may touch two of them.
  3. Two filled. Two corners on the same side (like aa, cc) both touch bb: fails. A corner and an edge cell that do not touch also fail: aa and ee both touch bb, and aa and gg both touch dd. Opposite edge cells (like bb, gg) both touch dd: fails. Opposite corners (aa and hh, or cc and ff) share no neighbour: this works. That gives 22.
  4. Three filled, none touching. The only such groups are three corners, or an edge cell with the two corners on the far side (like bb, ff, hh). In both, an edge cell between two of the filled corners (gg in the second example) sees two corners plus XX, which is 33. Fails. That gives 00.

Case 2: XX starts empty, with exactly 33 filled outer cells.

  1. A filled cell now sees only outer cells, so it must not touch both of the other two. An empty cell must not touch all three. (A full side, like a,b,ca, b, c, already breaks the first rule, since bb touches aa and cc.)
  2. Three corners. No two corners touch, and each edge cell touches only two corners. Works: 44 ways.
  3. Two corners on the same side plus an edge cell. Take a,ca, c. Adding bb: bb touches both, fails. Adding dd: then bb is empty and touches aa, cc, dd, fails (ee is the same). Adding gg: gg touches neither corner, and no empty cell touches all three. Works. There are 44 sides, so 44 ways.
  4. Two opposite corners plus an edge cell. Take a,ha, h and add bb. Only aa and bb touch each other; the empty cells dd and ee each see just 22. Works, and the same holds for any of the 44 edge cells. With 22 pairs of opposite corners: 2×4=82 \times 4 = 8 ways.
  5. One corner plus two edge cells. Take aa. Opposite edge cells fail (b,gb, g: then dd touches aa, bb, gg; and d,ed, e: then bb touches all three). Any pair that includes bb or dd also touches aa and the other edge cell, so that cell touches both others: fails. The only pair left is e,ge, g, which touch each other but not aa. Check the empty cells: bb sees a,ea, e; dd sees a,ga, g; hh sees e,ge, g. All 22 or fewer. Works: 11 way per corner, 44 ways.
  6. Three edge cells. Two of them are opposite, and the third touches both. Fails: 00 ways.

Total. 2+4+4+8+4=222 + 4 + 4 + 8 + 4 = 22.

The answer is (C) 22\boxed{\textbf{(C)}\ 22}.

Why this works

The rules only let a cell be filled afterwards if it has two or three filled neighbours, so "only the center is filled afterwards" limits the start to very few filled cells. After that it is careful bookkeeping of which cells touch which. Sorting by how many corners are used, and using the symmetry of the square (count one corner, then multiply by 44), keeps each case short.

Concise solution

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

The center's neighbors are the 88 "outer" cells of the 3×33 \times 3 (four corners, four edge-midpoints). For the center to end filled, either the center is filled with 22 or 33 filled outer cells, or it is empty with exactly 33.

Everything else must end empty. A border cell can only reach 33 filled neighbors if a whole side of the 3×33\times3 is filled, so no side may be full. A filled outer cell must not have 22 or 33 filled neighbors; an empty one must not have exactly 33. Adjacency on the ring: each corner touches its two neighboring edge cells; each edge cell touches every other edge cell except the opposite one.

Center filled. Each filled outer cell already sees the center, so it may touch no other filled cell. Three pairwise non-adjacent outer cells always leave some empty cell seeing exactly 33 (e.g. the edge between two of three corners): 00. Two non-adjacent cells with no empty cell touching both: only two diagonally opposite corners, 22.

Center empty, 3 filled outer cells. No filled cell may touch both others, no empty cell may touch all three, no full side.
- Three corners: always fine, 44.
- Two same-side corners plus an edge: only the opposite edge works, 44.
- Two diagonal corners plus an edge: any edge works, 2⋅4=82 \cdot 4 = 8.
- One corner plus two edges: opposite edges fail (the empty edge beside the corner sees all three); two adjacent edges plus the corner touching neither, 44.
- Three edges: two are opposite and the third touches both, 00.

Total 2+4+4+8+4=222 + 4 + 4 + 8 + 4 = 22.

The answer is (C) 22\boxed{\textbf{(C)}\ 22}.

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.