Problem

Source: 2020 Cyberspace Mathematical Competition P4, by Nikolai Beluhov

Tags: combinatorics, cyberspace



Let $n$ be an odd positive integer. Some of the unit squares of an $n\times n$ unit-square board are colored green. It turns out that a chess king can travel from any green unit square to any other green unit squares by a finite series of moves that visit only green unit squares along the way. Prove that it can always do so in at most $\tfrac{1}{2}(n^2-1)$ moves. (In one move, a chess king can travel from one unit square to another if and only if the two unit squares share either a corner or a side.) Proposed by Nikolai Beluhov