Papers
Topics
Authors
Recent
Search
2000 character limit reached

Knight Graphs: Structure, Tours, and Complexity

Updated 12 July 2026
  • Knight graphs are defined by chessboard cells as vertices and knight moves as edges, serving as the framework for modeling knight's tours and magic tours.
  • They exhibit intricate structures with distinct properties such as bipartiteness, Hamiltonicity, and various constrained labelings across standard and irregular boards.
  • Extensions to higher dimensions link knight graphs to generalized leaper graphs, highlighting both constructive Hamiltonian results on regular boards and NP-hard complexities on boards with holes.

A knight graph is the graph obtained by taking chessboard cells as vertices and legal knight moves as edges. In its most common form, the graph is defined on an m×nm\times n rectangular board, but the same construction applies to any finite set of cells SZ2S\subset \mathbb{Z}^2, to boards with holes, and to higher-dimensional rectangular boards. Across these settings, knight graphs serve as the standard graph-theoretic model for knight’s tours, magic tours, induced-path extremal problems, generalized leaper graphs, and computational hardness questions (Beluhov, 2021, Golenia et al., 2012, Siegel, 28 Jun 2026).

1. Definition and basic structure

On a rectangular board, a cell is indexed by coordinates, and two cells are adjacent precisely when a knight can move between them in one move: {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}. In the notation of Awani Kumar, the knight graph on an m×nm\times n board is Km,nK_{m,n}, with vertex set

V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},

and edge set consisting of unordered pairs of squares related by a single knight move (Kumar, 2018). In the notation used for arbitrary finite cell sets, the knight graph on SZ2S\subset \mathbb{Z}^2 is G{S}G\{S\}, a simple graph with vertex set SS and the same adjacency rule (Beluhov, 2023). For boards with holes, a chessboard is modeled by a Boolean matrix B{0,1}n×nB\in\{0,1\}^{n\times n}, the present cells form SZ2S\subset \mathbb{Z}^20, and the knight graph is the simple undirected bipartite graph on SZ2S\subset \mathbb{Z}^21 induced by knight moves (Siegel, 28 Jun 2026).

Knight graphs are bipartite. On ordinary boards this is the familiar checkerboard coloring: a knight move always switches the parity of SZ2S\subset \mathbb{Z}^22, so every edge goes between opposite color classes (Beluhov, 2021, Beluhov, 2023). On finite rectangular boards they are sparse, with degree at most SZ2S\subset \mathbb{Z}^23; internal vertices typically have degree SZ2S\subset \mathbb{Z}^24, SZ2S\subset \mathbb{Z}^25, or SZ2S\subset \mathbb{Z}^26 depending on proximity to the boundary (Kumar, 2018).

