Generalised Knight's Tours

The problem of existence of closed knight's tours in [n] d , where [n] = the same question for a generalised, (a, b) knight, which is allowed to move along any two axes of [n] d by a and b unit lengths respectively. Given an even number a, we show that the [n] d grid admits an (a, 1) knight's tour for sufficiently large even side length n.


Introduction
A knight's graph on [n] 2 is the graph with the specified vertex set, whose edges are legal knight's moves (two unit lengths in one direction and one in the other).Unconventionally, throughout the paper we take [n] = {0, 1, 2, . . ., n − 1}.A Hamiltonian cycle in a knight's graph is called a knight's tour.
The existence of a knight's tour in the 8×8 chessboard is a classical problem.The earliest known solutions originate from Arab chess players from around AD 800.The modern study of the problem appears to have begun in the late 17 th century, with Récréations Mathématiques et Physiques by Jacques Ozanam.This compilation contains knight's tours by de Montmort, de Moivre and de Mairan.For historical notes and an extensive list of papers published on special cases and related problems, we refer the reader to [2].
The first characterisation of rectangular chessboards which admit a knight's tour was given by Schwenk [3] in 1991.
The theorem was generalised into higher dimensions in 2012.We only state the special case relevant to this paper.
The authors of [1] also asked whether an analogous knight's tour exists if the standard knight is replaced with the generalised, (a, b) knight.The (a, b) knight is allowed to move along any two axes of [n] d by a and b unit lengths respectively.We define the (a, b) knight's graph on vertex set [n] d to be the graph whose edges are legal moves of the (a, b) knight.
We refer to an (a, b) knight's tour in [n] d to mean a Hamiltonian cycle in the corresponding knight's graph.Graph theory terminology is used throughout the paper.
The first generalisation of Theorem 2 is the existence of an (a, 1) knight's tour, for any even a (for odd a this is plainly impossible since the graph has two connected components: {(x 1 , x 2 , . . .x d ) : i x i odd} and its complement).Our main task is to find a 2-dimensional (a, 1) knight's tour.It turns out that extending to d dimensions is comparatively easy.
The following result is proved in Section 2.
Theorem 3.For any even values of a and n, with n a(6a + 2), there exists an (a, 1) knight's tour in [n] d .
For odd n and even a, no knight's tour exists because the (a, 1) knight's graph is bipartite, with two partitions of different size.
There are two main points in which our 2-dimensional (a, 1) knight's tours differ from the ones constructed so far for the (2, 1) knight.Firstly, a natural way to build a Hamiltonian cycle is to assemble it from a sequence of paths with adjacent endpoints, returning to the initial vertex.It requires much less caution and work to just partition the vertices of the graph, find a cycle in each partition, and then gradually merge (or concatenate) these into a single Hamiltonian cycle, which is what is done in Section 2.
Secondly, our vertex-partitions produce cycles that extend through the whole board, rather than being localised to square or rectangular domains.This 'globality' property is apparent in the resulting (a, 1) knight's tours.
By analogy with the (a, 1) knight, in Section 3 we give a way of extending (a, b) knight's tours in [n] 2 (with very little additional structure) to knight's tours in [n] d .Note that a and b are required to be coprime and not both odd if we are to construct an (a, b) knight's tour.We also find (2,3) and (2, 5) knight's tours in [n] 2 for sufficiently large even n, and consequently in [n] d .It is much harder to find structure in these graphs.In particular, we use completley different methods for the (2, 5) knight's tour (Section 3.3).We do not know what happens for general (a, b) knights.
the electronic journal of combinatorics 21(1) (2014), #P1.31 In Section 2, definitions and results are mostly stated in terms of coordinates, but we use diagrams to illustrate them and encourage the reader to think in terms of diagrams.Throughout Section 2, C ij means C i,j and similar.We omit commas in subscripts to make the text and diagrams more readable unless there is potential ambiguity.All numerical values are one-digit.

The (a, 1) knight
The construction of the (a, 1) knight's tour in [n] 2 comprises most of this section.We first find two ways of extending existing knight's tours, which will allow us to induct on the side length n.Then we turn to the basic case, n = 6a + 2. A 1 We call this the compound of cycles C 1 and C 2 and denote it by C = C 1 ∪ C 2 .The edges A 1 B 1 and A 2 B 2 will be called a bridge for this compound.

