Show that a generalized knight can return to its original position only after an even number of moves

Case I: If $p+q$ is odd, then the knight's square changes colour after each move, so we are done.

Case II: If $p$ and $q$ are both odd, then the $x$-coordinate changes by an odd number after every move, so it is odd after an odd number of moves. So the $x$-coordinate can be zero only after an even number of moves.

Case III: If $p$ and $q$ are both even, we can keep dividing each of them by $2$ until we reach Case I or Case II. (Dividing $p$ and $q$ by the same amount doesn't change the shape of the knight's path, only its size.)


This uses complex numbers.

Define $z=p+qi$. Say that the knight starts at $0$ on the complex plane. Note that, in one move, the knight may add or subtract $z$, $iz$, $\bar z$, $i\bar z$ to his position.

Thus, at any point, the knight is at a point of the form: $$(a+bi)z+(c+di)\bar z$$ where $a$ and $b$ are integers.

Note that the parity (evenness/oddness) of the quantity $a+b+c+d$ changes after every move. This means it's even after an even number of moves and odd after an odd number of moves. Also note that: $$a+b+c+d\equiv a^2+b^2-c^2-d^2\pmod2$$ (This is because $x\equiv x^2\pmod2$ and $x\equiv-x\pmod2$ for all $x$.)

Now, let's say that the knight has reached its original position. Then: \begin{align} (a+bi)z+(c+di)\bar z&=0\\ (a+bi)z&=-(c+di)\bar z\\ |a+bi||z|&=|c+di||z|\\ |a+bi|&=|c+di|\\ \sqrt{a^2+b^2}&=\sqrt{c^2+d^2}\\ a^2+b^2&=c^2+d^2\\ a^2+b^2-c^2-d^2&=0\\ a^2+b^2-c^2-d^2&\equiv0\pmod2\\ a+b+c+d&\equiv0\pmod2 \end{align} Thus, the number of moves is even.

Interestingly, this implies that $p$ and $q$ do not need to be integers. They can each be any real number. The only constraint is that we can't have $p=q=0$.


An alternative algebraic solution:

You have 8 possible moves $(p,q)$, $(p,-q)$, $(-p,q)$, $(-p,-q)$, $(q,p)$, $(q,-p)$, $(-q,p)$, $(-q,-p)$. Let $a_1,\cdots,a_8$ the number of each one of these moves ($a_i$ are nonnegative integers). Starting from $(0,0)$ you arrive at the point $$\left((a_1+a_2-a_3-a_4)p+(a_5+a_6-a_7-a_8)q,\:(a_5-a_6+a_7-a_8)p+(a_1-a_2+a_3-a_4)q\right)$$ In order to return to $(0,0)$ the following must hold $$(a_1+a_2-a_3-a_4)p+(a_5+a_6-a_7-a_8)q=0\\ (a_5-a_6+a_7-a_8)p+(a_1-a_2+a_3-a_4)q=0$$

Case 1: If $$a_1+a_2-a_3-a_4=0$$ then $$a_5+a_6-a_7-a_8=0$$ For each one of these equations the numbers of odds must be even. Thus the total sum $\sum_{i=1}^8{a_i}$ which is the total number of moves must be even.

Case 2: If $$a_1+a_2-a_3-a_4\neq 0$$ then $$p=\frac{a_7+a_8-a_5-a_6}{a_1+a_2-a_3-a_4}q$$ Replacing now into the second equation we obtain $$(a_5-a_6+a_7-a_8)(a_7+a_8-a_5-a_6)+(a_1-a_2+a_3-a_4)(a_1+a_2-a_3-a_4)=0$$ or equivalently $$(a_7-a_6)^2-(a_5-a_8)^2+(a_1-a_4)^2-(a_2-a_3)^2=0$$ and $$(a_7-a_6)^2+(a_1-a_4)^2=(a_2-a_3)^2+(a_5-a_8)^2$$ Consider again the total number of odds in the above equation. This must be even and therefore the total sum $\sum_{i=1}^8{a_i}$ which is the total number of moves must also be even for Case 2.


Without loss of generality, we can assume $p\ge q\ge0$. Two cases are easy to prove:

  1. If $p+q$ is odd, the knight alternates between black and white squares, so it takes an even number of moves to return to whatever color you started on.

  2. If $q=0$, the each move is either purely horizontal or purely vertical; it will require an even number of each type of move to get back to where you start, so an even number in all.

If $p+q$ is even, we can reinterpret the knight's move as being made in the two perpendicular diagonal directions. The total number of squares jumped in the reinterpretation is easily seen to be $p$. Since $p\lt p+q$ if $q\gt0$, we can say the magic word "induction" and call it a day (or a knight).