Tour a $M\times N$ chess board with a piece that moves in each turn along the diagonal of a $m\times n$ rectangle

Here a "tour" is a sequence of moves that visit each square of the board. A square can be visited more than once if necessary.

For example, in a $$8\times 8$$ chess board, a knight which makes $$2\times1$$ type moves can tour the whole board from an arbitrary starting point, but a bishop which makes $$1\times 1$$ (or $$k\times k$$) type moves can not. What condition must $$M,N,m,n$$ satisfy so that a full board tour from any starting point is possible?

• I assume that the piece which moves "along" the diagonals of a rectangle jumps from corner to corner without "visiting" the squares in between ? The standard name for that piece is $(m,n)$-leaper. "Tour" is the standard name for a sequence of moves that visits each square exactly once, as in the classic problem of the knight's tour. What (I think) you are asking, in plain language: On which rectangular chessboards can an $(m,n)$-leaper get from any square to any other square? – bof Jul 24 at 8:39
• Since you allow squares to be visited repeatedly, there is no need to say "from any starting point"; if you can do it from one starting point, you can do it from any starting point. – bof Jul 24 at 8:48
• You may as well assune that $m,n$ are relatively prime, and not both odd; otherwise your "tour" wil be impossible no matter how big $M$ and $N$ are. – bof Jul 24 at 8:51
• @bof Not in every case. A bishop, for example can reach every light square from every other light square, but not from a dark square. – Peter Jul 24 at 15:47
• @Peter What does that have to do with my comment that, if you can "tour the whole board" from one starting point, you can do it frim any starting point? A bishop cannot tour the whole board, no matter where it starts. – bof Jul 24 at 20:50