DR.WANG Mathematics中文

2024 AMC 10A · Question 25

Counting & combinatorics · casework · bijection · systematic listing · graph theory · problem-solving

Problem outline

On the edges of a grid eight cells wide and three high, draw one simple closed loop. Each of the eight middle-row cells must have exactly one edge on the loop. The top and bottom rows carry no restriction. Count the loops.

A three-row grid eight squares wide. Every square in the middle row is marked 1.
Show answer and methods 1 methods

Answer

C. 146146.

Method 1 Classify the cells inside the loop

Mark each cell inside the loop 1 and each cell outside 0; the exterior of the board also has value 0. An edge is on the loop exactly when its two sides have different marks. Thus each middle cell has exactly one neighbour with the opposite mark. The interior cells of a simple grid loop are edge-connected.

Suppose some middle cell is inside. Wherever consecutive middle marks change, the different horizontal neighbour uses up each cell’s allowance. Both vertical neighbours of either cell must match it. Thus beside a change there is an entirely empty column next to an entirely full column. An empty column disconnects inside cells on its two sides, so the middle 1s form one block. Outside that block there is at most one column at either end: any farther middle 0 would need an inside vertical neighbour cut off by the empty column.

Each end column of the block is full, also at a board edge where the outside mark is 0. For each strictly interior column of this block the middle cell already has two 1s horizontally, so exactly one of its top or bottom neighbours is 1. Each independent choice works: the marked cells extend the solid middle strip up or down by one, forming a connected shape without holes or corner pinches, hence one simple boundary. Omitting 0, 1 or 2 end columns gives 26+2⋅25+24=1442^6+2\cdot2^5+2^4=144 loops.

If no middle cell is inside, each column must have exactly one of its top and bottom cells inside. Connectivity forces all eight to be in the same row, yielding two more loops. The total is 146.

Source and attribution

The outline and worked methods on this page were prepared for DR.WANG Mathematics.

Original question (external)