arXiv:1911.13151v4 [math.CO] 6 Feb 2021 n ooig ftehprue n[4,toseilprmtrst of sets parameter non-fe special powerful two [14], a In giving hypercube. proved, witho the was announced of functions were colorings results boolean existence of the of immunity some hype the where of [9], 2-colorings work perfect of constructions general [13], In rps,adpret2clrnsof 2-colorings perfect and graphs), obnr case nonbinary fcmltl eua oe icuigpret2clrns in 2-colorings) perfect (including codes regular completely of An Introduction 1 sapriino h etxset the of partition a is neutbepriin ahcl ftepriini h riaeo so of preimage the is partition the of cell each partition: equitable an aaeeso -ooig ftebnr amn graph Hamming binary the of 2-colorings of Parameters nesblt fa nnt eiso aaeeso -ooig in cas 2-colorings other of the parameters in of constructed, series infinite were an colorings of perfect infeasibility case, one in n h iatt rp omdb h de ewe n w differ two any between a edges is partition the a by such formed of graph name bipartite the and oaseilcs fcmltl eua oe,nml,t h comple Rif`a, for a the Borges, known to codes, is namely, regular little ar completely codes, very on orthogonal regular that [7] new completely survey construct of recent to case a us special allows a particular, to in and, study prime eeaiain ftecntutosfo 1]t h o-iayc non-binary the to [13] from constructions the of generalizations a ecniee sase owr rm“eyltl”t “little”. to little” “very from forward step a as considered be can 3] eync euto oao 4]sosaoet-n corresp one-to-one a shows [41] Potapov of graph [2 result Hamming nice the e.g. very [5 A (see bound codes [31]. Bierbrauer–Gopalakrishnan–Stinson optimal of c the 2-colorings of one-to-one attaining perfect arrays classes a induce 15] in some [4, a be and bound functions Bierbrauer–Friedman to codes boolean proven transversals unbalanced perfect are 6], example, almost Corol. For objects [25, bound, parameters. 3 some special distance of with mean codes by MDS codes), MDS a edfie spretclrnswt pca aaees Exam parameters. special with colorings perfect t as rea several defined by be attention can much attract graphs distance-regular -( ( q ,t v, ntecretppr esuypret2clrnso the of 2-colorings perfect study we paper, current the In h amn rpsbln otecaso itnerglrgraphs distance-regular of class the to belong graphs Hamming The − equitable 1) oncinwt efc ooig,w osrc northogo an construct we colorings, perfect with connection ietbe famsil aaeeso -ooig nHamm color in of 2-colorings parameters of which parameters deduce admissible we of per tables last, of give At constructions known parameters. observe paramete we new on Next conditions with existence. start their We parameters. given with array. 1 + q − h elkoncneto fpretclrnsadotooa a orthogonal and colorings perfect of connection well-known The . Keywords: ecnie h rbe feitneo efc 2-colorings perfect of existence of problem the consider We q λ , sotie n[8 weetesm usini losle o Johnso for solved also is question same the (where [38] in obtained is -and )- k -partition > q veyA Bespalov A. Evgeny t -( n ncntutosta ienwprmtr fpret2-co perfect of parameters new give that constructions on and 2 efc ooig qial atto,Hmiggah gra graph, Hamming partition, equitable coloring, perfect H ,t v, 1 ( ,q n, fagraph a of 2 + ooe nttt fMteais ooiis,Russia Novosibirsk, Mathematics, of Institute Sobolev efc -ooig fHmiggraphs Hamming of 2-colorings Perfect 2 n h ola-audfntoson functions boolean-valued the and ) ooiis tt nvriy ooiis,Russia Novosibirsk, University, State Novosibirsk , naA Taranenko A. Anna > q )dsgs[6 .7] ai qae n ai yecbs(equivale hypercubes latin and squares latin p.178], [36, 1)-designs perfect V into .Sneteeaemr usin hnasesi hsae,orcu our area, this in answers than questions more are there Since 2. H G ( k ,q n, k ( = -coloring nonempty 1 ihtetidlreteigenvalue largest third the with ) ,E V, ei .Krotov S. Denis , i eea,amlirp,ie,losadmlide r allowed) are multiedges and loops i.e., multigraph, a general, (in ) hc,fral,rfr oa to refers formally, which, , cells Abstract 1 osatnV Vorob’ev V. Konstantin , V H 1 1 , . . . , ( n, q a ra OA(2048,7,4,5). array nal ayHmiggraph Hamming -ary cb eedsrbd(eas eto h conference the mention also (we described were rcube ) h yecb,wr tde n[,1,1,1,34]. 14, 13, 12, [9, in studied were hypercube, the 2), os aycasso obntra configurations combinatorial of classes Many sons. etclrnsadpooesm e nsgiving ones new some propose and colorings fect n graphs ing 1 so rpsadclrnsta r eesr for necessary are that colorings and graphs of rs V H lkad .Matiushev A. Aleksandr , dZnve etoe efc -ooig saying 2-colorings perfect mentioned Zinoviev nd k h amn rp 4] 4] iayorthogonal binary [41]; [40], graph Hamming the H ( nsaecvrdb hs osrcin and constructions these by covered are ings eutbe2priin)o amn graphs Hamming of 2-partitions) (equitable ase uhta vr elidcsarglrsubgraph regular a induces cell every that such efc -ooig of 2-colorings perfect ,q n, ,tennxsec a rvd n[4,the [34], In proved. was nonexistence the e, tiigtecreainimnt on [12]; bound correlation-immunity the ttaining ( nuepret3clrnso h hypercube the of 3-colorings perfect induce ] tpof.I 1] on ntecorrelation the on bound a [12], In proof). ut H lso uhcngrtosaepretcodes, perfect are configurations such of ples n, as h efc -ooig r equivalent are 2-colorings perfect The rays. nec ewe h efc -ooig of 2-colorings perfect the between ondence evalue. me eyrglrcdso oeigrdu .In 1. radius covering of codes regular tely ( > q ihtescn ags eigenvalue largest second the with ) )wspoe.I hsppr econsider we paper, this In proved. was 2) repnec ihpretclrnswith colorings perfect with orrespondence n el sbrglr nte equivalent Another biregular. is cells ent sblt etfrprmtr fpret2- perfect of parameters for test asibility ,q n, nltnsurs nsm ae,optimal, cases, some In squares. latin in ] 2];otooa rasatiigthe attaining arrays orthogonal [29]); 7], H n ent htpretclrnsof colorings perfect that note we and , hcvrn,pretcd,orthogonal code, perfect covering, ph tann on htcnet the connects that bound a attaining ) n oenwcntutn o non- for constructons new some and 2 ( θ ,q n, 2 ry ly nipratrl nour in role important an plays rrays k = n eua opeemultipartite complete regular and n vle ucinon function -valued o small for ) n ( H q 1 − ( ,q n, 1) oig.Acharacterization A lorings. − H ,mil ouigo the on focusing mainly ), n 2 ( q n, and r ecie n[39]. in described are )wr considered; were 2) 2 , q sn the Using . ty distance-2 ntly, V htdefines that rn work rrent θ 1 = correlation immunity of the function, the density of ones, and the average 0-1-contact number (the number of neighbors with function value 1 for a given vertex with value 0). Besides the Hamming graphs, distance-regular graphs where perfect colorings have been studied include Johnson graphs, see e.g. [1, 16], Latin-square graphs [2], halved hypercubes [32], Grassmann graphs Gq(n, 2), see e.g. [10] and [37]. In finite geometry, perfect 2-colorings are studied as intriguing sets, see e.g. [3]. As an example of the study of perfect colorings of non-distance-regular graphs yielding interesting and deep results we refer to [42]. Let us describe the structure of the paper. In Section 2, we introduce the main concepts related to perfect colorings in Hamming graphs and provide some easy observations. In Section 3, we study conditions necessary for the existence of perfect colorings with given parameters. Since Hamming graphs are distance-regular, we can specialize for them general results on weight distributions of colors in distance-regular graphs. We also consider some other necessary conditions based on algebraic and arithmetic properties of colorings and distributions of colors in faces of Hamming graphs. Section 4 is devoted to constructions of perfect colorings. Firstly, we give a series of constructions based on coverings of Hamming graphs. Next, we consider three direct constructions of perfect colorings based on additive codes (Section 4.2, where, as a special case, we construct an orthogonal array OA(2048, 7, 4, 5)), MDS codes, and 1-perfect codes (Section 4.3). Then, in Section 4.5, we describe more complex constructions of perfect colorings combining some of the previous ones and providing new admissible parameters of colorings. We summarize results on the admissibility of parameters of perfect colorings in Section 5. In particular, for cases when q is a prime power we find sufficient conditions for the existence of (b,c)-coloring in H(n, q) for n greater or equal some n0 and estimate the minimum value n0 for which such colorings exist. Finally, in Appendix we provide tables with admissibility statuses for parameters of colorings in q-ary n- dimensional Hamming graphs for small n and q = 3, 4, and 6. We emphasize that all the results of our paper that are applicable to the case q = 2 were proved for this case by Fon-Der-Flaass [13]. Moreover, some binary results (bounds in [12] and [13], possibility to partition one color into lines in the main construction of [13], special cases in [14]) were not generalized or generalized partially. On the other hand, new results for composite q have no analogs in the binary case.

2 Notations, definitions, and easy observations

Zn Z Given n and q, the Hamming graph H(n, q) is the graph with the vertex set q = {x = (x1,...,xn) | xi ∈ q} such that vertices x and y are adjacent if and only if the Hamming distance (the number of different positions) d(x, y) between them is 1. Observe that H(n, q) is a connected n(q − 1)-. For any vertex x, its (Hamming) weight wt(x) is defined to be the Hamming distance from x to the all-zero vertex 0n. The binary Hamming graph H(n, 2) is also known as a hypercube, or the n-. The spectrum of the Hamming graph H(n, q) is the eigenspectrum of its adjacency matrix; it consists of the n i eigenvalues θi = n(q − 1) − qi with multiplicity i (q − 1) , i =0,...,n, see e.g. [8]. For k ∈ {0,...,n}, a k-dimensional face, or simply a k-face, is a set of vertices of H(n, q) that induces a  subgraph isomorphic to H(k, q). Faces of dimension 1 are essentially the maximal cliques in H(n, q) and often called lines. A multiset C of vertices of H(n, q) is called an orthogonal array of strength t, or OA(|C|,n,q,t) if every (n − t)-face contains |C|/qt elements of C. In connection with perfect colorings, we will consider only simple orthogonal arrays, without multiple elements. A perfect k-coloring of a graph G is a surjective function f from the vertex set to the set of colors {1,...,k} such that each vertex x of color i is adjacent to exactly si,j vertices of color j, where si,j is some constant that does not depend on the choice of x. The numbers si,j are the parameters of the perfect coloring and they are the degrees of the regular and biregular subgraphs induced by the color sets. The matrix S = (si,j ) of order k is called the quotient matrix of the perfect coloring f. Let us have a closer look at parameters of perfect 2-colorings of H(n, q). The quotient matrix of a perfect 2-coloring f is usually written as a b S = . c d   It has two different eigenvalues: the trivial eigenvalue n(q − 1) (the graph degree) and the second eigenvalue θ = n(q − 1) − (b + c)= a − c. Since a + b = c + d = n(q − 1), the parameters b and c uniquely define the matrix. Thus, we will say that f is a (b,c)-coloring if it has the quotient matrix S as above. Rearranging colors, we may assume that b ≥ c. It is easy to prove that the number of vertices of the first color in a perfect (b,c)-coloring of H(n, q) is equal c n b n to b+c · q , while for the second color it is b+c · q . Reducing factors, we find that the densities of the colors in ′ ′ c b c b ′ b the perfect (b,c)-coloring f are b+c and b+c respectively, or, equivalently, b′+c′ and b′+c′ , where b = gcd(b,c) and ′ c ′ ′ c = gcd(b,c) . Later we will see that the parameters b and c not only define the proportion of colors in a perfect (b,c)-coloring but play an important role in the characterization of admissible parameters of colorings.

2 At the end of this section, we recall one straightforward application of K¨onig’s theorem, which will be used in one of the constructions. Proposition 2.1 ([13]). Let f be a perfect coloring of H(n, 2), and let i be one of the colors. If f −1(i) is not an independent set, then it can be partitioned into edges (lines).

3 Necessary conditions on parameters of perfect colorings

We start with one simple algebraic condition on parameters of (b,c)-colorings. It is well known [17, Ch. 5, Lemma 2.2] that the spectrum of the quotient matrix of a perfect coloring in a graph is contained in the graph spectrum. Since all eigenvalues of the Hamming graph H(n, q) have the form θi = n(q − 1) − qi, where i =0,...,n, and the second eigenvalue of a (b,c)-coloring of H(n, q) is θ = n(q − 1) − (b + c), we have the following. Proposition 3.1. If there exists a (b,c)-coloring of H(n, q), then b + c = qi for some i ∈{1,...,n}.

3.1 Perfect colorings and orthogonal arrays For perfect colorings of H(n, q), it is known that all large faces (of dimension greater than (n + θ)/q where θ is the second largest eigenvalue of the quotient matrix) have the same densities of colors as in the whole graph, see e.g. [31, Proposition 1], which is essentially a special case of [11, Theorem 4.4]. In particular, for 2-colorings we have

b+c Proposition 3.2. Each color of a (b,c)-coloring of H(n, q) forms an orthogonal array of strength q − 1. Based on this fact, we deduce the following necessary condition on the quotient matrices of 2-colorings. A special case of this condition was considered in [21] to show the nonexistence of some 1-perfect codes over non- prime-power alphabets. Theorem 3.3. Assume that there exists a perfect (b,c)-coloring of H(n, q). Then b′ + c′ divides the cardinality k b+c ′ b ′ c q of a k-face, where k = n − q +1, b = gcd(b,c) , and c = gcd(b,c) . Proof. By Proposition 3.2, for a (b,c)-coloring the densities of colors in each k-face are the same as in H(n, q). b′ c′ Recall that the colors have densities b′+c′ and b′+c′ . Since each k-face has an integer number of vertices of each color, we conclude that b′ + c′ divides qk. If c = 1, we can strengthen the conclusion of the theorem. Theorem 3.4. Assume that there exists a perfect (b, 1)-coloring of H(n, q). Then b is divisible by q−1. Moreover, if q = ps for some prime p, then b +1= qr for some r ∈ N. Proof. For a (b, 1)-coloring f, each vertex of the second color has exactly one neighbor of the first color. It yields that each line of H(n, q) contains 0, 1 or q vertices of the first color and q, q − 1 or 0 vertices of the second color. In particular, every line containing a given vertex of the first color has either q − 1 or 0 vertices of the second color. So b is divisible by q − 1. Let b = m(q − 1) for some m ∈ N. Suppose that q = ps for some prime p. Since b and c = 1 are relatively prime, Theorem 3.3 implies that b + 1 divides qr for some r ∈ N and b +1= pj for some j ∈ N. It is not hard to see that b = pj − 1 is divisible by q − 1= ps − 1 if and only if j = rs for some r ∈ N. Thus b +1= qr. In hypercubes H(n, 2), there is an additional necessary condition on parameters of (b,c)-colorings.

3 Lemma 3.5 ([12]). If there exists a (b,c)-coloring of H(n, 2) with b 6= c, then n ≥ 4 (b + c). This bound is a special case of the bound on the correlation immunity of boolean functions (equivalently, the strength of simple binary orthogonal arrays) proved in [12] and extended to non-simple orthogonal arrays in [24]. Generalizing this bound to q > 2 is an open research problem. ′ ′ ′ b Conjecture 1. If there exists a (b,c)-coloring in the Hamming graph H(n, q) with b + c > q, where b = gcd(b,c) , ′ c q+1 c = gcd(b,c) , then n ≥ q2 (b + c). Conjecture 2. Let C be an OA(|C|,n,q,t). If (a) |C| < qn−1 or (b) C is simple and |C| is not divisible by qn−1, n then n − t ≥ q+1 + 1.

3 3.2 Weight distribution theorems and generalizations In this section, we briefly discuss very strong properties of perfect colorings known as the distance invariance and its generalizations. In our experience, we could not find examples when these invariants reject some putative quotient matrix of a perfect 2-coloring of Hamming graphs in a non-binary case. However, they do work for that purpose when the number of colors is larger than 2, and the potential of the development of the theory makes these methods necessary to mention here. The general method to reject a putative quotient matrix using distance invariants is the following: if there is a way to calculate the number of groups vertices with some properties using only the parameters of the graph and the quotient matrix, but the calculations result in a negative or non-integer number, then perfect colorings with such a quotient matrix do not exist. The simplest distance-invariance property says that the weight distributions of all colors of a perfect coloring depend only on the color of the initial vertex and the parameters of the graph and the coloring. (The weight distribution is the multiset of distances from the initial vertex to the vertices of the given color.) This property holds for perfect colorings of any distance-regular graph and generalizes the well known Shapiro–Slotnick–Lloyd theorem [35, 43] on the distance invariance of perfect codes. In its turn, it can be generalized to the possibility to calculate the weight distribution of the coloring with respect to any completely regular code, not only a single vertex, see e.g. [28]. Another generalization of the distance invariance [44, 45, 23] connects the weight distributions of a perfect coloring of a Hamming graph in two orthogonal faces (so-called local weight distributions). Inexplicitly, this connection was utilized in the bounds [13, Theorems 1,2] for perfect 2-colorings of H(n, 2). The strongest of known generalizations [44] of the distance invariance enables one to calculate (see formulas in [30]) the multi-parameter invariants called interweight distributions of perfect colorings. These invariants work well for proving the nonexistence of perfect colorings in H(n, q) if q = 2, see e.g. [26], but examples [30] show that their natural generalization is not invariant in the non-binary case. The existence of similar strong invariants for q> 2 is an open problem.

4 Constructions of perfect colorings 4.1 Covering-based constructions In this section, we consider a series of constructions that allow us to obtain perfect colorings of a Hamming graph on the base of perfect colorings of a smaller Hamming graph. All these constructions utilize graph coverings. In order to describe them, it is convenient to represent Hamming graphs as Cayley graphs. Let Γ be a finite group and A ⊂ Γ be a (multi)set of Γ such that A = A−1. The Cayley (multi)graph Cay(Γ, A) with the connecting set A is a (multi)graph with the vertex set Γ and the edge set {(g,ga) | g ∈ Γ,a ∈ A}. For convenience, we assume everywhere that Γ is an abelian group. Zn The Hamming graph H(n, q) is the Cayley graph Cay( q , I(n, q)) with the connecting set I(n, q) consisting of all vertices of weight 1. A multigraph G = (V, E) is said to cover a multigraph H = (U, W ) if there exists a surjective function ϕ : V → U, called a covering, such that for each x ∈ V the equality {ϕ(y) | (y, x) ∈ E} = {w | (w, ϕ(x)) ∈ W } holds as for multisets. It is straightforward that a covering is a perfect coloring of G with the quotient matrix S equal to the adjacency matrix of H. Here under the adjacency matrix M of a multigraph H we mean a matrix with entries mi,j equal to the number of edges between vertices i and j and entries mi,i equal to the number of loops. There are natural coverings of Cayley graphs based on the following straightforward and well-known fact. Recall that ϕ :Γ → Γ′ is a homomorphism between groups (Γ, ∗) and (Γ′,⋆) if for all g,h ∈ Γ we have ϕ(g ∗ h)= ϕ(g) ⋆ ϕ(h). Lemma 4.1. Let ϕ :Γ → Γ′ be a surjective homomorphism between groups Γ and Γ′, and let A ⊂ Γ be a multiset such that A = A−1. Then ϕ is a covering of Cay(Γ′, ϕ(A)) by Cay(Γ, A). All constructions of perfect colorings of H(n, q) in this section are based on the following known and straight- forward fact. Lemma 4.2. Suppose that f is a perfect coloring of a multigraph H with the quotient matrix S. If ϕ is a covering of H by a multigraph G, then f ◦ ϕ is a perfect coloring of G with the quotient matrix S. Given a multigraph G and u, v ∈ N, we denote by G+uI the multigraph obtained from G by adding u loops to each vertex of G and by vG the multigraph in which every edge and loop of G has the multiplicity v times larger than in G. (We make an agreement that each loop contributes 1 to the degree of the corresponding vertex.) If G is a Cayley multigraph Cay(Γ, A), then the multigraph G + uI can be represented as Cay(Γ, A ∪{u × 0¯}), where u × 0¯ is the identity element 0¯ of Γ with multiplicity u. Similarly, the multigraph vG coincides with Cay(Γ, vA), where vA is the multiset obtained from A by multiplying all multiplicities by v. The definitions of a perfect coloring and multigraphs G + uI and vG imply the following.

4 Lemma 4.3. 1. If f is a perfect coloring of a multigraph G with the quotient matrix S, then f is a perfect coloring of the multigraph G + uI with the quotient matrix S + uI. 2. If f is a perfect coloring of a multigraph G with the quotient matrix S, then f is a perfect coloring of the multigraph vG with the quotient matrix vS. We consider a series of graphs and multigraphs that can be covered by Hamming graphs. Proposition 4.4. 1. The Hamming graph H(n + u, q) covers the multigraph H(n, q)+ u(q − 1)I. 2. The Hamming graph H(vn,q) covers the multigraph vH(n, q). 3. The Hamming graph H(n,pq) covers the multigraph pH(n, q)+ n(p − 1)I. Zn+u Zn Proof. Let us prove (1). Consider the group homomorphism ϕ : q → q defined by the equation

ϕ(x1,...,xn,...,xn+u) = (x1,...,xn). Zn+u It is straightforward to see the following: if I(n + u, q) is the set of all elements of q at distance 1 from the ¯ Zn identity element, then the multiset B := ϕ(I(n + u, q)) is equal to I(n, q) ∪{u(q − 1) × 0}. Since Cay( q ,B) is exactly the multigraph H(n, q)+ u(q − 1)I, Lemma 4.1 implies that ϕ is a covering of H(n, q)+ u(q − 1)I by H(n + u, q). The proofs of (2) and (3) are similar to (1). To prove (2), we use the group homomorphism

ϕ(x1,...,xvn) = (x1 + ··· + xv,...,xv(n−1)+1 + ··· + xvn), where + is the operation of Zq, and for (3) we utilize the homomorphism

ϕ(x1,...,xn) = (x1,...,xn) mod q; xi ∈ Zpq.

Remark 1. There are many other ways to choose homomorphisms ϕ in the proof of Proposition 4.4. For instance, it can be checked that if g1,...,gn are arbitrary v-ary quasigroups of order q such that gi(0,..., 0) = 0 for all i then the operation 1 n ϕ(x1,...,xvn) = (g (x1,...,xv),...,g (xv(n−1)+1,...,xvn)) is a group homomorphism with properties required in Proposition 4.4(2). Using Lemmas 4.2, 4.3 and Proposition 4.4, we obtain the following constructions of perfect colorings in Hamming graphs. Theorem 4.5 ([7, Prop. 33(ii)]1). For every perfect coloring of H(n, q) with quotient matrix S and every positive integer u, there exists a perfect coloring of H(n + u, q) with quotient matrix S + u(q − 1)I. In particular, if there is a perfect (b,c)-coloring of H(n, q), then there is a perfect (b,c)-coloring of H(n + u, q), u =1, 2,.... Theorem 4.6 ([7, Prop. 33(iii)]). For every perfect coloring of H(n, q) with quotient matrix S and every positive integer v, there exists a perfect coloring of H(vn,q) with quotient matrix vS. In particular, if there is a perfect (b,c)-coloring of H(n, q), then there is a perfect (vb,vc)-coloring of H(vn,q), v =1, 2,.... Theorem 4.7. For every perfect coloring of H(n, q) with quotient matrix S and every positive integer p, there exists a perfect coloring of H(n,pq) with quotient matrix pS + n(p − 1)I. In particular, if there is a perfect (b,c)-coloring of H(n, q), then there is a perfect (pb,pc)-coloring of H(n,pq), p =1, 2,....

4.2 Additive codes Under a code in the Hamming graph H(n, q), we mean an arbitrary nonempty subset of the vertex set of H(n, q). To each code in H(n, q) we assign a 2-coloring in which the set of vertices of the first color coincides with the code. We often identify codes with the corresponding 2-colorings. In this section we assume that q = ps for some prime p and integer s ≥ 1. As the vertex set of the Hamming graph H(n, q), we consider Zs n Zs ( p) = {x = (x1,...,xn) | xi ∈ p}. Zs Zs n Two vertices are adjacent in H(n, q) if they differ in exactly one p-component. A subset of ( p) is called an additive code if it is closed under the coordinate-wise addition. Since p is prime, an additive code is also a linear code over Zp, i.e., it is also closed with respect to the coordinate-wise multiplication by a constant. As any linear code, such a code C is the kernel of a vector-space homomorphism represented by a (sn − dim C) × sn matrix over Zp called a check matrix of the code.

1There is a misprint in the parameters of the resulting coloring in [7, Prop. 33(ii)]

5 Zs n Theorem 4.8. Let C be an additive code in ( p) with an m × sn check matrix H consisting of columns h1,1, Zm ..., h1,s, h2,1, ..., hn,s. For i ∈ {1,...,n}, denote by Vi the vector subspace of p spanned by hi,1, ..., hi,s. The following assertions are equivalent. Zm (i) All the spaces Vi, i = 1,...,n, are of dimension s, and every non-zero element of p belongs to exactly c of them, c = (ps − 1)n/(pm − 1). Zs n (ii) The characteristic function of C in ( p) is a perfect 2-coloring of H(n, q) with quotient matrix [[0,b], [c,b− c]], b = (ps − 1)n, c = b/(pm − 1).

m−s s sn−m s p (p −1)n (iii) C is an OA p ,n,p , pm−1 − 1 .   Proof. (ii) implies (iii) by Proposition 3.2. As noted in [41], any OA(N,n,q,t) attaining the Bierbrauer–Friedman n (q−1)n bound N ≥ q 1 − q(t+1) is a simple independent set whose characteristic function is a (b,c)-coloring, b = (q − 1)n, c = q(t+ 1) − (q −1)n. So, (ii) follows from (iii). Let us show the equivalence of (i) and (ii). Clearly, C is an independent set if and only if all Vi are of maximal Zs n T dimension, s. Assume this is the case. Consider a non-code vector x from ( p) . Denote by h the syndrome Hx . If h belongs to Vi for some i, then there is a unique vector e with nonzeros only in the ith group of coordinates T such that He = h, so x − e is a code neighbor of x. We see that the number of Vi the vector h belongs to is exactly the number of code neighbors of x. Every non-code vector x has exactly c code neighbors if and only Zm if every nonzero h from p belongs to exactly c spaces Vi, i ∈ {1,...,n}. By numerical reasons, c can only be (ps − 1)n/(pm − 1). A collection of subspaces satisfying (i) is called a c-fold spread, see [22, p.83], where a construction of multifold spreads can be found. The multifold spreads are a special case of subspace designs, namely, the subspace designs of strength 1, or q-ary 1-(n,k,λ) designs (in our notation, k = m and λ = c). Z3 Example 1. Taking p = s = 2, m = 3, n = 7, and all seven two-dimensional subspaces of 2 as Vi, we obtain a (21, 3)-coloring of H(7, 4) and OA(2048, 7, 4, 5). The last parameters (as well as the derived parameters OA(512, 6, 4, 4)) occur as putative in [20, Table 12.3] (where k := n = 7, t := 5, index is 2048/45 = 2). However, the parameters (the length 7, the dimension 3 over Z2, and the minimum distance d = 6) of the corresponding quaternary additive code generated by H (i.e., dual to C) were already discovered in [6], and by the Delsarte theory [11], the strength of the dual orthogonal array is t := d − 1. So, we cannot say that the OA(2048, 7, 4, 5) is new, but now we can treat it as a special case of a general construction, in contrast to the computer-aided approach in [6]. The union of 3 cosets of C gives a perfect (15, 9)-coloring of H(7, 4), which reduces the upper bound in another line of the small-value table (Appendix). It is possible to construct perfect colorings from additive codes that are not independent sets. This possibility needs further investigation, and here we only show one example, whose parameters occur in Appendix. Example 2. Consider the check matrix

000001011010010110010110 H = 010110100000011001111110 .  101000000101100101101010    over Z2. The kernel of this matrix is an additive code, whose characteristic function is a perfect (35, 5)-coloring of H(12, 4) (a perfect (35, 5)-coloring of H(13, 4) was constructed in [33] as a special case of perfect multifold ball packing). The proof is straightforward, using the same syndrome approach as in Theorem 4.8. The union of 3 cosets gives a perfect (20, 15)-coloring and also contributes to the small-value table. Remark 2. Additive codes can be interpreted in the classical manner of coding theory, as codes over fields. To Zs do so, we can treat p as the finite field GF(q), with properly defined multiplication. As a code over GF(q), an additive code is closed with respect to addition but not necessarily with respect to multiplication by constant, if s > 1. In the case, s = 1, the additive construction gives only colorings obtained from 1-perfect codes, see the next subsection.

4.3 MDS codes, 1-perfect codes An MDS code with distance d is a set of qn−d+1 vertices in H(n, q) such that the Hamming distance between any two different code vertices is not less than d. Equivalently, a distance-d MDS code is an orthogonal array OA(qn−d+1,n,q,n − d + 1). A τ-fold MDS code in H(n, q) is a set of vertices that has exactly τ elements in every 1-face (line), i.e., a simple OA(τqn−1,n,q,n − 1). Some τ-fold MDS codes can be obtained as the union of τ disjoint copies of distance-2 MDS codes. The definition implies that any τ-fold MDS code, τ ∈ {1,...,q − 1}, corresponds to an

6 (n(q − τ), nτ)-coloring of H(n, q); by Theorem 4.6, colorings with such parameters can be constructed from a (q − τ, τ)-coloring of the H(1, q). Perfect colorings corresponding to multifold MDS codes (including distance-2 MDS codes) have the second eigenvalue θ = −n, which is the smallest eigenvalue of H(n, q). A 1-perfect code in H(n, q) is a set of vertices such that each radius-1 ball B(x) = {y | d(x, y) ≤ 1} contains exactly one code vertex. The minimal Hamming distance between different vertices of a nontrivial (with more than 1 vertex) 1-perfect code is equal to 3. s qr −1 N It is well known that 1-perfect codes exist in H(n, q) if q = p for some prime p and n = q−1 for some r ∈ (e.g. q-ary Hamming codes, which can be treated as a special case of the additive codes from Section 4.2). If q is not a prime power, then the existence of 1-perfect codes in H(n, q) is a long-standing open problem. The definition implies that every 1-perfect code in H(n, q) is a (n(q − 1), 1)-coloring. A τ-fold 1-perfect code in H(n, q) is a set of vertices such that each radius-1 ball contains exactly τ code vertices. Some τ-fold 1-perfect codes can be obtained as the union of τ disjoint copies of 1-perfect codes. τ-Fold 1-perfect codes correspond to (n(q − 1) − τ +1, τ)-colorings of H(n, q); they exist if (but not necessarily “only if”) 1-perfect codes exist. The second eigenvalue of 1-perfect codes and multifold 1-perfect codes is −1. In constructions, we will use the following correspondence between 1-perfect codes in the Hamming graph H(q +1, q) and certain MDS codes in H(q, q). Proposition 4.9. If there exists a 1-perfect code in H(q +1, q), then there exists a partition of the vertex set of H(q, q) into distance-2 MDS codes M 0, ..., M q−1 such that each M i can be decomposed into the union of q disjoint distance-3 MDS codes.

Proof. Let C be a 1-perfect code (equivalently, a distance-3 MDS code) in H(q +1, q), and let Cj be the subset of C consisting of all codewords with last symbol j, j =0,...,q − 1. Denote by M, L0,..., Lq−1 the last-coordinate projections of C, C0,..., Cq−1, respectively. By definition, M is a distance-2 MDS code, and Lj , j =0,...,q − 1, i are distance-3 MDS codes; moreover, M = ∪j Lj. It follows that the codes M = M + (i, 0, ..., 0), i =0,...,q − 1, form a required partition.

4.4 The invasion construction Here, we describe a construction of perfect 2-colorings in Hamming graphs based on a set of 2-colorings and a perfect coloring into an arbitrary number of colors. We will use it as a step of splitting constructions in Sections 4.5 and 4.6. Let f be a k-coloring of H(n, q) and let g1,..., gk be 2-colorings of H(m, q) with same sets of colors. Define the invasion h = f × (g1,...,gk) of the coloring f by colorings g1,..., gk to be a 2-coloring of H(n + m, q) such that Zn Zm h(x, y)= gf(x)(y), x ∈ q , y ∈ q . Roughly speaking, the invasion coloring h of H(n + m, q) is obtained by replacing each vertex of color i in the coloring f of H(n, q) by the graph H(m, q) colored with the coloring gi. Assume that M 1,..., M q is a partition of the vertex set of H(m, q) into q pairwise disjoint distance-2 MDS i+τ−1 i j codes. Given τ, 0 ≤ τ ≤ q, define Gτ to be the 2-coloring corresponding to the τ-fold MDS code M (index j=i i j goes cyclically modulo q) in H(m, q) if m ≥ 1. In the case m = 0 (when H(0, q) is the 1-vertexS graph), let Gτ be the coloring of a vertex into the first color if 1 ≤ i ≤ τ, and the coloring of a vertex into the second color if τ +1 ≤ i ≤ q. Proposition 4.10. 1. Let f be a perfect (q + 1)-coloring of H(n, q) with the quotient matrix

α′ ··· α β . .. . .  . . . .  . α ··· α′ β    γ ··· γ δ      If 0 ≤ γ − α = m then for each τ = 0,...,q, l = 1, 2 such that τ(l − 1)+(q − τ)(2 − l) 6= 0, the invasions 1 q hl = f ×(Gτ ,...,Gτ , l), where l is the solid coloring of H(m, q) into the color l, are (bl,cl)-colorings of H(n+m, q) with bl = γ(q − τ)+ β(l − 1) and cl = γτ + β(2 − l).

7 2. Let f be a perfect 2q-coloring of H(n, q) with the quotient matrix

α ··· α β ··· β ......  ......  α ··· α β ··· β   .  γ ··· γ δ ··· δ     ......   ......     γ ··· γ δ ··· δ      1 q 1 q If 0 ≤ γ−α = β−δ = m, then for each τ1, τ2 =0,...,q, τ1+τ2 6=0, 2q the invasion h = f×(Gτ1 ,...,Gτ1 , Gτ2 ,...,Gτ2 ) is a (b,c)-coloring of H(n + m, q) with b = q(γ + β) − γτ1 − βτ2 and c = γτ1 + βτ2.

Proof. 1. By construction, the invasion hl = f × (g1,...,gk) is a coloring of H(n + m, q) into colors 1 and 2. Each vertex z ∈ H(n + m, q) is considered as an ordered pair of vertices (x, y), where x is a vertex of H(n, q) and y is a vertex of H(m, q). Therefore, the number of vertices of color 1 (color 2) in the coloring hl adjacent to the f(x) vertex z = (x, y) is equal to the number of vertices of color 1 (color 2) adjacent to y in the coloring Gτ or in the coloring l plus the number of vertices h(x′,y) of color 1 (color 2), where x′ runs over all the neighbors of x. i Recall that for each i =1,...,q, the coloring Gτ is a (m(q − τ), mτ)-coloring of H(m, q). −1 Suppose that hl(z) = 1, z = (x, y). If 1 ≤ f(x) ≤ q, then the number of vertices of hl (2) adjacent to z is −1 m(q − τ)+ α(q − τ)+ β(l − 1). In the case f(x)= q + 1, we have l = 1 and the number of the vertices of h1 (2) adjacent to z is equal to γ(q −τ). The condition m = γ −α implies that the equality m(q −τ)+α(q −τ)= γ(q −τ) holds for the coloring h1. −1 Suppose now that hl(z) = 2, z = (x, y). If 1 ≤ f(x) ≤ q, then the number of the vertices of hl (1) adjacent to z is equal to mτ + ατ + β(2 − l). In the case f(x) = q + 1, we have l = 2 and the number of the vertices of −1 h2 (1) adjacent to z in the coloring h2 is equal to γτ. Again, the condition m = γ − α implies that the equality mτ + ατ = γτ holds for the coloring h2. Thus, the invasions hl are perfect (bl,cl)-colorings of H(n + m, q) with bl = γ(q − τ)+ β(l − 1) and cl = γτ + β(2 − l). 2. As before, let z = (x, y) be a vertex of H(n + m, q). Suppose h(z) = 1. By the definition of h, if 1 ≤ f(x) ≤ q then the number of neighbors of z in h−1(2) is equal to m(q − τ1)+ α(q − τ1)+ β(q − τ2). In the case q +1 ≤ f(x) ≤ 2q the number of vertices of color 2 adjacent to z is equal to m(q − τ2)+ γ(q − τ1)+ δ(q − τ2). The condition m = γ − α = β − δ implies that the equality m(q − τ1)+ α(q − τ1)+ β(q − τ2)= m(q − τ2)+ γ(q − τ1)+ δ(q − τ2) holds for all τ1 and τ2. −1 Now suppose h(z)=2. If1 ≤ f(x) ≤ q then the number of neighbors of z in hl (1) is equal to mτ1 +ατ1 +βτ2. In the case q +1 ≤ f(x) ≤ 2q + 1, the number of vertices of color 1 adjacent to z is equal to mτ2 + γτ1 + δτ2. Again, the condition m = γ − α = β − δ implies that the equality mτ1 + ατ1 + βτ2 = mτ2 + γτ1 + δτ2 holds for all τ1 and τ2. Thus, the invasion h is a perfect (b,c)-coloring of H(n+m, q) with b = γ(q−τ1)+β(q−τ2) and c = γτ1+βτ2.

4.5 Splitting construction I In this and next sections, we provide constructions that enable us to obtain perfect 2-colorings with new propor- tions of colors. We call them splitting constructions. The main idea is to start with multiplying the parameters of a 2-coloring by a factor q, as in Theorem 4.6; after this, with the help of 1-perfect code in H(q +1, q), one of the colors (say, the second one) is split into q “equivalent” colors; and finally, after some intermediate step, τ of these colors are unified with the first one, while the remaining q − τ colors form the new second color. So, the ratio of the colors changes as follows:

c : b = qc : qb → qc : b : ··· : b → qc + τb : (q − τ)b.

The constructions generalize the main construction in [13] from the case q = 2 to the case of an arbitrary q such that there exists a 1-perfect code in H(q +1, q). We divide their proofs into several lemmas. Firstly, for certain q and for every perfect (b,c)-coloring of H(n, q), we construct an appropriate perfect 2q-coloring. a b Lemma 4.11. Let f be a perfect coloring in H(n, q) with the quotient matrix . If there exists a 1-perfect c d  

8 code in H(q +1, q), then there exists a perfect 2q-coloring g of H(qn,q) with the quotient matrix a ··· a b ··· b ......  ......  a ··· a b ··· b T =   .  c ··· c d ··· d     ......   ......     c ··· c d ··· d      Proof. Let M 1,..., M q be a partition of the vertex set of H(q, q) into q distance-2 MDS codes such that each i i i M is partitioned into distance-3 MDS codes L1,..., Lq. The existence of such a decomposition, provided the existence a 1-perfect code in H(q +1, q), is guaranteed by Proposition 4.9. Define a q-ary quasigroup h of order q on the vertex set of H(q, q) as h(x1,...,xq)= i if and only if the vertex i (x1,...,xq) belongs to M . 1 n Recall that every vertex y = (y1,...,yqn) of H(qn,q) can be considered as a tuple y = (y ,...,y ) of n vertices i i y = (y(i−1)q+1,...,yiq) of H(q, q). For shortness, let Xy = (x1,...,xn) be a vertex of H(n, q) with xi = h(y ) and Jy = (j1,...,jn) be a vertex of H(n, q) such that ji is defined by the index of the distance-3 MDS code i i i h(y ) containing the vertex y : y ∈ Lji . For an arbitrary n-ary quasigroup R of order q on the vertex set of H(n, q), we define a coloring g of H(qn,q) as g(y)= q(f(Xy) − 1)+ R(Jy). So g is a 2q-coloring of H(qn,q) into colors {1,...,q,q +1,..., 2q}. i Let us prove that g is a perfect coloring with the quotient matrix T . Let Zα be the set of vertices z adjacent to y such that z differs from y in some component of yi from H(q, q) with α = h(zi) 6= h(yi). Given a vertex y with i i i f(Xy) = 1, there are exactly a sets Zα such that for all z ∈ Zα we have f(Xz) = 1 and b sets Zα with f(Xz)=2 i i i for all z ∈ Zα. Similarly, if f(Xy) = 2 then we have c sets Zα such that for all z ∈ Zα it holds f(Xz) = 1 and d i i sets Zα with f(Xz) = 2 for all z ∈ Zα. i Note that for each i and α the cardinality of the set Zα is equal to q and all these q vertices z are colored i α by g into q different colors. Indeed, their components z belong to different distance-3 MDS codes Lji (otherwise α k i we have a contradiction with the minimal distance in Lji ), and all other components z of z ∈ Zα coincide and h(zk) belong to the same codes Ljk . Since the quasigroup R takes all different values on the set of q vectors Jz i different in one position, vertices z ∈ Zα are colored by g into all q possible colors. Therefore, each vertex y with g(y) ∈ {1,...,q} is adjacent to exactly a vertices of each of the colors 1,...,q and is adjacent to b vertices of each of the colors q +1,..., 2q in the coloring g. The same is true for vertices y of colors g(y) ∈{q +1,..., 2q}. In case when one of the colors of a perfect 2-coloring f can be divided into k-dimensional faces, a similar method enables us to construct the following perfect (q + 1)-colorings. a b Lemma 4.12. Let f be a perfect coloring in H(n, q) with the quotient matrix such that the set of c d   vertices of the first color can be partitioned into k-faces. If there exists a 1-perfect code in H(q +1, q), then there exist perfect colorings g′ and g′′ in q +1 colors in H(qn,q) with the quotient matrices

a − k(q − 1) ··· a + k qb a + k(q − 1)2 ··· a − k(q − 1) qb ...... T ′ =  . . . .  ; T ′′ =  . . . .  . a + k ··· a − k(q − 1) qb a − k(q − 1) ··· a + k(q − 1)2 qb      c ··· c qd   c ··· c qd          Proof. In the proof of this lemma, we use the same notations as in Lemma 4.11. In addition, if a vertex x of H(n, q) is colored with the first color in the coloring f, then let Ix = {i1,...,ik} be the set of k free directions in the k-dimensional face Γ containing the vertex x in the demanded decomposition of this color into faces. We will say that Ix is the set of special directions for the vertex x. For an arbitrary n-ary quasigroup R′ of order q on vertices of H(n, q), define a coloring g′ of H(qn,q) as

i ′ i i h(y ) ′ ′ 1 n R (j1,...,jn) if f(Xy)=1, where ji = h(y ) for i ∈ IX and y ∈ L otherwise; g (y)= g (y ,...,y )= y ji ( q + 1 if f(Xy)=2, and for a (n − k)-ary quasigroup R′′ of order q define a coloring g′′ of H(qn,q) as

il ′′ il h(y ) ′′ ′′ 1 n R (ji1 ,...,jin−k ) if f(Xy)=1, where all il ∈/ IXy and y ∈ Lj ; g (y)= g (y ,...,y )= il ( q + 1 if f(Xy)=2.

9 Let us prove that g′ and g′′ are perfect (q + 1)-colorings with the quotient matrices T ′ and T ′′ respectively. i i As before, let Zα be a set of q vertices z adjacent to y such that z differs from y in some component of y from H(q, q) with α = h(zi) 6= h(yi). 1. We firstly prove that g′ is a perfect coloring. Assume that a vertex y is colored into one of the colors {1,...,q} by the coloring g′. Acting similar to the i proof of Lemma 4.11, we see that all q vertices z from the set Zα with i∈ / IXy and f(Xz) = 1 are colored into all i different colors. By definitions, all qb vertices z from sets Zα with f(Xz) = 2 are different from y in components i ′ y , where i is not a special direction (i∈ / IXy ), so all these vertices are colored into color q + 1 in the coloring g . i Consider the set of vertices Zα adjacent to the vertex y along a special direction i ∈ IXy . By definition of ′ i the coloring g , all q vertices z from Zα are colored into one color that is different from the color of the vertex y. i i Moreover, while α runs over all q − 1 values different from h(y ), the colors of the vertices in sets Zα run over all q − 1 colors different from the color of y. The above reasoning implies that in the coloring g′ every vertex y of a color from the set {1,...,q} is adjacent to a − k(q − 1) vertices of the same color, to qb vertices of the color q +1 and to a + k vertices of each of the remaining colors. ′ i If the vertex y is colored into the color q +1 by g then all vertices z from sets Zα are either colored into the color q + 1 (when f(Xz) = 2) or colored into all q colors {1,...,q} (when f(Xz) = 1), that gives us the required parameters. 2. Let us prove that g′′ is a perfect coloring. ′′ ′ The coloring g is different from g only in neighborhoods along special directions i ∈ IXy of vertices y for i which f(Xy) = 1. In that case, all q vertices z from the sets Zα are colored into the same color as the vertex y. It implies that in the coloring g′′ every vertex y of a color from the set {1,...,q} is adjacent to a + k(q − 1)2 vertices of the same color, to qb vertices of the color q +1 and to a − k(q − 1) vertices of each of the remaining colors. If the vertex y is colored into the color q + 1 by the coloring g′′, then we have the same coloring of its neighborhood as for the coloring g′. Remark 3. In constructions of colorings in Lemmas 4.11 and 4.12 we can take different quasigroups R, R′ and R′′ for suitable sets of vertices that gives many nonequivalent colorings with the same parameters. Now we are ready to prove the main constructions. We start with a construction working for perfect colorings with the non-positive second eigenvalue. Theorem 4.13. Assume that there is a 1-perfect code in H(q +1, q). If f is a (b,c)-coloring in H(n, q) with the second eigenvalue θ ≤ 0, then for all τ1, τ2 =0,...,q, τ1 +τ2 6=0, 2q there exists a (q(b+c)−(cτ1 +bτ2), cτ1 +bτ2)- coloring F of H(qn − θ, q). Moreover, F has the same second eigenvalue θ. Proof. Since there is a 1-perfect code in H(q+1, q), by Lemma 4.11 there is a perfect 2q-coloring g in the Hamming graph H(qn,q) with the quotient matrix

a ··· a b ··· b ......  ......  a ··· a b ··· b T =   .  c ··· c d ··· d     ......   ......     c ··· c d ··· d      Let m = c − a = b − d = −θ. By the hypothesis of the theorem, we have m ≥ 0. With the help of Propo- sition 4.10(2), we obtain that for each τ1, τ2 = 0,...,q there exists a (˜b, c˜)-coloring F of H(qn + m, q) with ˜b = q(b + c) − cτ1 − bτ2 andc ˜ = cτ1 + bτ2. The second eigenvalue of the perfect coloring F is

θ˜ = (q − 1)(qn − θ) − ˜b − c˜ = (q − 1)(qn − θ) − q(b + c) = (q − 1)(qn − θ) − q((q − 1)n − θ)= θ.

The next theorem is a more general variant of the construction above, applicable when the first color of a perfect coloring f can be divided into k-dimensional faces. Theorem 4.14. Assume that there is a 1-perfect code in H(q +1, q). Let f be a (b,c)-coloring of H(n, q) with the second eigenvalue θ. Suppose that the vertex set of the first color of f can be partitioned into k-faces. Then the following holds: 1. If θ + k ≤ 0, then for all τ =1,...,q there is a (q(b + c) − τc,τc)-coloring F of H(qn − θ − k, q). The second eigenvalue of F is θ − k(q − 1).

10 2. If θ ≤ k(q − 1), then for all τ =1,...,q there is a (q(b + c) − τc,τc)-coloring F of H(qn − θ + k(q − 1), q). The second eigenvalue of F is θ + k(q − 1)2. Proof. 1. Since there is a 1-perfect code in H(q +1, q), by Lemma 4.12 there is a perfect (q + 1)-coloring g′ in H(qn,q) with the quotient matrix

a − k(q − 1) ··· a + k qb . .. . . T ′ =  . . . .  . a + k ··· a − k(q − 1) qb    c ··· c qd      Let m be c − a − k = −θ − k ≥ 0. With the help of Proposition 4.10(1), we obtain that for each τ =0,...,q there exists a (˜b, c˜)-coloring F of H(qn + m, q) with ˜b = q(b + c) − cτ andc ˜ = cτ. The second eigenvalue of the perfect coloring F is

θ˜ = (q − 1)(qn − θ − k) − ˜b − c˜ = (q − 1)(qn − θ − k) − q(b + c)= θ − k(q − 1).

2. Since there is a 1-perfect code in H(q +1, q), by Lemma 4.12 there exists a perfect (q + 1)-coloring g′′ of H(qn,q) with the quotient matrix

a + k(q − 1)2 ··· a − k(q − 1) qb . .. . . T ′′ =  . . . .  . a − k(q − 1) ··· a + k(q − 1)2 qb    c ··· c qd      Let m be c − a + k(q − 1) = −θ + k(q − 1) ≥ 0. With the help of Proposition 4.10(1), we obtain that for each τ =0,...,q there exists a (˜b, c˜)-coloring F of H(qn + m, q) with ˜b = q(b + c) − cτ andc ˜ = cτ. The second eigenvalue of F is

θ˜ = (q − 1)(qn − θ + k(q − 1)) − ˜b − c˜ = θ + k(q − 1)2.

Note that for the perfect coloring F constructed in Theorem 4.14(2) the vertex set of the first color can be partitioned into kq-dimensional faces. Moreover, for the second eigenvalue of the new coloring we have the inequality θ + k(q − 1)2 ≤ kq(q − 1). So we can iteratively apply Theorem 4.14(2) to the resulting coloring F . Corollary 4.15. Assume that there is a 1-perfect code in H(q +1, q). Let f be a (b,c)-coloring of H(n, q) with the second eigenvalue θ. If the vertex set of the first color of f can be partitioned into k-faces, then the following r holds. If θ ≤ k(q − 1), then for all τ1,...,τr = 1,...,q there is a (q (b + c) − τ1 ··· τrc, τ1 ··· τrc)-coloring of r qr −1 r H(q n + (k(q − 1) − θ) q−1 , q) with the second eigenvalue θ + k(q − 1)(q − 1).

4.6 Splitting construction II We conclude this section with one more splitting construction based on the covering of the graph pH(n, q)+n(p− 1)I by H(n,pq). Theorem 4.16. Let f be a (q2 − 1, 1)-coloring of H(q +1, q) corresponding to a 1-perfect code such that the vertex set of the second (non-code) color can be partitioned into lines. Then for every p ∈ N and for each τ, 0 ≤ τ ≤ p − 1 there exists a ((q2 − 1)(p − τ), (q2 − 1)τ + p)-coloring of H(q +1, pq) (with the second eigenvalue q(p − 1) − 1). −1 Zq+1 Proof. For a vertex x ∈ f (2) ⊂ q , let ix denote the direction of the line containing this vertex in the demanded partition. We will say that ix is the special direction for the vertex x. For a vertex y of H(q +1, pq), we ′ denote by Xy the vertex of H(q +1, q) defined as Xy ≡ y mod q entrywise, and by Xy, the vertex of H(q +1,p) y1 yq+1 equal to (⌊ q ⌋,..., ⌊ q ⌋). Let g be a(q(p − τ), qτ)-perfect coloring in H(q,p) corresponding to a τ-fold MDS code in this graph. Define a coloring h in H(q +1, pq) as follows

1 q+1 1 if f(Xy) = 1; h(y)= h(y ,...,y )= ′ ′ g(x ,...,x ) if f(Xy)=2, where all il 6= iX ,  i1 iq y ′ ′ ′ where (x1,...,xq+1)= Xy. Let us show that the coloring h is a perfect coloring of H(q +1, pq) with demanded parameters.

11 1. Let y be a vertex of H(q +1, pq) colored by h into the first color. Let us count the number of 2-colored α vertices z adjacent to y. Denote Zi to be the set of p vertices adjacent to y such that zi ≡ α 6≡ yi mod q. Assume that f(Xy) = 1. Note that there are no adjacent vertices z colored by h into second color such that 2 α f(Xz) = 1. For each vertex y there are exactly q − 1 sets Zi and, because i is not a special direction for all Xz, α α z ∈ Zi , each set Zi contains exactly τ vertices colored by h into the first color and p − τ vertices colored into the second color. So each such vertex y is adjacent to (q2 − 1)(p − τ) vertices of the second color. Suppose now that f(Xy) = 2. By the definition of the coloring h, there are q(p − τ) vertices z adjacent to y 2 α such that yi ≡ zi mod q for all i and h(z) = 2. As before, for each vertex y there are exactly q − 1 sets Zi .

If i = iXy is a special direction for the vertex Xy in H(q +1, q), then for all α 6≡ yi mod q all vertices z from α 2 α the sets Zi are colored into the first color by h. On the other hand, if i 6= iXy then each of q − q − 1 sets Zi with f(Xz) = 2 contains exactly τ vertices z such that h(z) = 1 and p − τ vertices z for which h(z) = 2. The α remaining set Zi with z such that f(Xz) = 1 contains only vertices colored into the first color by h. Summing up, each such vertex y with h(y) = 1 is adjacent to (q2 − 1)(p − τ) vertices of the second color in the coloring h. 2. Let y be a vertex of H(q +1, pq) colored by h into the second color and let us count the number of vertices z adjacent to y and colored to the first color. Note that for all such vertices y we have f(Xy) = 2. By the definition of the coloring h, there are qτ vertices z adjacent to y such that yi ≡ zi mod q for all i and α h(z) = 1. Consider the sets Zi of vertices z adjacent to y such that zi ≡ α 6≡ yi mod q. If i = iXy is the special α direction for the vertex Xy in H(q +1, q), then for all α 6≡ yi mod q all vertices z from the sets Zi are colored 2 α into the second color by h. On the other hand, if i 6= iXy , then each of q − q − 1 sets Zi with f(Xz) = 2 contains α exactly τ vertices z such that h(z) = 1 and p − τ vertices z for which h(z) = 2. As before, the remaining set Zi with z satisfying f(Xz) = 1 contains only vertices colored by h into the first color. Summing up, each vertex y with h(y) = 2 is adjacent to (q2 − 1)τ + p vertices of the first color in the coloring h. The second eigenvalue of h is

θ˜ = (q + 1)(pq − 1) − q2p = q(p − 1) − 1.

Remark 4. The second color of the constructed coloring h can be also partitioned into lines. So Theorem 4.16 allows an iterative application. Let us say few words on parameters for which the above constructions are applicable. By Proposition 2.1, we can use (once or recursively) the construction from Theorem 4.14(1) for all (b,c)- colorings in H(n, 2) with the non-positive second eigenvalue. Theorem 4.14(2) can be used for constructing perfect colorings from colorings given after the application of Theorem 4.16, because this theorem gives colorings with large second eigenvalue and such that one of their colors can be split into faces. As is stated in Proposition 2.1, the second color of a (3, 1)-coloring of H(3, 2) can be partitioned into edges (1-faces, lines). The second color of a (8, 1)-coloring (the complement of a 1-perfect code) in H(4, 3) can be partitioned into lines. It is straightforward to verify that all such partitions are equivalent to the following

Therefore, Theorem 4.16 is applicable for q =2 or q = 3 and gives us the following perfect colorings. Corollary 4.17. 1. For each p ∈ N and τ = 0,...,p − 1 there exists a perfect (3p − 3τ,p +3τ)-coloring of H(3, 2p) (with the second eigenvalue θ =2p − 3). 2. For each p ∈ N and τ = 0,...,p − 1 there exists a perfect (8p − 8τ,p +8τ)-coloring of H(4, 3p) (with the second eigenvalue θ =3p − 4). For cases q ≥ 4 we need to answer the following question. Question 1. Given q ≥ 4, does there exist a decomposition into 1-dimensional faces of the complement of a 1-perfect code in H(q +1, q)?

12 4.7 All constructions In the following table we summarize all general constructions considered in the present paper.

input input Th. necessary conditions output (b, c) output (n, q) output θ (b,c) (n, q) — — τ-fold q = ps is a prime power; n = (n(q − 1) − τ + (n, q) −1 perfect (qm − 1)/(q − 1) 1, τ) code — — τ-fold none (n(q − τ),τn) (n, q) −n MDS code c(pm − 1) — — 4.8 q = ps is a prime power; (c(pm − 1),c) , q −c q − 1 ∃ c-fold spread from s-   Zm dimensional subspaces of p 4.5 u ∈ N (b,c) (n + u, q) θ + u(q − 1) 4.6 v ∈ N (vb,vc) (nv,q) vθ 4.7 p ∈ N (pb,pc) (n,pq) pθ + n(p − 1) 4.13 ∃ 1-perfect code in H(q+1, q); (q(b + c) − (qn − θ, q) θ θ ≤ 0; τ1, τ2 = 0,...,q, τ1 + (cτ1 + τ2 6=0, 2q bτ2), cτ1 + bτ2) (b,c) (n, q) 4.14(1) ∃ 1-perfect code in H(q+1, q); (q(b + c) − (qn − θ − k, q) θ − k(q − 1) first color can be partitioned τc,τc) into k-faces; θ + k ≤ 0; τ = 1,...,q 4.14(2) ∃ 1-perfect code in H(q+1, q); (q(b + c) − (qn−θ +k(q − θ + k(q − 1)2 first color can be partitioned τc,τc) 1), q) into k-faces; θ ≤ k(q−1); τ = 1,...,q (q2−1, 1) (q+1, q) 4.16 second color can be parti- ((q2 − 1)(p − (q +1, pq) q(p − 1) − 1 tioned into 1-faces; p ∈ N, τ), (q2 − 1)τ + 0 ≤ τ ≤ p − 1 p)

5 Admissible parameters of perfect 2-colorings of H(n,q)

We first mention a well-known corollary from Theorem 4.5, which implies the following alternative for the existence of perfect (b,c)-colorings in Hamming graphs for given a and b. Corollary 5.1. Given q, b and c, either there are no (b,c)-colorings of H(n, q) for all n ∈ N, or there is n0 = n0(b,c,q) such that (b,c)-colorings of H(n, q) exist if and only if n ≥ n0.

We call parameters q, b and c satisfying the second alternative admissible, and we will say that n0 = n0(b,c; q) is the threshold. On the base of above theorems and some computation results, we put forward the following conjecture. b+c k Conjecture 3. Parameters q, and b ≥ c 6= 1 are admissible if and only if gcd(b,c) divides q for some k ∈ N. Necessity of this condition is established in Theorem 3.3 (by Theorem 3.4, it is not sufficient if c = 1). Combining the obtained constructions of perfect 2-colorings, we confirm Conjecture 3 for some cases and provide some bounds on the threshold n0. We start with some sufficient conditions on admissible parameters (b,c) when q is a prime power. ′ b ′ c Recall that we use notation b = gcd(b,c) and c = gcd(b,c) . Theorem 5.2. Let q = ps be a power of prime p. If for given b and c we have b′ + c′ = qk for some k ∈ N, then the parameters b and c are admissible. Moreover, the threshold n0 = n0(b,c; q) satisfies the inequalities b b + c b + c − gcd(b,c) max , + k − 1 ≤ n ≤ . q − 1 q 0 q − 1   Proof. Note that the parameters b and c satisfy the necessary condition of Theorem 3.3. In addition, if c = 1 then b and c are relatively prime and coincide with b′ and c′. So, b = qk − 1 and it is divisible by q − 1 as is claimed in Theorem 3.4. To prove sufficiency, we need to construct a (b,c)-coloring f in H(n, q) for some n. Denote m = gcd(b,c), b′ = b/m, and c′ = c/m. We have b′ + c′ = qk and b + c = mqk for some k. As it was stated in Subsection 4.3,

13 ′ qk −1 ′ ′ ′ ′ ′ for n = q−1 there is a c -fold 1-perfect code in H(n , q), corresponding to a (b ,c )-coloring f . With the help of Theorem 4.6, we multiply the perfect coloring f ′ by m and obtain a (b,c)-coloring in the graph H(n, q) with

qk − 1 b + c − gcd(b,c) n = mn′ = m = . q − 1 q − 1

Let us prove the lower bound on the threshold n0. Since for every (b,c)-coloring in H(n, q) the parameter b b is not greater than the degree n(q − 1) of the graph H(n, q), we have n0 ≥ q−1 . By Theorem 3.3, if there k−1 exists a (b,c)-coloring in H(n, q), then qk divides qn−mq +1. Since q is a prime power, we get the inequality k−1 n0 ≥ mq + k − 1. Additionally, the construction of perfect colorings from additive codes (Section 4.2) enables us to solve the existence of (b,c)-colorings in some cases when q is a power of prime p and b′ + c′ is also a power of p but not necessarily a power of q. Proposition 5.3. Assume that s and m are integers satisfying 1 ≤ s ≤ m, p is a prime number, q = ps, and l q−1 is a divisor of both s and m. If c = pl−1 , then, vc(pm − 1) vc(pm − 1) n (vc(pm − 1),vc; q)= and n (vc(pm − τ),vτc; q) ≤ 0 q − 1 0 q − 1 for any τ ∈{1,...,pm − 1} and v > 0. Proof. By Theorem 4.2.7 [22] on the existence of multifold spreads, the hypothesis of the proposition guarantees Zm the existence of a collection of subspaces of p satisfying p.(i) in Theorem 4.8. By Theorem 4.8, there is an m m m (p −1)c m c(p −1) additive code corresponding to a ((p − 1)c,c)-coloring in H( q−1 , q). This gives n0(c(p − 1),c; q)= q−1 (we cannot reduce the dimension because the first element of the quotient matrix is 0) and, by Theorem 4.6, m m vc(p −1) n0(vc(p − 1),vc; q)= q−1 . Unifying τ cosets of the additive code and again applying Theorem 4.6, we get a coloring supporting the inequality part of the claim. As a direct corollary of Theorem 5.2, we have that Conjecture 3 holds for the case of prime q. Theorem 5.4. Assume that q is a prime number. 1. The parameters b,c and q are admissible if and only if b′ + c′ = qk for some k ∈ N.

′ ′ k 2. If b + c = q for some k ∈ N then the threshold parameter n0 for existence of (b,c)-colorings satisfies the inequalities b b + c b + c − gcd(b,c) max , + k − 1 ≤ n ≤ . q − 1 q 0 q − 1   Proof. It is sufficient to note that in case of prime q the condition from Theorem 3.3 (b′ + c′ divides some power of q) is equivalent to that b′ + c′ is a power of q. It only remains to use Theorem 5.2.

In certain cases, we can give the exact value of the threshold n0: Corollary 5.5. Let q be a prime.

b+c 1. If b and c satisfy gcd(b,c) = q, then n0 = gcd(b,c).

2 2. If b and c are relatively prime such that b + c = q , then n0 = q +1.

6 Conclusion

We studied the problem of parameters of perfect 2-colorings in Hamming graphs, considering several known and new constructions and generating tables of small parameters. In the conclusion, we highlight one subcase of the general problem, namely, the problem of the existence of perfect 2-colorings of H(n, q) with quotient a b matrix satisfying a = 0, i.e., when the first color is an independent set. The existence of such colorings is c d   qnc b+c equivalent to the existence of an orthogonal array OA( b+c , n, q, q −1) attaining the Bierbrauer–Friedman bound. First examples of such colorings correspond to 1-perfect codes, and next we can multiply the quotient matrix by a constant (the corresponding orthogonal arrays can be constructed as linear codes and are well known). In the binary case, the main recursive construction in [13] enables one to reduce the parameter a in the quotient matrix step by step until a = 0. This gives an infinite series of parameters, including, for example, (13, 3)-, (29, 3)-, (59, 5)-colorings with a = 0 (OA(1536, 13, 2, 7), OA(3 · 224, 29, 2, 15), OA(5 · 253, 59, 2, 31)). In the non-binary

14 case, the analog of the Fon-Der-Flaass construction (Splitting I) does not allow us to reduce a, and we can only construct perfect 2-colorings with a = 0 as additive codes. The additive construction gives new parameters for nonprime prime-power q, but for odd prime q the question of the existence of 2-colorings in H(n, q) with a = 0 that do not come from perfect codes is open. The only parameters with a = 0 for which the nonexistence of colorings is known are the parameters of (14, 4)-colorings in H(7, 3), corresponding to OA(2 · 35, 7, 3, 5) [19]. In this direction, the first open questions are about (25, 7)-colorings in H(25, 2), (22, 5)-colorings in H(11, 3), (39, 9)-colorings in H(13, 4).

Acknowledgements

This work was funded by the Russian Science Foundation under grant 18-11-00136 (Sections 1–A.2, except The- orems 4.13 and 4.14(1), whose early versions occurred as a part of the graduate thesis of Aleksandr Matiushev in the Novosibirsk State University); the work of Anna Taranenko was supported in part (Section A.3) by an award of the contest “Young Russian Mathematics”.

References

[1] S. V. Avgustinovich and I. Yu. Mogilnykh. Perfect 2-colorings of Johnson graphs J(6, 3) and J(7, 3). In A.´ Barbero, editor, Coding Theory and Applications (Second International Castle Meeting, ICM- CTA 2008, Castillo de la Mota, Medina del Campo, Spain, September 15-19, 2008. Proceedings), vol- ume 5228 of Lect. Notes Comput. Sci., pages 11–19. Springer-Verlag, Berlin Heidelberg, 2008. DOI: 10.1007/978-3-540-87448-5 2. [2] R. A. Bailey, P. J. Cameron, A. L. Gavrilyuk, and S. V. Goryainov. Equitable partitions of Latin-square graphs. J. Comb. Des., 27(3):142–160, Dec. 2018. DOI: 10.1002/jcd.21634. [3] J. Bamberg, M. Law, and T. Penttila. Tight sets and m-ovoids of generalised quadrangles. Combinatorica, 29(1), 2009. DOI: 10.1007/s00493-009-2179-x.

[4] J. Bierbrauer. Bounds on orthogonal arrays and resilient functions. J. Comb. Des., 3(3):179–183, 1995. DOI: 10.1002/jcd.3180030304. [5] J. Bierbrauer, K. Gopalakrishnan, and D. R. Stinson. Orthogonal arrays, resilient functions, error- correcting codes, and linear programming bounds. SIAM J. Discrete Math., 9(3):424–452, Aug. 1996. DOI: 10.1137/S0895480194270950. [6] A. Blokhuis and Brouwer A. E. Small additive quaternary codes. Eur. J. Comb., 25(2):161–167, Feb. 2004. DOI: 10.1016/S0195-6698(03)00096-9. [7] J. Borges, J. Rif`a, and V. A. Zinoviev. On completely regular codes. Probl. Inf. Transm., 55(1):1–45, Jan. 2019. DOI: 10.1134/S0032946019010010. [8] A. E. Brouwer, A. M. Cohen, and A. Neumaier. Distance-Regular Graphs. Springer-Verlag, Berlin, 1989. DOI: 10.1007/978-3-642-74341-2. [9] R. Canogar. Partition designs with two subsets of the Hamming space. In 6th International Conference on Graph Theory, volume 5, pages 53–55. July 2000. DOI: 10.1016/S1571-0653(05)80123-4. [10] S. De Winter and K. Metsch. Perfect 2-colorings of the Grassmann graph of planes. Electr. J. Comb., 27(1):#P1.21(1–19), Jan. 2020. DOI: 10.37236/8672. [11] P. Delsarte. An Algebraic Approach to Association Schemes of Coding Theory, volume 10 of Philips Res. Rep., Supplement. N.V. Philips’ Gloeilampenfabrieken, Eindhoven, 1973. [12] D. G. Fon-Der-Flaass. A bound on correlation immunity. Sib. Elektron.` Mat. Izv., 4:133–135, 2007. Online: http://mi.mathnet.ru/eng/semr149.

[13] D. G. Fon-Der-Flaass. Perfect 2-colorings of a hypercube. Sib. Math. J., 48(4):740–745, 2007. DOI: 10.1007/s11202-007-0075-4 translated from Sib. Mat. Zh. 48(4) (2007), 923-930. [14] D. G. Fon-Der-Flaass. Perfect colorings of the 12-cube that attain the bound on corre- lation immunity. Sib. Elektron.` Mat. Izv., 4:292–295, 2007. In Russian. English translation: https://arxiv.org/abs/1403.8091. [15] J. Friedman. On the bit extraction problem. In Foundations of Computer Science, IEEE Annual Symposium on, pages 314–319, Los Alamitos, CA, USA, 1992. IEEE Computer Society. DOI: 10.1109/SFCS.1992.267760.

15 [16] A. L. Gavrilyuk and S. V. Goryainov. On perfect 2-colorings of Johnson graphs J(v, 3). J. Comb. Des., 21(6):232–252, July 2013. DOI: 10.1002/jcd.21327. [17] C. D. Godsil. Algebraic Combinatorics. Chapman and Hall, New York, 1993. [18] S. W. Golomb and E. C. Posner. Rook domains, latin squares, and error-distributing codes. IEEE Trans. Inf. Theory, 10(3):196–208, 1964. DOI: 10.1109/TIT.1964.1053680. [19] A. Hedayat, J. Stufken, and G. Su. On the construction and existence of orthogonal arrays with three levels and indexes 1 and 2. Ann. Stat., 25(5):2044–2053, March 1997. DOI: 10.1214/aos/1069362386. [20] A. S. Hedayat, N. J. A. Sloane, and J. Stufken. Orthogonal Arrays. Theory and Applications. Springer Series in Statistics. Springer, New York, NY, 1999. DOI: 10.1007/978-1-4612-1478-6. [21] O. Heden and C. Roos. The non-existence of some perfect codes over non-prime power alphabets. Discrete Math., 311(14):1344–1348, 2011. DOI: 10.1016/j.disc.2011.03.024. [22] J. W. P. Hirschfeld. Projective Geometries Over Finite Fields. Oxford University Press, New York, 1979. [23] J. Y. Hyun. Local duality for equitable partitions of a Hamming space. J. Comb. Theory, Ser. A, 119(2):476– 482, Feb. 2012. DOI: 10.1016/j.jcta.2011.10.006. [24] A. V. Khalyavin. Estimates of the capacity of orthogonal arrays of large strength. Mosc. Univ. Math. Bull., 65(3):130–131, 2010. DOI: 10.3103/S0027132210030101. [25] J. I. Kokkala, D. S. Krotov, and P. R. J. Osterg˚ard.¨ On the classification of MDS codes. IEEE Trans. Inf. Theory, 61(12):6485–6492, December 2015. DOI: 10.1109/TIT.2015.2488659. [26] J. Koolen, D. Krotov, and W. Martin. Completely regular codes: Tables. Online: https://sites.google.com/site/completelyregularcodes/. [27] D. S. Krotov. On the binary codes with parameters of doubly-shortened 1-perfect codes. Des. Codes Cryptography, 57(2):181–194, 2010. DOI: 10.1007/s10623-009-9360-5. [28] D. S. Krotov. On weight distributions of perfect colorings and completely regular codes. Des. Codes Cryptography, 61(3):315–329, 2011. DOI: 10.1007/s10623-010-9479-4. [29] D. S. Krotov. On the binary codes with parameters of triply-shortened 1-perfect codes. Des. Codes Cryptography, 64(3):275–283, 2012. DOI: 10.1007/s10623-011-9574-1. [30] D. S. Krotov. On calculation of the interweight distribution of an equitable partition. J. Algebr. Comb., 40(2):373–386, 2014. DOI: 10.1007/s10801-013-0492-3. [31] D. S. Krotov. On the OA(1536,13,2,7) and related orthogonal arrays. Discrete Math., 343:111659/1–11, 2020. DOI: 10.1016/j.disc.2019.111659. [32] D. S. Krotov, I. Yu. Mogilnykh, and A. Yu. Vasil’eva. On completely regular codes of covering radius 1 in the halved hypercubes. E-print 1812.03159, arXiv.org, 2018. [33] D. S. Krotov and V. N. Potapov. On multifold packings of radius-1 balls in Hamming graphs. IEEE Trans. Inf. Theory, 2021. To appear, DOI: 10.1109/TIT.2020.3046260. [34] D. S. Krotov and K. V. Vorob’ev. On unbalanced Boolean functions with best correlation immunity. Electr. J. Comb., 27(1):#P1.45(1–24), 2020. DOI: 10.37236/8557.

[35] S. P. Lloyd. Binary block coding. Bell Syst. Tech. J., 36(2):517–535, 1957. DOI: 10.1002/j.1538-7305.1957.tb02410.x.

[36] W. J. Martin. Completely regular designs of strength one. J. Algebr. Comb., 3(2):177–185, Apr. 1994. DOI: 10.1023/A:1022493523470. [37] I. A. Matkin. Cameron-Liebler line classes in PG(n, 5). Trudy Instituta Matematiki i Mekhaniki URO RAN, 24(2):158–172, 2018. DOI: 10.21538/0134-4889-2018-24-2-158-172. [38] A. Meyerowitz. Cycle-balanced conditions for distance-regular graph. Discrete Math., 264(3):149–166, March 2003. DOI: 10.1016/S0012-365X(02)00557-5. [39] I. Yu. Mogilnykh and A. A. Valyuzhenich. Equitable 2-partitions of the Hamming graphs with the second eigenvalue. Discrete Math., 343(11):112039(1–9), Nov. 2020. DOI: 10.1016/j.disc.2020.112039.

16 [40] V. N. Potapov. On perfect colorings of Boolean n-cube and correlation immune functions with small density. Sib. Elektron.` Mat. Izv., 7:372–382, 2010. In Russian, English abstract.

[41] V. N. Potapov. On perfect 2-colorings of the q-ary n-cube. Discrete Math., 312(6):1269–1272, 2012. DOI: 10.1016/j.disc.2011.12.004. [42] S. A. Puzynina. On periodicity of perfect colorings of the infinite hexagonal and triangular grids. Sib. Math. J., 52(1):91–104, 2011. DOI: 10.1134/S0037446606010101 translated from Sib. Mat. Zh., 52(1): 115–132, 2011. [43] H. S. Shapiro and D. L. Slotnick. On the mathematical theory of error correcting codes. IBM J. Res. Dev., 3(1):25–34, 1959. [44] A. Yu. Vasil’eva. Local and interweight spectra of completely regular codes and of perfect col- orings. Probl. Inf. Transm., 45(2):151–157, 2009. DOI: 10.1134/S0032946009020069, translated from Probl. Peredachi Inf., 45(2):84-90, 2009. [45] A. Yu. Vasil’eva. Local distributions for eigenfunctions and perfect colorings of q-ary hamming graph. Des. Codes Cryptography, 87(2-3):509–516, Mar. 2019. DOI: 10.1007/s10623-018-0559-1.

17 A Appendix. Perfect colorings in Hamming graphs of small sizes

We use the following notations for the columns of further tables Lower bounds: b a – degree bound a ≥ 0: n = q−1 . b+c b+c k k – bound from Theorem 3.3:ln =m q + k − 1, where k is the minimal integer such that gcd(b,c) divides q . Constructions: ∗ – multiplication of length (Theorem 4.6). q – multiplication of alphabet (Theorem 4.7). P – 1-perfect codes, multifold 1-perfect codes, additive codes (Sections 4.2 and 4.3). F – best of the splitting-I constructions (Theorems 4.13 and 4.14). S – multiplication of alphabet of a 1-perfect code in H(q +1, q) with splitting of the second color (splitting-II, Theorem 4.16). The best lower bounds and constructions for given parameters (b,c) are bold in each row. If there is a gap between lower bounds and constructions for a (b,c)-coloring, then the corresponding row is highlighted by color. The sign “?” in the last column means that no (b,c)-colorings are known in H(n, q) for any n.

18 A.1 Case q =3, illustrating prime q b+c b′+c′ (b,c) a k LB * P F UB 3 3 (2,1) 1 1 1 – 1 – 1 6 3 (4,2) 2 2 2 2 – – 2 9 3 (6,3) 3 3 3 3 4 4 3 9 9 (5,4) 3 4 4 – 4 4 4 9 9 (7,2) 4 4 4 – 4 4 4 9 9 (8,1) 4 4 4 – 4 4 4 12 3 (8,4) 4 4 4 4 – – 4 15 3 (10,5) 5 5 5 5 – – 5 18 3 (12,6) 6 6 6 6 – 8 6 18 9 (10,8) 5 7 7 8 – 8 8 18 9 (14,4) 7 7 8† 8 – 8 8 18 9 (16,2) 8 7 8 8 – 8 8 21 3 (14,7) 7 7 7 7 – – 7 24 3 (16,8) 8 8 8 8 – – 8 27 3 (18,9) 9 9 9 9 13 12 9 27 9 (15,12) 8 10 10 12 13 12 12 27 9 (21,6) 11 10 11 12 13 12 12 27 9 (24,3) 12 10 12 12 13 12 12 27 27 (14,13) 7 11 11 – 13 13 13 27 27 (16,11) 8 11 11 – 13 12 12 27 27 (17,10) 9 11 11 – 13 13 13 27 27 (19,8) 10 11 11 – 13 12 12 27 27 (20,7) 10 11 11 – 13 13 13 27 27 (22,5) 11 11 11 – 13 13 13 27 27 (23,4) 12 11 12 – 13 13 13 27 27 (25,2) 13 11 13 – 13 13 13 27 27 (26,1) 13 11 13 – 13 13 13 30 3 (20,10) 10 10 10 10 – – 10 33 3 (22,11) 11 11 11 11 – – 11 36 3 (24,12) 12 12 12 12 – 16 12 36 9 (20,16) 10 13 13 16 – 16 16 36 9 (28,8) 14 13 14 16 – 16 16 36 9 (32,4) 16 13 16 16 – 16 16 39 3 (26,13) 13 13 13 13 – – 13 42 3 (28,14) 14 14 14 14 – – 14 45 3 (30,15) 15 15 15 15 – 20 15 45 9 (25,20) 13 16 16 20 – 20 20 45 9 (35,10) 18 16 18 20 – 20 20 45 9 (40,5) 20 16 20 20 – 20 20 48 3 (32,16) 16 16 16 16 – – 16 51 3 (34,17) 17 17 17 17 – – 17 54 3 (36,18) 18 18 18 18 – 24 18 54 9 (30,24) 15 19 19 24 – 24 24 54 9 (42,12) 21 19 21 24 – 24 24 54 9 (48,6) 24 19 24 24 – 24 24 54 27 (28,26) 14 20 20 26 – 26 26 54 27 (34,20) 17 20 20 26 – 26 26 54 27 (38,16) 19 20 20 24 – 26 24 54 27 (40,14) 20 20 20 26 – 26 26 54 27 (44,10) 22 20 22 26 – 26 26 54 27 (46,8) 23 20 23 26 – 26 26 54 27 (50,4) 25 20 25 26 – 26 26 54 27 (52,2) 26 20 26 26 – 26 26

†: (14, 4)-colorings in H(7, 3) do not exist because there are no OA(2 · 35, 7, 3, 5) [19].

19 A.2 Case q =4, illustrating a prime power q b + c b′ + c′ (b,c) a k LB * q P FS UB 4 2 ( 2, 2) 1 1 1 – 1 1 – – 1 4 4 ( 3, 1) 1 1 1 – – 1 – – 1 8 2 ( 4, 4) 2 2 2 2 2 – – – 2 8 4 ( 6, 2) 2 2 2 2 3 – –– 2 8 8 ( 5, 3) 2 3 3 – – – – 3 3 12 2 ( 6, 6) 2 3 3 3 3 – – – 3 12 4 ( 9, 3) 3 3 3 3 – – –– 3 16 2 ( 8, 8) 3 4 4 4 4 5 5 – 4 16 4 (12, 4) 4 4 4 4 6 5 5– 4 16 8 (10, 6) 4 5 5 6 6 5 5 – 5 16 8 (14, 2) 5 5 5 – 7 5 5 – 5 16 16 ( 9, 7) 3 5 5 – – 5 5 – 5 16 16 (11, 5) 4 5 5 – – 5 5 – 5 16 16 (13, 3) 5 5 5 – – 5 5 – 5 16 16 (15, 1) 5 5 5 – – 5 5 – 5 20 2 (10,10) 4 5 5 5 5 – – – 5 20 4 (15, 5) 5 5 5 5 – – –– 5 24 2 (12,12) 4 6 6 6 6 – – – 6 24 4 (18, 6) 6 6 6 6 – – –– 6 24 8 (15, 9) 5 7 7 9 – 7 – – 7 24 8 (21, 3) 7 7 7 – – 7 – – 7 28 2 (14,14) 5 7 7 7 7 – – – 7 28 4 (21, 7) 7 7 7 7 – – –– 7 32 2 (16,16) 6 8 8 8 8 – 10 – 8 32 4 (24, 8) 8 8 8 8 12 – 10 – 8 32 8 (20,12) 7 9 9 10 12 – 10 – 10 32 8 (28, 4) 10 9 10 10 14 – 10 – 10 32 16 (18,14) 6 9 9 10 12 – 10 – 10 32 16 (22,10) 8 9 9 10 13 – 10 – 10 32 16 (26, 6) 9 9 9 10 13 – 10 – 10 32 16 (30, 2) 10 9 10 10 15 – 10 – 10 32 32 (17,15) 6 10 10 – – – – – ? 32 32 (19,13) 7 10 10 – – – – – ? 32 32 (21,11) 7 10 10 – – – – – ? 32 32 (23, 9) 8 10 10 – – – 14 – 14 32 32 (25, 7) 9 10 10 – – – – – ? 32 32 (27, 5) 9 10 10 – – – – – ? 32 32 (29, 3) 10 10 10 – – – 14 – 14 36 2 (18,18) 6 9 9 9 9 – – – 9 36 4 (27, 9) 9 9 9 9 – – –– 9 40 2 (20,20) 7 10 10 10 10 – – – 10 40 4 (30,10) 10 10 10 10 15 – – – 10 40 8 (25,15) 9 11 11 15 – 12 – – 12 40 8 (35, 5) 12 11 12 – – 12 – – 12 44 2 (22,22) 8 11 11 11 11 – – – 11 44 4 (33,11) 11 11 11 11 – – –– 11 48 2 (24,24) 8 12 12 12 12 – 15 – 12 48 4 (36,12) 12 12 12 12 18 – 15 – 12 48 8 (30,18) 10 13 13 14 18 14 15 – 14 48 8 (42, 6) 14 13 14 14 21 14 15 – 14 48 16 (27,21) 9 13 13 15 – – 15 – 15 48 16 (33,15) 11 13 13 15 – – 15 – 15 48 16 (39, 9) 13 13 13 15 – – 15 – 15 48 16 (45, 3) 15 13 15 15 – – 15 – 15

20 A.3 Case q =6, illustrating q which is not a prime power b + c b′ + c′ (b,c) a k LB * q P S UB 6 2 (3,3) 1 1 1 – 1 1 – 1 6 3 (4,2) 1 1 1 – 1 1 – 1 6 6 (5,1) 1 1 1 – – 1 – 1 12 2 (6,6) 2 2 2 2 2 – 3 2 12 3 (8,4) 2 2 2 2 2 – – 2 12 4 (9,3) 2 3 3 – 3 – 3 3 12 6 (10,2) 2 2 2 2 – – – 2 12 12 (7,5) 2 3 3 – – – – ? 18 2 (9,9) 2 3 3 3 – – – 3 18 3 (12,6) 3 3 3 3 3 – – 3 18 6 (15,3) 3 3 3 3 – – – 3 18 9 (10,8) 2 4 4 – 4 – 4 4 18 9 (14,4) 3 4 4 – 4 – – 4 18 9 (16,2) 4 4 4 – 4 – – 4 18 18 (11,7) 3 4 4 – – – – ? 18 18 (13,5) 3 4 4 – – – – ? 24 2 (12,12) 3 4 4 4 4 – – 4 24 3 (16,8) 4 4 4 4 4 – – 4 24 4 (18,6) 4 5 5 6 6 – – 6 24 6 (20,4) 4 4 4 5 – – – 5 24 8 (15,9) 3 6 6 – 6 – – 6 24 8 (21,3) 5 6 6 – 7 – – 7 24 12 (14,10) 3 5 5 – – – – ? 24 12 (22,2) 5 5 5 – – – – ? 24 24 (13,11) 3 6 6 – – – – ? 24 24 (17,7) 4 6 6 – – – – ? 24 24 (19,5) 4 6 6 – – – – ? 30 2 (15,15) 3 5 5 5 5 – – 5 30 3 (20,10) 4 5 5 5 5 – – 5 30 6 (25,5) 5 5 5 5 – – – 5 36 2 (18,18) 4 6 6 6 9 – – 6 36 3 (24,12) 5 6 6 6 6 – – 6 36 4 (27,9) 6 7 7 9 9 – – 9 36 6 (30,6) 6 6 6 6 – – – 6 36 9 (20,16) 4 7 7 8 8 – – 8 36 9 (28,8) 6 7 7 8 8 – – 8 36 9 (32,4) 7 7 7 8 8 – – 8 36 12 (21,15) 5 7 7 – – – – ? 36 12 (33,3) 7 7 7 – – – – ? 36 18 (22,14) 5 7 7 – – – – ? 36 18 (26,10) 6 7 7 – – – – ? 36 18 (34,2) 7 7 7 – – – – ? 36 36 (19,17) 4 7 7 – – – – ? 36 36 (23,13) 5 7 7 – – – – ? 36 36 (25,11) 5 7 7 – – – – ? 36 36 (29,7) 6 7 7 – – – – ? 36 36 (31,5) 7 7 7 – – – – ? 36 36 (35,1) 7 7 8‡ – – – – ?

‡: there are no 1-perfect codes in H(7, 6) [18], so there are no (35, 1)-colorings in H(7, 6).

21