Several minimal-board thresholds are known exactly. For the knight SZ2S\subset \mathbb{Z}^27, the complete leaper graph is nontrivially connected if and only if the board contains a SZ2S\subset \mathbb{Z}^28 rectangle or its transpose SZ2S\subset \mathbb{Z}^29. A distinct threshold governs edge connectedness: all knight edges lie in one connected component if and only if the board contains a {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.0 region (Beluhov, 2021). These criteria separate vertex-level connectivity from the weaker requirement that all non-isolated vertices belong to a single component.

A common misconception is that knight graphs are primarily about full rectangular chessboards. The literature treats those boards as a foundational case, but the same graph model extends directly to irregular shapes, holes, arbitrary finite cell sets, and higher-dimensional products. This broader viewpoint is essential for both the structural and the complexity-theoretic results.

2. Tours, Hamiltonicity, and arithmetic labelings

In graph-theoretic terms, a knight’s tour is a Hamiltonian traversal of the knight graph. An open tour is a Hamiltonian path, and a closed or re-entrant tour is a Hamiltonian cycle (Kumar, 2018, Siegel, 28 Jun 2026). This translation makes standard graph-theoretic distinctions central: existence of a tour becomes Hamiltonicity, and additional arithmetic constraints become constraints on vertex labelings induced by Hamiltonian paths or cycles.

Awani Kumar studies {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.1 and {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.2 with magic, semi-magic, quasi-magic, and near-magic constraints. On a {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.3 board, a knight tour labels squares by {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.4, and a magic knight tour requires all four long rows to sum to

{xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.5

while all {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.6 short rows sum to

{xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.7

On a {xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.8 board, the corresponding constants are

{xx,  yy}={1,2}.\{|x'-x''|,\;|y'-y''|\}=\{1,2\}.9

The parity obstruction is explicit: for m×nm\times n0 and m×nm\times n1, magic tours are impossible if m×nm\times n2 is odd, and on m×nm\times n3 they are also impossible when both sides are singly even, such as m×nm\times n4, m×nm\times n5, and m×nm\times n6 (Kumar, 2018).

The constructive existence results are specific. Magic tours exist on all boards of size m×nm\times n7 for m×nm\times n8, so the smallest such board is m×nm\times n9. Kumar reports Km,nK_{m,n}0 magic tours on Km,nK_{m,n}1, Km,nK_{m,n}2 on Km,nK_{m,n}3, Km,nK_{m,n}4 on Km,nK_{m,n}5, Km,nK_{m,n}6 on Km,nK_{m,n}7, Km,nK_{m,n}8 on Km,nK_{m,n}9, and V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},0 on V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},1. For V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},2, magic tours exist on all boards of size V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},3 for V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},4, so the smallest such board is V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},5; Kumar reports V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},6 magic tours on V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},7. The same paper records a quasi-magic tour on V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},8, V(Km,n)={(i,j):1im,  1jn},V(K_{m,n})=\{(i,j):1\le i\le m,\;1\le j\le n\},9 semi-magic tours with short rows magic on SZ2S\subset \mathbb{Z}^20, and on SZ2S\subset \mathbb{Z}^21 it records SZ2S\subset \mathbb{Z}^22 semi-magic tours with short rows magic, SZ2S\subset \mathbb{Z}^23 quasi-magic tours with short-row magic, and SZ2S\subset \mathbb{Z}^24 near-magic tours with short-row magic (Kumar, 2018).

The taxonomy is precise. A semi-magic knight tour requires either all long rows or all short rows to share a common sum, but not necessarily both. A quasi-magic knight tour is a semi-magic tour in which the non-magic lines take only two different sum values. A near-magic knight tour is a semi-magic tour where the non-magic lines take three distinct values: the magic constant and two other values (Kumar, 2018). Graph-theoretically, these are Hamiltonian paths or cycles together with constrained labelings on the vertex set.

Closed-tour behavior is subtler than open-tour behavior. Kumar cites Sainte-Marie’s result that closed tours are impossible on SZ2S\subset \mathbb{Z}^25 boards, which is a statement that SZ2S\subset \mathbb{Z}^26 admits Hamiltonian paths but not Hamiltonian cycles (Kumar, 2018). This sharp distinction between path-Hamiltonicity and cycle-Hamiltonicity recurs throughout the subject.

The enumerative results also delimit current knowledge. Kumar notes that total numbers of all tours on many boards remain unknown, records only partial or conjectural values for some sizes, and highlights open questions concerning counting complexity, the possible nonexistence of quasi-magic tours on SZ2S\subset \mathbb{Z}^27, and the existence of closed magic tours on SZ2S\subset \mathbb{Z}^28 and larger even boards (Kumar, 2018). This suggests that arithmetic constraints transform an already difficult Hamiltonian problem into a substantially narrower and more rigid labeling problem.

3. Knight graphs within leaper-graph theory

The knight is the SZ2S\subset \mathbb{Z}^29-leaper. More generally, a G{S}G\{S\}0-leaper moves between cells when

G{S}G\{S\}1

Beluhov studies skew free leapers, meaning G{S}G\{S\}2, G{S}G\{S\}3, G{S}G\{S\}4, and the complete leaper graph on G{S}G\{S\}5 is connected. Classically,

G{S}G\{S\}6

The knight satisfies these conditions and is therefore the root of an infinite ternary tree G{S}G\{S\}7 whose vertices are all skew free leapers (Beluhov, 2021).

