Bite 3.5.11 · Modelling Challenges

The knight's perfect tour, challenge chess with linear optimization

A knight visiting every square on the board exactly once?

Image by servet photograph · Unsplash

The Knight’s Tour is a classic mathematical and chess problem that consists of moving a knight on an $n \times n$ chessboard so that it visits each and every square exactly once.

There are two main variants of this problem:

  • Closed tour: The knight ends on a square that is one move away from the starting square, forming a complete cycle that could repeat indefinitely.
  • Open tour: The knight visits all squares, but the final square does not allow returning to the starting square in a single move.

This problem has fascinated mathematicians for centuries, from the celebrated Leonhard Euler in the 18th century to modern research in graph theory and Operations Research.

Do you dare to find a complete closed path before checking the solution and its mathematical modeling?


The Knight’s Tour can be formulated as a Traveling Salesperson Problem on a directed graph, do you dare to try it?

References

  1. Article · 1960
    Integer Programming Formulation of Traveling Salesman Problems
    C. E. Miller, A. W. Tucker, R. A. Zemlin
    Journal of the ACM
    DOI

Keep following the series

← Previous · 3.5.10Binary Sudoku Modelling Challenges Next · 3.5.12 →Hashi

How to cite

Cite this post

Martín-Campo, F. Javier (2026). The knight's perfect tour, challenge chess with linear optimization. https://www.fjmartincampo.com/blog/2026/knightstour/

As a BibTeX entry:

@misc{martín-campo2026the-knight-s-perfect-tour-challenge-chess-with-linear-optimization,
  title   = {The knight's perfect tour, challenge chess with linear optimization},
  author  = {Martín-Campo, F. Javier},
  year    = {2026},
  month   = {jul},
  url     = {https://www.fjmartincampo.com/blog/2026/knightstour/}
}

This post is published under a CC BY-NC-SA 4.0 license.