Traversing the rim of the board
Consider an (a, 1) knight's graph with vertex set [n] 2 , where a and n are even.In our diagrams, (0, 0) is the bottom left square, so that the coordinatisation is in accordance with the first quadrant of the Cartesian coordinate system.We call the subgraph induced by M = {(i, j) | a i n − a − 1, a j n − a − 1} the middle of the board.The subgraph induced by the complement of M is called the rim of width a.
A unit is defined as a set of form {(i, j), (i + 1, j), (i, j + 1), (i + 1, j + 1)}, where i and j are even, as shown in Figure 1.Two units U and U are equivalent if U can be translated by (ka, la) (k and l integers) to cover U .For example, the highlighted units in Figure 1 are an equivalence class of units in the rim of width 4 of our (4, 1) knight's graph.
We colour the vertices of the rim using a 2 colours, as displayed in Figure 1.The set coloured by i, j is uniquely defined by the requirement that its vertices lie within equivalent units.Each colour i, j induces a cycle C ij in the rim of width a.To explain why colours indeed induce closed paths C ij for any even n, it is sufficient to look at C 00 , C 01 , C 10 , C 11 , and track their position within the highlighted (gray) units.The other cycles will behave analogously.
The vertices belonging to C 00 and C 01 alternate vertically in bottom and top segment of the rim.The number of these transpositions is the same at the bottom and at the top, which means that C 00 and C 01 end up in the same relative position after a single lap (C 00 below C 01 ).Similarly, vertices belonging to C 00 and C 10 alternate horizontally in right and left segment of the rim, ending up at the same relative position.So cycle C 00 indeed returns to the bottom left corner.
Equivalently, C 01 alternates with C 00 vertically and with C 11 horizontally to return to the top left corner of its unit.The same argument works for C 10 and C 11 , so the claim is proved.
The partition of the rim into colours is not a matter of choice -most vertices along the edge of the board have degree 2 in the rim, as well as most vertices along the middle.These constraints dictate the 'propagation' of cycles.
To be able to induct on the side length, we prove a slightly stronger claim than mere existence of a knight's tour.To formulate the hypothesis, we define a structured (a, 1) knight's tour as a knight's tour that contains edges • {(i, j), (i + a, j + 1)}, where i and j lie between 0 and a − 1, and j takes only even values, • {(i, j), (i + a, j − 1)}, where i and j lie between 0 and a − 1, and j takes only odd values.
Figure 2: Bottom left corner of a (4, 1) knight's graph, with edges required for a structured knight's tour highlighted.
We shall contract the two cases as {(i, j), (i + a, j + (−1) j )}.Each of these edges (shown in Figure 2) is contained in the corresponding cycle C ij so this requirement is not very strong.
Lemma 4. Let a structured (a, 1) knight's tour in [n] 2 be given, with a and n even and n 2a.Then there exists a structured (a, 1) knight's tour in Proof.The middle of the board [n + 2a] 2 is isomorphic to the (a, 1) knight's graph in [n] 2 in a natural way, so we can construct a structured (a, 1) knight's tour C in {a, a + 1, . . .n+a−1} 2 .By definition, C contains the edges {(i+a, j +a), (i+2a, j +(−1) j +a)}, for all i and j in [a].These edges, for j ∈ {0, 1} are represented by solid black edges in Figure 3. Also form colours C 00 to C a−1,a−1 in the rim of width a.These cycles contain the edges {(i + a + 1, j), (i + 2a + 1, j + (−1) j )} for i and j in [a] (represented by dashed black edges in Figure 3 for j ∈ {0, 1}).
As explained in the previous section, for all i and j in [a], {(i + a + 1, j), (i + 2a + 1, j + (−1) j )} and {(i + a, j + a), (i + 2a, j + (−1) j + a)} is a bridge for the compound of C i+1,j and C (we take C a,j = C 0,j ).So by replacing this pair with {(i + a + 1, j), (i + a, j + a)} and {(i + 2a + 1, j + (−1) j ), (i + 2a, j + (−1) j + a)} (gray edges in Figure 3), we get the compound This notation makes sense because once the cycles are concatenated, the order in which it has been done is not distinguishable.The result is an (a, 1) knight's tour in  [n + 2a] 2 .Compare this new knight's tour with the definition of a structured tour.Edges connecting the two highlighted 4 × 4 squares are not among the ones which have been deleted to do the concatenation in Figure 3.This means exactly that the (a, 1) knight's tour we constructed is structured, which completes the proof.

Sequential concatenation of (a, 1) knight's tours
Given a collection of vertex-disjoint cycles {C i } in a knight's graph, the most straightforward way to concatenate all of them into a single cycle is to order them in a sequence, and then concatenate C i and C i+1 for each i.In addition, Lemma 5 gives a strategy of concatenating C i and C i+1 in a way that uses only one link, which will be used in many seemingly different constructions.This is a crucial idea, and we will refer to it as sequential concatenation.
We call the edge {(a − 1, 1), (a − 2, a + 1)} link A and refer to an (a, 1) knight's tour containing it as an A-linked knight's tour.
Lemma 5. Let [n] 2 admit a structured (a, 1) knight's tour and an A-linked (a, 1) knight's tour.Then for any natural number k, there is a structured (a, 1) knight's tour in [kn] 2 .
Proof.The hypothesis of this lemma implies that a and n are both even.Consider first just the board [2n]×[n], viewed as two copies of [n] 2 .Endow each copy of [n 2 ] with an (a, 1) knight's tour.The right copy, {n, n + 1, . . .2n − 1} × [n] contains link A by assumption, which is given by {(n + a − 1, 1), (n + a − 2, a + 1)} in the new common coordinate system.Then the edges {(n + a − 1, 1), (n + a − 2, a + 1)} (link A) and {(n − 1, 0), (n − 2, a)} (which must exist as a corner edge) make up a bridge.We use this bridge to construct a single (a, 1) knight's tour [2n] × [n].Represent this by an arrow pointing into the right copy, indicating that its link A has been 'used up' for the concatenation: Now extend this concept to [kn] 2 , divided into k 2 copies of [n] 2 , called elementary boards.Regard the elementary boards as vertices of a k × k grid graph.In this grid graph, two vertices are adjacent whenever they share a side.The k × k grid graph admits a straightforward Hamiltonian path P along its rows, which we indicate by arrows (Fig. 4).By assumption, each elementary board admits an A-linked knight's tour.Flip and rotate these tours so that each link A is positioned in accordance with the corresponding arrow.Now we can perform concatenations dictated by the arrows, one by one, as in Figure 4.
Link A of the (a, 1) knight's tour in each elementary board is used up exactly once.The exception is the bottom left one, [n] 2 , for which we haven't made any assumptions.We take the initial (a, 1) knight's tour in this board to be structured, so that this structure is inherited by the new tour in [kn] 2 .
It will turn out that Lemma 4 and Lemma 5 are the key to extending a suitable basic case to a knight's tour in any sufficiently large board.

