Change Ringing and Hamiltonian Cycles : The Search for Erin and Stedman Triples

A very old problem in campanology is the search for peals. The latter can be thought of as a heavily constrained sequence of all possible permutations of a given size, where the exact nature of the constraints depends on which method of ringing is desired. In particular, we consider the methods of bobs-only Stedman Triples and Erin Triples; the existence of the latter is still an open problem. We show that this problem can be viewed as a similarly constrained form of the Hamiltonian cycle problem (HCP). Through the use of special subgraphs, we convert this to a standard instance of HCP. The original problem can be partitioned into smaller instances, and so we use this technique to produce smaller instances of HCP as well. We note that the instances known to have solutions provide exceptionally difficult instances of HCP.

After each row is struck, a change occurs to transition to a new row. However, changes are constrained such that each entry in the new row can only have moved, at most, one place from the previous row 1 . It is not difficult to see that this means each bell must either retain its previous place, or swap places with a neighbour. For example, a valid change from rounds would be to transition to the row 13254, but no valid change transitions from rounds to 23451 since this would require the first bell to move four places. In cases where there is an odd number of bells, it is clear at least one bell must retain its place. A compact way of representing a sequence of changes is to simply list the places where the bell is unchanged (or list an 'x' if all bells change place), with each change separated by a dot; this is called place notation. The constraints on changes mean that the changes represented by any valid place notation are unique. For example, from rounds with five bells, the place notation 3.1.345.1 goes from rows 12345 to 21354 to 23145 to 32145 to 31254.
The rule governing the sequence of changes made is called the method, which is typically a short pattern which is learned by heart by the ringers. Ideally, the aim is to ring all possible rows before returning to rounds. The set of all possible rows is called the extent, which for n bells will consist of n! permutations of n numbers. However, even for fairly small numbers of bells, there are no short patterns which can be repeated to achieve this. Hence, it is necessary for a conductor (who must also be one of the ringers) to make calls, which are alterations to the method, as necessary. Traditionally, as well as in modern competitive change ringing, neither the conductor nor the other ringers are permitted to bring in notes, so these calls must be memorised. Hence, it is often desirable if the calls occur at regular intervals, follow simple patterns, or are as infrequent as possible.
In this manuscript, we will focus on the case where there are seven bells; this case is called triples, so named because at most three swaps can occur per change. Note that although this implies there are only seven bells, in reality eight bells are used (corresponding to an octave), with the eighth and lowest bell always struck last in each row. Therefore, an extent for triples consists of 7! = 5040 rows. For any number of bells n ≤ 7, striking the full extent including the final return to rounds is called a peal; if n ≥ 8 a peal must consist of at least 5000 changes. This number of changes will typically take several hours to complete.
For triples, there are only four ways for a change to induce three swaps. Specifically, any one of the first, third, fifth or seventh bells can stay in place. There are three common methods used for triples called Grandsire Triples, Stedman Triples and Erin Triples defined as follows. Grandsire Triples is the method induced by repeating the pattern 3. . None of these methods produce an extent; indeed, Grandsire Triples returns to rounds after 70 changes, Stedman Triples after 84 changes, and Erin Triples after 42 changes. However, it is possible to make calls to alter the methods appropriately, with two standard types of calls being used named bobs and singles.
In the case of Grandsire Triples, the pattern consists of fourteen changes, where the thirteenth change is to keep seventh place unchanged. A bob alters this so that the thirteenth change keeps the third place unchanged instead. A single alters this so that the thirteenth change keeps the third place unchanged, and the fourteenth change keeps the first, second and third places all unchanged.
In the case of both Stedman and Erin Triples, for every sixth change, the seventh place remains unchanged. In both cases, a bob alters this so that the sixth change instead keeps the fifth place unchanged. A single makes it so that in addition to the seventh place remaining unchanged in the sixth change, the fifth and sixth places also remain unchanged. In the case of Stedman triples, it is necessary to designate whether the call occurs for the sixth change, or the twelfth change. To handle this, the twelve changes are divided into two sets of six changes, with the first six called slow, and the second six called quick. In the case where no alternative is chosen, the sixth change is said to be a plain. Note that a plain is not considered to be a call.
A fundamental question in change ringing is whether there exists peals that follow certain methods and only use particular calls. The question of whether it was possible to use only bobs and plains to obtain a peal for triples was first considered in the 1700s. Since plains are not considered calls, such peals are called bobs-only. The earliest result along these lines was due to Thompson [18] in 1886 who proved that it is impossible to construct a full peal of bobs-only Grandsire Triples. This result was later generalised by Rankin [15,16], and Swan [17] subsequently provided a simplified proof of Rankin's result. In the late 1980s, White discussed Stedman and Erin Triples at length in a series of two papers [19,20]. The problem for Stedman Triples remained open until 1994 when Wyld constructed a peal of bob-only Stedman Triples, but did not publish it at the time. Johnson and Saddleton [10] subsequently found and published a solution online in 1995, after which Wyld's peal was also published [21]. Johnson [9] later found an improved peal (in the sense that it has a simpler and sparser pattern of calls to remember), and in 2012 improved on it again. The problem remains open for Erin Triples despite significant attempts to resolve it.
In this manuscript, we investigate bobs-only Stedman and Erin Triples in the framework of a famous problem from graph theory, the Hamiltonian cycle problem (HCP). Specifically, we show that the search for bobs-only Triples can be thought of as a constrained form of HCP. We then take advantage of a recently discovered family of subgraphs that allows us to convert this problem to a standard instance of HCP, so that this classical problem can be tackled using the highly sophisticated algorithms available for HCP. We show that the graphs so produced are exceptionally difficult to solve despite their fairly modest size. We also investigate the use of a group theoretic approach to decompose the problem into smaller parts and show that the HCP conversion remains valid.

