Can an $(a,b)$-knight reach every point on a chessboard? An $(a,b)$-knight moves $a$ units horizontally and $b$ units vertically (or $b$ horizontally and $a$ vertically) for each move. For example, the traditional knight is a $(1,2)$- or $(2,1)$-knight. Does there exist general algorithms to the following problems?


*

*Given $a,b$ and an infinite chessboard, can an $(a,b)$-knight reach every point on the chessboard no matter where it starts? 

*Given $a,b$ and an $m\times n$ chessboard, can an $(a,b)$-knight reach every point on the chessboard no matter where it starts? Here you can make the assumption that $m,n\gg a,b$ so the space won't be too limited for the knight to move.
In an infinite chessboard, it should be simpler, because the knight can reach every point if and only if it can achieve a single-unit up, down, left and right movement. For $m\times n$ chessboards though, I guess there might still be problems (or requirement for special treatment) with the edge or corner points, even when $m,n\gg a,b$?
 A: If $gcd(a,b)=1$ and $a+b$ is odd then the knight can visit every point (also by comments these conditions are nesessary)  That's because by combinig $(a,b)$ step with $(a,-b)$ step yields a $(2a,0)$ move and similarly for $b$. Since $gcd(2a,2b)$=2 he can achieve by euclidean algorithm a $(2,0)$ move. Since $a+b$ is odd he can perform $(a,b)$ move and by adequate $2$-moves go back to be only one square apart. The answer for finite chessboard is the same since the knight can draw a sqare of size $ab$ in the middle of a chessboard and if $n$, $m$ are sufficiently large he can reach every point of this square. Now he can reach every other point by choosing the right starting point inside the square by Chineese Remainder Theorem. The proof requires some details but the idea is roughly correct (I think).
A: If $\gcd(a,b)>1$ or if $a\equiv b\pmod 2$, then (1) is clearly impossible. 
The set of reachable positions with an $(a,b)$ knight is a sublattice $\Lambda$ of $\Bbb Z^2$ that is invariant under $90°$ rotation as well as vertical reflection. Let $(u,v)\in\Lambda-\{(0,0)\}$ be a $|\cdot|_1$-shortest non-zero vector (i.e., such that $|u|+|v|$ is minimized). Wlog $u\ge v\ge 0$ (but of course $u>0$). Then also $(2v,0)=(v,u)+(v,-u)\in\Lambda$. Then minimality of $|u|+|v|$ implies that either $v=0$ or $u=v$. We conclude that either $$\tag1\Lambda=\{\,(ui,uj)\mid i,j\in\Bbb Z\,\}$$ or $$\tag2\Lambda=\{\,((i+j)u,(i-j)u)\mid i,j\in\Bbb Z\,\}.$$
From $a\not\equiv b\mod 2$, we conclude that $(2)$ is impossible.
From $\gcd(a,b)$ and $(a,b)\in\Lambda$, we conclude $u=1$.
Hence all fields are reached. 
