Constructions of maximum few-distance sets in Euclidean spaces

A finite set of distinct vectors $\mathcal{X}$ in the $d$-dimensional Euclidean space $\mathbb{R}^d$ is called an $s$-distance set if the set of mutual distances between distinct elements of $\mathcal{X}$ has cardinality $s$. In this paper we present a combined approach of isomorph-free exhaustive generation of graphs and Gr\"obner basis computation to classify the largest $3$-distance sets in $\mathbb{R}^4$, the largest $4$-distance sets in $\mathbb{R}^3$, and the largest $6$-distance sets in $\mathbb{R}^2$. We also construct new examples of large $s$-distance sets for $d\leq 8$ and $s\leq 6$, and independently verify several earlier results from the literature.


Introduction
Let d 1 be an integer, and let R d denote the d-dimensional Euclidean space equipped with the standard inner product ., . and norm induced metric µ(., .). A set of n (distinct) vectors X := {v i : i ∈ {1, . . . , n}} ⊂ R d forms an s-distance set, if the set of mutual distances A(X ) := {µ(v i , v j ) : i < j; i, j ∈ {1, . . . , n}} has cardinality exactly s. If the parameter s is not specified, then, following the terminology of [5], we refer to these objects as few-distance sets. A few-distance set X is called spherical, if v i , v i = 1 for every i ∈ {1, . . . , n}. The problem of determining the maximum cardinality of X for given d and s is a long-standing open problem [6], [13], [26]. Currently there is a renewed interest in few-distance sets due to recent breakthrough results obtained via the polynomial method [3], [30], and because of emerging engineering applications related to frame theory [9], [27], [42].
The case s = 2 is the most studied, where equiangular lines appear as a special case [18], [41]. In particular, the maximum cardinality of 2-distance sets in R d have already been determined for d 8, see [10], [24], [28]. For s 6 the maximum cardinality of planar s-distance sets are also known [14], [43]. However, in the case d 3 and s 3 the only known result is that the set of 12 vertices of the regular icosahedron is the unique maximum 3-distance set in R 3 , see [39].
We mention two fundamental properties of maximum few-distance sets: first, the asymptotic growth of their size is well understood. In particular, if X is a maximum s-distance set in R d , then we have |X | d + s s ; and, for d 2s − 1, |X | d + 1 s .
The upper bound is from [2], [5], and the folklore constructive lower bound is mentioned in, e.g. [7], [31]. Somewhat improved upper bounds apply to the spherical case [31]. Secondly, there is a rather strong number theoretic condition constraining the elements of A(X ), which holds for sufficiently large d in terms of s, see [25], [34]. One reason why studying small dimensional maximum few-distance sets is challenging is the lack of sufficient understanding of A(X ).
In this paper we construct new s-distance sets in R d for small parameter values, and prove their optimality in certain cases. This complements recent efforts [3], [31] aimed to strengthening the upper bounds on |X |. The discovery of a 16-element 3-distance set in R 4 and the proof of its uniqueness and optimality is one of the main contributions of this paper (Theorem 14). In addition, we settle [14,Conjecture 2] by fully classifying all planar 6-distance sets (Theorem 16), extending previous partial results on this problem [43]. We also investigate spherical few-distance sets and discover some connections to near-resolvable designs, generalized conference matrices, and association schemes (see Remarks 3.2,3.3,and 3.4). This correspondence opens up various new avenues to be explored in search for large few-distance sets in the future.
The proofs are computational, and they involve both classical graph generation techniques [29], [36], and elements of computational commutative algebra [4], in particular: Gröbner basis calculations. The graph generation is required to gather combinatorial information on the structure of the putative few-distance set X , while studying its algebraic properties is necessary to gain information on A(X ) and control the size of the ambient dimension d. This approach builds upon, and considerably extends the earlier work [28], where maximum 2-distance sets were studied by means of computers. We remark that the use of computational commutative algebra recently led to the resolution of several challenging problems in combinatorial geometry, such as finding a unit-distance planar embedding of the Heawood graph [16], determining optimal packings in real projective spaces [15], and showing the existence [17] or nonexistence of certain complex equiangular tight frames [40].
The outline of this paper is as follows: in Section 2 we describe constructions of fewdistance sets, and establish lower bounds on the size of maximum few-distance sets for small parameter values, see Table 1. In Section 3 we set up a computational framework the electronic journal of combinatorics 27(1) (2020), #P1.23 for generating and classifying spherical few-distance sets in R d . Then, in Section 4 we slightly modify this approach in order to deal with general (i.e., not necessarily spherical) few-distance sets.
In Table 1 we tabulate the exact values of (indicated by an asterisk), and best known lower bounds on the cardinality of n-element s-distance sets in R d for d 8 and s 6, which reflects the new results obtained in this paper. We will comment on the entries in the next section. 2 Constructions of few-distance sets In this section we describe a computer-aided construction of s-distance sets X ⊂ R d . The construction is based on the following ansatz: it is assumed that the set of distances A(X ) is a subset of those within an s-dimensional unit cube, and in addition the vertices of a (d − 1)-dimensional unit simplex are part of the configuration. The construction, which is summarized in the next theorem, results in maximum s-distance sets in several small dimensional cases. For a graph Γ we denote by ω(Γ) the size of its maximum clique, that is, pairwise adjacent vertices.
. . , d}}, and for w ∈ W let V w be the set of solution vectors v := (v 1 , . . . , v d ) T ∈ R d to the following system of d equations in d variables: Let Γ be a graph on w∈W |V w | vertices, where two nodes, representing the vectors x, y ∈ ∪ w∈W V w , are adjacent if and only if µ(x, y) ∈ A. Then for some Proof. Let B i ∈ R d denote the canonical basis vector whose ith coordinate equals 1, and its other coordinates are 0. Note that for distinct i, j ∈ {1, . . . , d}, we have µ(B i , B j ) = √ 2, which is the smallest element of A. For a fixed w ∈ W the system of equations (2) is easily seen to be equivalent to the system of equations µ(v, B i ) = w i , i ∈ {1, . . . , d}. Since the electronic journal of combinatorics 27(1) (2020), #P1.23 these equations are quadratic in v 1 , which uniquely determines v i for i ∈ {2, . . . , d}, the graph Γ is finite, and a clique in it represents a subset of solution vectors whose mutual distances belong to A. Since {B 1 , . . . , B d } is disjoint from ∪ w∈W V w , the result follows.
We use Theorem 1 to establish lower bounds on the maximum cardinality of s-distance sets in R d for small parameter values. Solving the quadratic equations (2) is straightforward as well as setting up the (not necessarily connected) compatibility graph Γ on at most 2s d vertices. The clique search was carried out with the Cliquer software [33] which is based on the algorithm described in [35]. In the following Table 2 we display our results in the form |Γ|/ω(Γ). Entries marked by an asterisk indicate a lower bound on ω(Γ). Note that the row and column headings shown indicate the input parameters used, both of which are upper bounds on the parameters of the resulting few-distance sets. In particular, entries shown in row s correspond to t-distances sets with some t s. For further bounds on planar few-distance sets, see [14]. For a positive integer i we denote by S i the symmetric group on i elements. For a vector v = (v 1 , . . . , v d ) T ∈ R d , and σ ∈ S d we use the shorthand notation σ(v) := (v σ(1) , . . . , v σ(d) ) T . We point out the following notable examples.

