1 Basic concepts

In accordance with the survey paper (Exoo and Jajcay 2008), a \(k\)-regular graph G of girth \(g\) will be referred to as a \((k,g)\)-graph. If the order of such graph is the smallest possible for a given pair \(k\) and \(g\), we call it a \((k,g)\)-cage and denote its order by \(n(k,g)\). In the 1960’s, Erdős and Sachs (1963) and Sachs (1963) proved the existence of infinitely many \((k,g)\)-graphs for all parameter pairs \(k\ge 2\) and \(g\ge 3\). Nevertheless, the order of \((k,g)\)-cages has been determined only for a very limited set of parameters (Exoo and Jajcay 2008).

The best known universal lower bound on the order of \((k,g)\)-graphs (and therefore also for the order \(n(k,g)\) of \((k,g)\)-cages) is the Moore bound:

$$\begin{aligned} n(k,g)\ge M(k,g)= {\left\{ \begin{array}{ll} 1+k+k(k-1)+\dots +k(k-1)^{(g-3)/2},&{}\text {if }g\text { is odd},\\ 2(1+(k-1)+\dots +(k-1)^{(g-2)/2}),&{}\text {if }g\text { is even}. \end{array}\right. } \nonumber \\ \end{aligned}$$
(1)

Graphs whose orders equal the Moore bound are called Moore graphs, and exist only for very limited sets of parameter pairs. They are known to exist if and only if

  • \(k=2\) and \(g\ge 3\): cycles;

  • \(g=3\) and \(k\ge 2\): complete graphs;

  • \(g=4\) and \(k\ge 2\): complete bipartite graphs;

  • \(g=5\) and \(k=2,3,7\): the \(5\)-cycle, the Petersen graph, the Hoffman-Singleton graph;

  • \(g=6,8\) or \(12\): symmetric generalized \(n\)-gons;

with the existence of the \((57,5)\)-graph of order matching the Moore bound still unresolved (Bannai and Ito 1973; Damerell 1973; Exoo and Jajcay 2008).

Outside the above cases, the obvious lower bound for the order of a \((k,g)\)-cage is the value of the Moore bound plus one, \(M(k,g)+1\), when \(k\) is even, and the value of the Moore bound plus two, \(M(k,g)+2\), when \(k\) is odd.

The difference between the order of a \((k,g)\)-graph G and the corresponding Moore bound \(M(k,g)\) is called the excess of G. It is almost universally believed that the excess of the majority of cages is significantly bigger than \(2\). No unified opinion appears to exist on whether the excess of cages can be arbitrarily large.

The focus of our paper is on constructive upper bounds on the orders n(kg). Since the order of any (kg)-graph G provides such upper bound, any construction resulting in small (kg)-graphs is of interest, and the smallest currently known (kg)-graphs are collected in Exoo and Jajcay (2008), where they are referred to as record holders. Consulting (Exoo and Jajcay 2008), it is easy to observe that the difference between \(M(k,g)\) and the order of the smallest known \((k,g)\)-graph grows rather quickly (with regard to both k and g). Even for such relatively small case as \((3,11)\), the Moore bound is \(M(3,11)=94\) while the actual order of the cage is \(n(3,11)=112\) (which yields the excess of \(e=18\)). Comparing the orders of trivalent records holders of girth \( \ge 11 \) with the corresponding Moore bounds reveals a very quick growth of the corresponding excesses. At the same time, some of the orders of the record holding graphs have not changed for a number of years (most notoriously the case (3, 13)), and thus even decreasing their orders by 1 or 2 would bring in a long-awaited improvement.

In Exoo and Jajcay (2008), methods for removing vertices from existing (kg)-graphs are generally called excisions, and methods proposed in our paper also fall into this category. The main difference between our methods and the previously used excision methods lies in that, based on the properties of the vertices to be removed from the original graph, we only remove vertices when we positively know that the resulting graph will have the very same parameters as the original. In comparison, the usual ways of applying excisions rely on trying many different choices of sets of vertices to be removed, subsequently checking the properties of the resulting graphs, and keeping only those choices that result in a new graph with the same parameters as the original (if such choices are found). Even though the methods we propose result in removing at most two vertices at a time, they may be repeatedly applied to different parts of the starter graph. In addition, they may produce results in extreme cases where even removing a single vertex would result in finding a new record holder. Studying this type of excisions also contributes to our understanding of cages, which are by definition graphs whose orders cannot be lowered by any type of excision without simultaneously changing their parameters. In addition, as pointed out by one of our referees, techniques presented in our paper could (and should) also be considered when constructing graphs that can be viewed as generalizations of cages, namely, minimal graphs of prescribed girth and possessing vertices of two distinct degrees (called biregular cages (Boben et al. 2015; Exoo and Jajcay 2016; Araujo-Pardo et al. 2016)) or minimal edge-girth-regular graphs which are minimal k-regular graphs in which each edge is contained in the same number of girth cycles (Jajcay et al. 2018; Zavrtanik Drglin et al. 2021).

The main motivation for the present paper is Jajcay and Raiman (2021) that addressed the opposing problem of increasing the number of vertices in a given (kg)-graph without changing the parameters (kg). The paper introduced several methods for enlarging small \((k,g)\)-graphs. In the present paper we propose to reverse these techniques and introduce methods for shrinking known \((k,g)\)-graphs. In essence, we propose to look for patterns that may be ‘the result of vertices added’, and reverse the operation by removing them.

In the next paragraph, we choose to include just one of the results from Jajcay and Raiman (2021); meant to serve as an example. However, all vertex removal techniques presented in our paper can be viewed as reversals of additions from Jajcay and Raiman (2021).

Theorem 1.1

(Jajcay and Raiman (2021)) Let \(G\) be a \((3,g)\)-graph of order \(n\). If \(G\) contains at least two edges of distance at least \(g-3\), then there exists a \((3,g)\)-graph \(G'\) of order \(n+2\).

Repeated applications of the construction used in the proof of Theorem 1.1 lead to the following result:

Theorem 1.2

(Raiman (2018)) Let \(G\) be a \((3,g)\)-graph. If \(G\) is of order at least \(\frac{1}{3}2^g-\frac{4}{3}\), then there exists a \((3,g)\)-graph of any greater even order.

2 Constructions decreasing the orders of existing \((k,g)\)-graphs

In this section, we present techniques for removing vertices and edges from \((k,g)\)-graphs while preserving their degree \(k\ge 3\) and girth \(g\ge 5\) (the remaining possibilities \((2,g),(k,3),(k,4)\) were covered in Jajcay and Raiman (2021)).

Construction 2.1

Let \(G\) be a \((2k+1)\)-regular graph of order \(n\). Construct the graph \(G{\setminus }\{u,v\}\) by removing two adjacent vertices \(u,v\) together with all their incident edges. In the graph \(G{\setminus }\{u,v\}\), divide the former neighbors of \(u\) into \(k\) pairs and divide the former neighbors of \(v\) into \(k\) pairs, and subsequently join the paired vertices by new edges.

It is easy to see that Construction 2.1 results in a graph \(G'\) which is still \((2k+1)\)-regular and of order \(n-2\).

Theorem 2.2

Let \(k \ge 1\), \( g \ge 5 \), and let \(G\) be a \((2k+1,g)\)-graph of order \(n\). Suppose that G contains two adjacent vertices \(u\) and \(v\) having the property that the neighbors \( u_1, u_2, \ldots , u_{2k} \) of \(u\) different from v, can be divided into pairs \( u_i,u_{i+k}\), \( 1 \le i \le k \), which are not contained together in any g-cycle of G, and the neighbors \( v_1, v_2, \ldots , v_{2k} \) of \(v\) different from u, can also be divided into pairs \(v_i,v_{i+k}\), \( 1 \le i \le k \), not contained together in any g-cycle.

Then, applying Construction 2.1 to \(G\), the vertices \(u\) and \(v\), and the pairs of vertices \( u_i,u_{i+k}\), \(v_i,v_{i+k}\), \( 1 \le i \le k \), results in \(G'\) that is \( (2k+1) \)-regular of girth \(g'\ge g\) and order \(n-2\).

Proof

Let \(G'\) be the graph obtained from G by removing the vertices u and v and their incident edges and introducing the edges \( \{ u_i,u_{i+k} \}\), \( \{ v_i,v_{i+k} \}\), \( 1 \le i \le k \). Since the pairs \( u_i,u_{i+k}\), \(v_i,v_{i+k}\) are not contained in shared g-cycles in G, their distance in \(G{\setminus }\{u,v\}\) is at least \((g-1)\): Should their distance be shorter, G would contain a path joining \( u_i,u_{i+k} \) (resp. \( v_i,v_{i+k} \)) not containing the edges \( \{ u_i, u \}, \{ u, u_{i+k} \} \) (resp. \( \{ v_i,v \}, \{ v, v_{i+k} \}\)), while attaching this path to these edges would result in a cycle of length strictly smaller than \((g-1)+2=g+1\) in G; contradicting the choice of the pairs \( u_i,u_{i+k} \) (\( v_i,v_{i+k} \)). This observation implies that any cycle in \(G'\) containing at least one of the edges \( \{ u_i,u_{i+k} \}\) \( \{ v_i,v_{i+k} \} \), \( 1 \le i \le k \), is of length at least \(g\) (using essentially the same argument as above while replacing the ‘new’ edge by the 2-path \( \{ u_i, u \}, \{ u, u_{i+k} \} \) or \( \{ v_i,v \}, \{ v, v_{i+k} \}\)). Furthermore, any cycle in \(G'\) not containing at least one of the edges \( \{ u_i,u_{i+k} \}\), \( \{ v_i,v_{i+k} \} \), \( 1 \le i \le k \), consists entirely of edges from G, and hence is of length at least g. Thus \(G'\) contains two fewer vertices than \(G\), has no cycles of length less than g and all the vertices of \(G'\) are of degree \((2k+1)\). The assertion of the theorem follows. \(\square \)

Fig. 1
figure 1

The (3, 5)-graph at the top can be reduced to the Petersen graph by deleting a pair of antipodal vertices, and joining pairs of vertices that were adjacent to the deleted vertices

Example 2.3

We demonstrate the construction from Theorem 2.2 in Fig. 1 starting from a \((3,5)\)-graph \(G\) of order \(12\). It contains two vertices \(u,v\) whose neighbors \( u_1,u_2\) and \( v_1,v_2 \) are not contained in any 5-cycle in G. Removing the vertices \(u,v\) and their incident edges and connecting the neighbors \( u_1,u_2\) of \(u\) and the neighbors \(v_1,v_2\) of \(v\) results in the Petersen graph. Since we know that the Petersen graph is the smallest possible \((3,5)\)-graph, we stand no chance of another vertex removal (i.e., Petersen cannot possibly contain a pair of adjacent vertices whose neighbors are not contained in a 5-cycle.) In fact, even without referring to the fact that a Moore graph is a smallest (kg)-graph, it is easy to see that any two neighbors of a vertex in a Moore graph of odd girth must be contained in a shared g-cycle.

In our next construction, we consider the case of even degree.

Construction 2.4

Let \(G\) be a \(2k\)-regular graph of order \(n\). Construct the graph \(G{\setminus }\{u\}\) by removing a vertex \(u\) and its incident edges. In the graph \(G{\setminus }\{u\}\), divide the former neighbors of \(u\) into \(k\) pairs and subsequently join the paired vertices by new edges.

Once again, it is easy to see that this process results in a graph \(G''\) which is \((2k)\)-regular of order \(n-1\). We use Construction 2.4 in an analogous way to Theorem 2.2.

Theorem 2.5

Let \( k \ge 2 \), \( g \ge 5 \), and let \(G\) be a \((2k,g)\)-graph of order \(n\). Suppose that G contains a vertex \(u\) which has the property that we can divide the neighbors \( u_1,u_2, \ldots , u_{2k} \) of \(u\) into pairs \( u_i,u_{i+k} \), \( 1 \le i \le k \), which are not contained together in any cycle of length g. Then, applying Construction 2.4 to G, u, and the pairs \( u_i,u_{i+k} \), \( 1 \le i \le k \), results in a \((2k,g')\)-graph \(G''\) of girth \(g'\ge g\) and order \(n-1\).

Proof

Along the lines of the previous proof, no cycle containing any of the edges \( \{ u_i, u_{i+k} \} \) in \(G''\) can be of length shorter than \(g\). The cycles in \(G''\) not containing any of the edges \( \{ u_i, u_{i+k} \} \) consist of edges from G and as such are of length at least g. This yields that \(G''\) is of girth at least \(g\). We already know that \(G''\) is \(2k\)-regular and contains one less vertex than \(G\). \(\square \)

Fig. 2
figure 2

Reducing a (4, 5)-graph of order 20 to a (4, 5)-graph of order 19. In both graphs, the apparently isolated red, blue, and green vertices are adjacent to all vertices of the same color on the 12-cycle (Color figure online)

Example 2.6

This time, we start with a \((4,5)\)-graph \(G\) of order \(20\) pictured on the left side of Fig. 2. It contains a vertex \(u\) whose four neighbors can be divided into the pairs \( u_1,u_3 \) and \( u_2,u_4 \) which are not contained in a shared 5-cycle. Removing u and its incident edges and introducing the edges \( \{ u_1,u_3 \} \) and \( \{ u_2,u_4 \} \) results in the Robertson graph; the smallest possible \((4,5)\)-graph.

3 Constructions that do not decrease the orders of the graphs

As already observed in Sect. 1, the methods discussed in the previous section fall into the general class of excisions (Exoo and Jajcay 2008). Excisions are used to remove vertices and edges from existing \((k,g)\)-graphs. More precisely, if \(G\) is a \((k,g)\)-graph and \(H\) is a subgraph of \(G\) with degree set \(\{1,k\}\), removing the vertices of \(H\) whose degree is \(k\) together with their adjacent edges leaves a subgraph of \(G\) containing vertices of degree k and \(k-1\). In the case \(k=3\), one can suppress the resulting vertices of degree \(2\). For larger values of \(k\), the final step involves pairing the degree \((k-1)\) vertices and joining them with edges. The goal of excision is to find subgraphs \(H\) whose removal leaves a graph whose girth is at least \(g-1\) (Exoo and Jajcay 2008). This method has been essential for finding the \((3,11)\)-cage and a number of records listed in Exoo and Jajcay (2008).

The vertex removal methods presented in our paper are excisions of the one-vertex \(K_1\) or one-edge \(K_2\) from a (kg)-graph G with the additional conditions guaranteeing that the resulting graph is still a (kg)-graph. Just like all excisions, our methods cannot (successfully) be applied just to any (kg)-graph. For example, they cannot be successful when attempted on cages. Moreover, even when considering a (kg)-graph whose order is larger than the order of the corresponding record holder, the graph still may not contain a subgraph required by one of our theorems. For example, our methods cannot be applied to the Möbius-Cantor graph, a \((3,6)\)-graph of order \(16\), even though we know a (3, 6)-graph of order 14 exists. Similarly, there is a well-known gap in the series of orders between the \((3,8)\)-graphs of order \(30\) and \(34\), which means that our methods cannot be applied to a \((3,8)\)-graph of order \(34\).

We have tested all the known record graphs listed in the tables presented in Exoo and Jajcay (2008) with the aim of finding a subtree that could be excised and no such case has been found for subtrees of orders up to 12 vertices. Thus, Constructions 2.1 and 2.4 cannot be applied to any of the known record holders from Exoo and Jajcay (2008). Even though this might be viewed as a failure, it is important to note that the record holders from Exoo and Jajcay (2008) are generally not unique with respect to their degree, girth and order. Thus, even though Constructions 2.1 and 2.4 fail when applied to the listed record holders, they may still be successful when applied to other graphs with the same parameters. One way to obtain families of such graphs is to alter the record holders in a way that does not change their degree, girth, and their order.

Our next construction is an example of one such construction. We denote the distance between the vertices \(u\) and \(v\) in \(G\) by \(d_G(u,v)\).

Construction 3.1

Let \( k \ge 3, g \ge 5 \), and let \(G\) be a (kg)-graph of order \(n\). Let u be a vertex of G with neighbors \(u_1,u_2\), and let vw be a pair of adjacent vertices which are not neighbors of u. Denote the graph obtained from G by removing the edges \( \{ u,u_1 \}, \{ u,u_2 \}, \{ v, w \} \), and introducing the edges \( \{ u_1,u_2 \}, \{ u,v \}, \{ u,w \} \) by \(G'''\).

Construction 3.1 yields the following result.

Theorem 3.2

Let \( k \ge 3 \), \( g \ge 5 \), and let \(G\) be a \((k,g)\)-graph of order \(n\). Suppose that G contains vertices \(u,v\) and w such that \( d_G(u,v), d_G(u,w) \ge g-1 \) and u has two neighbors \(u_1\) and \(u_2\) which are not contained in any g-cycle of G. Then, applying Construction 3.1 to G and the vertices \(u,u_1,u_2,v,w\) results in a (kg)-graph \(G'''\) of order n.

Proof

It is easy to see that \(G'''\) is a k-regular graph of order n again. Let H be the auxiliary graph obtained from G by removing the edges \( \{ u,u_1 \} \), \( \{ u,u_2 \} \), \( \{ v, w \} \) and adding the edge \( \{ u_1,u_2 \} \) and let \({{\mathcal {C}}}\) be a cycle in this graph. If \({{\mathcal {C}}}\) does contain the edge \( \{ u_1,u_2 \} \), the length of \({{\mathcal {C}}}\) is at least g as otherwise replacing \( \{ u_1,u_2 \} \) with \( \{ u,u_1 \}, \{ u,u_2 \} \) in \({{\mathcal {C}}}\) would result in a cycle of length smaller than \(g+1\) in G; which contradicts the choice of u, \(u_1\) and \(u_2\). If \({{\mathcal {C}}}\) does not contain the edge \( \{ u_1,u_2 \} \), it is a cycle from G and as such is of length at least g. Hence, the girth of the auxiliary graph H is at least g. Next, consider the length of the cycles in \(G'''\). Cycles not containing either of the edges \( \{ u,v \}, \{ u,w \} \) are cycles in H and are therefore of length at least g. Any cycle containing exactly one of the edges \( \{ u,v \}, \{ u,w \} \) must be of length at least g as otherwise there would exist a path in G (the part of the cycle obtained by removing the ‘new’ edge) of length at most \(g-2\); a contradiction with the condition \( d_G(u,v), d_G(u,w) \ge g-1 \). Finally, should there exist a cycle containing both edges \( \{ u,v \}, \{ u,w \} \) of length less than g, \(G'''\) would have to contain a path between v and w of length less than \(g-2\) not using the edges \( \{ u,v \}, \{ u,w \} \) (and, of course, neither the edge \( \{v,w \} \) that has been removed). Note that this path cannot include the vertices \( u_1, u_2 \) because their distance from both v and w in G is at least \(g-2\), and hence they cannot lie on a path of length \(g-2\) connecting these two vertices not using the edges \( \{ u,v \}, \{ u,w \} \). Thus, should there exist a cycle containing both edges \( \{ u,v \}, \{ u,w \} \) of length less than g, \(G'''\) would have to contain a path between v and w of length less than \(g-2\) not using the new edges \( \{ u,v \}, \{ u,w \}, \{u_1,u_2 \} \), i.e., consisting entirely of edges from G different from the edge \( \{ v,w \}\). This path, however, together with the edge \( \{ v,w \}\) would form a cycle of length less than g in G. We conclude that the girth of \(G'''\) is at least g. \(\square \)

Applying Construction 3.1 repeatedly to the record holders may result in new (kg)-graphs of the same order to which one could possibly apply Construction 2.1 or 2.4 and thereby obtain a (kg)-graph of order smaller than the original record holder.

Just like we pointed out in Example 2.3, any two neighbors of a vertex in an odd girth Moore graph are contained in a shared g-cycle. Thus, Construction 3.1 cannot be applied to an odd girth Moore graph even though it does not decrease its order. Interestingly, even though this observation cannot be used to prove the uniqueness of odd girth Moore graphs, all odd girth Moore graphs are known to be unique with regard to their degree and girth. This is, however, not the case for Moore graphs of girths 6, 8 or 12; whose existence is tied to the existence of generalized polygons. We will briefly return to this observation at the end of our article where we discuss computational experiments.

4 Distance between graphs

The graph \(G'''\) discussed in the previous section is obtained from the original graph G by removing and adding some edges (while keeping the number of vertices unchanged). Even though it is obvious that removing or adding even a single edge may result in a graph with radically different properties (consider, for example, the cycle), it still feels meaningful to view graphs which can be obtained one from the other via the removal and/or addition of just a few edges as ‘similar’ or ‘close’. This is the idea behind the definition of the distance between graphs based on the minimal total number of edges removed and/or added that we consider next.

Two graphs \(G_1\) and \(G_2\) of order n are said to be of distance d if it is possible to remove \(d_1\) and add \(d_2\) edges to \(G_1\) so that \(d=d_1+d_2\), the resulting graph is isomorphic to \(G_2\), and d is the smallest total number of edges to be removed and added to \(G_1\) with the resulting graph isomorphic to \(G_2\) (see, for example, Fig. 3).

It is not hard to observe that the above distance is well defined for any pair of graphs of the same order. Also, it satisfies all three of the usual properties of a metric. The distance of G from itself is indeed 0, and the distance from \(G_1\) to \(G_2\) is the same as the distance from \(G_2\) to \(G_1\). Finally, the distance between graphs satisfies the triangle inequality. Namely, for any three graphs \(G_1, G_2\) and \(G_3\) of order n, the distance between \(G_1\) and \(G_2\) cannot exceed the sum of distances between \(G_1\) and \(G_3\) and between \(G_3\) and \(G_2\). This is due to the fact that one can obtain \(G_2\) from \(G_1\) by first making \(G_1\) into \(G_3\) and then making \(G_3\) into \(G_2\). We feel obliged to point out that this is not the only way to define distance between a pair of graphs. Alternative definitions can be found, for example, in Goddard and Swart (1996).

Employing our definition, we quickly see that the distance between G and \(G'''\) discussed in the previous section is at most \(3+3=6\), as \(G'''\) is obtained from G by deleting 3 edges and introducing 3 new edges. We stress that this distance is at most 6, since it is conceivable that there might exist (other) \(d_1\) edges in G which can be removed and \(d_2\) edges that can be added so that \( d_1+d_2 < 6 \) and the resulting graph is also isomorphic to \(G'''\). Even more extremely, \(G'''\) itself might turn out to be isomorphic G, in which case the distance between G and \(G'''\) is by definition 0. Note that the distance between two graphs of the same order and size (number of edges) must be even, and thus, the distance between G and \(G'''\) may be one of the numbers 0, 2, 4 or 6.

Even though the distance between graphs defined above feels natural, determining the distance between two given graphs is computationally at least as hard as determining whether the two graphs are isomorphic. Clearly, given an instance of two graphs \(G_1\) and \(G_2\) of equal orders and sizes \(m_1\) and \(m_2\), respectively, their distance is at most \(m_1+m_2\) and it can be determined by considering all subsets of the edge set \(E(G_1)\) of size \(k_1 \le m_1\) and all subsets of the set of non-edges of \(G_1\) of size \(k_2 \le m_2\) satisfying the property \(m_1-k_1+k_2=m_2\). For each such pair of subsets, one can remove the selected edges and add the selected non-edges, and check whether the resulting graph is isomorphic to \(G_2\). This approach, if applied with no further refinements, is clearly exponential in \(m_1+m_2\), and since isomorphism checking is not known to be linear in the size of the considered graphs, even certificate verification is not obviously polynomial, i.e., we do not know how to check effectively whether a given subset of edges and a subset of non-edges to be removed and added to \(G_1\) results in a graph isomorphic to \(G_2\). This makes the general problem of calculating graph distances extremely time consuming.

Fig. 3
figure 3

The two cubic (3, 5)-graphs of order 12 are shown above. Their distance is 4 as can be seen by adding either the red edges and omitting the green edges, or vice versa (Color figure online)

5 Distances between cages

Recall that we have introduced the concept of graph distance to examine the possibilities to produce and use large families of (kg)-graphs with the aim of finding those that admit application of order decreasing excisions. In this section, we investigate the concept of distance applied specifically to cages. All the ‘definite’ claims made in this section are based on extensive computer calculations, i.e., if we claim that the distance between two specific graphs is a specific number, we have verified that there is no smaller number of edge removals and additions that would produce one of the graphs from the other.

Before considering the specific examples, let us make an easy observation. The distance between two non-isomorphic k-regular graphs of the same order must be at least 4. This is a consequence of the fact that removing a single edge in a k-regular graph yields a unique pair of vertices of degree \(k-1\), which are in turn the only vertices one could add an edge to if the resulting graph is to be k-regular again; resulting in the same graph again. Thus, to obtain two non-isomorphic k-regular graphs, one needs to remove at least two edges and replace them with at least two non-edges.

Example 5.1

When considering cubic graphs, girth 9 is the smallest girth for which there exists more than one (3, 9)-cage. Somewhat surprisingly, there are altogether 18 different (3, 9)-cages; all of them of order 58 (Coolsaet et al. 2023). Moreover, since the orders of their automorphism groups range from 1 to 24, the structures of these cages are necessarily quite different. It is therefore interesting to determine how far apart are these graphs when it comes to applying methods similar to Construction 3.1. Note that no two graphs among the (3, 9)-cages are connected via Construction 3.1, i.e., there is no pair among these graphs where one of the graphs is obtained by removing and adding three edges to the other as described in Construction 3.1.

In view of our remark preceding this example, the minimum distance between any two of these cages is at least 4, and the closest pair among all (3, 9)-cages is indeed of distance 4. The first cage contains four vertices \( u_1,u_2,u_3,u_4\) that form a path of length 3 with edges \( \{ u_1,u_2 \} \), \( \{ u_2,u_3 \} \), and \( \{ u_3,u_4 \} \). Deleting the edges \( \{ u_1,u_2 \} \) and \( \{ u_3,u_4 \} \), and adding edges \( \{ u_1,u_3 \} \) and \( \{ u_2,u_4 \} \) produces the second cage. There is also another pair at distance 4 that uses two paths of length 3 of distance 3 apart. To mention just one more possible switch, there is a 6-cycle switch between one pair of graphs; with each graph containing three alternating disjoint edges of such 6-cycle. Thus, there exist two (3, 9)-cages of distance 6.

Table 1 included at the end of this section contains the distances between all eighteen (3, 9)-cages. The graphs are numbered as in Coolsaet et al. (2023).

Clearly, any switch between two graphs in the table might be viewed as a potential candidate for another construction preserving the degree k, girth g, and the order of a (kg) -graph; along the same lines as those we explored with respect to Construction 3.1. This is just one more reason why we find investigating the distances between existing cages worthwhile.

To put all the distances listed in the table in perspective, let us observe that the total number of edges in the (3, 9)-cages is \( \frac{58 \cdot 3}{2} = 87 \). Thus the furthest pairs we have found require the removal and replacement of more than a third of all the edges (30 out of 87).

Example 5.2

For comparison, there are three (3, 10)-cages of order 70 and size 105. Their distances are 6, 12 and 18; quite small when compared to the previous example.

Example 5.3

As our last example, consider the four (5, 5)-cages of order 30 and size 75. Their distances range from 10 to 30, and all triangle inequalities are strict.

Table 1 Minimum distances between the (3, 9)-cages

6 Concluding remarks

All the above computational experiments proceeded by selecting edges to be removed and added, and checking whether the resulting graph still had the same girth. Finding sufficient conditions similar to those included in Theorem 3.2 that would guarantee that these transformations preserve both the degree and the girth is certainly not hard: the distances between vertices should be \(g-1\) after the first set of edges is removed. Unfortunately, saying something deeper is probably very hard; possibly pertaining to using graph automorphisms.

We tried all possible replacements like the two mentioned in the previous section (the 4-path and the 6-cycle replacement), and the programs tried many many millions of them. In relatively small cases (up to the (3, 13) case at 270 vertices which is the first unsettled case for cubic graphs) we tried all possible moves of these types of up to approximately 20 edges – 10 edges deleted and 10 edges added – and we also tried many random moves that were larger. The programs worked by removing edges, computing a new distance matrix, and then looking for replacement edges that did not violate the girth or degree; updating the distance matrix as new edges were added.

We also did this in the context of finding smaller cage candidates: starting with an incomplete graph (satisfying the girth conditions, but short a few edges) for which no edges could be added, then applying one of these replacement moves and trying to increase the number of edges. In case of the (3,13)-cage search, we got a list of about 25 million moves, many of which were 4-path and 6-cycle moves (millions of them), and others were larger, but often multiples of these; for example, double 6-cycle moves, where neither 6-cycle move worked alone. There were also 8-cycle moves (with alternate edges of the cycle deleted and added), 10-cycle moves, and unions of cycles.

One interesting question might be to find the distances among the incidence graphs for some of the projective planes (cases where there is more than one plane, e.g., orders 8 and 9; the (9, 6)- and (10, 6)-cages). Geometric versions of this might be known in the context of adding and deleting lines from the plane, however, looking at this problem from the perspective of removing and adding edges in the incidence graphs may lead to further insights, and potentially even to constructions of new projective planes.