Implementing Brouwer's database of strongly regular graphs

Andries Brouwer maintains a public database of existence results for strongly regular graphs on $n\leq 1300$ vertices. We implemented most of the infinite families of graphs listed there in the open-source software Sagemath, as well as provided constructions of the"sporadic"cases, to obtain a graph for each set of parameters with known examples. Besides providing a convenient way to verify these existence results from the actual graphs, it also extends the database to higher values of $n$.


Introduction
Many researchers in algebraic combinatorics or an adjacent field at some point want to get their hands on a list of feasible parameters of strongly regular graphs, and on actual examples of graphs. These graphs are studied and/or used in hundreds of articles; recent highlights in using strongly regular graphs include A. Bondarenko's [2] and an improvement of the latter by T. Jenrich and A. E. Brouwer [40]. While parameters are available from A. E. Brouwer's online database [4], actually constructing an example can easily take a lot of time and effort. The project described here aims at making these tasks almost trivial by providing the necessary graph constructions, and a way to obtain a strongly regular graph from a tuple of parameters, in the computer algebra system Sagemath [18] (also known as Sage). It is worth mentioning that a large part of the project makes use of GAP [22] and its packages, in particular L. Soicher's package GRAPE [52].
Exhaustive enumeration of the non-isomorphic strongly regular graphs has been performed for some tuples T of parameters (see T. Spence [53]). However, the sheer number of non-isomorphic examples (see e.g. D. Fon-Der-Flaass [21] or M. Muzychuk [46]) makes it hard to expect to be able to generate all of them, for a given T , in reasonable time. Thus we opted for a minimalist approach: for each T we generate an example, provided that one is known. We note, however, that some of constructions implemented can generate many examples with the same T ; e.g. we have implemented the construction to generate the point graph of the generalized quadrangle T * 2 (O) (see [49]) from any hyperoval O ⊂ P G(2, 2 k ). As well, many T 's can be realized by more than one implemented construction, sometimes leading to isomorphic graphs, and sometimes not.
Our desire to take on this project was motivated by the following considerations.
• One wants to double-check that the constructions are correct and their descriptions are complete; indeed, a program is more trustworthy than a proof in some situations, and coding a construction is a good test for completeness of the description provided.
• We wanted to see that the Sage combinatorial, graph-theoretic, and grouptheoretic primitives to deal with such constructions are mature and versatile, so that coding of constructions is relatively easy and quick.
• One learns a lot while working on such a project, both the underlying mathematics, and how the toolset can be improved. In particular, one might come along simplifications of constructions, and this actually happened on couple of occasions, see Sect. 5.3.
• As time goes by, possible gaps in constructions are harder and harder to fill in. Reconstructing omitted proof details becomes a tricky and timeconsuming task.
In particular, as far as the latter item is concerned, we seem to have uncovered at least one substantial gap in constructions (see Sect. 7). Furthermore, a number of constructions needed feedback from their authors or discussions with experts -sometimes quite substantial -to code them.
A large part of the constructions use in a nontrivial way another combinatorial or algebraic object: block design, Hadamard matrix, two-graph, twodistance code, finite group, etc. In particular, at the start of the project some of these were lacking in Sagemath, we needed to implement constructions of certain block designs, regular symmetric Hadamard matrices with constant diagonal (where the gap just mentioned was uncovered), skew-Hadamard matrices, and two-graphs. As well, we created a small database of two-distance codes (see Sect. 4.2).
The remainder of the paper consists of a short introduction to strongly regular graphs, pointing out particular relevant Sagemath features, and a description of our implementations, few of them seemingly novel. We list the constructions that we implemented, and discuss few gaps we discovered in the literature. neighbours, and the vertices u and v of any non-edge have µ common neighbours. One says that Γ has parameters (n, k, λ, µ). Note that the complement of Γ, i.e. the graph with the same set of vertices and edges being precisely the non-edges of Γ, is also a strongly regular whose parameters are related by a simple formula to these of Γ (see e.g. A. E. Brouwer and W. Haemers [8] for details). Some sources further require that both Γ and its complement are connected; in terms of parameters this means 0 < µ < k. This excludes the trivial case of Γ (or its complement) being disjoint union of complete graphs of the same size. Sagemath implementation does not impose this restriction.
A considerable number of techniques ruling out the existence of a strongly regular graph Γ with given parameters (n, k, λ, µ) are known, e.g. based on computing eigenvalues of the adjacency matrix A of Γ. As A generates a dimension 3 commutative subalgebra of C n×n , one sees that there are just 3 distinct eigenvalues of A, and they are determined by the parameters (e.g. the largest eigenvalue is k). Sagemath implements parameter-based techniques to rule out sets of parameters from A. E. Brouwer and J. H. van Lint [10], and from A. E. Brouwer, A. M. Cohen, and A. Neumaier [7].
We use standard terminology for finite permutation groups, finite simple groups, and geometries over finite fields from [7,8].

