Can a {p,q}-powered knight return to the origin?

1.1k Views Asked by At

I am working on the following problem:

Suppose we have an arbitarily large chessboard. For two positive integers $p$, $q$, define a $[p,q]$-knight as an object that on each turn, must move p squares along some axis in either the positive or negative direction, and q squares along the other axis in either the positive or negative direction. To give an example, a $[1, 3]$-knight starting at the square $(0, 0)$ will be at one of the eight cells $(1, 3)$, $(1, −3)$, $(−1, 3)$, $(−1, −3)$, $(3, 1)$, $(3, −1)$, $(−3, 1)$, $(−3, −1)$ after its first move. Can our generalized knight make it back to the origin after an odd number of moves? Why or why not?

Here is my proposed answer. Does it work? Is there a more elegant answer? For example, an answer more based in the notions of combinatorial game theory? And is there some way for me to shorten this answer?

Suppose an arbitrary $[p,q]$-knight can return to the "origin" (which I understand to mean the coordinates where it started) in $k$ moves, where $k$ is an odd number. My idea is to work with two equations, each of which represent the horizontal and the vertical position of the knight after $k$ moves.

Dealing first with the horizontal position of the knight after $k$ moves, note that each move changes the horizontal position of the knight by $+p$, $-p$, $+q$, or $-q$. Let $a$, $b$, $c$, and $d$ be non-negative integers. So we have $$0=ap-bp+cq-dq$$ $$\implies 0=p(a-b)+q(c-d)$$ $$\implies p(a-b)=q(d-c)$$ where $a+b+c+d=k$.

Note that one of $a+b$ (which represents the number of moves where a $p$ is added or subtracted from the horizontal position of the knight) or $c+d$ (which represents the number of moves where a $q$ is added or subtracted from the horizontal position of the knight) is odd whereas the other is even (if they are both odd or both even, $k$ would be even). Suppose, without loss of generality, that $a+b$ is even and $c+d$ is odd. Since $a+b$ is even, $a-b$ must be even. Since $c+d$ is odd, $d-c$ is odd.

Now consider the vertical position of the knight after $k$ moves. Let $u$, $v$, $s$, and $t$ be non-negative integers. So we have $$0=up-vp+sq-tq$$ $$\implies 0=p(u-v)+q(s-t)$$ $$\implies p(u-v)=q(t-s)$$ where $u+v+s+t=k$.

Every move that applies a $p$ to the horizontal position of the knight applies a $q$ to the vertical position of the knight, and every move that applies a $q$ to the horizontal position of the knight applies a $p$ to the vertical position of the knight. This implies $a+b=s+t$ and $c+d=u+v$. So we know that $s+t$ is even, implying $t-s$ is even, and $u+v$ is odd, implying $u-v$ is odd.

So we have now two equations: $$p(u-v)=q(t-s)$$ and $$p(a-b)=q(d-c).$$

Since $p=q\frac{t-s}{u-v}$ (I don't think I have to worry about the case where $u-v=0$ because $u-v$ is odd), by substitution we have $$q\frac{t-s}{u-v}(a-b)=q(d-c)$$ $$\implies (t-s)(a-b)=(d-c)(u-v).$$ Now we have a contradiction, since $(t-s)(a-b)$ is even while $(d-c)(u-v)$ is odd.

1

There are 1 best solutions below

1
On BEST ANSWER

Do casework over parities of p and q

If p and q are both odd, the vertical component will change by an odd number on every move, meaning we will only be on an even square vertically (such as the origin) after an even number of moves.

If one of p or q is odd, then the knight will switch between dark-colored squares and light-colored squares with every move, assuming a checkerboard shape. Therefore, assuming without loss of generality that the origin is light, it is impossible to return to the origin in an odd number of moves, since after that many moves, you'll be on a dark square instead.

If both p and q are even, consider their greatest common factor which is a power of two. For example

$$p = k*2^n, q = m*2^n$$

Where either $k, m$, or both are odd

Then every move will be on a factor of $2^n$ for both the vertical and horizontal components. In an odd number of moves, we will never be on a square that is a multiple of $2^{n+1}$ for both the vertical and horizontal components.

Think of this as scaling down the chessboard onto only the movable squares, ignoring all the squares we skip over since they are not multiples of $2^n$. From there, we can use the methods in the previous two parts to show that it is impossible to return to the origin in an odd number of steps.