Implementing Brouwer’s database of strongly regular graphs

Andries Brouwer maintains a public database of existence results for strongly regular graphs on n≤1300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n\le 1300$$\end{document} vertices. We have implemented most of the infinite families of graphs listed there in the open-source software Sagemath (The Sage Developers, http://www.sagemath.org), 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 Bondarenko's [2] and an improvement of the latter by Jenrich and Brouwer [38]. While parameters are available from 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 [54] (also known as Sage). It is worth mentioning that a large part of the project makes use of GAP [53] and its packages, in particular Soicher's package GRAPE [50].
Exhaustive enumeration of the non-isomorphic strongly regular graphs has been performed for some tuples T of parameters (see Spence [51]). However, the sheer number of nonisomorphic examples (see e.g. Fon-Der-Flaass [20] or Muzychuk [44]) 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 [47]) from any hyperoval O ⊂ PG(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 group-theoretic 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 time-consuming 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, two-distance 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.
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. Brouwer and Haemers [7] for details).
Example 2.1 Let be the graph with vertices being k-subsets of an m-set, with k ≤ m/2 ; two vertices are adjacent if the corresponding k-subsets intersect in a (k − 1)-subset. Such graphs are called Johnson graphs and denoted by J (m, k) (in Sagemath, J (m, k) can be constructed by calling the function graphs.JohnsonGraph(m,k)). Then J (m, 2) is a strongly regular graph, with parameters m 2 , 2(m − 2), m − 2, 4 . Example 2.2 RSHCD -a (n, )-Regular Symmetric Hadamard matrix M with Constant Diagonal is an n × n symmetric ±1-matrix such that: (1) M M T = n I ; (2) its rows sums are all equal to δ √ n, where ∈ {−1, +1} and δ is the (constant) diagonal value of M, usually denoted RSHCD − and RSHCD + . These matrices yield regular two-graphs. As well, they yield strongly regular graphs: replacing all the entries equal to the diagonal values by 0, and the remaining entries by 1 gives the adjacency matrix of a strongly regular graph.
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 Brouwer and van Lint [9], and from Brouwer et al. [10].
We use standard terminology for finite permutation groups, finite simple groups, and geometries over finite fields from [7,10].

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 fixedsize 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 s 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.  Technical details and descriptions of many specific functions is available as a part [13] of the Sagemath manual, which can be found online [54].

"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.
We identify the corresponding graphs by their parameters, and provide references and some construction details for each of them. (120, 77, 52, 44) Unique by Degraer and Coolsaet [17]. We first build a 2−(21, 7, 12) design, by removing two points from the Witt design on 23 points. We then build the intersection graph of blocks with intersection size 3.  Table 9]. An orbital of degree 39 (among 2 such orbitals) of the group P SL 3 (3) acting on the (right) cosets of a subgroup of order 39. (176, 49, 12, 14) Brouwer [5]. Built from the symmetric Higman-Sims design. 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). Klin et al. [40]. S 7 acts on the 210 digraphs isomorphic to the disjoint union of K 1 and the circulant 6-vertex digraph which one can obtain using Sagemath as digraphs.Circulant(6, [1,4]). This action has 16 orbitals; the package [19] found a merging of them, explicitly described in [40], resulting in this graph.

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 Chen [11], data by Kohnert [41] [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 from finite geometries
Here q denotes a prime power, and ∈ {−, +}.
• Graphs arising from projective geometry designs are discussed in Sect. 5 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 [7, 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 [7, Table 9.9]. These are constructions by Wilbrink, cf. [9, 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 • Graphs of non-isotropic points of polar spaces, with adjacency specified by orthogonality.
These include a number of cases.
• Graphs of Taylor two-graphs, see [7, Table 9.9] and [9, 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. • Cossidente-Penttila hemisystems in PG (5, q), for q odd prime power [16], are certain partitions of points of the minus type quadric in PG(5, q) into two parts V , V of equal size. The subgraph of the collinearity graph of the corresponding GQ(q, q 2 ) induced on V has parameters ((q 3 + 1)(q + 1)/2, (q 2 + 1)(q − 1)/2, (q − 3)/2, (q − 1) 2 /2). The way we construct these graphs in Sage is described in Sect. 5.3.1.
• Orthogonal Array block graphs OA(k, n). Sage is able to build a very substantial stateof-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 [23]. • 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 [48], 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 [42,49]. • Pseudo-Paley and Pasechnik graphs from skew-Hadamard matrices. These are constructions due to Goethals-Seidel [9] and Pasechnik [46], constructing graphs on (4m − 1) 2 vertices from skew-Hadamard matrices of order 4m. Sage builds the corresponding skew-Hadamard matrices from a small database featuring classical constructions of skew-Hadamard matrices from [28] and small examples from (anti)-circulant matrices [22,56].

Novel constructions
Here we collect descriptions of constructions of graphs that are in our view sufficiently 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 {(0 : 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.
Finally, we need to adjust B, by multiplying it by appropriately chosen ν ∈ F * q 2 , so that (1 : 1 : ) becomes isotropic under the relative trace norm (X : Y : Z ) → ν B(X, Y, Z ) + (ν B(X, Y, Z )) q , used to define adjacency in .

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 et al. in [37], and we implemented their construction in Sagemath. See [27,45] 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 [27,Lemma 11] to M + , which says that for an RSHCD matrix M built from four n × n-blocks M i j , 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 [27].

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 [32]. 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 [33] to [32]; 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 [7,Sect. 10.5]).
• In [7, Sect. 10.5.1, (i)], the construction of RSHCD(196, −) is attributed to [34], in which the existence of a (4k 2 , 2k 2 + k, k 2 + k)-strongly regular graph, equivalent to a RSHCD(196, −) for k = 7, is claimed in Theorem 8.  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.
I f a + 1 is a prime power and there exists a symmetric conference matrix of order a, then there exists a RSHCD(a 2 , +).
Following [loc.cit.] did not lead us to the expected result; as it turns out, [loc.cit.] has a typo, and the correct formulae should be taken from the original source [57,Corollary 17] by Wallis and Whiteman. An essential ingredient in this construction, referred to in [57], is a special pair of difference sets due to Szekeres [52,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: • (196, 78, 32, 30)-can be obtained from an OA (6,14) [55] • (324, 102, 36, 30)-can be obtained from an OA (6,18) [1] • (324, 119, 46, 42)-can be obtained from an OA (7,18) [1] 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 [48], although this value did not appear in the online database at that time.