Knight's graph
Mathematical graph relating to chess

In graph theory, a knight's graph, or a knight's tour graph, is a graph that represents all legal moves of the knight chess piece on a chessboard. Each vertex of this graph represents a square of the chessboard, and each edge connects two squares that are a knight's move apart from each other.
More specifically, an knight's graph is a knight's graph of an
chessboard.
Its vertices can be represented as the points of the Euclidean plane whose Cartesian coordinates
are integers with
and
(the points at the centers of the chessboard squares), and with two
vertices connected by an edge when their Euclidean distance is
.
For an knight's graph, the number of vertices is
. If
and
then the number of edges is
(otherwise there are no edges). For an
knight's graph, these simplify so that the number of vertices is
and the number of edges is
.
A Hamiltonian cycle on the knight's graph is a (closed) knight's tour. A chessboard with an odd number of squares has no tour, because the knight's graph is a bipartite graph (each color of squares can be used as one of two independent sets, and knight moves always change square color) and only bipartite graphs with an even number of vertices can have Hamiltonian cycles. Most chessboards with an even number of squares have a knight's tour; Schwenk's theorem provides an exact listing of which ones do and which do not.
When it is modified to have toroidal boundary conditions (meaning that a knight is not blocked by the edge of the board, but instead continues onto the opposite edge) the knight's graph is the same as the four-dimensional hypercube graph.
Sources and credits
This article is adapted from the Wikipedia article “Knight's graph”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Images, from Wikimedia Commons:
- Knight's graph.svg by Smithers888, Public domain
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.