The three child transformations are

G{S}G\{S\}8

Every skew free leaper appears exactly once in the rooted tree, and each leaper has a unique descent, a word over G{S}G\{S\}9 describing how it is reached from the knight. Beluhov’s “induction on descent” proves general theorems for all skew free leapers by starting from the knight and propagating properties along these transformations (Beluhov, 2021).

For knight graphs themselves, several consequences are explicit. The knight graph is nontrivially connected if and only if the board contains a SS0 or SS1 subboard. All edges of the knight graph lie in one connected component if and only if the board contains a SS2 subboard. A knight wazir journey, meaning a knight walk whose endpoints are adjacent by a wazir move, exists if and only if the board contains a SS3 rectangle (Beluhov, 2021). These thresholds are minimal-board criteria rather than asymptotic statements.

Beluhov also introduces directional rigidity. Two leaper graphs are direction-isomorphic if there is an isomorphism preserving move directions. A knight graph is directionally flexible if it is direction-isomorphic to a graph of some non-proportional leaper, and directionally rigid otherwise. The criterion is the presence of an unbalanced closed walk. For the knight, Beluhov’s theorem implies that there are finitely many minimal boards SS4 such that any board containing one of them yields a directionally rigid knight graph; on smaller boards, directionally flexible coincidences with other leapers can occur (Beluhov, 2021). The paper gives concrete descendants of the knight in SS5, including the giraffe SS6, the zebra SS7, and SS8.

The resulting perspective treats the knight graph not as an isolated chess construction but as the foundational case in a larger hierarchy of leaper graphs. This suggests a methodological shift: many apparently knight-specific phenomena are better understood as instances of structural statements that can be lifted and lowered along SS9.

4. Induced paths, cycles, and pseudosnake density

A snake path in a graph is a path that is also an induced subgraph; equivalently, it is a chordless path. A snake cycle is an induced cycle. Beluhov studies the longest snake paths and cycles in knight graphs B{0,1}n×nB\in\{0,1\}^{n\times n}0 and proves the asymptotic theorem

B{0,1}n×nB\in\{0,1\}^{n\times n}1

for all positive integers B{0,1}n×nB\in\{0,1\}^{n\times n}2 (Beluhov, 2023). Thus the longest induced path or cycle uses about half the board, with a deficit linear in the perimeter.

The upper bound is obtained through weighted pseudosnake density. A pseudosnake is an induced subgraph of maximum degree B{0,1}n×nB\in\{0,1\}^{n\times n}3, hence a disjoint union of paths and cycles. Beluhov constructs a finite weighted knight graph on B{0,1}n×nB\in\{0,1\}^{n\times n}4 cells with total weight B{0,1}n×nB\in\{0,1\}^{n\times n}5 and, using a constraint-satisfaction solver (Copris, OR-Tools), verifies that the maximum total weight of any pseudosnake is exactly B{0,1}n×nB\in\{0,1\}^{n\times n}6. The resulting weighted pseudosnake density is therefore

B{0,1}n×nB\in\{0,1\}^{n\times n}7

A transfer lemma then yields the global upper bound B{0,1}n×nB\in\{0,1\}^{n\times n}8 for all rectangular knight graphs (Beluhov, 2023).

The local obstruction underlying this construction is a B{0,1}n×nB\in\{0,1\}^{n\times n}9-cell set SZ2S\subset \mathbb{Z}^200 whose knight graph is isomorphic to the SZ2S\subset \mathbb{Z}^201-dimensional hypercube SZ2S\subset \mathbb{Z}^202. The pseudosnake density of this tesseract graph is SZ2S\subset \mathbb{Z}^203, which is too large for the desired bound, so Beluhov superposes overlapping copies and obtains a weighted “pancake” graph of density SZ2S\subset \mathbb{Z}^204 (Beluhov, 2023). This is an instance where the decisive obstruction is weighted rather than purely unweighted.