Basic case
We will build all our (a, 1) knight's tours from a structured (a, 1) knight's tour in [6a+2] 2 .The construction is fairly complex.Namely, it is somewhat surprising that such an (a, 1) knight's tour can be built for general (even) a.
We now partition the vertices of the entire board, as we partitoned the rim in the previous section.We extend the definition of a unit (a set of form {(i, j), (i+1, j), (i, j + 1), (i + 1, j + 1)}, where i and j are even) to the entire vertex set [6a + 2] 2 .Recall, two the electronic journal of combinatorics 21(1) (2014), #P1.31 units U and U are equivalent if U can be translated by (ka, la) (k and l integers) to cover U .The set of vertices numbered by i, j will now be called a level and denoted by L ij .We construct the level L ij as follows (see Figure 5).(i) L ij contains the vertex (i, j).
(ii) Consider the subgraph of our knight's graph induced by the unit containing (i, j) and all equivalent units.L ij is the connected component of this subgraph determined by (i).
We refer to two levels L and L as adjacent if there are vertices belonging to L and L respectively that are related by a single knight's move.In particular, if the knight's move that relates them is (−1, ±a) or (1, ±a) then we say L and L are vertically adjacent.
Otherwise we say that they are horizontally adjacent.Refer to Figure 5 to make sure these concepts are well-defined.Lemma 6 shows that each level is adjacent to four others -two horizontally and two vertically.Each set of vertices B ij = {(x, y) | ia x (i + 1)a − 1, ja y (j + 1)a − 1} is called a block (i and j range from 0 to 6).We refer to blocks B i,6 and B 6,j along the top and right edge of the board as incomplete blocks.This allows us to specify the knight's position using ordered pairs The moves of an (a, 1) knight constrained to one level are now reduced to just horizontal and vertical steps from one block to its neighbour (neighbours are blocks which share a side).This means that we can view each level separately as a 2-dimensional grid graph.Keeping in mind that movement within each level is simple, our strategy is to cover each level entirely before switching (or lifting) to the next one.But reaching each level exactly once and returning to the starting point is yet another Hamiltonian-cycle problem.Hence we view our levels as vertices of a new graph.Following its Hamiltonian cycle will enable us to lift between levels.

The guide
Let G be a graph with vertices denoted by L ij , where i and j range from 0 to a − 1 and a is even.Two vertices of this graph are adjacent if the corresponding levels are adjacent.We read off the adjacent vertices in this graph from Figure 5 and its analogue, Figure 6.Lemma 6 is followed by a restatement which you might find easier to picture.Lemma 6.Let G be the graph defined above, for some even a.The edges of G are as follows.
Proof.For (i) and (ii), we look at blocks B 11 and B 12 , shown in Figure 6 for a = 6.Statements (iii) and (iv) follow from symmetry across the main diagonal.Let i be even, and look at block B 11 .The moves (1, −a) and (1, a) take us from (B 11 , L ij ) to (B 10 , L i+2,j ) and (B 12 , L i+2,j ) respectively, provided that i = a − 2. In this case L ij and L i+2,j are vertically adjacent.
In the argument above, we can replace B 11 by any B kl with l odd.This will be used in the proof of lemma 8.
For i odd, the same argument works, but we have to use the moves (1, ±a) to move from block B 11 and (−1, ±a) to move from block B 12 .This completes the proof.
We now write down the same lemma in terms of diagrams.This is used to construct the guide, a Hamiltonian cycle in G.The vertices of G are assigned relative unit-positions (sometimes just positions).Level L ij has position A if i and j are both even, B if i is odd and j is even, C if i and j are both odd, D if i is even and j is odd (cf. Figure 7).The assignment yields a partition of vertices of G into four subsets.
Then the permitted moves in the guide are as follows: (i) From any unit, we can move to its horizontal neighbour.In doing so, the relative unit-position is unchanged (e.g.L 32 is vertically adjacent to L 12 and L 52 , by looking at B 11 and B 12 ).(ii) If the unit in which we are positioned is along the left edge of Figure 7(a) (that is, we are in one of the levels L 0,j or L 1,j , any j), we can step 'over the edge' to level L a−2,j+(−1) j or L a−1,j+(−1) j respectively.In doing so, the relative unit-position changes vertically, but not horizontally (i.e.A ↔ D and B ↔ C).Similarly, if we are in one of the levels L a−2,j or L a−1,j , any j, we can step to the left-hand side of G with the same effect on relative unit-position.We will call this move a special move or special lifting.
(iii) From any unit, we can move to its vertical neighbour without changing relative unit-position (e.g.L 32 is horizontally adjacent to L 30 and L 34 ).
(iv) If the unit in which we are positioned is along the top or bottom edge of Figure 7(a), we can step 'over the edge', while changing relative unit-position horizontally (A ↔ B and D ↔ C).We call this a special move or special lifting as well.
For example, level L 01 is adjacent to L 21 and L 03 via (i) and (iii), and to L a−2,0 and L 1,a−1 via special moves (iii) and (iv).
We are now ready to construct the guide.
Lemma 7.For any even a, the graph G admits a Hamiltonian cycle (the guide).
the electronic journal of combinatorics 21(1) (2014), #P1.31 Proof.The figure above is another representation of G (we use the example a = 6).It consists of four a 2 × a 2 grid graphs related by special moves.Vertices of each grid graph are levels which have the same relative unit-position (this position is specified in the background).
Our guide starts at L 00 and follows the solid arrow to cover the entirety of position A and finish at vertex L 0,a−2 .It is important to notice that such a path exists regardless of whether a 2 is odd or even.Then use a special move (dotted arrow) from position A (vertex L 0,a−2 ) to position B (vertex L 10 ) and cover all vertices with position B. Follow the dotted arrow to vertex L a−1,a−1 with position C. Continue with positions C and D.
We finish at vertex L a−2,1 with position D, which is adjacent to L 00 via a special move.

