What is the least number of moves it takes a knight to get from one corner of an $n\times n$ chessboard, where $n\ge 4$, to the diagonally opposite corner?
Problem
Source: Baltic Way 1999
Tags: induction, floor function, ceiling function, combinatorics proposed, combinatorics
10.03.2013 13:51
Let $ f(n) $ be a minimum number of moves on chessboard n x n. if $ n=3k-1 $ or $ n=3k $ or $ n=3k+1 $ then $ f(n)=2k $
10.03.2013 17:33
Let $f(n)$ be the minimum number of moves required to complete $n \times n$. First, I will show the solutions for $n=4,5,6$: X... .... .X.. ...X X.... ..... .X.X. ..... ..X.X X..... ...X.. .X.... ....X. ...... .....X Hence $f(4) \le 2, f(5) = f(6) \le 4$. Now, note that by performing the two moves as in the $n=4$ board, we can reduce a problem from $n \times n$ to $(n-3) \times (n-3)$ by using two moves, so we have $f(n) = 2 + f(n-3)$. By induction, we can solve the recursion to obtain $f(n) \le 2 \left\lfloor \dfrac{n+1}{3} \right\rfloor$. In other words, if $n = 3k-1 \vee 3k \vee 3k+1$ for some integer $k$, $f(n) \le 2k$. Now we will prove that $f(n) \ge 2 \left\lfloor \dfrac{n+1}{3} \right\rfloor$ so that we can establish that $f(n) = 2 \left\lfloor \dfrac{n+1}{3} \right\rfloor$. Suppose the bottom-right corner is $(0,0)$, the bottom-left corner is $(n,0)$ and the top-left corner is $(n-1,n-1)$. Let the value of a square $(x,y)$ to be $x+y$. Note that a knight can decrease the value of the square it's standing on by at most $3$. Initially the knight has a value of $2n-2$ and it needs to decrease the value until $0$, so the knight needs at least $\dfrac{2n-2}{3}$ moves. Also, the knight always changes the parity of its value. Initially it's even and at the end it's also even, so the knight needs to take an even number of moves. Hence $f(n)$ must be at least the least even integer greater than or equal to $\dfrac{2n-2}{3}$, or in other words, $f(n) \ge 2 \left\lceil \dfrac{n-1}{3} \right\rceil$. Note that since $n$ is an integer, we have $\left\lceil \dfrac{n-1}{3} \right\rceil = \left\lfloor \dfrac{n+1}{3} \right\rfloor$ (use $x = \lfloor x \rfloor + \{x\}$, $\lceil x \rceil = -\lfloor -x \rfloor$, and $\left\{ \dfrac{n}{3} \right\} \le \dfrac{2}{3}$ if $n$ is an integer; the proof is left to the reader), so $f(n) \ge 2 \left\lfloor \dfrac{n+1}{3} \right\rfloor$, completing the proof.