Small codes

Determining the maximum number of unit vectors in $\mathbb{R}^r$ with no pairwise inner product exceeding $\alpha$ is a fundamental problem in geometry and coding theory. In 1955, Rankin resolved this problem for all $\alpha \leq 0$ and in this paper, we show that the maximum is $(2+o(1))r$ for all $0 \leq \alpha \ll r^{-2/3}$, answering a question of Bukh and Cox. Moreover, the exponent $-2/3$ is best possible. As a consequence, we conclude that when $j \ll r^{1/3}$, a $q$-ary code with block length $r$ and distance $(1-1/q)r - j$ has size at most $(2 + o(1))(q-1)r$, which is tight up to the multiplicative factor $2(1 - 1/q) + o(1)$ for any prime power $q$ and infinitely many $r$. When $q = 2$, this resolves a conjecture of Tiet\"av\"ainen from 1980 in a strong form and the exponent $1/3$ is best possible. Finally, using a recently discovered connection to $q$-ary codes, we obtain analogous results for set-coloring Ramsey numbers.


Introduction
Let S r−1 denote the unit sphere in R r and define ρ(r, n) = min v 1 ,...,vn∈S r−1 max The question of determining ρ (as well as the extremal configurations) was first posed in 1930 by the botanist Tammes [16] in the context of studying the arrangements of pores of pollen grains.Since then, it has come to be known as an important problem in geometry and coding theory, see e.g.[7,9,12] for more information.Indeed, this question is equivalent to that of packing spherical caps on a unit sphere (when the angular radius of each cap is π/6, this is equivalent to the kissing number problem) and it is strongly related to the classical problem of packing spheres in a Euclidean space.
In 1955, Rankin [14] determined ρ(r, n) for all n ≤ 2r.It is therefore natural to ask what happens when n is slightly larger than 2r.This question was considered more recently by Bukh and Cox [3], who showed that if r is sufficiently large relative to k, then ρ(r, 2r + k) ≤ O √ k/r and they also noted that the linear programming method of Delsarte, Goethals, and Seidel [8] yields the lower bound ρ(r, In this paper, we substantially improve this lower bound and as a consequence, we determine that ρ(r, 2r + k) = Θ(1/r) for any fixed k ∈ N as r → ∞.
Theorem 1.For all k, r ∈ N, we have ρ(r, 2r + k) ≥ In general, a collection of unit vectors in a Euclidean space is called a spherical L-code if all pairwise inner products lie in the set L. If we define M(r, α) to be the maximum size of a spherical [−1, α]-code in R r , then it is not hard to see that determining M is equivalent to determining ρ.Since it is well known that M(r, 0) = 2r, we obtain the following immediate corollary of Theorem 1.
Corollary 2. For all r ∈ N and α ≥ 0 such that α = o r −2/3 as r → ∞, we have Since q-ary codes give rise to spherical codes, we will show that Corollary 2 implies a bound on q-ary codes.More precisely, a subset C ⊆ [q] r is called a q-ary code with block length r and distance s if any distinct x, y ∈ C differ in at least s coordinates and we let A q (r, s) denote the maximum size of such a code.Similarly to the spherical case, A q (r, s) is fairly well understood when s ≥ (1 − 1/q)r due to the bounds of Plotkin [13] for binary codes (q = 2) and of Blake and Mullin [2], Mackenzie and Seberry [10] for q ≥ 3.In particular, Plotkin showed that A 2 (r, r/2) ≤ 2r with equality if there exists a Hadamard matrix of order r and more generally, Mackenzie and Seberry showed that for r ≥ q ≥ 3, A q (r, (1 − 1/q)r) ≤ qr with equality if r, q are powers of the same prime.
Moreover, for binary codes and when s is slightly smaller than r/2, i.e. when s = r/2 − j for j = o r 1/3 , Tietäväinen [17] conjectured that A 2 (r, r/2 − j) = O(r).We will show that any q-ary code with block length r and distance (1 − 1/q)r − j can be transformed into a spherical −1, qj (q−1)r -code in R (q−1)r , so that applying Corollary 2 will yield the following result, which verifies Teitäväinen's conjecture in a strong form.Theorem 3. Let q ≥ 2 be a fixed integer and let r ∈ N and j ≥ 0 be such that Remark 4. Note that Sidel'nikov [15] constructed a binary code with block length r and distance r/2−Θ r 1/3 having size Θ r 4/3 for infinitely many r, so that the exponent 1/3 appearing in Theorem 3 is best possible for q = 2.Moreover, by changing each 0 to a 1, each 1 to a −1, and normalizing the resulting vectors, his construction yields a spherical −1, Θ r −2/3 -code of size Θ r 4/3 in R r , so that the exponent −2/3 appearing in Corollary 2 is also best possible.Furthermore, if k = Θ(r) then by considering any subset of 2r + k vectors from this spherical code, one can see that Theorem 1 is tight up to a multiplicative constant, i.e. ρ(r, 2r + k) = Θ k 1/3 2r+k .
It follows directly from the lower bounds of ( 1) and ( 2) that for any prime power q, the upper bound given in Theorem 3 is tight up to the multiplicative factor 2(1 − 1/q) + o(1) for infinitely many r.In particular, if there exists a Hadamard matrix of order r and j = o(r 1/3 ), then we conclude that A 2 (r, r/2 − j) = (2 + o(1)) r as r → ∞.
Very recently, Conlon, Fox, He, Mubayi, Suk, and Verstraëte [5] established a connection between error-correcting codes and a variant of the classical Ramsey numbers.For all q, r, s ∈ N with r > s, the set-coloring Ramsey number R(q; r, s) is defined to be the minimum n such that if each edge of the complete graph K n receives s colors out of a universe of r colors, then there exist a set of q vertices all of whose edges received the same color.In particular, R(q; r, 1) is just the usual r-color Ramsey number of a q-clique.For all q, r, s ∈ N with r > s, it was shown in [5] that and on the other hand, Conlon, Fox, Pham, and Zhao [6] showed that this bound is approximately tight when s is near (1 − 1/q)r by proving that for any ε > 0, there exists a c > 0 such that if r, s ∈ N with s ≤ (1 − 1/q)r and j = (1 − 1/q)r − s + 1, then As a consequence of (4) and Theorem 3, we immediately obtain the following upper bound on set-coloring Ramsey numbers when s is slightly below (1 − 1/q)r.

Proofs
In order to establish Theorem 1, we will need the following simple but powerful lemma, which provides a quantitative version of the fact that a matrix with large trace but whose square has small trace, must have large rank (see e.g.[1] for other applications).Lemma 6.Let M be a symmetric real matrix with rank r.Then tr(M) 2 ≤ r tr(M 2 ).
Proof.Since M is a symmetric real matrix, M has precisely r non-zero real eigenvalues λ 1 , . . ., λ r .Applying Cauchy-Schwarz then yields the desired bound ), and let C denote a set of n = 2r + k unit vectors in R d .We define M = M C to be the corresponding Gram matrix, i.e. the C × C matrix satisfying M(u, v) = u, v for u, v ∈ C .We would like to apply Lemma 6 to M and so we will need to bound tr(M 2 ), i.e. the sum of the squares of the entries of M. If C were a spherical [−α, α]-code, then we would have tr(M 2 ) ≤ n + α 2 n(n − 1) and so Lemma 6 would yield the lower bound α ≥ Ω k 1/2 /r .However, the same bound doesn't follow if all we know is that C is a spherical [−1, α]-code, since inner products can be very negative.Nonetheless, the following lemmas show that we can effectively bound the sum of the squares of the negative inner products by using the fact that M is positive semidefinite.
To this end, we will need the following definitions.We think of M as a signed weighted complete graph with vertex set C and so we say that the edge uv is negative if u, v < 0.Moreover, for any u ∈ C , we define N + (u) = {v ∈ C : u, v ≥ 0} and N − (u) = {v ∈ C : u, v < 0}.We also define γ(u) = v∈N − (u) u, v , i.e. the sum of the negative edges incident to u.
Proof.Let M be the Gram matrix for {u} ∪ N − (u) and let x : {u} ∪ N − (u) → R be the vector with x(u) = 1 and x(v) = − u, v for all v ∈ N − (u).Since M is positive semidefinite, we obtain which is equivalent to the desired result.Proof.Let L = 3 2 (1 + αn) and let M = M C be the Gram matrix of C .Also define B = {u ∈ C : −γ(u) ≥ L} and let x : C → R be the vector defined by Since M is positive semidefinite, we obtain By Cauchy-Schwarz, we have u∈C x(u) 2 ≤ n u∈C x(u) 2 and thus Proof of Theorem 1.Let C be a set of n = 2r + k unit vectors in R r having maximum pairwise inner product α = ρ(r, 2r + k).Let M = M C be the Gram matrix of C .We would like to apply Lemma 6 to M. To this end, note that rk(M) ≤ r and tr(M) = n.Moreover, using Lemma 7 and Lemma 8 we have Noting that (αn) Having verified Theorem 1, we conclude this section by proving Theorem 3.
Proof of Theorem 3. Let u 1 , . . ., u q be equidistant unit vectors in R q−1 , so that u i , u j = −1/(q−1) for all i = j.For any x ∈ [q] r , we let f (x) ∈ R (q−1)r be the vector obtained from x by replacing each coordinate x i with the vector u x i , i.e. f (x) is the concatenation of u x 1 , . . ., u xr .Now observe that for all x, y ∈ [q] r , we have f (x), f (y) = r i=1 u x i , u y i , so that ||f (x)|| 2 = r and moreover, if we let d(x, y) denote the Hamming distance between x and y, i.e. the number of coordinates in which they differ, then we conclude that It follows that for any q-ary code C with block length r and distance (1 − 1/q)r − j, the collection C = {f (x)/ √ r : x ∈ C} is a spherical −1, qj (q−1)r -code in R (q−1)r , and thus Corollary 2 yields |C| = |C | ≤ (2 + o( 1))(q − 1)r, as desired.

Concluding remarks
Note that if k → ∞ and r is sufficiently large relative to k, then Theorem 1 and the construction of Bukh and Cox [3] yield the bounds Ω k 1/3 ≤ r • ρ(r, 2r + k) ≤ O k 1/2 , so it would be interesting to determine the order of growth of r • ρ(r, 2r + k) when r is sufficiently large relative to k.Since we know that Theorem 1 is tight up to a multiplicative constant when k = Θ(r) (see Remark 4), we conjecture that the answer should be Θ k 1/3 .
If we let j = j(r) be any function of r which satisfies 0 ≤ j ≪ r 1/3 as r → ∞, then Theorem 3 and the lower bounds of (1) and (2) imply that for any prime power q, the quantity B q (j) = lim sup r→∞ 1 r A q (r, (1 − 1/q) r − j) satisfies q ≤ B q (j) ≤ 2(q − 1).In particular, we have shown that B 2 (j) = 2, so it would be interesting to see if our methods can be extended in order to determine B q (j) for q ≥ 3.In view of (3) and ( 4), this would yield corresponding results for set-coloring Ramsey numbers.