Example 2.
Here we show how a set of 120 nonantipodal vectors of a root system of type E 8 (see [12] for more details) can be extended with two additional vectors to form a 122-element 3-distance set X in R 8 . Explicitly, we have X := Y ∪ Z ∪ W, where Since the elements of Y ∪ Z are on a sphere of radius √ 2, forming a 3-distance set with the noted distances, the center of this sphere (the origin) can be further added to this set. Finally, the vector w := (2, 0, 0, 0, 0, 0, 0) T is at distance 2 from the origin, µ(z, w) = 2 for every z ∈ Z, and µ(y, w) = √ 2 or µ(y, w) = √ 6 depending on the first coordinate of y ∈ Y. We have an analogous example in R 7 , based on the E 7 root system, which we have discovered by an incomplete clique search (see Table 2).
Geometrically, X is formed by the vertices of the 24-cell, its dual, and their common centerpoint.
Remark 2.1. For s = 2, d = 9 the graph Γ, coming from Theorem 1 is on 442 vertices with ω(Γ) = 36. Therefore it is not possible to immediately improve with this construction on the cardinality of known 2-distance sets in R 9 . We also note here that starting from d 13 the chosen set of distances { √ 2, 2} might no longer be optimal for 2-distance sets, and instead A := { √ 2, √ 3} should be preferred [25].
There are a number of ways to generalize Theorem 1: not only the set of distances, and the shape of the constituent vectors are subject to our choice, but also the relative size of the constituent vectors. In particular, assuming that the (d − 1)-simplex is formed by those vectors whose mutual distance is the largest element of A(X ) could, and it indeed does, result in different compatibility graphs having different maximum clique sizes than of those reported in Table 2. We have not yet explored any of these research directions.
Next we comment on Table 1 by comparing it with Table 2. As a result of our choice for A(X ) the implied lower bounds on the sizes of few-distance sets coming from Theorem 1 (see Table 2) are arguably weak for d ∈ {2, 3} as we are indeed missing most of the regular convex polygons as well as the icosahedron and the dodecahedron. These cases were treated in [13], [14], [43]. On the other hand, for d 8 we were able to rediscover the maximum 2-distance sets reported in [28]. The case d = 3, s = 3 is the regular icosahedron, whose optimality was shown in [39], and we will see later in Section 4 that the 3-distance sets in R 4 and the 4-distance sets in R 3 constructed by Theorem 1 are also examples of maximum few-distance sets. For d = 4 the set shown in Example 3 is better than what we have found by our clique search. For d = 5 the reported lower bounds seem to be new. The set of 240 shortest vectors of a root system of type E 8 (see [12]) gives an example of a spherical 4-distance set in R 8 , and its various subconfigurations give rise to lower bounds for d ∈ {6, 7, 8} and s ∈ {3, 4}. In some of these cases our construction, which not necessarily results in spherical sets, is somewhat better. Finally, for s ∈ {5, 6} and d large enough the bounds, which are rather weak, follow from configurations formed by the vertices of variously truncated d-simplices. We mention two of these constructions below.
Since these two constructions result in spherical few-distance sets, it is plausible that they can be significantly improved. Indeed, equation (1) shows that for d 15 the resulting sets are far from being optimal. This concludes the discussion of the numbers shown in Table 2 and the implied bounds shown in Table 1. In the next sections we set up a framework to show the optimality of some of the few-distance sets discovered.

