# Moore graph

In graph theory, a Moore graph is a regular graph whose girth (the shortest cycle length) is more than twice its diameter (the distance between the farthest two vertices). If the degree of such a graph is d and its diameter is k, its girth must equal 2k + 1. This is true, for a graph of degree d and diameter k, if and only if its number of vertices (its order) equals
    $1+d\sum _{i=0}^{k-1}(d-1)^{i},$
an upper bound on the largest possible number of vertices in any graph with this degree and diameter. Therefore, these graphs solve the degree diameter problem for their parameters.
Another equivalent definition of a Moore graph G is that it has girth g = 2k + 1 and precisely ⁠n/g⁠(m – n + 1) cycles of length g, where n and m are, respectively, the numbers of vertices and edges of G. They are in fact extremal with respect to the number of cycles whose length is the girth of the graph.
Moore graphs were named by Hoffman & Singleton (1960) after Edward F. Moore, who posed the question of describing and classifying these graphs.
As well as having the maximum possible number of vertices for a given combination of degree and diameter, Moore graphs have the minimum possible number of vertices for a regular graph with given degree and girth. That is, any Moore graph is a cage. The formula for the number of vertices in a Moore graph can be generalized to allow a definition of Moore graphs with even girth as well as odd girth, and again these graphs are cages.

## Bounding vertices by degree and diameter

Let G be any graph with maximum degree d and diameter k, and consider the tree formed by breadth-first search starting from any vertex v. This tree has 1 vertex at level 0 (v itself), and at most d vertices at level 1 (the neighbors of v). In the next level, there are at most d(d − 1) vertices: each neighbor of v uses one of its adjacencies to connect to v and so can have at most d − 1 neighbors at level 2. In general, a similar argument shows that at any level 1 ≤ i ≤ k, there can be at most d(d − 1)$^{i−1}$ vertices. Thus, the total number of vertices can be at most
    $1+d\sum _{i=0}^{k-1}(d-1)^{i}.$
Hoffman & Singleton (1960) originally defined a Moore graph as a graph for which this bound on the number of vertices is met exactly. Therefore, any Moore graph has the maximum number of vertices possible among all graphs with maximum degree d and diameter k.
Later, Singleton (1968) showed that Moore graphs can equivalently be defined as having diameter k and girth 2k + 1; these two requirements combine to force the graph to be d-regular for some d and to satisfy the vertex-counting formula.

## Moore graphs as cages

Instead of upper bounding the number of vertices in a graph in terms of its maximum degree and its diameter, we can calculate via similar methods a lower bound on the number of vertices in terms of its minimum degree and its girth. Suppose G has minimum degree d and girth 2k + 1. Choose arbitrarily a starting vertex v, and as before consider the breadth-first search tree rooted at v. This tree must have one vertex at level 0 (v itself), and at least d vertices at level 1. At level 2 (for k > 1), there must be at least d(d − 1) vertices, because each vertex at level 1 has at least d − 1 remaining adjacencies to fill, and no two vertices at level 1 can be adjacent to each other or to a shared vertex at level 2 because that would create a cycle shorter than the assumed girth. In general, a similar argument shows that at any level 1 ≤ i ≤ k, there must be at least d(d − 1)$^i$ vertices. Thus, the total number of vertices must be at least
    $1+d\sum _{i=1}^{k-1}(d-1)^{i}.$
In a Moore graph, this bound on the number of vertices is met exactly. Each Moore graph has girth exactly 2k + 1: it does not have enough vertices to have higher girth, and a shorter cycle would cause there to be too few vertices in the first k levels of some breadth-first search tree. Therefore, any Moore graph has the minimum number of vertices possible among all graphs with minimum degree d and girth 2k + 1: it is a cage.
For even girth 2k, one can similarly form a breadth-first search tree starting from the midpoint of a single edge. The resulting bound on the minimum number of vertices in a graph of this girth with minimum degree d is
    $2\sum _{i=0}^{k-1}(d-1)^{i}=1+(d-1)^{k-1}+d\sum _{i=0}^{k-2}(d-1)^{i}.$
(The right hand side of the formula instead counts the number of vertices in a breadth-first search tree starting from a single vertex, accounting for the possibility that a vertex in the last level of the tree may be adjacent to d vertices in the previous level.) Thus, the Moore graphs are sometimes defined as including the graphs that exactly meet this bound. Again, any such graph must be a cage.

## Examples

The Hoffman–Singleton theorem states that any Moore graph with girth 5 must have degree 2, 3, 7, or 57. The Moore graphs are:
* The complete graphs K$_n$ on n > 2 nodes (diameter 1, girth 3, degree n − 1, order n)
* The odd cycles C$_{2n+1}$ (diameter n, girth 2n + 1, degree 2, order 2n + 1). This includes C$_5$ with diameter 2, girth 5, degree 2, and order 5.
* The Petersen graph (diameter 2, girth 5, degree 3, order 10)
* The Hoffman–Singleton graph (diameter 2, girth 5, degree 7, order 50)
* A hypothetical graph (or more than one) of diameter 2, girth 5, degree 57 and order 3250; the existence of such is unknown and is one of the most famous open problems in graph theory.
Although all the known Moore graphs are vertex-transitive graphs, the unknown one (if it exists) cannot be vertex-transitive, as its automorphism group can have order at most 375, less than its number of vertices.
If the generalized definition of Moore graphs that allows even girth graphs is used, the even girth Moore graphs correspond to incidence graphs of (possible degenerate) generalized polygons. Some examples are the even cycles C$_{2n}$, the complete bipartite graphs K$_{n,n}$ with girth four, the Heawood graph with degree 3 and girth 6, and the Tutte–Coxeter graph with degree 3 and girth 8. More generally it is known that, other than the graphs listed above, all Moore graphs must have girth 5, 6, 8, or 12. The even girth case also follows from the Feit-Higman theorem about possible values of n for a generalized n-gon.