Hamiltonian Cycle Problem
The Hamiltonian cycle problem (HCP) is a, now classical, decision problem from graph theory which can be stated succinctly: given a graph G containing vertex set V with cardinality N , and a (directed) edge set E : V → V , does the graph contain any simple cycles of length N ? Such simple cycles are called Hamiltonian cycles (HC), and any graph containing at least one HC is said to be Hamiltonian, while those graphs with no HCs are called non-Hamiltonian. HCP has gained notoriety recently because it was one of the first problems identified to be NP-complete [11], and because of its close relationship with the arguably more famous traveling salesman problem (TSP). Indeed, TSP can be thought of as the problem of finding the HC (if one exists) of optimal length in a weighted graph.
Although HCP is an NP-complete problem, there is a wealth of sophisticated heuristics available for HCP, most notably LKH [8] and Snakes and Ladders Heuristic [2]. The Concorde TSP solver [1] is also very effective on HCP instances despite being primarily designed for TSP. There is also an algorithm by Chalaturnyk [3] that enumerates every HC in a graph, while Eppstein [5] has an enumerative algorithm designed solely for 3-regular graphs, that is, graphs where each vertex is connected to exactly three other vertices. Note that although HCP is defined for directed graphs, all of the best current heuristics are designed for undirected graphs. If necessary, a directed graph can be converted to an undirected graph but the process involves tripling the number of vertices (e.g. see page 46 in Ejov et al. [4]).
Given the definition of HCP, it is natural to think of the search for a peal in the context of HCP since, in both cases, we are seeking a path (method) that visits every vertex (row) precisely once and then returns to the first choice again. In particular, imagine a graph with 7! = 5040 vertices, where each vertex corresponds to a row, that is, a permutation of seven numbers. Then, for any valid change that can be made for this row, which results in a new row, an edge can be introduced connecting this vertex to the vertex corresponding to the new row. What results is a graph in which the full set of peals and the full set of Hamiltonian cycles are in 1-to-1 correspondence.
If we are searching for a peal that follows a particular method, for example a peal of bobs-only Stedman Triples, then not just any HC will be sufficient. Instead, we need a HC that satisfies the requirements of the method. In the case of bobs-only peals, it is sufficient to only consider changes where a single place is unchanged in the row. Recall that there are only four such changes possible for any given row, so the graph can be reduced to a 4-regular graph. However, even in this reduced graph, the number of possible HCs is likely to be astronomically higher than those corresponding to Stedman Triples. Instead, what we are looking for is a constrained Hamiltonian cycle, one that follows the pattern of 3.1.3.1.3.(7/5).1.3.1.3.1.(7/5), where the (7/5) changes indicate that either 7th place remains unchanged (a plain) or 5th place remains unchanged (a bob). No standard HCP heuristic is designed to handle such constraints, so the only remaining alternative is to modify the graph in such a way that HCs not satisfying this constraint are eliminated, while those that do are retained.
Before we do this, however, it is possible to reduce the problem further. Since the only decisions that can be made occur every six steps, it seems sensible to consider groups of six changes together. In the case of Stedman and Erin Triples, this is greatly facilitated by the existence of sixes, which are sets of six rows. The full extent of 5040 rows can be partitioned uniquely into 840 sixes using the following procedure. First, note that following the pattern 3.1.3.1.3.1 causes the row to repeat. For example, starting from rounds, we go through: 1234567, 2135476, 2314567, 3215476, 3124567, 1325476, and then back to rounds again. Hence, these six rows are considered to be members of the same six. Irrespective of which of them we start with first, the same six members will be produced. Then we can select any row not yet considered and generate its six, and so on until all 840 sixes are produced. Now, consider the case where a plain or a bob occurs, resulting in a certain row. Then it is clear that the subsequent rows will also be a member of that row's six until the next plain or a bob occurs. Hence, for a bobs-only peal of Stedman Triples or Erin Triples, we can think of the problem as the task of visiting all 840 sixes without repetition and returning to the first six; this version of the problem also naturally lends itself to HCP.
With the consideration of sixes, some new terminology is required. Although each six may only be visited once, the first row visited in any given six is not fixed, and will change depending on the calls made to that stage. Hence, the term six-end is used to denote the final row visited in a six for a particular peal. In the case of Erin Triples, the six-end is uniquely determined by which row is visited first in the six; upon visiting that row, the pattern 3.1.3.1.3 is traversed resulting in the six-end. In the case of Stedman Triples, upon entering a six, the pattern may be 3.1.3.1.3 (slow) or 1.3.1.3.1 (quick). To represent this, we say that a six can be either a slow six or a quick six, the determination of which depends on the peal. Each quick six is followed by a slow six, and vice versa. If a six is concluded by a plain, we say it is a plain six, and if concluded by a bob it is called a bobbed six, with the determination again depending on the peal.
Fortunately, a parity argument can be utilised to reduce the size of the problem by half. Each row can be labelled as odd or even, such that even rows only link to odd rows and vice versa. Hence, if we start with an even row, the six-end will be an odd row, and hence the new six (whichever it is) will be entered at an even row. Inductively, we can conclude that only odd rows may be six-ends. In the case of Erin Triples, this means that each six has three possible six-ends. In the case of Stedman Triples, each six-end may be slow or quick, so for simplicity we think of them as six separate six-ends.
Subsequently, we can now cast the problem as a smaller version of constrained HCP. First consider Erin Triples. Then we have a directed graph with 840 vertices, each corresponding to a six. From each vertex, there are six outgoing edges, corresponding to the two possible ways (plain or bob) to leave from each of the three six-ends. There will also be six incoming edges from other sixes. Then any peal of bobs-only Erin Triples will correspond to a HC in this graph that satisfies the constraints that, upon entering a vertex (six), one of the two "valid" outgoing edges (corresponding to the appropriate six-end) are used. Note that determining which six-end is the appropriate one depends on the previous six-end. Hence, the constraints to be satisfied can all be stated in the form, "upon visiting this vertex via edge e 1 , you may only depart via edges e 2 or e 3 ." In the case of Stedman Triples we also have a directed graph with 840 vertices, each corresponding to a six. However, this time from each vertex there are twelve outgoing edges, since in this case we also need to consider whether the the six is slow or quick. Nonetheless, the nature of the constraints is still the same; upon entering a vertex, there will only be two "valid" outgoing edges, and which two are valid depends entirely on the edge used to enter.
Since no HCP algorithm is designed to handle such constraints, we take advantage of subgraphs which we called in-out subgraphs which will be used to eliminate any HCs that don't satisfy the desired constraints.