Spherical few-distance sets and their Gram matrices
In this section we discuss spherical few-distance sets, that is, it is further assumed that the elements of X ⊂ R d are of unit length. Given an array of mutual distances, deciding whether there is a corresponding spherical configuration is essentially a test of positive semidefiniteness of certain matrices. The following result is well known, see e.g. [32] for an equivalent characterization. We include this result along with its proof for completeness, and for future reference.
Proof. Assume that we have a set of n distinct unit vectors v 1 , . . . , v n with pairwise distances µ(v i , v j ), with i, j ∈ {1, . . . , n}. By simple algebra we obtain 1 − µ(v i , v j ) 2 /2 = v i , v j and therefore G is a Gram matrix. It is well known that every Gram matrix is positive semidefinite, and its rank is the maximum number of linearly independent vectors amongst v i , i ∈ {1, . . . , n}. Therefore rank G d, as claimed. Since the vectors are distinct, we have µ(v i , v j ) > 0 and consequently G ij < 1 for every i < j with i, j ∈ {1, . . . , n} as claimed.
Conversely, let G be an n × n positive semidefinite matrix with G ii = 1 and G ij < 1 for every i < j with i, j ∈ {1, . . . , n} with rank G d. Then one may define a set of n 2 positive real numbers µ ij := 2 − 2G ij for i < j with i, j ∈ {1, . . . , n}, and reconstruct n unit vectors with exactly these distances by the Cholesky decomposition with complete pivoting. The procedure results in a rank G × n matrix V such that V T V = G. Since µ ij > 0, the column vectors of V are distinct, and they form the unit vectors v i , i ∈ {1, . . . , n} having the prescribed distances µ(v i , v j ) = µ ij for every i < j with i, j ∈ {1, . . . , n}. This reconstruction is unique up to isometry [22]. The significance of Lemma 6 is that it shows that one may study certain positive semidefinite matrices instead of spherical few-distance sets. This leads to a more convenient computational framework, as the Gram matrices are basis independent. Therefore from now on we will focus on the computer-aided generation of Gram matrices, which we carry out via a two-step process. First, for fixed s and n, we generate all n × n symmetric matrices with constant diagonal 1 satisfying a combinatorial constraint, namely that their off-diagonal entries assume s distinct values only, say x 1 , x 2 , . . . , x s . We call these objects candidate Gram matrices, and denote them by G(x 1 , . . . , x s ). Secondly, for a given candidate Gram matrix and dimension d, we determine whether there exists a complex s-tuple (α 1 , . . . , α s ) ∈ C s with distinct coordinates, each different from 1, for which we have rank G(α 1 , . . . , α s ) d. If there is no such an s-tuple, then the combinatorial pattern described by G(x 1 , . . . , x s ) cannot lead to any spherical few-distance set in R d . Otherwise, we proceed by either augmenting G(x 1 , . . . , x s ) with a further row and column, or, when this is no longer possible, determine all real s-tuples (α 1 , . . . , α s ) ∈ R s with distinct coordinates for which −1 α i < 1 holds for every i ∈ {1, . . . , s} and G(α 1 , . . . , α s ) is positive semidefinite. We discuss these two tasks in detail in the following subsections.

