Does the existence of a knights tour depend on the initial position taken in any way?

584 Views Asked by At

Attempting to find solutions for a knights tour using basic bactracking algorithms and came across that most examples use one of the corners as the starting point, does the existence of the tour depend on the starting position.

2

There are 2 best solutions below

2
On

By definition a closed tour (Hamiltonian cycle) must visit every vertex of the graph and come back to the starting point. So you can choose any vertex $x$ as the starting point. A closed tour $(t_0, t_1, \ldots, t_n = t_0)$ that starts anywhere else can be transformed into one that starts at $x$: if $x = t_m$, then take $(t_m, t_{m+1}, \ldots, t_n, t_1, \ldots, t_m)$.

1
On

If you're looking for a closed knight's tour, then it shouldn't matter where you start - at least, not as far as the number of solutions is concerned. The starting point might affect how quickly you find a solution.

If you're looking for an open tour that doesn't necessarily return to the starting point, then the choice of starting point might matter for the number of solutions or for the existence of solutions. In particular, for a $5 \times 5$ chessboard, we can show that any open tour must start or end at one of the corners. (Otherwise, we must use both moves in an out of each corner, and those moves link up to a length-$8$ subtour that can't be part of any tour.)