In-out Subgraphs
A recent paper [7] introduced the family of Crown subgraphs C n , which satisfy the following property, which we call the "in-out" property. Suppose that C n is included in any large graph G such that: (1) There are n vertices in C n denoted incoming vertices, such that any incoming edges from the rest of G to C n must go to one of these vertices. These are labelled i 1 , i 2 , . . . , i n .
(2) Similarly, there are n vertices in C n denoted outgoing vertices, such that any outgoing edges from C n to the rest of G must depart from one of these vertices. Note that these may overlap with the incoming vertices. These are labelled o 1 , o 2 , . . . , o n .
Then, consider any HC H contained in G. The following must be true: (3) Upon entering C n , the Hamiltonian cycle H must traverse the entirety of C n before departing.
That is, C n cannot be entered and exited twice in any valid HC, irrespective of the structure of the rest of the graph. (4) If H enters C n via incoming vertex i k , it must depart via outgoing vertex o k .
Property (3) ensures that C n behaves like a vertex in the context of HCP, in the sense that each copy of C n included in a graph must be visited precisely once. Property (4) can be used to impose the kinds of constraint mentioned in the previous section. In particular, if every vertex is replaced by C n , then depending on which edge is used, a particular incoming vertex will be visited, and this will determine the outgoing vertex and hence which outgoing edges may be used. Hence, by linking 840 copies of C n together appropriately, only those peals corresponding to the desired method will remain. In the case of Erin Triples, C 3 can be used, while for Stedman Triples, C 6 can be used.
However, C 6 contains 20 vertices, and since the resulting graph is directed, converting it to an undirected graph (so heuristics can consider it) will triple the size of each C 6 to 60 vertices. This would result in a graph containing 50,400 vertices for Stedman Triples. Meanwhile, C n is only defined for n ≥ 4, so C 3 does not exist, although a stripped down version of C 4 can be produced which contains 8 vertices, which upon conversion to an undirected graph would result in a graph containing 20,160 vertices for Erin Triples. In order to improve the solving time for these graphs, it makes sense to search for other, smaller, graphs satisfying the in-out property to be used instead of C n . Such graphs do not appear to have been widely studied or even considered in literature beyond the results of [7], although an example of a 2-in-out subgraph can be seen in Papadimitriou and Steiglitz [12]. We will refer to such subgraphs as n-in-out subgraphs, where n denotes the number of incoming (and hence outgoing) vertices. For the purposes of considering Erin and Stedman Triples, we have successfully identified a 3-in-out subgraph and a 6-in-out subgraph which are both considerably smaller in size than the equivalent Crown subgraphs.
Before we provide the in-out subgraphs, note that although the graphs considered so far have been directed, since we will be replacing every vertex with an in-out subgraph, it is sufficient to consider strictly undirected in-out subgraphs, as long as we add the caveat that incoming and outgoing vertices may no longer overlap. Then as long as the HC is started at an incoming vertex (any vertex may be chosen as the starting point of a HC), this will be equivalent to the directed graph.
We denote the two (undirected) in-out subgraphs we discovered as S 3 and S 6 , on 16 and 33 vertices respectively. Both subgraphs can be constructed by starting with a path graph (that is, a graph of n vertices containing edges (i, i + 1) for i = 1, . . . , n − 1) and then adding the following (undirected) edges.
1. Find all 840 sixes, and identify the three six-ends in each six. Denote the sixes s 1 , . . . , s 840 , and each of the three six ends in six j by e 1 j , e 2 j , e 3 j . 2. For each six-end e k j , work out which six-end will be visited next after a plain (ie after going through changes 7. 3.1.3.1.3), and which six-end will be visited next after a bob (ie after going through changes 5. 3.1.3.1.3). Denote a map P : e → e such that P (e k j ) is equal to the next six-end visited after a plain, and an equivalent map B for a bob. Similarly, using copies of S 6 , we can produce an instance of HCP corresponding to bobs-only Stedman Triples via the following algorithm.
1. Find all 840 sixes, and identify the three six-ends in each six. Denote the sixes s 1 , . . . , s 840 , and each of the three six ends in six j by e 1 j , e 2 j , e 3 j . 2. For each six-end e k j , work out which six-end will be visited next after a slow plain ( The resultant Erin graph has 13,440 vertices and 21,840 edges, while the Stedman graph has 27,720 vertices and 45,360 edges. In the case of the Erin graph, any HC (or a proof that the graph is non-Hamiltonian) would settle the centuries-old question of whether a peal of bobs-only Erin Triples exists.

Peals in Parts
One of the breakthroughs in the search for peals was obtained by utilising techniques from group theory to break the full extent up into several equivalent parts. Then, any method that fully traverses one of the parts can be used for the other parts as well, in the sense that the starting six from one part corresponds to a particular six in each of the other parts respectively, and following the same calls, each of the parts can be individually traversed. Each part has a designated starting point, and the final step of the path in each part either returns to this starting point, completing a cycle, or goes to the starting point of another part. Since the parts of equivalent, the latter case means that the path through this new part also finishes by going to the starting point of another part (possibly the first one) and so the final result of each of these paths is a set of short cycles, the union of which forms a vertex-disjoint cycle cover in the graph. These short cycles which contain one or more parts are called round blocks. Then, by the use of some clever switching techniques (e.g. see Price [14]), it is possible to replace some calls in a systematic way to start joining the round blocks together. These techniques always increase or decrease the number of round blocks by an even amount (or keep them the same) so the search for a single peal in this manner must start from an odd number of round blocks, and so usually from an odd number of parts; however, searching for peals in an even number of parts is of interest in its own right despite typically being unable to form a full peal from the results.
In practice, the process of searching for peals in parts is done by reducing the set of 840 sixes to some fraction of the sixes by mapping each of the omitted sixes to one of the remaining sixes. Likewise, each of the six-ends in the omitted sixes maps to the equivalent six-end of the corresponding remaining six. What results is a smaller problem which can be easily converted to an instance of HCP using the algorithms in the previous section.
In order to perform this mapping, an appropriate group is required. These cannot be constructed at will, but various groups are known which can be used for either Stedman or Erin triples. The group contains a set of six-ends which will be contained in each of the respective parts. For example, the group used to search for a 5-part peal of bobs-only Stedman Note that, although we can move down the column by going through the process 3.1.3.1.3, we can almost move across rows using a relabelling method. For example, from the first entry in the second column to the first entry in the second column, we relabel {1, 2, 3, 4, 5, 6, 7} → {2, 3, 4, 5, 1, 6, 7} so 1 is relabelled to 2, 2 is relabelled to 3, and so on. This relationship is retained throughout the table. Hence, when we next choose any even row that has not been already considered (for example, by considering a plain or bob on one of the six-ends obtained so far) and add it to the first column to obtain a new six, we can use this same relabelling technique to obtain the rest of the row, and proceed to find the next sixes. For example, in the above It can be shown (e.g. see Price [13]) that it is impossible to obtain any repetition this way, and hence this procedure results in a partitioning of the 840 sixes into five disjoint parts of 168 sixes each. Then, each six in columns 2, 3, 4 or 5 are just mapped to equivalent the six in column 1. Likewise, any six-end in columns 2, 3, 4 or 5 is mapped to the equivalent six-end in column 1. So, for example, consider the six-end 1325476 in the first column. After a plain, the next row would be 3152746. Where the next six-end occurs depends on whether 1325476 was a slow six-end or a quick six-end. To represent the different cases, we write either S or Q at the end. Therefore, the six-end after choosing a plain from 1325476S is 1357264Q, and the six-end after choosing a plain from 1325476Q is 3517264S. Both of these entries are in the second six in the fourth column, so the would be mapped to the first column accordingly. That is, a plain from 1325476S would be mapped to 3527461Q, and a plain from 1325476Q would be mapped to 5237461S.
Once the entire set of mappings has been created, the algorithm in the previous section can be used to produce the 5-part Stedman graph. Any time a six-end is mapped to another six-end in the same six, the edge can be ignored, making the graph a bit simpler (although no issue arises if the edge is retained). The resulting graph is one-fifth the size of the original Stedman graph, making it more tractible for HCP heuristics.
Price [14] gave a large set of groups that have been discovered which are useful for change ringing problems. Here we summarise those that could, potentially, be useful for finding bobsonly Stedman or Erin Triples. They are selected by first considering the order of the group (a k-part peal requires a group of order k) and then choosing only those groups which satisfy the following conditions. First, there must not be a 3-bell cycle within one of the elements. Second, there must not be 3 pairs swapping in one of the elements. These conditions ensure the splitting into parts does not interfere with the splitting into sixes. For bobs-only peals we also want an odd number of round blocks, so the group must have a cyclic subgroup with an odd number of cosets. This cyclic subgroup must also be even so the start of each part is reachable with just bobs and plains. In each of the remaining cases we give the generators, as well as the index used by Price [13], and the potential numbers of round blocks that might occur.

Results
For each of the ten groups mentioned in the previous section, we produced an HCP instance for both Stedman and Erin Triples. Using exhaustive search techniques, we were able to either discover solutions for each of the Stedman cases, or confirm that none existed in the case of Sted21 and Sted7. In many cases, the solution for a smaller graph, when translated back to a peal, could then be utilised to provide solutions for larger graphs, for example a peal arising Finally, if the desire is to create difficult instances of HCP, rather than find bobs-only peals, groups which do not satisfy the condition of separating into an odd number of round blocks can be used. These are as follows:  Table 2 The 18 additional graphs produced for Stedman and Erin Triples for groups that do not permit an odd number of round blocks, as well as their Hamiltonicity, where 'U' indicates the Hamiltonicity is currently unknown. The number of solutions for Sted12 (6.14) and Sted60 (7.03) is also given.