3

You begin this problem on an infinite by infinite chess board with a knight at the center of it. We'll call this square $(0, 0)$. Pick any square and find its coordinates, $(x, y)$.

In real chess knights can only go vertically 2 squares and then horizontally 1 square, or horizontally 2 squares and then vertically 1 square. However, this problem will be much more general. For this problem, the knight can go vertically $a$ square(s) and then horizontally $b$ square(s), or horizontally $a$ square(s) and then vertically $b$ square(s). $a$ and $b$ will both be constants.

The challenge here is to find a formula for how many moves the shortest path to that square ($x$, $y$) is, given an $a$ and a $b$.

Take note that for certain $a$'s and $b$'s and $x$'s and $y$'s no amount of moves could ever be enough to get it to that square. If $a$ and $b$ were both equal to $1$, it's pretty obvious that for any choice of $x$ and $y$ whose sums are an odd number, you would never be able to get to that square.

I put this under graph theory because you can think about this board as a graph. Place a node on each square. Put an edge from each square to the square the knight could move to if it were on that square.

  • 2
    By the way, your generalized knight is called an $(a,b)$-leaper. The $(1,1)$-leaper you mention is called a ferz; it was actually used (in place of the queen) in the game of chess as it was played before the 15th century. – bof Jan 12 '25 at 23:08
  • If I am not mistaken, then, besides $~(a,b) = (1,1),~$ the rule of accessibility seems to be that if $~d~$ equals the greatest common divisor of $~a,b~$ then $~d~$ must divide both $~x~$ and $~y.$ – user2661923 Jan 12 '25 at 23:12
  • 1
    For the ordinary knight, see the answer to the question chess board knight distance. – bof Jan 12 '25 at 23:18
  • Graphs corresponding to the moves of chess pieces have been studied before, e.g., the knight's graph. – bof Jan 12 '25 at 23:22
  • Donald E. Knuth's paper on Leaper Graphs does not seem (after a very quick glance) to address the question you asked, but it may be a starting point for a literature search. – bof Jan 12 '25 at 23:30
  • 1
    Another reference: Induction on Descent in Leaper Graphs by Nikolai Belubov. The answer to your question may be in this paper, but I don't have time to read it. – bof Jan 12 '25 at 23:43
  • 1
    @user2661923 No. The same reasoning applies to (say) (1, 3), where we can only get to squares whose coordinates sum to a multiple of 2. We also need $ \gcd(a+b, a-b) \mid x+y$. – Calvin Lin Jan 13 '25 at 16:17
  • 1
    (I believe that) A necessary and sufficient condition for there to exist a path to reach $(x, y)$ is that $ \gcd(a, b) \mid x, \gcd(a, b) \mid y, \gcd(a-b, a+b) \mid x+y$. $\quad$ From there, study solutions to $ n_x a + m_x b = x, n_y a + n_y b = y$, where $|n_x | + |m_x| \equiv |n_y| + |m_y| \pmod{2}.$ – Calvin Lin Jan 13 '25 at 16:21
  • @CalvinLin +1 : nice catch, my mistake. – user2661923 Jan 13 '25 at 16:38

0 Answers0