Generating candidate Gram matrices
We generate the candidate Gram matrices G of order n with at most s distinct offdiagonal entries with orderly generation [23, Section 4.2.2], [36]. Since this is a routine task we only outline the basic ideas. Two candidate Gram matrices G 1 (x 1 , . . . , x s ) and . , x σ(s) )P T for some permutation matrix P and for some permutation σ ∈ S s . Clearly, it is enough to generate these matrices up to equivalence. The generation starts from the 1 × 1 matrix 1 , and then a new row and column with the elements x 1 , . . . , x s is inductively appended to it in all possible ways, maintaining symmetry and entries 1 on the main diagonal. However, only those i×i matrices G are kept (i ∈ {2, . . . , n}) whose vectorization vec G := [G 2,1 , G 3,1 , G 3,2 , . . . , G i,1 , G i,2 , . . . , G i,i−1 ] is the lexicographically smallest vector in the set {vec P G(x σ(1) , . . . , x σ(s) )P T : σ ∈ S s , P is an i × i permutation matrix}. An alternative approach completing this task is to employ canonical augmentation [29]. We tabulate the number of generated matrices in Table 3. problem: the candidate Gram matrices correspond to distinct colorings of the edges of the complete graph on n vertices with at most s colors, up to permutation of the colors.
There are techniques, such as the Power Group Enumeration Theorem, which can be used to enumerate these objects without actually being generated. These can be used to independently verify the entries of Table 3, see [21,Chapter 6].
Since the number of candidate Gram matrices up to equivalence grows very rapidly, it is important to discard those which cannot correspond to a desired n-element s-distance set in R d during early stages of the search. In the next subsection we discuss a strategy for doing this.
Therefore one should understand first what are the small candidate Gram matrices with appropriate rank, and then build up the larger ones from those. In the next result we state how to control the rank of candidate Gram matrices.
has a complex solution.
Proof. The rank condition on G is equivalent to the condition on vanishing minors. Moreover, the last equation featuring the auxiliary variable u ensures that the values α i , i ∈ {1, . . . , s}, are necessarily distinct, and they all different from 1.
the electronic journal of combinatorics 27(1) (2020), #P1.23 Proposition 8 is just a necessary condition ensuring that the candidate Gram matrix G(x 1 , . . . , x s ) is of correct rank for certain parameter values. Indeed, a solution to (3) is not necessarily real, and the positive semidefiniteness of G is not guaranteed. Nevertheless, it is a powerful condition eliminating a significant proportion of candidate Gram matrices which cannot correspond to a spherical s-distance set for a given d. We study the system of equations (3) in the following way: we use various computer algebra systems (such as e.g. [1]) to compute an exact degree reverse lexicographic reduced Gröbner basis (with respect to the variable ordering x 1 > · · · > x s > u). If this happens to be {1}, then there are no complex solutions to (3), and the matrix G(x 1 , . . . , x s ) can be discarded, as it cannot have appropriate rank. On the other hand, when the Gröbner basis is anything else than {1}, then regardless of what information it conveys, we keep the matrix. For background on computational commutative algebra, we refer the reader to [4, Chapter 5].

