Knight's graph
Knight's graph | |
---|---|
![]() [math]\displaystyle{ 8\times 8 }[/math] knight's graph | |
Vertices | [math]\displaystyle{ mn }[/math] |
Edges | [math]\displaystyle{ 4mn-6(m+n)+8 }[/math] (if [math]\displaystyle{ n\ge 2 }[/math] and [math]\displaystyle{ m\ge 2 }[/math]) |
Girth | 4 (if [math]\displaystyle{ n\ge 3 }[/math] and [math]\displaystyle{ m\ge 5 }[/math]) |
Properties | bipartite |
Table of graphs and parameters |
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 [math]\displaystyle{ m \times n }[/math] knight's graph is a knight's graph of an [math]\displaystyle{ m \times n }[/math] chessboard.[1] Its vertices can be represented as the points of the Euclidean plane whose Cartesian coordinates [math]\displaystyle{ (x,y) }[/math] are integers with [math]\displaystyle{ 1\le x\le m }[/math] and [math]\displaystyle{ 1\le y\le n }[/math] (the points at the centers of the chessboard squares), and with two vertices connected by an edge when their Euclidean distance is [math]\displaystyle{ \sqrt{5} }[/math].
For an [math]\displaystyle{ m \times n }[/math] knight's graph, the number of vertices is [math]\displaystyle{ nm }[/math]. If [math]\displaystyle{ m\gt 1 }[/math] and [math]\displaystyle{ n\gt 1 }[/math] then the number of edges is [math]\displaystyle{ 4mn-6(m+n)+8 }[/math] (otherwise there are no edges). For an [math]\displaystyle{ n \times n }[/math] knight's graph, these simplify so that the number of vertices is [math]\displaystyle{ n^2 }[/math] and the number of edges is [math]\displaystyle{ 4(n-2)(n-1) }[/math].[2]
A Hamiltonian cycle on the knight's graph is a (closed) knight's tour.[1] 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.[3]
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 [math]\displaystyle{ 4\times 4 }[/math] knight's graph is the same as the four-dimensional hypercube graph.[3]
See also
References
- ↑ 1.0 1.1 Averbach, Bonnie; Chein, Orin (1980), Problem Solving Through Recreational Mathematics, Dover, p. 195, ISBN 9780486131740.
- ↑ Sloane, N. J. A., ed. "Sequence A033996". OEIS Foundation. https://oeis.org/A033996.
- ↑ 3.0 3.1 Watkins, John J. (2004), Across the Board: The Mathematics of Chessboard Problems. Paradoxes, perplexities, and mathematical conundrums for the serious head scratcher, Princeton University Press, pp. 44, 68, ISBN 978-0-691-15498-5, https://books.google.com/books?id=EQSPm1MPKJUC&pg=PA44.
External links
![]() | Original source: https://en.wikipedia.org/wiki/Knight's graph.
Read more |