Implementing the guide
We denote blocks starting from the bottom left corner by B ij , with i and j ranging from 0 to 6. Block B ij is shaded gray if i + j is even, and white otherwise.
We already used the coordinatisation of [6a + 2] 2 as (B i 1 j 1 , L i 2 j 2 ).In these coordinates, the guide is our desired projection of an (a, 1) knight's tour onto the space of levels and we are yet to prove that there is a corresponding path in each level.We keep coming back to Figure 5 because the (4, 1) knight is enough to demonstrate the general case.
Consider the subgraphs of our (a, 1) knight's graph induced by a single level.Each subgraph is just a 2-dimensional grid graph whose vertices are blocks B ij .The subtlety is that the sizes of this grid graph differ for different levels.
• Levels L 00 , L 10 , L 01 and L 11 are 7 × 7 grid graphs (Fig. 8 (a)).We call them odd levels.These admit a Hamiltonian path between any two gray blocks.The proof can be found in Appendix A.
• Levels L ij , where exactly one of the indices i and j is in {0, 1} are 7 × 6 or 6 × 7 grid graphs (Figure 8 (b) or (c)).
We call the latter two even levels, and they admit Hamiltonian paths between any two blocks of different shade.
It remains to study adjacency between levels in more detail.Let the vertices V and V be adjacent in the (a, 1) knight's graph and belong to distinct levels L and L respectively.Then the block containing V is called a lift from L to L .
Lemma 8. Let a be even.Given two adjacent levels L and L , T-region contains lifts from L to L of either shade (white and gray).Figure 8: For any even a, within each level, our [6a + 2] 2 chessboard is reduced to one of these grid graphs whose vertices are blocks.We shade these blocks as a standard chessboard.Recall, the difference in size arises because the incomplete blocks along the edge of [6a + 2] 2 do not contain all levels (see Figure 5).Proof.Let L and L be vertically related.Then the set of lifts from L to L is of form {B ij : j even} or {B ij : j odd} (from Figure 5), say the prior.T-region contains two blocks in an even row, one of each shade.These are our required lifts from L to L .The set of lifts is equivalent for horizontally related levels, so the statement still holds.
Theorem 9.If a is even, there exists a structured (a, 1) knight's tour in Proof.To construct this path, we will have to follow three graphs -Figure 9 is sufficient to illustrate moving within a single level (steps A1 -A3).The guide dictates the order in which levels are traversed.Finally, to see how the transitions between levels (B1 -B2) reflect on the knight's position in Figure 9 (i.e.moving between blocks), we have to go back to the full chessboard (Figure 5 or 6).
Our algorithm for implementing the guide will have the following steps.
A1 Suppose we are at the start of an even level E, in one of the gray blocks within the T1-region.Let E be followed by L in the guide.This step comprises simply doing a Hamiltonian path on level E and finishing in the white lift from E to L within the electronic journal of combinatorics 21(1) (2014), #P1.31 the T-region.The existence of this lift is granted by Lemma 8. Blocks B 00 and B 10 are adjacent in this Hamiltonian path because B 00 has only two neighbours (B 01 and B 10 ), and is not an endpoint.
A2 Same as A1, except that we start in a white and finish in a gray block.
A3 As above, except that we are traversing an odd level.The algorithm below guarantees that we start in a gray block within the T1-region, and we make sure to finish in a gray lift in T-region.Blocks B 00 and B 10 are also adjacent in this path, as indicated by the cord connecting them in Figure 9.
It is not necessary to distinguish between steps A1 -A3, but doing so makes it easier to track block shades along our knight's tour (see the algorithm below).
We go back to Figure 5 and Lemma 6 to notice that lifting from a level with relative position A to another level with position A reflects on Figure 9 as a single horizontal or vertical move.However, special lifting results in a diagonal change of block.This leads to the following steps.

B1
We have just finished a level and are finding ourselves in a lift within T-region.The next move in the guide is not special, so we simply move horizontally or vertically into the T1-region while lifting.This lifting causes a switch from a gray block to white or vice versa.