The search
For a fixed d and s the search for an s-distance set X proceeds in essentially the same way as described in [28,Section 7]. First we generate the (d + 1) × (d + 1) candidate Gram matrices with at most s distinct off-diagonal entries, as described in Section 3.1. Then we filter these matrices with the aid of Proposition 8: those for which the system of equations (3) has no solutions are discarded, the others are retained in a set L d+1 . Now given a set L i (for some i d + 1), we inductively build up larger matrices via the orderly generating algorithm, and we test whether (a) each of their i × i principal submatrices belong to the set L i up to equivalence (see Lemma 7); and (b) whether they themselves satisfy the system of equations (3) of Proposition 8. The matrices surviving both tests then form the set L i+1 . We continue doing this as long as bigger matrices are keep being discovered, but only up to the upper bound given by equation (1). Once the search concludes, we inspect the largest candidate Gram matrices found and investigate for what parameter values they are positive semidefinite.
We have implemented this search in the programming language C++, and used a computer cluster having 500 CPU cores for several weeks to obtain the results described in Sections 3.4 and 4.1. The bottleneck in our implementation was memory consumption. Indeed, in order to obtain the set L i+1 , the preceding set L i had to be stored in memory.
Remark 3.1. A given candidate Gram matrix could actually correspond to multiple nonisometric configurations (which is indeed the case for the two pentagonal pyramids in R 3 , see [13]). However, once the distances are specified, there is an essentially unique way to reconstruct X , as guaranteed by the Cholesky decomposition. See also [32].

