What is the least number of moves it takes a knight to get from one corner of an $n \times n$ chessboard, where $n \geqslant 4$, to the diagonally opposite corner?
Answer: $2 \cdot\left\lfloor\frac{n+1}{3}\right\rfloor$.

Label the squares by pairs of integers $(x, y), x, y=1, \ldots, n$, and consider a sequence of moves that takes the knight from square $(1,1)$ to square $(n, n)$.

The total increment of $x+y$ is $2(n-1)$, and the maximal increment in each move is 3 . Furthermore, the parity of $x+y$ shifts in each move, and $1+1$ and $n+n$ are both even. Hence, the number of moves is even and larger than or equal to $\frac{2 \cdot(n-1)}{3}$. If $N=2 m$ is the least integer that satisfies these conditions, then $m$ is the least integer that satisfies $m \geqslant \frac{n-1}{3}$, i.e. $m=\left\lfloor\frac{n+1}{3}\right\rfloor$.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=254&width=246&top_left_y=1342&top_left_x=190)

$n=4$

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=309&width=310&top_left_y=1286&top_left_x=543)

$n=5$

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=371&width=375&top_left_y=1225&top_left_x=918)

$n=6$

Figure 1

For $n=4, n=5$ and $n=6$ the sequences of moves are easily found that take the knight from square $(1,1)$ to square $(n, n)$ in 2,4 and 4 moves,
respectively (see Figure 1). In particular, the knight may get from square $(k, k)$ to square $(k+3, k+3)$ in 2 moves. Hence, by simple induction, for any $n$ the knight can get from square $(1,1)$ to square $(n, n)$ in a number of moves equal to twice the integer part of $\frac{n+1}{3}$, which is the minimal possible number of moves.