B2
We have just finished a level that is the last one with its relative unit-position (A, B, C or D).This means that we are in a gray lift within T-region, and the next move in the guide is special.This still leaves us with a choice -if we would like to lift vertically, e.g. from L 00 to L a−2,1 we have a choice of direction vertically.Thus it is possible to move diagonally up or diagonally down.At least one of the resulting blocks will be in T1, so we choose that one.
Finally the algorithm is the following: 1.The knight starts at a vertex from L a−2,1 which we also regard as the final one.This initial vertex belongs to B 33 -the gray block within T-region which is a lift from L a−2,1 to L 00 .
2. The knight makes the transition B2.
3. A1 -B1 is repeated as long as the knight is on an even level (possibly zero times).
4. The knight is on an odd level, so we perform step A3.
5. B1 -A2 is repeated until all levels of the current position are covered (again, possibly zero times).
6.If the knight is on a level with position A, B or C, go back to 2. Otherwise, go to 7.
7. By choice of an appropriate path on level L a−2,1 , we are back to the starting point.
To make sure the algorithm does construct a Hamiltonian cycle, we note that the electronic journal of combinatorics 21(1) (2014), #P1.31 • The knight finishes each stage 1-6 inside a gray block, which guarantees that the next step is possible.
• Stages 2-6 are repeated four times -once for each relative unit-position in the guide.
• The key to validity of the algorithm is that each position (A, B, C, D) contains exactly one odd level and thus requires exactly one execution of step 4.
• It remains to show that the (a, 1) knight's tour we constructed is structured.This is true by the fact that blocks B 00 and B 10 are adjacent when covering each level (steps A1-A3).Recall, the a 2 edges required in definition of a structured tour are exactly those lying between the two blocks in the bottom left corner.
The third bullet gives the reason why n ≡ ±2 (mod 2k) and potentially n ≡ 0 (mod 2k) are the only cases in which we can hope to implement our guide -in other cases the number of odd levels is greater than four, requiring more than four special lifts.
Even worse, for any larger a there will be odd cycles from which there are no special moves (e.g.22, 23, 32, 33 in case a = 6).Then our shading argument shows that for most board sizes there is no (a, 1) knight's tour that covers each level entirely before moving on to the next one.

The main theorem
In analogy with link A, which is used for sequential concatenation of (a, 1) knight's tours in Lemma 4, we define link B to be the edge {(a, 0), (0, 1)}.Link B will be used to perform sequential concatenation in a slightly different context (Theorem 11).
Corollary 10.For any even numbers a and n, with n a(6a + 2), there exists an (a, 1) knight's tour in [n] 2 .In addition, this tour can be chosen to contain link B.
Proof.We induct on n based on Lemma 8, with the additional condition that our tours are structured.
As for link B, it is the edge {(B 00 , L 01 ), (B 10 , L 01 )}, so it exists in any structured tour.This completes the proof.
As noted before, extending into d dimensions is straightforward in comparison with the work done so far.The only additional structure we require from a 2-dimensional knight's tour is link B.
Theorem 11.For any even values of a and n, with n a(6a + 2), there exists an (a, 1) knight's tour in the grid [n] d .
Proof.The construction uses sequential concatenation and is thus quite similar to the proof of Lemma 5.
Number the points [n] d by (x 1 , x 2 , (x 3 , . . .x d )) to emphasise the idea that the grid is divided into subgraphs called floors and labelled by p = (x 3 , . . .x d ), each floor being a copy of [n] 2 (i.e.canonically isomorphic to it).
Construct any Hamiltonian path p 1 , p 2 , . . .p l of the (d − 2)-dimensional grid graph (i.e.such that each two neighbouring vertices differ by just a unit vector along any axis, which is denoted by e i ).This will be used as our sequence for sequential concatenation.
On each level p i , use Corollary 10 to display an (a, 1) knight's tour containing link B. Consider levels p i and p i+1 for any i.The following edges make up a bridge between them: {(a, 0, p i ), (0, 1, p i )} (link B) and {(0, 0, p i+1 ), (a, 1, p i+1 )} (which must exist because the corner of floor p i+1 has degree 2).
For each i starting from 1, use the bridge we just constructed to concatenate (a, 1) knight's tours on levels p i and p i+1 .The result is an (a, 1) knight's tour in the ddimensional grid, as required.
We remark that this proof is valid if we only assume that one 2-face of the grid is square and greater than a(6a + 2).It can be modified into induction on d, which is equivalent to choosing a particular path p 1 , p 2 , . . .p l .
This proof makes concatenation the universal concept in constructing Hamiltonian cycles, used for • connecting the rim of the board to the middle (Lemma 4), • replicating (a, 1) knight's tours (Lemma 5), • connecting (a, 1) knight's tours on different flours for higher-dimensional knight's graphs (Theorem 11).

The (a, b) knight
We first generalise the proof of Theorem 11, which enables us to extend 2-dimensional (a, b) knight's tours into d dimensions.Lemma 12 iterates the argument we used to prove Theorem 11 twice, so it is still convenient to prove the two results separately.