Structure and use of the implementation
The strongly regular graphs are split into two categories: the fixed-size graphs (see Sect.4) and the families of strongly regular graphs (see Sect.5). The parameters (n, k, λ, µ) of fixed-size graphs are hardcoded, while each family of strongly regular graphs has a helper function which takes (n, k, λ, µ) as an INPUT and answers whether the graph family is able to produce a graph with the required parameters. Some families forward their queries to the databases of Balanced Incomplete Block Designs, of Orthogonal Arrays, of Hadamard matrices of various types, and of 2-weight codes.
With this design, it takes ≤ 3 seconds on a modern laptop to know which graphs on < 1300 vertices can be produced by the implemented constructions (i.e. as far as the online database goes).
In Sage, everything is made available to the user through a single function graphs.strongly regular graph that produces a graph matching the provided parameters. Note that µ, the fourth parameter, can be omitted. One can use the same function to learn whether a set of parameters is realizable, if it is not, or if the existence problem is unsettled: sage: graphs.strongly regular graph(175,30,5,5,existence=True) True sage: graphs.strongly regular graph(57,14,1,existence=True) False sage: graphs.strongly regular graph(3250,57,0,1,existence=True) Unknown Technical details and descriptions of many specific functions is available as a part [13] of the Sagemath manual, which can be found online [18].

"Sporadic" examples
Here we did not attempt to give an exhaustive list of references for each graph, for some of them have several papers devoted to them in one or another way.
There exists an involution σ exchanging the points and blocks of the Higman-Sims design, such that each point is mapped onto a block that contains it (i.e. σ is a polarity with all absolute points). The graph is then built by making two vertices u, v adjacent whenever v ∈ σ(u).

Two-weight codes database
The rest of the fixed-size constructions of strongly regular graphs in the database originate from linear d-dimensional two-weight codes of length ℓ with weights w 1 and w 2 over F q . We use data shared by Eric Chen [11], data by Axel Kohnert [43] shared by Alfred Wassermann, data from I. Bouyukliev [11] Note that some of these codes are members of infinite families; this will be explored and extended in forthcoming work.

