1

An $(a,b)$-knight is defined here: Can an $(a,b)$-knight reach every point on a chessboard?. Starting from a position $(x_0, y_0)$, it can basically move to $(x_0 + a, y_0 + b)$, $(x_0 + a, y_0 - b)$, $(x_0 + b, y_0 + a)$, $(x_0 - b, y_0 + a)$, $(x_0 - a, y_0 + b)$, $(x_0 - a, y_0 - b)$, $(x_0 + b, y_0 - a)$ or $(x_0 - b, y_0 - a)$. Given a position larger by $(x,y)$ from a starting position, the question is whether the knight can reach it.

I think that the idea is to find $\alpha_i$, $i=1,2,...,8$ such that $\sum_{i=1}^{8} \alpha_i \cdot p_i = (x,y)$, where $p_i$ represent all 8 possible moves of the knight written above. This could be rewritten as a system of two diophantine equations $a \cdot A + b \cdot B = x$ and $a \cdot C + b \cdot D = y$, where $A, B, C, D$ are combinations of $\alpha_i$ obtained after we expand the formula with the sum written above. Solutions exist if $gcd(a,b)$ divides both $x$ and $y$, in which case one can use the Extended Euclidean Algorithm to find $A, B, C, D$.

If my reasoning is correct up to this point, I don't know how to find the $\alpha_i$ after I compute $A, B, C, D$. All 8 $\alpha_i$ describe the movement of the knight.

Could someone help?

  • 2
    A necessary condition is that $a$ and $b$ have distinct parities and are coprime. Indeed, otherwise such a knight would stay on same-color tiles (or $x$ would remain constant mod some $n > 1$). Now, if $a-b$ is odd, you can check that an $(a,b)$-knight can make the following moves: $(a-b,a-b)$ and $(a+b,a+b)$, with $a-b,a+b$ being coprime. So (I leave you to flesh out the details) it can move along all diagonals, so reach any same-colored tile. But it can also switch colors, so you're done. – Aphelli Dec 30 '20 at 15:51
  • Thank you! Now I understand why these 2 additional conditions are needed. Do you have any hints on how could I find the $\alpha_i$s? – user12632521 Dec 30 '20 at 16:02

0 Answers0