A piece is placed in the lower left-corner cell of the $15 \times 15$ board. It can move to the cells that are adjacent to the sides or the corners of its current cell. It must also alternate between horizontal and diagonal moves $($the first move must be diagonal$).$ What is the maximum number of moves it can make without stepping on the same cell twice$?$
Problem
Source: 239-School Open Olympiad (Senior Level)
Tags: combinatorics, board, diagonal, cells
05.05.2023 18:06
Let's hope what follows is not complete garbage. I'll try to explain as thoroughly as I can. Let us generalize to a $n \times n$ board, with $n$ odd. We claim the answer is $(n-1)^2$ moves. To prove this is indeed feasible, consider the following $5 \times 5$ board: $\begin{bmatrix} & 8 & 9 & & \\ 7 & 6 & 11 & 10 & \\ 5 & 4 &13 &12 & \\ 3 & 2 & 15 & 14 & \\ 1 & & & 16 & 17 \\ \end{bmatrix},$ where we have $16$ moves $i \rightarrow i+1$ for all $i \in \{1,2, \ldots, 16 \}$. It is easy to see that this example generalizes, and yields exactly $(n-1)+\ldots+(n-1)+1-1=(n-1)^2$ moves. Now, for the bound, let us chessboard colour the board, with the corner squares being black. Call a shape consisting of two squares, such that they have just one corner in common a brick. Note that bricks can consist of only black or only white squares. Call the former Type A bricks, and the latter Type B bricks. Thus, a path of adjacent squares such that the one described in the problem statement, alternatively consists of Type A and Type B bricks, starting with a Type A brick, since the lower-left square is black. Note that this sequence of bricks either ends with a Type B brick (possibly having one more black square remaining), or ends with a Type A brick (possibly having one more white square remaining). Let $X$ be the number of Type A bricks, and $Y$ be the number of Type B bricks in the path. From the above we have that $Y \in \{X,X,-1 \}$, with $Y=X$ in the first case and $Y=X-1$ in the second. In the first case, we could have made at most $2(X+Y)+1-1=4X$ moves, and in the second case we could have made at most $2(X+Y)+1-1=4X-2$ moves. Thus, the total number of moves we have made is always less than or equal to $4X$. Hence, we are equivalently left to prove the following Claim: Claim: The total number of Type A bricks the path contains is less than or equal to $(n-1)^2/4$. Proof: Consider only the black squares of the board. Consider all $(n-1)^2/4$ internal black squares (we exclude all squares on the sides of the board). Note that all Type A bricks should have exactly one square belonging to these internal black squares. However, for each such square, at most one Type A brick can be "rooted" at it, as the path has no "loops". Thus, we indeed can have at most $(n-1)^2/4$ Type A bricks, as desired $\blacksquare$ Having proved the Claim, we are done.