Knight's Tour

A chess knight visits every square of the board exactly once, and its path of short, crooked jumps becomes a dense star of lines.

Knight's Tour: A chess knight visits every square of the board exactly once, and its path of short, crooked jumps becomes a dense star of lines.Knight's Tour: A chess knight visits every square of the board exactly once, and its path of short, crooked jumps becomes a dense star of lines.

About this pattern

Rudrata, 9th century · Leonhard Euler, 1759 · H. C. von Warnsdorff, 1823

Knight's Tour, hamiltonian path, drawn by GART: A chess knight visits every square of the board exactly once, and its path of short, crooked jumps becomes a dense star of lines.
Knight's Tour · CC BY 4.0

The knight moves two squares one way and one the other, so it can never reach a neighbouring square directly, and a tour that visits every square once has to wander. The oldest known tour is a poem: Rudrata's Kāvyālaṅkāra, a Sanskrit work on poetics from the 9th century, sets a half-board tour in verse. Leonhard Euler studied tours in 1759, and in 1823 H. C. von Warnsdorff gave a rule that finds one almost every time: always jump to the square with the fewest onward moves, so the awkward squares are visited before they can be stranded. A closed tour ends a knight's move from where it began. Allen Schwenk showed in 1991 which boards have one; no square board with odd sides does, because the knight changes colour with every jump and an odd board has one square more of one colour. The ordinary board has more than 13 trillion closed tours, so every seed draws another.

Behind the mathematics