This website contains a program and supplementary data that were used in the proofs of some of the results in
For a positive integer $d$, a set of points in the $d$-dimensional Euclidean space is called \emph{almost-equidistant} if for any three points from the set, some two are at unit distance. Let $f(d)$ denote the largest size of an almost-equidistant set in the $d$-space.
It is known that $f(2)=7$, $f(3)=10$, and that the extremal almost-equidistant sets are unique. We give independent, computer-assisted proofs of these statements. It is also known that $f(5) \ge 16$. We further show that $12\leq f(4)\leq 13$, $f(6)\geq 18$, $f(7)\geq 20$, and $f(9)\geq f(8)\geq 24$. Up to dimension $4$, our work is based on a computer search, and in dimensions $6$ to $9$, we give constructions based on the construction for $d=5$.
For every dimension $d \ge 3$, we give an example of an almost-equidistant set of $2d+4$ points in the $d$-space and we prove the asymptotic upper bound $f(d) \le O(d^{3/2})$.
The following text files contain all $n$-vertex abstract almost-equidistant graphs in $\mathbb{R}^d$ for $d = 2, 3, 4$. The graphs are encoded with the graph6 representation (graph6-encoded).
The program generates all $n$-vertex abstract almost-equidistant graphs in~$\mathbb{R}^d$ for $d \in \{2,3,4\}$ and for $d=5$ and some sufficiently small values of $n$ (see the paper for definitions).
The source code of the program is available
here and
can be executed using SageMath.
The program asks for three parameters.
The first parameter defines the dimension, which is either 2, 3, 4, 5, or 6.
The second parameter should be set to 1 if all graphs should be enumerated or 0 if the graphs should only be counted.
The third parameter should be set to 1 if the graphs should be printed with graph6-encoding or 0 if the edge list should be printed.
The following command gives an illustration how to use the program:
$ sage program.sage 3 1 1 A three-dimensional abstract almost-equidistant graph is a graph with independence number at most 2, and without K_5 or K_{3,3}. Here follows a list of all such graphs. 1 abstract almost-equidistant graphs on 1 vertices: graphs written to file: graphs3_1.g6 2 abstract almost-equidistant graphs on 2 vertices: graphs written to file: graphs3_2.g6 3 abstract almost-equidistant graphs on 3 vertices: graphs written to file: graphs3_3.g6 7 abstract almost-equidistant graphs on 4 vertices: graphs written to file: graphs3_4.g6 13 abstract almost-equidistant graphs on 5 vertices: graphs written to file: graphs3_5.g6 29 abstract almost-equidistant graphs on 6 vertices: graphs written to file: graphs3_6.g6 50 abstract almost-equidistant graphs on 7 vertices: graphs written to file: graphs3_7.g6 69 abstract almost-equidistant graphs on 8 vertices: graphs written to file: graphs3_8.g6 35 abstract almost-equidistant graphs on 9 vertices: graphs written to file: graphs3_9.g6 7 abstract almost-equidistant graphs on 10 vertices: graphs written to file: graphs3_10.g6 1 abstract almost-equidistant graphs on 11 vertices: graphs written to file: graphs3_11.g6 0 abstract almost-equidistant graphs on 12 vertices: graphs written to file: graphs3_12.g6To enumerate all abstract almost-equidistant graphs for a given dimension $d$, we start with a single vertex and repeatedly add a new vertex and go through all possibilities of joining the new vertex to the old vertices. For each possibility of adding edges, we check if the resulting graph contains one of the two forbidden subgraphs and that its complement does not contain a triangle. We use two tricks to speed this up. First, when adding a vertex, we can assume that the newly inserted vertex has minimum degree in the extended graph. Secondly, we only have to go through all possibilities of adding at least $n-d-1$ new edges, where $n$ is the number of vertices before extending the graph. This is because the degree of the newly added vertex has to be at least $n-d-1$, since the complement of an abstract almost-equilateral graph $G$ is triangle-free, hence the non-neighbours of each vertex induce a clique in $G$, which has at most $d+1$ vertices.
$ $ sage filter_minimal_graphs.sage graphs3_10.g6 4 of 7 graphs are minimal.
$ ./triangleramsey-1.0/triangleramsey 20 | ./testvalid_d5 output20.mcHere triangleramsey produces all minimal triangle-free graphs and our testvalid_d5 program filters graphs, whose complement is an almost-equidistant graphs for dimension $d=5$.
$ ./triangleramsey-1.0/triangleramsey 19 ramsey K8.mc write_all_ramseygraphsSimilarly, the MTF program can be used to enumerate minimal triangle-free graphs. The following command gives an illustrataion how to enumerate all Ramsey(3,8)-graphs on 19 vertices using MTF.
$ ./mtf n 19 ramsey_kn 8However, as mentioned on the MTF website, triangleramsey is recommended over MTF.