Extending the (a, b) knight's tour into d dimensions
Under the assumption that an (a, b) knight's tour exists in two dimensions, we divide [n] d into 2-dimensional floors as in the proof of Theorem 11.Our aim is to connect all the levels, by which we mean concatenating the corresponding knight's tours.Link B needs to be replaced by two links: link α is given by {(0, b), (a, 0)}, and link β by {(n−1, a), (n−b−1, 0)}.Link α is used to connect floors p and p displaced by ae i .The following edges form a bridge between them: {(0, 0, p), (a, b, p)} and {(0, b, p ), (a, 0, p )}.Note that link α is used up only at level p , which allows for sequential concatenation that was already used in Lemma 5 and Theorem 11.
Equivalently, we use link β to connect levels that differ by be i .A 2-dimensional (a, b) knight's tour containing both links is called a linked knight's tour.
Since a and b are assumed to be coprime, between any two floors there is a path which consists of steps of length a and b along the principal axes.Lemma 12 gives a way of connecting the floors in an orderly way using the idea of sequential concatenation.We extend the concept of congruence modulo a to Z d−2 and denote the congruence class of p by p. Furthermore, let r(p) be the residue of p modulo a, defined by For any floor p, the graph with vertices from [n] d−2 ∩ p and edges of form ae i is a grid graph, so it admits a Hamiltonian path P .Using link α, we can sequentially concatenate the (a, b) knight's tours along P , exactly as in Theorem 11.
The result is a set of vertex-disjoint cycles , where each cycle is a tour in the corresponding congruence class.To concatenate these cycles, we follow yet another Hamiltonian path in a grid graph.This time the vertices are {0, b, . . .b(a − 1)} d−2 and the edges are of form be i .We represent the Hamiltonian path by a sequence of vertices p 1 , p 2 , . . .p l .
We use the bridge between levels r(p i ) and r(p i ) + (p i+1 − p i ) to concatenate cycles T pi+1 and T pi .To show that this is possible and the result is an (a, b) knight's tour, recall that • Floors r(p i ) and r(p i ) + (p i+1 − p i ) differ by be i , so they can be connected using link β.Floor r(p i ) + (p i+1 − p i ) exists by the condition n a + b.
• The fact that we previously used up link α does not interfere with the existence of link β because they are defined to lie in different corners.
Link α and link β can be modified if we find a particular 2-dimensional (a, b) knight's tour that does not contain them.The bridge {(0, 0, p), (a, b, p)} and {(0, b, p ), (a, 0, p )} and its symmetric images are particularly convenient because they work for both p − p = ae i and (with reordering the vertices) p − p = be i .

The (2, 3) knight
For an (a, b) knight with a and b both greater than 1, we do not have a partition into blocks and levels analogous to Figure 5.This means that for now, basic cases are constructed using heuristic computer programs and do not possess any structure except that dictated by the corners.
We do use analogues of Lemma 4 and Lemma 5 for the inductive step, but have to work harder to obtain a suitable colouring of the rim.

Basic case
The figure below shows a (2, 3) knight's tour for n = 10, generated by a computer program.It is easy to show (using restrictions on vertices near the corner) that no (2, 3) knight's tour exists in smaller chessboards.