Infinite families
These are roughly divided into two parts: graphs related to finite geometries over finite fields (in particular various classical geometries), and graphs obtained by combinatorial constructions.
• Graphs arising from projective geometry designs are discussed in Sect. 5.2, along with other Steiner graphs.
• Paley graphs. The vertices are the elements of F q , with q ≡ 1 mod 4; two vertices are adjacent if their difference is a nonzero square in F q ; see [8, 9.1.2].
• Polar space graphs. These include polar spaces for orthogonal and unitary groups, see entries O ϵ 2d (q), O 2d+1 (q), and U d (q) in [8, Table 9.9]. Sagemath also has an implementation of polar spaces for symplectic groups (entry Sp 2d (q) in [loc.cit.]), but we do not use them in the database, as they have the same parameters as these for orthogonal groups.
• Generalised quadrangle graphs, GQ(s, t) in [8, Table 9.9]. Apart from these appearing as polar space graphs, with s = t = q, s 2 = t = q, and s = q 2 , t = q 3 , we provide other examples, as follows.
• Graphs of non-degenerate hyperplanes of orthogonal polar spaces, with adjacency specified by degenerate intersection; see NO ϵ 2d+1 (q) in [8, Table  9.9]. These are constructions by Wilbrink, cf. [10, Sect.7.C]. The implementation in Sagemath simply takes the appropriate orbit and orbital of the orthogonal group acting on the hyperplanes using parameters of the graph, namely v = q d (q d + ϵ)/2, k = (q d − ϵ)(q d−1 + ϵ).
• Graphs of non-isotropic points of polar spaces, with adjacency specified by orthogonality. These include a number of cases.
-One class of non-isotropic points of orthogonal polar spaces over Table 9.9]. -One class of non-isotropic points of orthogonal polar spaces (specified by a non-degenerate quadratic form F ) over F 5 ; see NO ϵ⊥ 2d+1 (5) in [8, Table 9.9]. This is a construction by Wilbrink, cf.  Table  9.9].
• Graphs of Taylor two-graphs, see [8, Table 9.9] and [10, Sect.7E]. Note that we implement an efficient construction that does not need all the triples of the corresponding two-graphs, by first directly constructing the descendant strongly regular graphs on q 3 vertices, and a partition of its vertices into cliques. The latter provides a set to perform Seidel switching on the disjoint union with K 1 , and obtain the strongly regular graph on q 3 + 1 vertices. See Sagemath documentation for graphs.TaylorTwographSRG for details.
• Orthogonal Array block graphs OA(k, n). Sage is able to build a very substantial state-of-the-art collection of orthogonal arrays (often abbreviated as OA), thanks to a large implementation project undertaken in 2013/2014 by the first author in a very productive collaboration with Julian R. Abel and Vincent Delecroix. For the present work no new constructions of OAs were needed, and the link between Sage's OAs and Strongly Regular Graphs databases filled in three new entries in Andries Brouwer's database.
• Steiner Graphs (intersection graphs of BIBD) -Sage can already build several families of Balanced Incomplete Block Designs (when k ≤ 5, or projective planes, or other recursive constructions and fixed-size instances). More constructions from [14] were added to Sage while working on this project.
• Goethals-Seidel graphs, see [25]. for this class of Hadamard matrices were implemented in Sage and are available in its Hadamard matrices module.
• Switch OA Graphs -these strongly regular graphs are obtained from OA block graphs (see above). From such a graph G obtained from an OA(k, n), the procedure is to (1) add a new isolated vertex v; (2) perform Seidel switching on the union of {v} and several disjoint n-cocliques of G. Note that a n-coclique in G corresponds to a parallel class of the OA(k, n), and that those are easily obtained from an OA(k + 1, n) (i.e. a resolvable OA(k, n)).
• Polhill Graphs -In [50], Polhill produced 5 new strongly regular graphs on 1024 vertices as Cayley graphs. His construction is able to produce larger strongly regular graphs of order ≥ 4096, though the current implementation only covers the n = 1024 range.
• Mathon's pseudo-cyclic strongly regular graphs related to symmetric conference matrices, optionally parameterised by a strongly regular graph with parameters of a Paley graph, and a skew-symmetric Latin square [44,51].

Novel constructions
Here we collect descriptions of constructions of graphs that are in our view suffciently novel and interesting to mention. Namely, Sect. 5.3.1 describes another construction for a known graph, Sect. 5.3.2 describes a working construction for a graph which was claimed to exist in the literature, although we were unable to verify a number of published constructions (see Sect. 7 for details). Finally, Sect. 5.3.3 discusses an unpublished construction by Ionin and Kharaghani.

Cossidente-Penttila hemisystems
The construction of the hemisystem in [16] requires building GQ(q 2 , q), which is slow. Thus we designed, following a suggestion of T. Penttila, a more efficient approach, working directly in PG (5, q). The partition in question is invariant under the subgroup H = Ω 3 (q 2 ) < O − 6 (q). Without loss in generality H leaves the form B(X, Y, Z) = XY + Z 2 invariant. We pick two orbits of H on the F q -points, one of them B-isotropic, with a representative (1 : 0 : 0), viewed as a point of Π := PG(2, q 2 ), and the other corresponding to points of Π that have all the lines on them intersecting the conic of Π specified by B in zero or two points. We take (1 : 1 : ϵ) as a representative, with ϵ ∈ F * q 2 so that ϵ 2 + 1 is not a square in F q 2 .
Indeed, the conic can be viewed The coefficients of a generic line on (1 : 1 : ϵ) are [1 : −1 − ϵb : b], for −1 ̸ = ϵb. Thus, to make sure that its intersection with the conic is always even, we need that the discriminant of 1 + (1 + ϵb)t 2 + tb = 0 never vanishes, and this is if and only if ϵ 2 + 1 is not a square.

