Source: USAMO-2023-P3
Category: Existence and Construction

Problem:
Consider an $n$-by-$n$ board of unit squares for some odd positive integer $n$. We say that a collection $C$ of identical dominoes is a maximal grid-aligned configuration on the board if $C$ consists of $\frac{n^{2}-1}{2}$ dominoes where each domino covers exactly two neighboring squares and the dominoes don't overlap: $C$ then covers all but one square on the board. We are allowed to slide (but not rotate) a domino on the board to cover the uncovered square, resulting in a new maximal grid-aligned configuration with another square uncovered. Let $k(C)$ be the number of distinct maximal grid-aligned configurations obtainable from $C$ by repeatedly sliding dominoes.

Find all possible values of $k(C)$ as a function of $n$.

Solution:
The answer is that 
\[
k(C) \in \left\{ 1, 2, \dots, \left( \frac{n-1}{2} \right)^2 \right\} \cup \left\{ \left( \frac{n+1}{2} \right)^2 \right\}.
\]

Index the squares by coordinates $(x,y) \in \{1,2,\dots,n\}^2$. We say a square is special if it is empty or it has the same parity in both coordinates as the empty square.

We now proceed in two cases. First, consider the case where the special squares have both odd coordinates. 

We construct a directed graph $G = G(C)$ whose vertices are special squares as follows: for each domino on a special square $s$, we draw a directed edge from $s$ to the special square that the domino points to. Thus all special squares have an outgoing edge except the empty cell.

Any undirected connected component of $G$ is acyclic unless the cycle contains the empty square inside it.  
*Proof:* Consider a cycle of $G$; we are going to prove that the number of chessboard cells enclosed is always odd. This can be proven directly by induction, but for theatrical effect, we use Pick's theorem. Mark the center of every chessboard cell on or inside the cycle to get a lattice. The dominoes of the cycle then enclose a polyomino which actually consists of $2 \times 2$ squares, meaning its area is a multiple of $4$. Hence $B/2+I-1$ is a multiple of $4$, in the notation of Pick's theorem. As $B$ is twice the number of dominoes, and a parity argument on the special squares shows that number is even, it follows that $B$ is also a multiple of $4$. This means $I$ is odd. However, if the empty cell is not inside the cycle, all cells enclosed by the cycle must be covered by dominoes, implying the number of enclosed cells is even. This contradiction shows that any cycle must contain the empty square inside it.

Let $T$ be the connected component containing the empty cell. By the claim, $T$ is acyclic, so it is a tree. Now, notice that all the arrows point along $T$ towards the empty cell, and moving a domino corresponds to flipping an arrow. Therefore, $k(C)$ is exactly the number of vertices of $T$.  
*Proof:* Starting with the underlying tree, the set of possible graphs is described by picking one vertex to be the sink (the empty cell) and then directing all arrows towards it.

This implies that $k(C) \le \left( \frac{n+1}{2} \right)^2$ in this case. Equality is achieved if $T$ is a spanning tree of $G$. One example of a way to achieve this is using a snake-like configuration.

Answer: $k(C) \in \{1,2,\dots,((n-1)/2)^2\} \cup \{((n+1)/2)^2\}$

Grading guidelines:
(Partial) 1. Introduced the parity/special-square invariant (e.g. special squares are the empty square plus all squares whose coordinates have the same parity pattern as the empty one), and correctly deduced that only these squares can ever be empty during legal slides. 2. Modeled a configuration by a directed graph on the special squares (each occupied special square has one outgoing edge along its domino toward the next special square), and correctly related a domino slide to reversing one directed edge / changing the sink. 3. Proved a nontrivial structural restriction on the directed graph, e.g. that in any connected component not containing the empty square there can be no directed cycle, or that any directed cycle must enclose the empty square (with a correct parity/area argument). (Almost) 1. Established the main correspondence that the reachable configurations from C are in bijection with choices of the sink within the connected component T of the empty square (so k(C)=|V(T)|), but left a small gap in proving reachability/uniqueness of the sink-forcing process. 2. Proved the correct upper bound k(C)≤((n+1)/2)^2 (via the special-square graph/tree component argument), and essentially derived the set of possible values, but did not fully justify why all sizes 1,2,…,((n−1)/2)^2 are attainable and why the remaining attainable value is exactly ((n+1)/2)^2. 3. Gave correct constructions producing many values of k(C) (including one achieving k(C)=((n+1)/2)^2), but missed or mishandled one boundary case (typically distinguishing whether the empty square’s parity class is the “larger” or “smaller” special set).