The lower bound comes from explicit induced-cycle constructions built from twines, ties, splices, and skeins. A twine is a board of height SZ2S\subset \mathbb{Z}^205; its knight graph decomposes into four paths. By tying off twines on the left or right and splicing successive twines, Beluhov constructs sets SZ2S\subset \mathbb{Z}^206 whose knight graph is a cycle whenever SZ2S\subset \mathbb{Z}^207 is odd. Assemblies of four large skeins, followed by local deletion and addition operations, produce a single snake cycle occupying

SZ2S\subset \mathbb{Z}^208

vertices (Beluhov, 2023).

The asymptotic theorem sharply separates ordinary Hamiltonian behavior from induced Hamiltonian behavior. Knight graphs on many large rectangles admit Hamiltonian paths or cycles, yet induced Hamiltonian paths or cycles do not exist for large knight graphs. On the SZ2S\subset \mathbb{Z}^209 board, the exact extremal values cited by Beluhov are a snake path of maximum length SZ2S\subset \mathbb{Z}^210 and a snake cycle of maximum length SZ2S\subset \mathbb{Z}^211; Dawson found a snake path of length SZ2S\subset \mathbb{Z}^212 and a snake cycle of length SZ2S\subset \mathbb{Z}^213, while Knuth determined the finer equivalence-class counts (Beluhov, 2023). This shows that local nonadjacency constraints fundamentally limit induced traversals even when global tours exist.

5. Higher-dimensional knight graphs

The higher-dimensional knight graph is defined on the rectangular board

SZ2S\subset \mathbb{Z}^214

where SZ2S\subset \mathbb{Z}^215. The move set is

SZ2S\subset \mathbb{Z}^216

so exactly two coordinates change, by SZ2S\subset \mathbb{Z}^217 and SZ2S\subset \mathbb{Z}^218, and the others stay fixed. The knight graph is SZ2S\subset \mathbb{Z}^219, where SZ2S\subset \mathbb{Z}^220 iff SZ2S\subset \mathbb{Z}^221 (Golenia et al., 2012).

A closed knight tour is exactly a Hamiltonian cycle in SZ2S\subset \mathbb{Z}^222. For SZ2S\subset \mathbb{Z}^223, the relevant background theorem is Schwenk’s classification of rectangular boards with no closed tour: SZ2S\subset \mathbb{Z}^224 and SZ2S\subset \mathbb{Z}^225 both odd, SZ2S\subset \mathbb{Z}^226, or SZ2S\subset \mathbb{Z}^227 with SZ2S\subset \mathbb{Z}^228. For SZ2S\subset \mathbb{Z}^229, DeMaio and Mathew showed that no closed tour exists exactly when SZ2S\subset \mathbb{Z}^230 are all odd, or SZ2S\subset \mathbb{Z}^231, or SZ2S\subset \mathbb{Z}^232 and SZ2S\subset \mathbb{Z}^233 (Golenia et al., 2012).

Erde, Golénia, and Golénia extend this to all SZ2S\subset \mathbb{Z}^234. If SZ2S\subset \mathbb{Z}^235, then the SZ2S\subset \mathbb{Z}^236 board has no closed knight tour if and only if one of the following holds: all SZ2S\subset \mathbb{Z}^237 are odd, SZ2S\subset \mathbb{Z}^238, or SZ2S\subset \mathbb{Z}^239. In all other cases, the higher-dimensional knight graph has a Hamiltonian cycle (Golenia et al., 2012). They also prove that when some SZ2S\subset \mathbb{Z}^240 is even, a closed tour exists if and only if the knight graph is connected.

The proof is constructive and inductive. The graph is first shown to be bipartite by a coloring SZ2S\subset \mathbb{Z}^241. Nonexistence in the forbidden cases follows from parity or disconnection. Existence is proved using sites and bi-sited Hamiltonian cycles: local patterns inside a Hamiltonian cycle of a lower-dimensional knight graph allow one to glue together multiple layers and gain a new dimension while preserving Hamiltonicity (Golenia et al., 2012). This dimension-raising mechanism is the higher-dimensional analogue of building larger tours from smaller templates.

