A $3 \times 3$ grid of unit cells is given. A snake of length $k$ is an animal which occupies an ordered $k$-tuple of cells in this grid, say $(s_1, \dots, s_k)$. These cells must be pairwise distinct, and $s_i$ and $s_{i+1}$ must share a side for $i = 1, \dots, k-1$. After being placed in a finite $n \times n$ grid, if the snake is currently occupying $(s_1, \dots, s_k)$ and $s$ is an unoccupied cell sharing a side with $s_1$, the snake can move to occupy $(s, s_1, \dots, s_{k-1})$ instead. The snake has turned around if it occupied $(s_1, s_2, \dots, s_k)$ at the beginning, but after a finite number of moves occupies $(s_k, s_{k-1}, \dots, s_1)$ instead. Find the largest integer $k$ such that one can place some snake of length $k$ in a $3 \times 3$ grid which can turn around.
Problem
Source: USA TST for EGMO 2019, Problem 1 (adapted from IMO TST Problem 3)
Tags: combinatorics
11.12.2018 10:04
13.08.2019 07:52
The answer is \(k=5,\) and a possible construction is putting \(s_1s_2s_3\) as a line through the center. Now I will show \(k=6\) doesn't work (clearly this finishes). Color the grid like a checkerboard, with the corners/centers being blue and the ``edges'' being white. The snake always covers 3 of the 4 white squares, because adjacent squares are different colors. Label the white squares as \((0,1,2,3)\), where 0 indicates the white square in the initial position that is uncovered, 1 indicates the white square with smallest index \(s_i\), and so on for 2 and 3. Note that after every two moves, the snake moves into exactly one square of each color. When it moves into the white square, it only has one option to move \(s_1\) into, so the ordered quadruple must change to \((1,2,3,0)\). Similarly, this becomes \((2,3,0,1)\) then \((3,0,1,2)\) then back to \((0,1,2,3)\). Thus, it can never reach the desired \((0,3,2,1)\), so \(k=6\) doesn't work, as desired.