Results
The search described in Section 3.3 yielded the following new classification results. Since the proof of Theorem 9 is a result of computer calculations, we could only offer here what is merely a discussion of our findings. First we note that the vertices of the cuboctahedron can be obtained as {σ((−1, 0, 0, 1) T ) : σ ∈ S 4 }, whereas the vertices of the truncated tetrahedron can be obtained as {σ((−3, −3, 1, 5) T ) : σ ∈ S 4 }. It is easy to see that both of these are 12-element 4-distance sets, embedded in R 3 .
The search resulted in the following largest candidate Gram matrices, denoted by S 12A (u, v, w), S 12B (u, v, w, x), and S 12C (u, v, w, x), respectively: It is interesting to note that the 4-distance sets given in Theorem 9 have no more vertices than the icosahedron, which is the largest 3-distance set in R 3 and represented by the permutation equivalent matrices S 12A (±1/ √ 5, ∓1/ √ 5, −1). This is a "shadow" solution featuring fewer than 4 distinct off-diagonal entries, and therefore it is discarded. 1 The matrix S 12B (u, v, w, x) corresponds to the truncated tetrahedron. By solving the rankequations coming from Proposition 8 we find that u = 7/11, v = −1/11, w = −5/11, and x = −9/11 is the only solution for which S 12B (u, v, w, x) is positive semidefinite of rank 3. Finally, for the third case we have u = ±1/2, v = 0, w = −u, x = −1. The two algebraic solutions S 12C (1/2, 0, −1/2, −1) and S 12C (−1/2, 0, 1/2, −1) are permutation equivalent, thus represent isometric configurations. These matrices correspond to the vertices of the cuboctahedron. In Table 4 we display the number of intermediate configurations found: in column i ∈ {4, . . . , 13} the entry in the first row shows the number of i × i candidate Gram matrices (CGM) found during the augmentation step, while the entry in the second row shows the number of matrices surviving the rank condition (3). Since for i = 8 this second round of filtering was not effective, we stopped performing it on larger matrices. We remark that the intermediate configurations not necessarily correspond to positive semidefinite matrices and hence they might not have any geometrical meaning in the Euclidean space. This concludes the discussion of Theorem 9.  (3) 22 434 1283 383 179 In [31,Theorem 3.8] it was proved, amongst other results, that the maximum cardinality of spherical 3-distance sets in R 4 is at most 27. It turns out that the exact answer, presented below, is considerably smaller. In what follows we discuss the configurations arising in Theorem 10. The largest candidate Gram matrices found by the search are: where S 12A (u, v, w) is the first matrix shown in (4). Once again, we solve the system of equations (3) coming from Proposition 8 to ascertain that the rank of these matrices is 4. In the first case we have u = (5 ± 3 √ 5)/20, v = 1/2 − u, w = −1/2. These two algebraic solutions are permutation equivalent. In the second case we have u = (1± √ 5)/4, v = 1/2, w = u − 1/2. These latter two are nonisometric realizations, which can be seen by observing that the distances u, v, w, appear a different number of times, and v plays the role of the shortest distance in one of these two realizations, but not in the other. In the third case we have 64u 3 + 16u 2 − 16u + 1 = 0, and v = (16u 2 + 4u − 3)/4, w = (−8u 2 − 4u + 1)/2. Let α > β > γ denote the three real roots of the polynomial 64u 3 + 16u 2 − 16u + 1. Then S 13C (α, β, γ), S 13C (β, γ, α), and S 13C (γ, α, β) are the three permutation equivalent solutions. Each of these four matrices are positive semidefinite, as required. Refer to Table 5 for the number of intermediate objects found. This concludes the discussion of Theorem 10.   Remark 3.4. The candidate Gram matrix S 13C (u, v, w) was discovered earlier in the context of 3-class association schemes. See [20] and the accompanying website 2 .

General few-distance sets
Now we turn to the discussion of the general case, where the elements of X are not necessarily unit vectors. The following classical result is presented in various equivalent forms within the cited references. Here we recall it in a form which is the most useful for our purposes. The proof is once again included for the reader's convenience.  [30], [32], [37]). Let d 1, n 2 be integers. There exists n distinct vectors v 1 , .
Proof. Assume that we have a set of n distinct vectors v 1 , . . . , v n with pairwise distances µ(v i , v j ) > 0 for every i < j and i, j ∈ {1, . . . , n}. By the polarization identity, we have Once again, C is positive semidefinite, and rank C is the maximum number of linearly independent vectors amongst v i −v n , i ∈ {1, . . . , n−1}. Therefore rank C d, as claimed. Finally, the conditions C ii > 0 and C ij < (C ii + C jj )/2 follow as the vectors are distinct, and therefore µ(v i , v j ) > 0 for every i < j with i, j ∈ {1, . . . , n}.
Remark 4.1. In R d an n-element spherical s-distance set with its center point (see Section 3) forms an (n + 1)-element general t-distance set for some t ∈ {s, s + 1}.
Recall that in Section 3 we have classified what we called the candidate Gram matrices having constant diagonal 1 and at most s distinct off-diagonal elements representing the combinatorial properties of a spherical s-distance set. These objects will be used once again during the treatment of the general case. The analogue statement to Lemma 7 also applies here, and the analogue of Proposition 8 is the following Proposition 12. One key difference compared with the spherical case is that here one of the distances can be normalized to 1 up to a global isometry.
Proposition 12. Let d, s 1, n d + 2 be integers, let x 1 , . . . , x s be indeterminates, and let G(x 1 , . . . , x s ) be an n × n candidate Gram matrix. Let M denote the set of all (d + 1) × (d + 1) submatrices of the matrix C : has a complex solution.
Proof. This is once again just a reformulation of the rank condition in terms of vanishing minors. Moreover, it is assumed that x 1 = 1 up to a global isometry. The auxiliary variable u ensures that the other variables take up distinct values, each different from 0 and 1. The search in the general case is analogous to what is described in Section 3.3, with the only difference that it starts with the (d + 2) × (d + 2) candidate Gram matrices, and then it uses Proposition 12 for pruning.