The same paper also defines generalized knight graphs SZ2S\subset \mathbb{Z}^242, where the move is SZ2S\subset \mathbb{Z}^243 in exactly two coordinates, and proves a dimension-raising theorem for these generalized leapers: if an SZ2S\subset \mathbb{Z}^244-tour exists on a sufficiently large SZ2S\subset \mathbb{Z}^245-dimensional board, then tours exist on higher-dimensional boards with dimensions at least SZ2S\subset \mathbb{Z}^246 in the added coordinates (Golenia et al., 2012). This suggests that the higher-dimensional knight graph is one point in a broader family of leaper graphs whose Hamiltonicity can be propagated across dimension.

6. Complexity and algorithmic regimes

For boards with holes, the computational picture changes abruptly. A chessboard with holes is given by a Boolean matrix SZ2S\subset \mathbb{Z}^247, and it is connected when the rook-adjacency graph on its present squares is connected. In this setting, the knight graph remains bipartite, but its shape can encode much more complicated structures than rectangular boards permit (Siegel, 28 Jun 2026).

The open Knight’s Tour problem is Hamiltonian path on the knight graph, and the closed Knight’s Tour problem is Hamiltonian cycle on the knight graph. On connected chessboards with holes, both open and closed Knight’s Tour are NP-hard. The reductions start from Hamiltonian path or cycle in grid graphs and replace each grid-graph vertex by a local SZ2S\subset \mathbb{Z}^248 board-with-holes gadget SZ2S\subset \mathbb{Z}^249. The gadgets have transition squares, the number and placement of which encode the vertex degree, and the global placement ensures that neighboring gadgets are connected by exactly one knight edge while non-neighboring gadgets are not connected by knight moves (Siegel, 28 Jun 2026).

The reverse direction of the reduction depends on parity inside the gadgets. In each SZ2S\subset \mathbb{Z}^250, the total number of squares of the majority color exceeds the other by exactly SZ2S\subset \mathbb{Z}^251, and all transition squares have the same color. Since a knight alternates color on every move, a global tour can enter and leave each gadget at most once. The contiguous gadget blocks extracted from a knight tour therefore recover a Hamiltonian cycle or path in the source grid graph (Siegel, 28 Jun 2026). This makes the hardness argument genuinely graph-theoretic rather than merely geometric.

The same paper places Knight Exchange in the language of pebble motion. A configuration on a graph SZ2S\subset \mathbb{Z}^252 is a function

SZ2S\subset \mathbb{Z}^253

with SZ2S\subset \mathbb{Z}^254 and SZ2S\subset \mathbb{Z}^255 representing black and white pebbles and SZ2S\subset \mathbb{Z}^256 a hole. A move SZ2S\subset \mathbb{Z}^257 slides a pebble along an edge into a hole. The optimal Knight Exchange problem is the corresponding Pebble Swap problem restricted to knight graphs of connected boards, with symmetric initial and final configurations. The paper proves that Pebble Swap on bipartite graphs is NP-hard and then transfers the reduction to knight graphs, concluding that the optimal Knight Exchange problem on connected chessboards is NP-hard (Siegel, 28 Jun 2026).

This hardness result coexists with a markedly easier rectangular regime. For standard rectangular boards, the decision problem for an open knight’s tour is effectively constant-time decidable from arithmetic conditions on the dimensions, and a linear-time construction is known when a tour exists (Siegel, 28 Jun 2026). A plausible implication is that knight graphs exhibit two sharply separated algorithmic behaviors: highly regular rectangles admit explicit structure theorems, while connected boards with holes are expressive enough to simulate NP-hard Hamiltonian and reconfiguration problems.

The complexity results also correct a common oversimplification. Connectivity of the underlying board does not make the problem easy: even under rook-connectivity, knight-graph Hamiltonicity remains NP-hard on boards with holes (Siegel, 28 Jun 2026). The decisive structural variable is not connectivity alone, but the extent to which the board geometry constrains the knight graph from encoding arbitrary gadgetry.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (5)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Knight Graphs.