Regular symmetric Hadamard matrices of order 324.
We recall the definition of RSHCD + and RSHCD − from Example 2.2. An example M + of RSHCD + order 324 was constructed by Janko, Kharaghani, and Tonchev in [39], and we implemented their construction in Sagemath. See [47,29] for other examples of RSHCD + of order 324.
We use M + to build an example M − of RSHCD − of order 324, as follows. One is tempted to apply [29,Lemma 11] to M + , which says that for an RSHCD ϵ matrix M built from four n × n-blocks M ij , so that is an RSHCD −ϵ , provided that row sums of M 11 and M 22 are 0. However, the latter condition does not hold for M = M + . We are able to "twist" M + so that the resulting matrix is amenable to this Lemma. Namely, it turns our that the matrix is RSHCD + , its diagonal blocks having row sums 0, as needed by (1). Interestingly, the (324, 152, 70, 72)-strongly regular graph corresponding to T (M ′ ) has a vertex-transitive automorphism group of order 2592, twice the order of the (intransitive) automorphism group of the (324, 153, 72, 72)-strongly regular graphcorresponding to M + . As far as we know, this is the only known example of such a vertex-transitive graph. Other graphs with such parameters were constructed in [29].

A (765,192,48,48)-graph
We were unable to implement the construction of a graph with these parameters described, as a part of an infinite family, in Ionin and Kharaghani [34]. The authors of the latter were very kind to send us an updated construction of the graph in question, which we successfully implemented in Sagemath, see [12]. This construction can be found in the documentation of the Sagemath function graphs.IoninKharaghani765Graph. They have also posted an update [35] to [34]; we have not yet tried to implement the updated version in full generality.

Missing values
Among the 1150 realizable, according to Andries Brouwer's database, parameter sets, our implementation can realize 1142. Up to taking graph complements, the list of currently missing entries is as follows. The fisrt entry is discussed in Sect. 7. Implementation of the remaining three entries is currently in progress.

Incorrect RSHCD constructions ?
We were unable to reproduce the following two constructions of Regular Symmetric Hadamard matrices with Constant Diagonal (RSHCDs) and thus the corresponding strongly regular graphs (in the sense of [8,Sect.10.5] If n − 1 and n + 1 are odd prime powers, there exists a RSHCD(n 2 , +).
We implemented the construction provided in [58,Corollary 5.12], but that did not lead us to the expected strongly regular graph. We also note that while Corollary 5.12 does not claim that the provided matrices are regular, that claim appears in the theorem on which it relies. The author of [58,Corollary 5.12] did not answer our message, and we discarded this construction as broken in our work. This construction should have been able to produce a RSHCD(676, +) and a RSHCD(900, +). Fortunately in the end it was not required.
The following construction of RSHCDs needed a lot of effort and a number of discussions with Andries Brouwer to correct crucial misprints in several sources and combine them into a working construction.
If a + 1 is a prime power and there exists a symmetric conference matrix of order a, then there exists a RSHCD(a 2 , +). Whiteman. An essential ingredient in this construction, referred to in [57], is a special pair of difference sets due to G. Szekeres [54,Theorem 16], defined in (4.1) and (4.2) there. However, (4.2) has a typo (it has − instead of + sign), invalidating the construction. Fortunately, a correct definition for may be found [58, Theorem 2.6, p.303]. This construction allowed us to produce RSHCD(676, +) and a RSHCD(900, +).

Entries added to database during this work
By linking Sage's database of Orthogonal Arrays with its database of Strongly Regular Graphs, we were able to fill in the following three values: This can be seen as a by-product of making two mathematical databases, which formerly only existed in printed form, inter-operable. In our implementation, any update of the combinatorial designs databases can be beneficial for the database of strongly regular graphs.
We obtained a (1024, 462, 206, 210)-graph while going through the constructions from [50], although this value did not appear in the online database at that time.