Rim of width 6
There is a natural colouring of a straight band of width 6 into 12 colours, with each colour following a knight's path.It is based, as before, on translating blocks, but they are now rectangular1 (as opposed to squares from the previous section).
This implies that the colouring has a pattern as long as we move horizontally between the blocks, but the path of each colour around a corner is not initially imposed.The corners below are simply a colouring of the square of side length 6 made up so that all 12 colours can 'emerge' on either side of the square.We now show that this gives a partition of the rim into 12 cyclic graphs.
Annotate each rectangular block internally as in Figure 10.Given a certain block, we assign block-positions2 to each colour depending on which square the colour occupies.Define the permutation f : {1, 2, . . .12} −→ {1, 2, . . .12} by f (i) = j if colour j in the lined block (i.e. after the corner) has the same block-position as colour i in the gray block (before the corner).For n ≡ 2 (mod 4) necessary and sufficient condition for each path to come back to its original block-position is that f 4 = id.This is because the number of blocks in each band is odd (e.g. 3 blocks in each band in Figure 11), and so block-position of each colour is unchanged after traversing the band.For the bottom right corner shown in Figure 10, f = (1 4 10 7)(2 5 11 8)(3 9 12 6) , so the condition f 4 = id is satisfied.
If the number of blocks in each band is even (n ≡ 0 (mod 4)), the colours swap blockpositions in pairs as they propagate through the band.So our consistency condition is altered to [(1 4)(2 5)(3 6)(7 10)(8 11)(9 12)f ] 4 = id, which is also true.Denote the cycle formed by colour i by C i .
We are now ready to prove the equivalent of Lemma 5. Notice that we now abandon the strategy of connecting each cycle to the middle separately.The trick in Lemma 13 is to keep creating the edges we need for the next bridge.It is worth noting that this version requires no additional structure for the initial (2, 3) knight's tour.
Proof.As before, given the board [n + 12] 2 , construct the rim of width 6 and use the assumption to form a (2, 3) knight's tour in the middle.
We first concatenate the cycles C 1 , C 4 , C 9 and C 12 using the bridges near the bottom left corner as shown in Figure 12.Call the resulting cycle cluster 1. Do the same with cycles C 3 , C 6 , C 7 and C 10 to form cluster 2.
The equivalent cannot be done with 2, 5, 8 and 11, but we can use the corner structure to add C 2 to cluster 2 (Fig. 13).We do the same with cycles C 5 and C 11 (the reason why the solution is structured in this way is given below).We have to emphasise that this concatenation happens in the bottom right corner regardless of the size of the board.Now use the following bridge to connect cluster 1 to the middle: {(8, 3), (11, 5)} (exists from concatenation of C 1 and C 12 ), and {(6, 6), (9, 8)} (must exist in the (2, 3) knight's tour in the middle).We now have two vertex-disjoint cycles covering the chessboard -a small one given just by colour 8, and a large one covering the rest.One of the edges we just created, {(8, 3), (6, 6)} can be used along with {(11, 1), (9, 4)} (dotted gray lines) as a bridge between two cycles, giving us the final solution.
Corollary 14.For sufficiently large even n and d 2, there is a (2, 3) knight's tour in [n] d .
Proof.Refer to Figure 10.Link α and link β exist as part of the turn (corner square of side length 6), so we can apply Lemma 12 to our (2, 3) knight's tour in [n] 2 .

The (2, 5) knight
We use a completely different method for extending (2, 5) knight's tours.It produces more 'localised' (2, 5) knight's tours, similar to those found in references, but we still rely on sequential concatenation as the key principle.

Square of side length 20
The first useful result for the (2, 5) knight is the partition of the structure found on [20] × [10] into 16 vertex-disjoint cyclic graphs.Such a board will now be called a brick.
While concatenating these cycles, we will have to keep track of which edges they contain, so we illustrate each cycle individually.Recall that these connections happen between each pair of neighbouring bricks.The result is a 20 × 10k rectangle partitioned into 16 cycles: S1-S8, 1-4 and R1-R4.These are concatenated using only the first and second brick as follows.This forms the cluster S7 ∪ 4 ∪ S3 ∪ 1 ∪ S6 ∪ R4 ∪ S2 ∪ R3.Similarly, we form cluster the electronic journal of combinatorics 21(1) (2014), #P1.31 Finally, the two clusters are concatenated using the following bridge.The obvious purpose of this lemma is to get a (2, 5) knight's tour in [20] × [20], but it is also crucial for constructing a rectangle, whose exact size is yet to be determined.

Rectangle [20] × [154]
As suggested by the subtitle, we insert a remainder of side length 4 (shaded) into the construction in Lemma 17.
Upper and lower rectangles of side lengths 20 × 10(k − 2) and 20 × 20 are equipped with tours from Lemma 17, but the bottom one is reflected vertically.We call these tours U and L respectively.The remainder is filled in by replacing the gray edges with black ones in Figure 14.Proof.Figure 14 shows how tour U is extended to traverse the subset of the remainder indicated by gray shading.
The complement of this subset is exactly its mirror image under reflection in the horizontal bisector of the remainder, so it can be filled in by extending tour L in the same way.
This leaves us with two separate cycles which originate from U and L. These are concatenated using the bridge formed by dotted edges, so the proof is complete.This gives us sufficient tools to deduce the main results of this section.
Theorem 19.For any sufficiently large even number n, there is a (2, 5) knight's tour in Proof.We use Figure 15 to construct a (2, 5) knight's tour in a square of side length 154 = 11 • 14 as described in Lemma 16.This tour contains both links.
The (2, 5) knight's tour in the 20 × 154 rectangle given by Lemma 16 contains both link H and link V as a part of cycle 3 (1) (thick edges):  Proof.Symmetric images of the edge {(0, 2), (5, 0)} exist in each corner of our brick (as part of cycles 1, 2, 3 and 4) and in each corner of our tour in the 14 × 14 square in Figure 15.Hence the same holds for our building blocks 154 × 154, 154 × 20 and 20 × 20 rectangles).
The (2, 5) knight's tour in [n] 2 is assembled from these blocks as described in Lemma 16, so it contains link α and link β regardless of the orientations of building blocks.The hypothesis of Lemma 12 is satisfied, so we deduce the result.

Further research
For the general case (with a and b still coprime), we can only notice that there is no apparent difference among (a, b) knight's graphs that would imply or indicate non-existence of (a, b) knight's tours.The following conjecture is already formulated by Erde, Golénia and Golénia.
Conjecture 21 (Erde, Golénia, Golénia [1]).Let gcd(a, b) = 1, with a and b not both odd.For sufficiently large even n and d 2, there is an (a, b) knight's tour in [n] d .The question of necessary conditions for existence of an (a, 1) knight's tour for even a also remains open.An easy colouring argument can be used to show that the smallest connected knight's graph, on the board [2a] 2 , is not Hamiltonian.
We could try using the method from Section 2.2 to construct a knight's tour in [4a+2] 2 or even [2a + 2] 2 .Namely, choices have been made in constructing the guide and its implementation.It might be possible to modify our algorithm to work for [4a + 2] 2 or even [2a + 2] 2 .The simplest two knights, (2, 1) and (4, 1), confirm this conjecture.

A Hamiltonian paths in grid graphs
Recall that the moves of an (a, 1) knight constrained to one level are now reduced to just horizontal and vertical steps from one block to its neighbour.Thus in traversing each level (moves A1 -A3), we assumed the existence of certain Hamiltonian paths in 7 × 7, 7 × 6, 6 × 6.We now exhibit those paths.
To avoid new notation, we still regard the vertices of our grid graph as blocks B ij , and two blocks are adjacent if they share a side.We denote T= {B ij : i, j ∈ {2, 3}}, T1 = {B ij : i, j ∈ {1, 2, 3, 4}}\T.
Lemma.The grid graph with vertex set {B ij : i, j ∈ [7]} admits a Hamiltonian path from any gray block in T1 to any gray block in T.
Proof.We start with paths finishing at B 22 .
Since B 22 is on the main diagonal, the paths starting at B 13 and B 24 are obtained using reflection across the main diagonal.
By the same argument, it is sufficient to display the following paths finishing at B 33 .
(i) H 66 admits a Hamiltonian path from any gray block in T1 to any white block in T.
(ii) H 66 admits a Hamiltonian path from any white block in T1 to any gray block in T.
(iii) The same holds for H 67 and H 76 .
Proof.We only need to exhibit three paths finishing at B 32 -the remaining three are constructed by reflecting across the antidiagonal.
Paths finishing at B 23 are obtained by reflecting across the main diagonal, which proves (i).For (ii), we use the following Hamiltonian paths and reflect them across the main diagonal to cover all the possible starting points (white blocks in T1), since B 22 is on the main diagonal.Reflection across the main diagonal to switch the finish point to B 33 .
Finally, the paths we constructed are easy to extend by a single row or column in any direction, so (iii) holds.Since B 22 is on the main diagonal, the paths starting at B 13 and B 24 are obtained using reflection across the main diagonal.

2. 1
Extending 2-dimensional (a, 1) knight's tours Concatenation of cycles is a basic principle for building longer cycles from the given, smaller ones.Consider a graph G containing vertex-disjoint cycles C 1 and C 2 .Let C 1 and C 2 contain edges A 1 B 1 and A 2 B 2 respectively.Suppose A 1 and A 2 are adjacent, and B 1 and B 2 are adjacent in G. Then the following is a cycle containing the union of vertices of C 1 and C 2 :

Figure 4 :
Figure 4: Grid graph whose vertices are elementary boards (for k = 4).The arrows indicate the Hamiltonian path P used for sequential concatenation.

Figure 6 :Figure 7 :
Figure 6: The levels on [6a + 2] 2 (here a = 6).Only blocks relevant to the proof of Lemma 6 are shown.Division into blocks is indicated by gray shading.

Lemma 12 .
Let there exist a linked (a, b) knight's tour in [n] 2 , with n a + b.Then for any d, the grid [n] d admits a knight's tour.Proof.As before, display an (a, b) knight's tour on each 2-dimensional floor.

•
a and b are coprime since the 2-dimensional (a, b) knight's graph admits a Hamiltonan cycle.It follows that each congruence class modulo a contains exactly one member of {0, b, . . .b(a − 1)} d−2 , so p1 , p2 , . . .pl is indeed a Hamiltonian path of congruence classes.

Figure 10 :
Figure 10: Block positions illustrated in four blocks near the bottom right corner.The block-position of each colour in the gray block determines how it behaves around the corner.Two highlighted blocks induce a permutation of colours.

Figure 11 :
Figure 11: Cycles in the rim of [n] 2 , for n ≡ 2 (mod 4).The translating blocks are now 2 × 6 rectangles.We refer to sections of the board as corners (squares of side length 6), bands (straight sections of the rim tiled by blocks) and the middle.As for the (a, 1) knight, colours are numbered based on the bottom left block.

Figure 12 :
Figure 12: Concatenating cycles to construct clusters 1 and 2 -the dotted edges form bridges which are replaced by black edges in the process.Regardless of the size of the board, we always use the first five blocks (in positive direction) for the concatenation.The figure only shows the relevant section of the chessboard.

Figure 13 :
Figure 13: Appending cycles C 2 , C 5 and C 11 to clusters in the bottom right corner.Concatenating clusters with the middle in bottom left corner.The edge {(9, 4), (7, 7)} is then used up to connect C 8 to the rest of the board (thick edges).
This solution is included in the paper because it uses a new idea of assembling rectangular boards, [m] × [n].Lemma 16 reduces the (a, b) knight's tour problem to finding certain 'small' knight's tours.We consider an (a, b) knight's graph in [m] × [n].Let a > b.We call the edge {(a − 1, b), (a − b − 1, a + b)} and all its symmetric images link H. Similarly, {(b, a − 1), (a + b, a − b − 1)} is called link V.For m = n, these two edges coincide under reflection in the main diagonal.Lemma 15.Assume that there are (a, b) knight's tours of [m 1 ] × [n] and [m 2 ] × [n] containing link H and link V. Let gcd(m 1 , m 2 ) = 2.For a sufficiently large even number the electronic journal of combinatorics 21(1) (2014), #P1.31 k, the [k] × [n] admits an (a, b) knight's tour.In addition, this tour can be chosen to contain link V. Proof.Any sufficiently large k can be written as a linear combination of m 1 and m 2 , which yields a partition of the board into a sequence of blocks of length m 1 and m 2 .We construct (a, b) knight's tours in these blocks and sequentially concatenate them using link H, as shown in the diagram.There is no assumption on the tour in the leftmost block, so the new (a, b) knight's tour can inherit both link H and link V from it.Lemma 16.Assume that there are (a, b) knight's tours of [m]×[n], [n]×[n] and [m]×[m], each containing link H and link V. Let gcd(m, n) = 2.For sufficiently large even numbers k and l, [k] × [l] board admits an (a, b) knight's tour.In addition, this knight's tour can be chosen to contain link V. Proof.First construct knight's tours in [k] × [n] and [k] × [m] as described in Lemma 15.Then we can use the same argument to construct the required knight's tour in a [k] × [l] board.

Figure 15 :
Figure 15: A (2, 5) knight's tour in [14] × [14], constructed using one of our programs.Link H and link V are both given by the highlighted edge.