Results
Now we turn to the discussion of the following new classification results.
Theorem 13. The largest cardinality of a 4-distance set in R 3 is 13. There are exactly two configurations realizing this up to isometry: the vertices of the icosahedron with its center point, and the vertices of the cuboctahedron with its center point.
The search revealed two configurations, which can be described with the following candidate Gram matrices: where the submatrices S 12A (u, v, w) and S 12C (u, v, w, x) were discussed in Section 3.4, see (4). Recall that the rank condition applies to certain 12×12 transformed matrices as stated in Theorem 11. We assume that x := 1 due to a global isometry. In the first case the rank the electronic journal of combinatorics 27(1) (2020), #P1.23 condition implies that u = 2(5 ± √ 5)/5, v = 4 − u, w = 4. These two algebraic solutions are permutation equivalent. In the second case we find that u = (2 ± 1)/4, v = 1/2, w = 1 − u. These two solutions are also permutation equivalent. Thus, altogether two nonisometric solutions are found. It is not too hard to see that these correspond to the claimed sets in Theorem 13. Refer to Table 6 for the number of intermediate objects found. We regard the following as the main result of this manuscript.
Theorem 14. The largest cardinality of a 3-distance set in R 4 is 16. There is a unique configuration X realizing this up to isometry, which may be taken as the following subset of the 4-dimensional integer lattice: The following is the largest candidate Gram matrix found by the search: 1 u u v u v v w u u u u u u u u u 1 v u v u w v u u u w u u u w u v 1 u v w u v u u w u u u w u v u u 1 w v v u u u w w u u w w u v v w 1 u u v u w u u u w u u v u w v u 1 v u u w u w u w u w v w u v u v 1 u u w w u u w w u w v v u v u u 1 u w w w u w w w u u u u u u u u 1 v v v u u u u u u u u w w w w v 1 v v u u w w u u w w u u w w v v 1 v u w u w u w u w u w u w v v v 1 u w w u u u u u u u u u u u u u 1 v v v u u u u w w w w u u w w v 1 v v u u w w u u w w u w u w v v 1 v u w u w u w u w u w w u Recall that the rank condition applies to the 15 × 15 transformed matrix C(u, v, w) as stated in Proposition 12. One readily verifies that the only possibility to ensure rank C(u, v, w) = 4 with u := 1 normalization is the choice v = 2 and w = 3. In this case the nonzero eigenvalues of the matrix C(1, 2, 3) are 8, and the three roots of λ 3 − 52λ 2 + 500λ − 1312. Since the coefficients of this polynomial alternate in sign, clearly its roots are positive (recall that C(1, 2, 3) is symmetric), and therefore C(1, 2, 3) is positive semidefinite. From the matrix C(1, 2, 3) one may recover the coordinates of the vectors in R 4 with the aid of Theorem 11 (up to a change of basis). Since this configuration is unique, it is isometric to the 4-dimensional 3-distance set X given in Theorem 14.   1.2]). The largest cardinality of a 3-distance set in R 3 is 12. There is a unique configuration realizing this up to isometry: the vertices of the icosahedron.
This result is an (almost) immediate corollary of Theorem 13. Indeed, Table 6 shows that there are 5 candidate Gram matrices of size 12 with at most 4 distinct off-diagonal entries, and inspection reveals that only one of them has 3 distinct off-diagonal entries.
Nevertheless, we did an independent search so that to document the number of intermediate configurations found (see Table 8). As expected, the largest candidate Gram matrix found by the search is S 12A (u, v, w), see (4). We find that the system of equations (5) has the following normalized solutions: u = (5 ± √ 5)/10, v = (5 ∓ √ 5)/10, w = 1. These two solutions are permutation equivalent. The following result settles [14,Conjecture 2]. See also [43,Theorem 19] for previous partial results.
Theorem 16. The largest cardinality of a 6-distance set in R 2 is 13. There are exactly three configurations realizing this up to isometry: the regular convex 13-gon, the regular convex 12-gon with its center point, and a regular hexagram with its center point (as shown on [14, p. 116]).
The search found the following three candidate Gram matrices G 13C (u, v, w, x, y, z), G 13D (u, v, w, x, y, z), and G 13E (u, v, w, x, y, z): 1 u u u u u u u u u u u u u 1 u u v v w x x y y z z u u 1 v u w v x y x z y z u u v 1 w u v y x z x z y u v u w 1 v u y z x z x y u v w u v 1 u z y z x y x u w v v u u 1 z z y y x x u x x y y z z 1 u u v v w u x y x z y z u 1 v u w v u y x z x z y u v 1 w u v u y z x z x y v u w 1 v u u z y z x y x v w u v 1 u u z z y y x x w v v u u 1 1 u u v v w w x x y y z z u 1 v u w v x w y x z y z u v 1 w u x v y w z x z y v u w 1 x u y v z w z x y v w u x 1 y u z v z w y x w v x u y 1 z u z v y w x w x v y u z 1 z u y v x w x w y v z u z 1 y u x v w x y w z v z u y 1 x u w v y x z w z v y u x 1 w u v y z x z w y v x u w 1 v u z y z x y w x v w u v 1 u z z y y x x w w v v u u 1 w u u w w x x u u 1 v u w v u w u x w x u u v 1 w u v w u x u x w u v u w 1 v u w x u x u w u v w u v 1 u x w x u w u u w v v u u 1 x x w w u u v u u w w x x 1 v v y y z v u w u x w x v 1 y v z y v w u x u x w v y 1 z v y v w x u x u w y v z 1 y v v x w x u w u y z v y 1 v v x x w w u u z y y v v 1 the electronic journal of combinatorics 27(1) (2020), #P1.23 15 We use the normalization u := 1 up to a global isometry. In the first case we find that v = 3, w = 4, x = 2 ± √ 3, y = 2, z = 4 − x are the only solutions corresponding to a planar configuration. The two solutions are permutation equivalent, thus represent isometric configurations: the regular convex 12-gon with its center point. In the second case, after discarding the meaningless complex solutions satisfying v 2 − v + 1 = 0, we get v 6 − 11v 5 + 45v 4 − 84v 3 + 70v 2 − 21v + 1 = 0, which is the minimal polynomial of sin 2 (π/13)/ sin 2 (6π/13). Any choice for v then uniquely determines the remaining parameter values as follows: w = v 2 −2v +1, x = v 3 −4v 2 +4v, y = v 4 −6v 3 +11v 2 −6v +1, z = v 5 − 8v 4 + 22v 3 − 24v 2 + 9v. All these solutions correspond to the regular convex 13-gon. In the third case we get v = 3, w = 4, x = 7, y = 9, z = 12, which corresponds to the hexagram. Refer to Table 9 for the number of intermediate objects found. We note that due to the (relatively) large number of distinct distances the classification of this case required considerable amount of computational efforts. This concludes the discussion of Theorem 16.  (5) 24 922 20229 4667 1565 We believe that our approach described in this paper has further potential. In particular, one may analyze in a similar fashion the non-maximum candidate Gram matrices, and proceed with the classification of few-distance sets of a given cardinality. Furthermore, it seems that the classification of maximum 3-distance sets in R 5 , and maximum planar 7-distance sets will be doable in the near-term future.