Solving Small Rubik’s Cubes as Slowly as Possible
Abstract
We study, for different Rubik’s puzzles, whether from any starting state one can solve the puzzle as slowly as possible, visiting every reachable state exactly once before reaching the solved configuration. This question corresponds to the existence of Hamiltonian paths (ending in the solved state) in the Cayley graphs associated with these puzzles. A major conjecture attributed to Lovász is that every Cayley graph has a Hamiltonian path. An even stronger version of the conjecture, considered by Dupuis and Wagon (2015) and Gregor et al. (2024), is that every Cayley graph of degree at least is either bipartite and has Hamiltonian paths between any pair of vertices on opposite parts, or is non-bipartite and has Hamiltonian paths between any pair of vertices. Our study of slowly solving Rubik’s puzzles amounts to studying this Strong Lovász Conjecture in their respective Cayley graphs. We first verify the Strong Lovász Conjecture computationally for small Rubik’s puzzles like the or cuboids, which have under 200 states. This approach, however, becomes infeasible for the , which has over million states. Our main result is then showing that the Strong Lovász Conjecture holds for the cube, using a careful graph-theoretic construction based on the subgroup induced by the and turns.
Keywords and phrases:
Hamilton connectivity, Rubik’s Cube, Finite group theoryFunding:
Bernardo Subercaseaux: supported by NSF grant DMS-2434625.Copyright and License:
2012 ACM Subject Classification:
Mathematics of computing Paths and connectivity problemsSupplementary Material:
Software: https://github.com/bsubercaseaux/rubik-hamiltonianarchived at
swh:1:dir:0f9311f69998251f6e55d18e982d2bbef4e0124f
Editor:
John IaconoSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Little Ernie, a clever Hungarian boy, often gets reprimanded at the dinner table by his mom for playing with the Rubik’s cube. His mom, fed up one day with the constant noise of the cube, tells Ernie “It’s over; this will be your last solve”. Clever Ernie, in turn, decides to maximize his fun by taking as many steps as possible in what will be his final solve. But how many steps can he prolong the solve for? While he could obviously keep turning a single face forever, without making any progress, this wouldn’t be any fun for Ernie. Moreover, Ernie’s mom is no fool, and would realize that Ernie has had the cube in the exact same state before, which could end up with tragically scattered cube pieces all over the floor.
Being Hungarian, little Ernie has a good command of combinatorics and quickly realizes that his problem is equivalent to finding the longest path from the starting scrambled state of the cube to the solved state, and thus ideally, a Hamiltonian path. In this paper, we address the mathematical question at the core of Ernie’s dilemma: is there a Hamiltonian path from any starting state that ends in the solved state?
While any cube can be solved in at most moves (or if we count moves as one) [27], we will show in this paper that Ernie can succeed in solving such a cube, without repeating any state, for at least steps.
This seemingly innocent question concerning Rubik’s puzzles is a concrete instance of a much more general problem in graph theory: understanding the relationship between symmetry and connectivity. Concretely, a famous open question of Lovász [16] is whether every vertex-transitive graph has a Hamiltonian path. A slightly weaker variant, also referred to as Lovász conjecture, is whether every Cayley graph has a Hamiltonian path. Curran and Gallian have written a nice, albeit somewhat old, survey on Hamiltonicity properties of Cayley graphs [6].
In this article, we are interested in the much stronger notion of Hamilton-connectivity: a graph is said to be Hamilton-connected if for every pair of vertices there is a Hamiltonian path from to . Unfortunately, bipartite graphs cannot be Hamilton-connected for a rather trivial parity reason (illustrated in Figure 1): all Hamiltonian paths of a graph on vertices have edges, and thus if is odd, then all Hamiltonian paths end in the opposite part of the graph they started from. If is even, then is odd, and thus the two parts of the graph must have different sizes. But then it is not possible to have a Hamiltonian path that starts in the smaller part.
This motivates the notion of Hamilton-laceability: a bipartite graph is said to be Hamilton-laceable if for every pair of vertices and there is a Hamiltonian path between and . To avoid having to case on whether a graph is bipartite or not, we consider the following notion.
Definition 1 (-connected).
A graph is said to be -connected if it is either Hamilton-connected, or bipartite and Hamilton-laceable.
We can now state the conjecture at the core of our work, which is a slight variant of the “Strong Lovász Conjecture” [11], considered earlier by Dupuis and Wagon [9].
Conjecture 2.
Every Cayley graph of degree at least is -connected.
Naturally, in the statement above, the degree of the graph refers to the degree of any of its vertices, since Cayley graphs are regular (see Definition 4). The purpose of the mild degree condition is simply to avoid cycles as a trivial exception.
Conjecture 2 is known to hold for Cayley graphs arising from some families of groups, such as Abelian groups [5], Hamiltonian groups [1], groups of order less than 48 [29], or groups generated by transpositions [2]. Unfortunately, none of these classes encompasses the graphs arising from Rubik’s cubes (see Section 2).
Our main contribution is thus to study Conjecture 2 in the context of Rubik’s cubes, where it corresponds to the possibility of solving cubes as slowly as possible. Our main result is the following (stated informally since a full statement requires defining the exact groups and generators of the Rubik’s cubes, as we do in Section 2).
Theorem 3 (Informal).
The Cayley graphs of the , , and Rubik’s cubes are all -connected.
Related Work.
For a general reference on the mathematical treatment of Rubik’s cubes (and other puzzles) as groups, we direct the reader to the nice book of Mulholland [18], or his interactive notes [19]. The most studied question regarding Rubik’s cube puzzles is that of “God’s number”, corresponding to the diameter of the associated Cayley graph [17, 14, 13, 25, 24], with the most prominent result being the fact that in the Half Turn Metric, where face rotations count as one move, the diameter of the cube is 20 [25]. The asymptotic diameter of an cube is known to be [7], and optimal solutions from a given position are known to be NP-hard to compute [8]. Norskog has found Hamiltonian cycles on both the and puzzles [21, 20]. It is worth clarifying that finding a single Hamiltonian cycle is much weaker than Hamilton-connectivity or Hamilton-laceability. For instance, while a cycle graph trivially has a Hamiltonian cycle, it does not have Hamiltonian paths between vertices that are not adjacent.
2 Preliminaries
We will treat groups in multiplicative notation, using to denote . Recall that, given a subset of the elements of group , the subgroup generated by , denoted , is the subgroup of all elements that can be expressed as a combinations of elements of and their inverses, or more formally, as finite products of the form with . When , we say that generates , or that is a set of generators for .
The group of the Rubik’s cube, which we will denote , can be generated by just three moves: (rotating the right face clockwise by ), (rotating the top face clockwise by ) and (rotating the front face clockwise by ). By labeling the 24 stickers as shown in Figure 2, we think of this group as a subgroup of , with the following generators:
In other words, the formal definition of is simply . It is worth clarifying right away that, while in certain contexts it is convenient to define turns as a single move (this is known as the Half Turn Metric), for our purposes of visiting each state exactly once, we believe it makes more sense to consider turns only. The reason is that, when performing a turn, the cube must still go momentarily through the intermediate state corresponding to a turn, which we would want to count as a visited state.
Our treatment of the cube is mostly graph theoretic. Intuitively, the graph of a Rubik’s puzzle has all the possible configurations of the puzzle as vertices, and there are edges between configurations that are one move away.
Definition 4 (Cayley Graph).
Given a group and a set of generators , the Cayley graph is the undirected graph whose vertex set is and whose edges are the sets such that .
Let denote , and note that Definition 4 implies that is a -regular graph, since for each vertex (i.e., puzzle states) there are possible edges; 3 stemming from , and 3 from their inverses . As it is common in the Rubik’s cube literature, we will use notation to denote , and analogously for and .
Given a graph , a graph automorphism is a function such that for every pair of vertices , it holds that if and only if .
Definition 5 (Vertex transitivity).
A graph is said to be vertex transitive if for every pair of vertices , there is an automorphism of such that .
We will use throughout a standard fact: Cayley graphs are always vertex transitive.
Lemma 6.
For any group , and generating set , the Cayley graph is vertex transitive.
To prove Lemma 6 it suffices to consider, for every pair of vertices , to consider the automorphism (see [17, Lemma 3] for a proof that matches our notation).
We have therefore that is vertex transitive. We will next see that is bipartite, which requires introducing some notation regarding permutations.
Recall that the parity of a permutation corresponds to the parity of the number of inversions (i.e., pairs such that but ). For example, is an even permutation since it has inversions, whereas is odd. A folklore fact about the parity of permutations is that a permutation is odd if and only if it consists of an odd number of cycles of even length [26, §1]. Therefore, the permutations and their inverses, which consist of 3 cycles of length 4, are odd permutations. It follows that is bipartite, with the two parts being , and , as applying any move (an odd permutation) to an element of yields an element of , and viceversa.
Small Puzzles
We start by exploring the possibilities and limits of computational methods to directly confirm Conjecture 2 in Rubik’s puzzles with relatively few states. First, we consider the cuboid (illustrated in Figure 3(a)), which has only states. Let us denote its group . We consider its associated graph , illustrated in Figure 3(b), where the moves are defined in the natural way by twists of the right, top, and bottom face, respectively. Similarly, we consider the cuboid, which has states under its natural generators, and the cuboid, with states under its natural generators (left, right, top, bottom, and one of the two intermediate slices), and finally, we consider as well the , with states, as a stress test.
Since the Hamiltonian path problem is NP-complete, we opted for SAT solving (for a general reference, see [4]). There is a body of research on different SAT encodings and techniques to deal with Hamiltonian paths or cycles [22, 28, 31, 30, 12]. For simplicity, we used the incremental approach of [28]. A summary of results is presented in Table 1. We used the CaDiCaL solver [3] due to its incremental interface, running experiments on a personal computer (MacBook Pro M1 2020). As these graphs are bipartite and vertex-transitive, we considered an arbitrary vertex and found Hamiltonian paths ending in each state on the opposite part of ; Table 1 displays the maximum, minimum, and average runtime over the choices of . In a nutshell, satisfiability solving allows us to efficiently confirm the first part of Theorem 3, but it already reaches its limit around the cuboid, implying the puzzle requires different techniques. All our code, using the PySat library [15], is publicly available at https://github.com/bsubercaseaux/rubik-hamiltonian/.
| Cuboid dims. | Bipartite | Avg stddev [s] | Max [s] | Min [s] | Total [s] | ||
|---|---|---|---|---|---|---|---|
| Yes | 48 | 72 | 0.028 | 0.001 | 0.12 | ||
| Yes | 144 | 288 | 4.365 | 0.008 | 8.13 | ||
| Yes | 192 | 384 | 0.209 | 0.011 | 2.33 | ||
| Yes | 1152 | 2880 | 57.143 | 0.319 | 828.11 |
3 Overview of the proof for the
Recall that denotes the Cayley graph for the Rubik’s cube. As this graph contains over million nodes, the previous SAT-solving technique for proving Hamilton laceability becomes infeasible. We will instead construct Hamiltonian paths using a group-theoretic approach. Our construction is based on considering the subgroup , which has elements, and proving:
-
1.
(Subgroup Laceability) that its associated Cayley graph is Hamilton laceable, and
-
2.
(Cycle stitching) that we can “stitch together” parts of the Hamiltonian paths from the different cosets of to form Hamiltonian paths for . Figure 5 illustrates this part.
Let us first elaborate on the subgroup laceability step. Since is a Cayley graph and thus vertex transitive, it will suffice to show the existence of a path from an arbitrary odd to (the solved state, which is also the identity element). In order to do this, we start by showing that there exists an “almost Hamiltonian” path between and , which does not repeat vertices but might not visit certain structured subsets of the vertices. Our strategy will then be to extend these almost Hamiltonian paths into true Hamiltonian paths, in the way illustrated by Figure 4.
To state the sufficient condition for the extendability of these paths, let us say that a set of two vertices forms a couple if it is of the form , where is even. Then, the condition for a path to be extendable into a Hamiltonian path is that for every such couple of vertices in ,
-
1.
Either and are both in , or they are both not in .
-
2.
If the vertices of the couple are not in , then the vertices and are both in , and is an edge in .
Figure 4 shows how, given a path with these properties, we can intuitively extend to form a Hamiltonian path on . However, it is not immediately obvious that such a exists, so we begin by constructing an “almost-almost Hamiltonian” path whose properties are a relaxed version of those of , and from which we will obtain later on. We partition into cycles, and given a vertex , let denote the cycle-part to which belongs; a similar cycle decomposition for the cuboid is displayed in Figure 3(b). We want to have the following properties: for any couple of vertices ,
-
1.
Either and are both in , or they are both not in .
-
2.
If the vertices of the couple are not in , then at least one of the following is true.
-
(a)
The vertices and are both in , and is an edge in .
-
(b)
None of the vertices in are visited by .
-
(c)
None of the vertices in are visited by .
-
(a)
-
3.
Either visits all cycle-parts at least once, or it is possible to augment to form a new path, , such that the set of cycle-parts visited by is a strict superset of the set of cycle-parts visited by .
Once we have a that satisfies the above properties, we will argue that we can create a path that satisfies the properties for and also visits every cycle, which will be enough to ensure is indeed almost Hamiltonian.
Once proved that is Hamilton laceable, we will consider the quotient graph, which describes how the different cosets of the subgroup are related. It turns out that this quotient graph is very dense, which allows us to use a classic result of Ore [23] to argue it must be Hamilton connected. We finish the proof by using the Hamilton connectedness of the quotient graph will allow us to thread the Hamiltonian paths from the different cosets into one large Hamiltonian path, as illustrated in Figure 5.
4 Hamilton Laceability of
4.1 Partitioning into cycles
We begin by formally defining the cycle-partition. Let . We say that if either:
-
1.
is even and for some
-
2.
is odd and for some
We will next show that is an equivalence relation, and intuitively, its equivalence classes will correspond to the cycle of vertices visited by repeating the sequence an arbitrary number of times.
Lemma 7.
The relation is an equivalence relation.
Proof.
We make use of the fact that . For even , we observe that and for odd , . This suffices to show reflexivity.
For symmetry, suppose . If is even, then implies
Similarly, if is odd, then one can check that . Thus, .
Now assume and . We observe that the parity of is dependent on the parity of and . In particular, is even if and only if with even or if with odd . We now prove that by cases depending on the parities of and :
-
( and are both even) Since , then
-
( is even and is odd)
-
( and are both odd)
-
( is odd and is even)
In all cases, , so is transitive. Since is reflexive, symmetric, and transitive, we conclude the proof.
Definition 8.
For , let denote the equivalence class of given by the equivalence relation .
Intuitively, we can think of as the set of positions reached by repeating the moves and in an alternating manner. If is even, the first move in the alternating sequence is , and if is odd, the alternating moves begin with .
Lemma 9.
For all ,
Proof.
First suppose is even. It can be verified computationally that has order 15 (see Appendix A). So has size 15. Then also has size 15, so
Thus we can equivalently define by
We can visualize the equivalence classes with respect to the graph as 30-cycles, as illustrated in Figure 6.
Let be the graph whose vertex set is and where two vertices are adjacent if and only if there exists an and such that either or . Given two cycle-classes and that are adjacent in this sense, we are interested in the appearance of . The following few lemmas explore how a cycle-class interacts with its neighbors.
Lemma 10.
For any two even , the function is a graph automorphism that satisfies:
-
1.
,
-
2.
for any , ,
-
3.
for all , such that .
Proof.
To check that is indeed a graph automorphism, let , and note that from where
To verify the first condition, we have . To verify the second condition, let , and note that
For the third condition, suppose without loss of generality that is even (the odd case is almost identical) and observe that
Thus satisfies the conditions required by the lemma.
Lemma 11.
The graph is vertex-transitive.
Proof.
It suffices to show that for all , there exists an automorphism such that . Let , and choose and both even. Apply Lemma 10 on and to obtain . By Lemma 10, maps to itself, and since , we have that .
Lemma 12.
For all even , we have if and only if is a multiple of 5.
Proof.
This can be verified computationally for (see Appendix A). Thus, we have that is a multiple of if and only if and since is the group identity, we have
| (1) |
For an even vertex where , let be the automorphism given by Lemma 10 with . Then, combining Equation 1 with the properties of given by Lemma 10, we obtain
Lemma 13.
The graph is 5-regular, and for any and even , the neighbors of in are exactly the elements of the set
Proof.
It can be checked that the vertex has degree 5, so by vertex-transitivity (Lemma 11), is 5-regular. Let and pick any even . By Lemma 12, no two elements in the set are in the same equivalence class, so has size 5. It remains to show that each of these elements is adjacent to in . Indeed, for any , is odd and, solving for we have , so . As is adjacent to , we have that is adjacent to . A visualization of the results of Lemma 12 and Lemma 13 (In particular, the -regularity of ) is shown by Figure 7.
4.2 Constructing Hamiltonian paths
We turn towards the construction of Hamiltonian paths in . Given an even , we will construct a path from to with certain properties that allow us to extend into , where visits every cycle-class at least once and also has properties that allow us to extend it into a Hamiltonian path.
We begin by rigorously defining the properties of , and by arguing that paths with such properties exist. Examples of paths with these properties are shown in Figure 8 and Figure 9(a).
Lemma 14.
Let be odd. Then there exists a path from to with the following properties:
-
1.
(Pair inclusion) For all even , if and only if
-
2.
(Cycle options) Let . For all even such that , either or .
-
3.
(Neighbor-connectivity) For all , if is a neighbor of with respect to , then there exists an even such that and .
-
4.
(Path construction invariant) For all even , the vertex immediately following in is either or .
Proof.
Let be a shortest path in from to .
By Lemma 13, for all such that , given an even vertex , there exists a unique (based on and ) such that and .
Consider the sequence defined by and for . Intuitively, this is the same as constructing our path greedily; we construct our such that covers as much of each as possible whilst traversing .
For , let be the path that starts at and records the positions visited by the sequence of moves , ending on . Note is even and . As is odd, for some such that . Then . Let be the path that starts at and records the positions visited by performing the sequence of moves , ending on .
Then is a path in that starts on and ends on . It remains to show that satisfies the desired properties.
Note that any even position in is followed immediately by , so condition 4 is satisfied. As visits an equal number of even and odd positions, condition 1 is satisfied as well.
To prove condition 2, suppose for the sake of contradiction that there is an even such that , , and . Since and is contained in , we have that and . Suppose .
Since , it follows that for some . Note (if it exists) and (if it exists).
Since is odd, , and by Lemma 12, . Because , we have that . Now we note that since , is neither a multiple of nor does it differ from by a multiple of , so is neither nor . Thus, while and are both in , does not visit these two vertices consecutively. Since and are adjacent in , this contradicts the fact that is a shortest path.
To prove condition 3, let where . By Lemma 13, for some . Then is in both and , and
Thus satisfies all four conditions, as desired.
Theorem 15 (Godsil and Royle [10]).
A vertex-transitive graph with valency has vertex connectivity at least
Lemma 16.
The graph is 2-connected.
Proof.
By Lemma 11 and Lemma 13, is a vertex-transitive graph with valency . Then by Theorem 15, has connectivity at least . Thus is 4-connected, meaning it is also 2-connected.
We will now argue that we can extend to visit more cycles while preserving its properties. Intuitively, we take our original path, find a neighboring cycle, deviate from our original path for a moment and fully fill out an untouched neighboring cycle, and finally pick up where we left off with the original path. An example of such a modification can be seen in the difference between Figure 9(a) and Figure 9(b).
Proof.
We will case on whether .
-
Case 1. If , then as , it follows that , so all vertices in are in . Then as , it follows that for some path where and .
Let be the path that begins on and records the positions visited by performing the sequence of moves . Then ends on the position . A visualization thereof is shown with Figure 9(a) and Figure 9(b). Let , so , so . Since the set of vertices visited by is exactly the union of the set of vertices visited by and , condition 1 of Lemma 14 is satisfied.
For condition 2, suppose and . Then since all vertices in are in , it follows that . Then either , in which case , or . In the latter case, either , which implies , or , which implies .
For condition 3, we only need to check . Note that all vertices in are in . By Lemma 13, for any neighboring , there exists an even such that . Since is even, . As all vertices in are also in , we have that , and we are done.
Condition 4 is satisfied because , where vertices satisfy the condition because is a subpath of and vertices in satisfy the condition because begins on , an even vertex, and is constructed by the move sequence .
-
Case 2. If , then is nonempty. By Lemma 16, the graph of with the vertex removed is connected, so there exists a that is adjacent to some . By the third clause of Lemma 14, there exists an even such that and . Since , , so the vertex immediately following in must be . Note that
Let be the prefix of that ends at , exclusive. Let be the path that starts at and records the positions visited by performing the move sequence , ending on the position . Let be a suffix of that begins immediately after . Let . Then , so . It remains to prove that satisfies the properties given by Lemma 14. Since traverses exactly the union of and the set of points traversed by , condition 1 remains true.
For condition 2, we have that . Suppose and . Then . Since all points in are also in , we also have that . As satisfies property 2 from Lemma 14, it follows that either or . If , then . Otherwise, , so either , in which case , or .
For condition 3, suppose and is a neighbor of with respect to . We will case on whether . If , then because satisfies condition 3, there exists an even such that and , which means as well. If , then . Then there exists a such that either or . If , then must be even, since if is odd, then , so we are done. Otherwise, if , then must be odd, so is even and is even. Then .
To show condition 4 is true for , since and are both subpaths of that start on even positions (and satisfies condition 4), it suffices to show that satisfies condition 4. This can be verified by observing that starts on – which is an even position – and is formed by the move sequence .
By applying Lemma 17 iteratively, we obtain a path with the properties of that also visits every cycle, upon which new properties emerge.
Lemma 18.
Let be odd. Then there exists a path from to with the following properties:
-
1.
For all even , if and only if
-
2.
For all even , either or
-
3.
For all even , the vertex immediately following in is either or .
Proof.
Let be a path given by Lemma 14, and define . Given satisfying the properties given by Lemma 14, suppose . Then by Lemma 17, there exists a such that . By repeating this argument (no more than times), there is a such that and satisfies the properties of Lemma 14. Let . Note satisfies properties 1 and 3 by properties 1 and 4 from Lemma 14. Furthermore, and , so property 2 follows from the property 2 from Lemma 14.
We will now argue that a path as described in Lemma 18 can be extended into a Hamiltonian path. We make use of the fact that . If we have and as consecutive vertices in , and and are not in , then we can extend to include and by performing in place of on .
Theorem 19.
The graph is Hamilton laceable.
Proof.
Since is vertex-transitive, it suffices to show that for an arbitrary odd , there exists a path from to that is Hamiltonian for . Fix . Let be a path from to as given by Lemma 18. If is Hamiltonian, we are done. Otherwise, we claim that there exists a path from to that satisfies the conditions for from Lemma 18 and is strictly longer than . If the claim holds, then by repeating this argument (no more than times) we must end with a Hamiltonian path.
We now prove the claim. Suppose the path , for some , is not Hamiltonian, and thus there is some vertex . Then, by the first clause of Lemma 18, we can assume without loss of generality that is even and . Then, by the second clause of Lemma 18, . As , it follows from the third clause of Lemma 18 that the vertex before in is . Thus, is followed immediately by in , while and are both not in . Let be the prefix of that ends with and let be the suffix of that begins on . Then, is a path from to , strictly longer than , and also holds the conditions from Lemma 18. This establishes the claim, and thus concludes the proof.
5 Extending Laceability to
We turn to prove Hamilton laceability for . First, observe that for arbitrary , we have that is isomorphic to . This gives us the following generalization of Theorem 19.
Corollary 20.
For any , is Hamilton laceable.
Let be the graph whose vertex set is and where two vertices are adjacent if there exist , even and , odd such that and are both edges in . It can be checked computationally that and , so (see Appendix A).
Lemma 21.
The graph is vertex-transitive.
Proof.
Let be two arbitrary vertices in . We want to show that there exists a graph automorphism that maps to Define a function on by
Note is well-defined because if , then for some . Then
Since is a two-sided inverse, is bijective.
To show that preserves edges, suppose and are adjacent by edges and . Then and , where and are both edges in , so is adjacent to .
Thus is a graph automorphism, and it can be easily checked that maps to .
Lemma 22.
The graph is 90-regular
Proof.
It follows from Lemma 21 that is regular. Additionally, it can be checked computationally that the vertex has degree 90 (see Appendix Appendix A), so is 90-regular.
Lemma 23.
The graph is 3-connected
Proof.
By Lemma 21 and Lemma 22, is a vertex-transitive graph with a valency of 90. It follows from Theorem 15 that has vertex-connectivity at least . Thus is 3-connected.
Theorem 24 (Ore [23]).
Let be a 2-connected graph on vertices satisfying for every pair of non-adjacent vertices . Then, is Hamilton connected.
Lemma 25.
The graph is Hamilton connected, and so is the induced subgraph .
Proof.
By Lemma 23, both and are 2-connected. Recall that is a -regular graph on vertices, and as is the same graph but with one vertex removed, every remaining vertex has degree at least . Therefore, both and satisfy the hypotheses of Theorem 24 ( for , and for ) and are thus Hamilton connected. Finally, we prove our main result:
Theorem 26.
The graph is Hamilton laceable.
Proof.
First, observe that by vertex transitivity it suffices to consider an arbitrary odd position and show that there is a Hamiltonian path whose endpoints are and . Now the proof is by cases depending on whether or not.
-
Case 1. Suppose . By Lemma 25, we can find a Hamiltonian path on such that and . Then we can find distinct , all odd, such that and for all , and is adjacent to some . Furthermore, let . For all , is even and is odd, so by Corollary 20 we can find a path that begins at , ends at , and is Hamiltonian for . Then is a path that starts at , ends at , and is Hamiltonian for .
-
Case 2. Now suppose . We can find a path that is Hamiltonian for . Then . It can be checked that for any , , so . Then by Lemma 25, we can find a Hamiltonian path on such that and . We can find , all odd, such that and for all , and is adjacent to some . Let . By Corollary 20 for all , we can find a path that begins at , ends at , and is Hamiltonian for . Let be such that . Then is a path that starts on , ends on , and is Hamiltonian for .
References
- [1] B. Alspach and Y. Qin. Hamilton-Connected Cayley Graphs on Hamiltonian Groups. European Journal of Combinatorics, 22(6):777–787, 2001. doi:10.1006/eujc.2001.0456.
- [2] T. Araki. Hyper hamiltonian laceability of Cayley graphs generated by transpositions. Networks. An International Journal, 48(3):121–124, 2006. doi:10.1002/net.20126.
- [3] A. Biere, T. Faller, K. Fazekas, M. Fleury, N. Froleyks, and F. Pollitt. CaDiCaL 2.0. In Arie Gurfinkel and Vijay Ganesh, editors, Computer Aided Verification - 36th International Conference, CAV 2024, Montreal, QC, Canada, July 24-27, 2024, Proceedings, Part I, volume 14681 of Lecture Notes in Computer Science, pages 133–152. Springer, 2024. doi:10.1007/978-3-031-65627-9_7.
- [4] A. Biere, M. Heule, H. van Maaren, and T. Walsh. Handbook of Satisfiability: Volume 185 Frontiers in Artificial Intelligence and Applications. IOS Press, NLD, 2009.
- [5] C. C. Chen and N. F. Quimpo. On strongly hamiltonian abelian group graphs. In K. L. McAvaney, editor, Combinatorial Mathematics VIII, pages 23–34, Berlin, Heidelberg, 1981. Springer Berlin Heidelberg.
- [6] S. J. Curran and J. A. Gallian. Hamiltonian cycles and paths in Cayley graphs and digraphs — A survey. Discrete Mathematics, 156(1):1–18, 1996. doi:10.1016/0012-365X(95)00072-5.
- [7] E. D. Demaine, M. L. Demaine, S. Eisenstat, A. Lubiw, and A. Winslow. Algorithms for solving rubik’s cubes. In European Symposium on Algorithms, pages 689–700. Springer, 2011.
- [8] E. D. Demaine, S. Eisenstat, and M. Rudoy. Solving the Rubik’s Cube Optimally is NP-complete. In Rolf Niedermeier and Brigitte Vallée, editors, 35th Symposium on Theoretical Aspects of Computer Science (STACS 2018), volume 96 of Leibniz International Proceedings in Informatics (LIPIcs), pages 24:1–24:13, Dagstuhl, Germany, 2018. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2018.24.
- [9] M. Dupuis and S. Wagon. Laceable knights. ARS MATHEMATICA CONTEMPORANEA, 9, 2014. doi:10.26493/1855-3974.420.3c5.
- [10] C. Godsil and G. Royle. Algebraic Graph Theory. Graduate Texts in Mathematics. Springer New York, NY, 2001. doi:10.1007/978-1-4613-0163-9.
- [11] P. Gregor, H. P. Hoang, A. Merino, and O. Mička. Generating All Invertible Matrices by Row Operations. In Julián Mestre and Anthony Wirth, editors, 35th International Symposium on Algorithms and Computation (ISAAC 2024), volume 322 of Leibniz International Proceedings in Informatics (LIPIcs), pages 35:1–35:14, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ISAAC.2024.35.
- [12] Marijn J. H. Heule. Chinese remainder encoding for hamiltonian cycles. In Chu-Min Li and Felip Manyà, editors, Theory and Applications of Satisfiability Testing - SAT 2021 - 24th International Conference, Barcelona, Spain, July 5-9, 2021, Proceedings, volume 12831 of Lecture Notes in Computer Science, pages 216–224. Springer, 2021. doi:10.1007/978-3-030-80223-3_15.
- [13] S. Hirata. Graph-theoretical estimates of the diameters of the rubik’s cube groups, 2024. doi:10.48550/arXiv.2407.12961.
- [14] S. Hirata. Probabilistic estimates of the diameters of the rubik’s cube groups, 2024. doi:10.48550/arXiv.2404.07337.
- [15] A. Ignatiev, A. Morgado, and J. Marques-Silva. PySAT: A Python toolkit for prototyping with SAT oracles. In SAT, pages 428–437, 2018. doi:10.1007/978-3-319-94144-8_26.
- [16] L. Lovász. Problem session (problem 11). In N.Sauer R.Guy, H.Hanam, Gordon J.Schonheim, and Breach, editors, Combinatorial Structures and Their Applications, 1970.
- [17] A. Merino and B. Subercaseaux. A demigod’s number for the Rubik’s cube, 2024. arXiv:2501.00144.
- [18] J. T. Mulholland. Math 302: Combinatorial mathematics. http://www.sfu.ca/˜jtmulhol/math302/notes/permutation-puzzles-book.pdf. [Accessed 12-16-2025].
- [19] J. T. Mulholland. Permutation puzzles - rubik’s cube. https://www.sfu.ca/˜jtmulhol/math302/puzzles-rc.html. [Accessed 12-16-2025].
- [20] B. Norskog. Hamiltonian circuit for the entire 2x2x2 cube group — speedsolving.com. https://www.speedsolving.com/threads/hamiltonian-circuit-for-the-entire-2x2x2-cube-group.34318/, 2011. [Accessed 12-27-2025].
- [21] B. Norskog. A Hamiltonian circuit for Rubik’s. https://bruce.cubing.net/ham333/rubikhamiltonexplanation.html, 2012. [Accessed 12-27-2025].
- [22] R. Ohashi, T. Soh, D. Le Berre, H. Nabeshima, M. Banbara, K. Inoue, and N. Tamura. SAT-Based CEGAR Method for the Hamiltonian Cycle Problem Enhanced by Cut-Set Constraints. In Jeremias Berg and Jakob Nordström, editors, 28th International Conference on Theory and Applications of Satisfiability Testing (SAT 2025), volume 341 of Leibniz International Proceedings in Informatics (LIPIcs), pages 24:1–24:10, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAT.2025.24.
- [23] O. Ore. Hamilton connected graphs. Journal de Mathématiques Pures et Appliquées, 42:21–27, 1963.
- [24] T. Rokicki, J. Dethridge, H. Kociemba, and M. Davidson. God’s Number is 26 in the Quarter Turn Metric. https://cube20.org/qtm/. [Accessed 12-16-2025].
- [25] T. Rokicki, H. Kociemba, M. Davidson, and J. Dethridge. The Diameter of the Rubik’s Cube Group Is Twenty. SIAM Review, 56(4):645–670, 2014. doi:10.1137/140973499.
- [26] J. J. Rotman. An Introduction to the Theory of Groups. Springer New York, 1995. doi:10.1007/978-1-4612-4176-8.
- [27] J. Scherphuis. Mini Cube, the 2x2x2 Rubik’s Cube. https://www.jaapsch.net/puzzles/cube2.htm. [Accessed 26-12-2025].
- [28] T. Soh, D. Le Berre, S. Roussel, M. Banbara, and N. Tamura. Incremental SAT-Based Method with Native Boolean Cardinality Handling for the Hamiltonian Cycle Problem. In Eduardo Fermé and João Leite, editors, Logics in Artificial Intelligence, pages 684–693, Cham, 2014. Springer International Publishing.
- [29] D. Witte Morris and K. Wilk. Cayley graphs of order are hamiltonian for . The Art of Discrete and Applied Mathematics, 3(2):#P2.02, May 2020. doi:10.26493/2590-9770.1250.763.
- [30] N. Zhou. In pursuit of an efficient sat encoding for the hamiltonian cycle problem. In Principles and Practice of Constraint Programming: 26th International Conference, CP 2020, Louvain-La-Neuve, Belgium, September 7–11, 2020, Proceedings, pages 585–602, Berlin, Heidelberg, 2020. Springer-Verlag. doi:10.1007/978-3-030-58475-7_34.
- [31] N. Zhou. Encoding the Hamiltonian Cycle Problem into SAT Based on Vertex Elimination. In Paul Shaw, editor, 30th International Conference on Principles and Practice of Constraint Programming (CP 2024), volume 307 of Leibniz International Proceedings in Informatics (LIPIcs), pages 40:1–40:8, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.CP.2024.40.
