A Knight's Tour Can End One Move from Its Start

Leonhard Euler presented a solution in 1759 to the problem of covering a chessboard with a lone knight, according to the Euler Archive at the University of the Pacific. The example here starts with the knight on the corner square a1. In ETH Library’s account, a knight’s tour visits every square of an empty chessboard exactly once. The tour is closed if one more knight’s move could bring the piece from its final square back to the starting square. A complete tour without that connection is open.

A dark wooden knight stands beside a sweep of empty light and dark squares.
A dark wooden knight casts a soft shadow across the chessboard.

From that corner the knight hops to b3. The letter names the column on the board and the number names the row. This is an invented route on an otherwise empty board, separate from Euler’s examples. Its first move puts the piece one column over and two rows up. On the next hop, the same shape can take it away from the corner again. The harder part comes once the board has a record of where the knight has been.

What has to happen before a route counts as a tour?

On a standard chessboard a knight’s move changes position by two squares along one axis and one square along the other. The offsets describe where the piece lands. The squares between its old and new positions are not visits. There is also a visit before the first hop: the square occupied at the start is already part of the route.

In the small set of moves starting at a1, the knight goes from b3 to a5. The move is the same shape as the first hop, with the column change in the other direction. At a5 the piece could move back to b3 in ordinary chess, but b3 already appears in the route. Under the puzzle rule the next landing must be fresh. The later move to b7 meets that condition.

One Hand Before the Full Set
  1. Start: The knight stands on a1; only a1 has been visited.
  2. First hop: The knight stands on b3; visits are a1, b3.
  3. Next hop: The knight stands on a5; visits are a1, b3, a5.
  4. Near the edge: The knight stands on b7; visits are a1, b3, a5, b7.

The sequence can be written as an ordered list of landings. The order shows whether each successive hop is possible, and the list as a whole shows whether any square was missed or listed twice. A pocket of empty squares can survive next to a long trail of legal moves. The run to b7 is a valid beginning, with no claim about how the unknown part of the route will proceed.

On the standard board, the count to check is 64 distinct squares, starting with the one the knight already occupies. That leaves 63 moves between the starting square and the final landing. An attempt with the right number of entries can still fail if the same square appears twice. In that case the duplicate has taken the place of a square that should have been visited.

When can the last square connect to the start?

ETH Library states: "If the final square is only one knight's move from the starting square, the tour is referred to as closed; otherwise, it is open."

Suppose the route beginning a1, b3, a5, b7 has been completed with each square visited once. The number of squares in the record now settles whether the board has been covered, provided that the landings are all distinct and the hops are legal. To tell whether the route closes, only the two ends matter. The knight needs the same shape of move to return to a1 as it needed for the jump away.

From a1 the knight has only two possible destinations, b3 and c2, because every other move of that shape would cross the edge. On the illustrated route b3 has already been used as the first destination. It cannot appear later as the endpoint. A completion of this particular opening would therefore have to finish on c2 to be closed. The calculation fixes a condition for closure without proving that the middle of the route can be filled in.

What the Endpoints Would Tell
Closed if complete
  • From c2 to a1: a knight’s move
Open if complete
  • From h7 to a1: no knight’s move

The comparison is conditional on a completed route. A piece that stopped on h7 with squares still unvisited would be part of an unfinished attempt, not an open tour. A piece that stopped early on c2 would be equally short of a tour, even though c2 is in the right place to connect to a1. The end-to-start check acquires its meaning once the coverage check has passed.

The closing connection can be drawn without adding a new square to the list. If the piece were moved along that connection, it would land on the square already recorded at the start. A drawing of the closed circuit can show the join; the list that establishes the tour still records the starting square just once.

The board colours provide a quicker test with a narrower purpose. A knight’s move always changes the colour under the piece: shifting two squares along one axis preserves the colour, and shifting one along the other changes it. Since the complete route takes 63 moves between its two ends, the ending colour must differ from the starting colour. Both c2 and h7 are on the opposite colour from a1. The colour check rules out some claimed endpoints, but it cannot tell those two apart. The offset still has to be checked.

An endpoint can even touch the starting square and fail that check. Suppose a completed route from a1 finishes on a2. The squares share an edge and differ in colour, but a2 and a1 lie in the same column. The finishing square would be close in the ordinary sense and out of reach in one knight’s move. Closure depends on the pattern of the jump rather than on how little space separates the two squares.

Where does an attempted route have to change?

The ETH Library exhibit describes backtracking, which tests a route by undoing a choice when it leads to a dead end. A dead end here is a square from which no legal knight’s move leads to a square still unvisited, even though the tour is incomplete. The last move is removed from the attempted route, and the preceding position gets another look.

Back on the board that began at a1, suppose the knight continues from b7 through d6, f7, e5 and g6. Now the knight can hop from g6 into the far corner at h8. The landing is fresh and the hop fits the rule. The trouble appears after the landing. The only destinations from h8 are f7 and g6, and both are already on the list. Plenty of squares are still blank.

How the Far Corner Becomes a Dead End
  • ArrivalThe knight takes a legal step from g6 to h8.
  • Possible exitsf7 and g6 have both been visited.
  • BacktrackThe h8 landing is erased and g6 becomes the end of the route again.

A fresh destination can have no fresh exit.

Backtracking separates the route retained on paper from the sequence of moves tried while working it out. Physically returning the piece from h8 to g6 would revisit g6. On paper it cancels the move to h8, so g6 remains the end of the retained route and h8 becomes unvisited again. From g6 the knight could instead try e7. That move keeps the search going, though it gives no assurance that the far corner will be usable at the right time.

If all continuations from g6 fail, the same method takes the record back another step. The live position depends just as much on the earlier landings as on the square under the piece. At h8, arriving from either neighbour uses one of the two exits; whether the other exit is still available depends on the path that got there. Could another branch keep f7 free for the exit from h8 and still save c2 for the final landing?

Frequently Asked Questions

When did Euler’s knight’s tour paper first appear in print?

The Euler Archive at the University of the Pacific dates the first printing of Euler’s knight’s tour paper to 1766. The archive dates its first review, in the Journal Encyclopédique, to 1767.

Did the knight’s tour puzzle predate Euler?

ETH Library traces the knight’s tour puzzle to Indian and Arabic manuscripts from the ninth century. Those manuscripts document the puzzle well before Euler’s presentation.

What does Warnsdorff’s rule count before selecting a move?

Warnsdorff’s rule counts the unvisited squares that the knight could reach on the move after each candidate landing, as described by ETH Library. It favours the candidate with the fewest such onward options.

Can the knight’s tour problem use a board of another shape?

ETH Library describes generalisations of the knight’s tour to boards of other shapes and sizes. The library also mentions versions posed on boards with more dimensions than the ordinary chessboard.

Which book supplies the illustration for ETH Library’s knight’s tour exhibit?

ETH Library credits the illustration in its knight’s tour exhibit to Edouard Lucas’s Récréations mathématiques. The caption identifies volume 4, published in Paris in 1894.

Sources

  • ETH Library, ETH Zurich: Knight's Tour Problem
  • Euler Archive, University of the Pacific: Solution d'une question curieuse que ne paroit soumise à aucune analyse
  • International Chess Federation: FIDE Laws of Chess taking effect from 1 January 2023