From the a1 corner
- Input
- 5x5, a1, aberto
- Expected output
- a1 b3 a5 c4 e5 d3 e1 c2 a3 b5 d4 e2 c1 a2 b4 d5 e3 d1 b2 a4 c5 e4 d2 b1 c3
Pure Warnsdorff, 25 squares, ending on the center c3.
Knight's Tour: Puzzle and Solver
knight's tour 5x5
The 5x5 is the smallest square board on which the knight can visit every square, and it has a catch: it only works if you start on one of the 13 squares of the corner color. From the other 12, a complete tour is impossible.
Pure Warnsdorff, 25 squares, ending on the center c3.
Ends on the a1 corner. Starting and ending on the corner color is mandatory.
b1 is the wrong color. A 25-square tour would have to alternate colors and one square would be left over.
It is the problem of taking a chess knight through every square of a board, visiting each exactly once, using only its L-shaped move. When the last square is one knight move from the first, the tour is called closed or re-entrant, because it forms a circuit.
The 5x5. The 2x2, 3x3 and 4x4 boards have no complete tour, with the 1x1 as the trivial one-square exception.
No. The number of squares is odd (25), and a closed knight circuit requires an even number. The first square board with a closed tour is 6x6.
By color: a board with an odd number of squares only admits an open tour leaving from the majority color. For small boards it also proves absence by exhaustive search.
Start on a1. Press Solve.
Sources: Schwenk (1991) for closed tours; Cull and De Curtins (1978) for open ones.
Everything runs in your browser: no move or tour is sent to any server.