I have asked this question once before, but I forgot about it and it's been a long time since then. Also, I have learned new things since then so my approach has changed. Therefore I am creating a new question. It goes something like this:
Suppose a chess knight is positioned on some arbitrary square on a chessboard and wants to move to another arbitrary square. What is the smallest number of moves needed?
To solve this problem, a good approach might to create a Cartesian plane around the chessboard, such that the origin $(0, 0)$ is the square $a1$ and $(7, 7)$ corresponds to $h8$.
My first attempt was to use vector geometry. The move has some variety of possible moves it can make: $\{ \pm (1,2),\pm (2,1),\pm (-1,2),\pm (2,-1) \}$, where $\pm$ represents the scalar $+1$ or $-1$. Suppose our knight starts somewhere (don't think it really matters where) and wants to move to the square $(x,y)$. We could then brute-force our way to a solution:
$a(2,1)+b(1,2)+c(-1,2)+d(1,-2)=(x,y)$
Using this, we can say that $y-x=-a+b+3c-3d$, where $a,b,c,d\in\mathbb{Z}$
A crucial observation here is that if two squares share the same color, their coordinate sums will also share the same even-odd parity. This means that the total amount of moves to move between squares of the same color complex is always even. It is therefore useful to note that either $|a|+|b|+|c|+|d|\equiv _{2}0$ or $|a|+|b|+|c|+|d|\equiv _{2}1$.
The terms can only have the remainder either $0$ or $1$ in both cases, so it is possible to say that for example $a\equiv _{2}0\implies a=2n, n\in\mathbb{Z}$. Using this, one could imagine an infinite set containing "every" possible linear combination $|a|+|b|+|c| +|d|$ for all different combinations of equivalence classes modulo 2 for $|a|,|b|,|c|,|d|$. The smallest element in this set, then, would be the least number of moves.
Of course, the above "method" is horribly inefficient and basically impossible to use. There must exist some more analytic way of solving this. It was easy to solve this using programming, but not so easy mathematically.
Any insights would be greatly appreciated!