6x6 from a1
- Input
- 6x6, a1, fechado
- Expected output
- a1 b3 a5 c6 e5 f3 e1 d3 c1 a2 b4 a6 c5 e6 f4 e2 d4 f5 d6 b5 a3 b1 c3 a4 b6 d5 f6 e4 f2 d1 b2 c4 d2 f1 e3 c2
36 squares. The last, c2, is one jump from a1.
Knight's Tour: Puzzle and Solver
closed knight's tour
A closed, or re-entrant, knight's tour visits every square once and ends one jump from the starting square, forming a circuit. Not every board has one: Schwenk's theorem says exactly which do.
36 squares. The last, c2, is one jump from a1.
30 squares on a board of just 3 rows. The last, c2, closes on a1.
Both sides are odd (35 squares), an exception in Schwenk's theorem. An open tour on 5x7 does exist, from the 18 squares of the corner color.
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.
Those with an even side from 6x6 up (6x6, 8x8, 10x10, 12x12 and so on). Odd-sided boards and 4x4 have none.
Yes. Since the tour is a cycle, any square can be the start: you simply rotate the sequence. In the tool, click the desired square in the Solver tab.
It is, because the last square must also land one jump from the first. Warnsdorff alone rarely closes the loop; the solver combines backtracking with Pósa rotations to close the cycle.
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.