A New Approach to the Kasami Codes of Type 2

The dual of the Kasami code of length <inline-formula> <tex-math notation="LaTeX">$q^{2}-1$ </tex-math></inline-formula>, with <inline-formula> <tex-math notation="LaTeX">$q$ </tex-math></inline-formula> a power of 2, is constructed by concatenating a cyclic MDS code of length <inline-formula> <tex-math notation="LaTeX">$q+1$ </tex-math></inline-formula> over <inline-formula> <tex-math notation="LaTeX">$F_{q}$ </tex-math></inline-formula> with a Simplex code of length <inline-formula> <tex-math notation="LaTeX">$q-1$ </tex-math></inline-formula>. This yields a new derivation of the weight distribution of the Kasami code, a new description of its coset graph, and a new proof that the Kasami code is completely regular. The automorphism groups of the Kasami code and the related <inline-formula> <tex-math notation="LaTeX">$q$ </tex-math></inline-formula>-ary MDS code are determined. New cyclic completely regular codes over finite fields a power of 2, generalized Kasami codes, are constructed; they have coset graphs isomorphic to that of the Kasami codes. Another wide class of completely regular codes, including additive codes, as well as unrestricted codes, is obtained by combining cosets of the Kasami or generalized Kasami code.


I. INTRODUCTION
Distance-regular graphs form the most extensively studied class of structured graphs due to their many connections with codes, designs, groups and orthogonal polynomials [1], [6].Since the times of Delsarte [7], a powerful way to create distance-regular graphs, especially in low diameters, has been to use the coset graph of completely regular codes.A linear or additive code is completely regular if the weight distribution of each coset solely depends on the weight of its coset leader.
Many such examples from Golay codes, Kasami codes, and others, can be found in [6].A recent survey is [5].
In this note we focus on the Kasami code of type (ii) in the sense of [6, § 11.2].This code was also studied in [3].It is a cyclic code of length 2 2m − 1 with the two zeros α, α 1+2 m , where α denotes a primitive root of F 2 2m .We call such a code a classical Kasami code.We give a new construction by concatenating a cyclic MDS code with a binary Simplex code.This gives a new derivation of its weight distribution, a non trivial calculation in [13], and a characterization of its automorphism group.
More generally, we construct generalized Kasami codes of lengths q 2 −1 p−1 , when q is an even power of p, and p itself a power of 2. This is obtained by concatenation of a q-ary cyclic MDS code with a p-ary Simplex code.The resulting code is cyclic with two zeros α, α (p−1)(1+q) , where α denotes a primitive root of F q 2 .When p > 2, we obtain in that way infinitely many new cyclic completely regular codes with a coset graph isomorphic to the coset graph of a Kasami code.
We emphasize that one of the main contributions of our research is in applying the concatenation with the Simplex code to cyclic codes, with the result being cyclic too.In general, the concatenation approach in the construction of linear completely regular codes is known, see [16], [17], [4], [5].In particular, in [4], the concatenation of dual-distance-3 MDS codes with the Simplex code was considered (note that a distance-3 MDS code, even non-linear, is always completely regular [12,Cor. 6]); the result is a two-weight q-ary code, whose dual is a covering-radius-2 completely regular code.We use a similar approach, but start with a cyclic dualdistance-4 MDS code, and prove also the cyclicity of the resulting p-ary (p is a power of two) completely regular code of covering radius 3, which is known as the Kasami code if p = 2, and is a new cyclic completely regular code if p > 2. In fact, concatenation with the Simplex code can be applied as well to produce a completely regular p-ary code from a linear completely regular q-ary code, q = p k , with the same intersection array, independently on the concrete parameters.Moreover, even more general approach guarantees that from any unrestricted (not necessarily linear or additive) qary completely regular code (and even an equitable partition) we can construct a completely regular code with the same intersection matrix over any alphabet p such that q is a power of p (the alphabet sizes p and q are not required to be prime powers).This approach is based on the existence of a locally bijective homomorphism, known as a covering, see, e.g., [8,Sect. 6.8], between the Hamming graphs H(n, q) (in the role of the cover) and H( q−1 p−1 n, p) (in the role of the target) of the same degree.With the inverse homomorphism, an equitable partition or completely regular code of the target graph automatically maps to an equitable partition or completely regular code, respectively, of the cover graph, with the same intersection matrix.This combinatorial approach is very powerful and allows to connect equitable partitions of different graphs, especially translation graphs (Cayley graphs over abelian groups), such as, for example, bilinear forms graphs and Hamming graphs.However, it does not always allow to track some nice algebraic properties of the codes such as cyclicity.
The material is arranged as follows.The next section collects the notions and notations needed for the rest of the paper.Section III describes the concatenation approach and the inner code used.Section IV gives a new description of the classical Kasami codes, including their weight distributions, and their automorphism groups.Section V describes the (new) generalized Kasami codes obtained by allowing a more general alphabet in the outer code.This includes a determination of the weight distribution, and of the coset graphs.Section VI provides a combinatorial way to derive new completely regular codes from old, and applies it to the generalized Kasami codes.Section VII recapitulates the path followed, and points out new directions.

A. Graphs
All graphs in this note are finite, undirected, connected, without loops or multiple edges.In a graph Γ, the neighborhood Γ(v) of the vertex v is the set of vertices connected to v. The degree of a vertex v is the size of Γ(v).A graph is regular if every vertex has the same degree.The i-neighborhood Γ i (v) is the set of vertices at geodetic distance i to v. A graph is distance regular (DR) if for every pair or vertices ū and v at distance i apart the quantities which are referred to as the intersection numbers of the graph, solely depend on i and not on the special choice of the pair (ū, v).The automorphism group of a graph is the set of permutations of the vertices that preserve adjacency.The Hamming graph H(n, q) (we consider only the case of prime power q) is a distance-regular graph on F n q , two vectors being connected if they are at Hamming distance one.It is well known [14] that any automorphism of the Hamming graph acts as a permutation π of coordinates and, for every coordinate, a permutation σ i of F q ; i.e., σ • π:

B. Equitable partitions, completely regular codes
A partition (P 0 , . . ., P k ) of the vertex set of a graph Γ is called an equitable partition (also known as regular partition, partition design, perfect coloring) if there are constants S ij such that The numbers S ij are referred to as the intersection numbers, and the matrix (S ij ) k i,j=0 as the intersection (or quotient) matrix.If the intersection matrix is tridiagonal, then P 0 is called a completely regular code of covering radius k and intersection array (S 01 , S 12 , . . ., S k−1 k ; S 10 , S 21 , . . ., S k k−1 ).That is to say, a set of vertices C is a completely regular code if the distance partition with respect to C is equitable.As was proven by Neumaier [15], for a distance regular graph, this definition is equivalent to the original Delsarte definition [7]: a code C is completely regular if the outer distance distribution

C. Linear and additive codes
A linear code (that is, a linear subspace of F n q ) of length n, dimension k, minimum distance d over the field F q is called an The duality is understood with respect to the standard inner product.Let A w denote the number of codewords of weight w.
Linear codes are special cases of the additive codes, which are, by definition, the subgroups of the additive group of F n q .A coset of an additive code C is any translate of C by a constant vector.A coset leader is any coset element that minimizes the weight.The weight of a coset is the weight of any of its leaders.The coset graph Γ C of an additive code C is defined on the cosets of C, two cosets being connected if they differ by a coset of weight one.
The weight distribution of a code is displayed as where A w denotes the number of codewords of weight w.

D. Cyclic codes
A cyclic code C of length n over F q is, up to polynomial representation of vectors, an ideal of the ring F q [x]/(x n − 1).All ideals are principal with a unique monic generator, called the generator polynomial of C, and denoted by g(x).If this polynomial has t irreducible factors over F q , then the code C is called a cyclic code with t zeros.In that case, the dual C ⊥ admits a trace representation with t terms of the form , where • k i is the degree of the factor indexed i of g(x), • Tr = Tr q k i /q is the trace from F q k i down to F q , • a i is arbitrary in F q k i , • α i is a primitive root in F × q k i , In general the relative trace from F q r to F q , where q is a power of a prime, is defined as If q is prime, then Tr q r /q (z) is the absolute trace.See the theory of the Mattson-Solomon polynomial in [13] for details and a proof.

E. Automorphisms
The automorphism group Aut(C) of a q-ary code C of length n is the stabilizer of C in the automorphism group of the Hamming graph H(n, q).Note that every automorphism acts as the composition of a coordinate permutation and a permutation of the alphabet in every coordinate.
We will say that a subgroup A of the automorphism group of the Hamming graph H(n, q) acts imprimitively on the coordinates if the set of coordinates can be partitioned into subsets, called blocks, and denoted by N 1 , . . ., N t , 1 < t < n, such that the coordinate-permutation part of every automorphism from A sends every block to a block.If there is no such a partition, then the action of the group on the coordinates is primitive (for example, this is the case for Aut(C) of any cyclic code C of prime length).
We denote by Aut0(C) the stabilizer of the all-zero word in Aut(C).The monomial automorphism group AutM(C) of a q-ary code C is defined as the set of all monomial transforms that leave the code wholly invariant [11].A monomial transform acting on F n q is the product of a permutation matrix by an invertible diagonal matrix, both in F n×n q .The subgroup consisting of all such transforms with trivial diagonal part is called the permutation part of the automorphism group.The group AutS(C) consists of the semilinear automorphisms of a q-ary code C, where each semilinear automorphism is the composition τ • µ of a monomial transform µ and an automorphism τ of the field F q (acting simultaneously on the values of all coordinates) such that τ • µ(C) = C.Note that for any linear code C, the groups AutM(C) and AutM(C ⊥ ) are always isomorphic, as well as the groups AutS(C) and AutS(C ⊥ ); the same is not necessarily true for Aut or Aut0.
If q is not prime and F q has a subfield F p , we also use the notation AutL p (C) to denote the subgroup of Aut0(C) consisting of only transformations that are linear over F p .Any automorphism from AutL p (C) acts as the composition of a coordinate permutation and a F p -linear permutation (from GL(log p q, p)) of F q in every coordinate.In particular, if q is a power of 2, then we have AutM(C) ≤ AutS(C) ≤ AutL 2 (C) ≤ Aut0(C) ≤ Aut(C), and if q = 2, then the first four of these groups are the same (the last group, for an additive code, is the product of Aut0(C) and the group of translations by codewords).

III. CONCATENATION WITH THE SIMPLEX CODE
Concatenation is the replacement of the symbols of the codewords of some code, called the outer code, by the codewords of some other code, called the inner code.The role of the inner code in our study is played by a Simplex code; moreover, we mainly focused on the case when this code is cyclic.
Let p be a prime power; let q = p k .Let ξ be a root of unity of order q−1 p−1 in F q .We assume that k and p − 1 are coprime; hence, so are q−1 p−1 and p − 1 (indeed, by induction, and, in particular, all powers of ξ are mutually linear independent over F p .Then, the matrix (ξ 1 , . . ., ξ q−1 p−1 ), considered as a k × q−1 p−1 matrix over F p , is a generator matrix of a Simplex code of size q, where the distance between any two different codewords is p k−1 [11, Th. 2.7.5].
Encoding the Simplex code.Let L be a nondegenerate F p -linear function from F q to F p .Any such function can be represented as L(•) ≡ Tr q/p (a•) for some a ∈ F q , and in our context we can always assume that L is Tr q/p .Define φ : expand its action to F n q coordinatewise, and to any set of words in F n q wordwise.Lemma 2. For any two words ȳ, z in F n q , we have d(φ(ȳ), φ(z)) = p k−1 d(ȳ, z).I.e., φ is a scaled isometry.
Proof.Immediately from the fact that the Simplex code is a one-weight code with nonzero weight p k−1 , we have Then the matrix Proof.The proof is straightforward.Any codeword c of the code generated by Φ(M ) is a linear combination of its rows, and so is of the form for some F p -linear functions L i : That is, c is a φ-image of some codeword of C.
The following lemma provides an alternative explanation to the fact that completely regular codes with identical coset graphs can exist over different alphabets [17].
Proof.We first observe that the number of cosets of C ⊥ coincides with size of the code C, which is the same as the size of the code φ(C), which is, in its turn, the number of cosets of φ(C) ⊥ .That is, the considered graphs have the same number of vertices.
Let C be a code over F q with a generator matrix M , which is a check matrix of the dual code C ⊥ .The cosets of C ⊥ naturally correspond to the syndromes under the action of the check matrix M .By the definition of the coset graph Γ C ⊥ , two cosets are adjacent in the coset graph if and only if the difference between the corresponding syndromes is the syndrome of a weight-1 word.We call the syndromes of the weight-1 words the connecting syndromes because they play a connecting role for the coset graph (this terminology is in agree with that for a more general class of graphs called Cayley graphs).For the check matrix M = (M ij ) m i=1 n j=1 over F q , the connecting syndromes are (corresponding to the weight-1 words with a in the j-th position).Now, consider the matrix Φ(M ), which, by Lemma 3, is a generator matrix for φ(C) and a check matrix for φ(C) ⊥ .The connecting syndromes are b(ξ l M 1j , . . ., ξ l M mj ) T , (3) corresponding to the weight-1 words with b in the position ), we find that the sets of connecting syndromes (2), (3) for both matrices coincide; call this set S.
Two cosets of C ⊥ are adjacent in Γ C ⊥ if and only if the corresponding syndromes have the difference in S. Two cosets of φ(C) ⊥ are adjacent in Γ φ(C) ⊥ if and only if the corresponding syndromes have the difference in S. So, indexing the cosets by the syndromes induces an isomorphism between the Γ C ⊥ and Γ φ(C) ⊥ .
Corollary 1.If the code C ⊥ is completely regular, then the code φ(C) ⊥ is completely regular with the same intersection array.
In the rest of this section, we establish important relations between the automorphism groups of a code and its concatenated image.

A. Automorphism group
Lemma 5.The group AutL p (C) is isomorphic to a subgroup of AutM(φ(C)) such that the action of this subgroup on the coordinates is imprimitive with the blocks Proof.The action of the monomial automorphism group on a codeword c of C can be represented as a permutation of the coordinates and, for every i from 1 to n the action of an element of GL(m, p) on of the value in the i-th coordinate, understood as an element of F m p .We first consider these two actions separately.
(i) A permutation of coordinates corresponds to a permutation of blocks for φ(C): we see that is obtained from φ(z 1 , . . ., z n ) by sending each i-th block of coordinates to the place of the φ(i)-th block.
(ii) Next, we show that the action of a F p -linear permutation on the value z i in the i-th coordinate corresponds to a monomial transform inside the i-th block of φ(z 1 , . . ., z n ).
Here, a crucial observation if the following well-known fact.
(*) Any bijective linear transform of the Simplex code is equivalent to the action of some of its monomial automorphisms.This fact is straightforward from the form of a generator matrix of the Simplex code, which consists of a complete collection of pair-wise linearly independent columns of height m.Applying a bijective linear transform to the rows, we obtain another generator matrix with the same property.It is obvious that one such matrix can be obtained from another one by permuting columns and multiplying each column by a nonzero coefficient, that is, by a monomial transform.
Consider the value z i in the i-th position and some permutation τ i of F q that is linear over F p .Since φ is also linear over F p and invertible, we have a bijective linear transform φ(τ i (φ −1 (•))) of the Simplex code.By (*), there is a monomial automorphism σ i of the Simplex code whose action on this code is identical to φ(τ i (φ −1 (•))).Then, we have i.e., the action of a F p -linear permutation τ i in the i-th coordinate of a word z from F n q corresponds to the action of the monomial transform σ i in the i-th block of coordinates of φ(z).
Summarizing (i) and (ii), we get the following.If the mapping maps φ(C) to itself, i.e., belongs to AutM(φ(C)).This proves the statement.Lemma 6. Assume that C is a linear code over F q and C ⊥ satisfies the following property: Then the groups AutL p (C), AutM(φ(C)), and AutM(φ(C) ⊥ ) are isomorphic.
Proof.We will first deduce from (i) that (ii) Aut0(φ(C) ⊥ ) (and hence, also AutM(φ(C) ⊥ )) acts imprimitively on the coordinates with the blocks (As we see from Lemma 5, this property is indeed necessary, while (i) is only sufficient to guarantee (ii).)To show (ii), we note two other facts.From the code distance ≥ 4 of C ⊥ , we see that (iii) for every codeword of weight 3 in φ(C) ⊥ , the three nonzero coordinates belong to the same block.Indeed, assume that φ(C) ⊥ has a codeword with exactly three nonzero coordinates, with values β, β ′ and β ′′ respectively.This means that for some i, i ′ , i ′′ , j, j ′ , j ′′ such that (i, j) = (i ′ , j ′ ) = (i ′′ , j ′′ ) = (i, j), the equation is satisfied for every (z1, . . ., zn) from C. Since L is linear and nondegenerate, this implies for all (z1, . . ., zn) from C. The last equation contradicts to the code distance of C ⊥ , unless i = i ′ = i ′′ , i.e., the three coordinates are from the same block.
On the other hand, because the dual of a Simplex code is a 1-perfect Hamming code, we have (iv) every two coordinates from the same block are nonzero coordinates for some weight-3 codeword in φ(C) ⊥ .
Indeed, in the generator matrix of the Simplex code, the sum of any two columns is proportional to some other column.
The same relation takes place between the corresponding coordinates from the same block of the concatenated code, which implies the required property.
From (iii) and (iv), we see that the code properties of φ(C) ⊥ distinguish the pairs of coordinates in the same block and the pairs of coordinates in different blocks.Hence, the automorphism group does not break blocks and we have (ii).
Next, we observe that property (i) excludes some degenerate cases with vanishing coordinates: (v) every codeword of the Simplex code occurs in every block, over the codewords of the concatenated code φ(C).Indeed, this obviously equivalent to the fact that for every symbol of Fq and every position, there is a codeword of C with the given symbol in the given position.Since C is linear, it is the same as to say that there is no vanishing coordinate in C. Equivalently, C ⊥ does not contain a weight-1 codeword, which follows immediately from (i).
Now, we have that every automorphism from AutM(φ(C) ⊥ ) permutes blocks, permutes coordinates inside each block, and permutes the values of F p for every coordinate (fixing 0).The same is true for AutM(φ(C)), because it is isomorphic to AutM(φ(C) ⊥ ) with the isomorphism keeping the permutation part.According to (v), the last two steps (permuting coordinates inside each block, and permuting the values of F p for every coordinate) must be compatible with the automorphism group of the Simplex code, and result in a permutation of its codewords.A permutation of the codewords of the Simplex code in each block, for the code φ(C), corresponds to a permutation of the elements of F q in the corresponding coordinate for C; and a permutation of the blocks corresponds to a permutation of the coordinates for C. So, we see that every automorphism from AutM(φ(C)) corresponds to some automorphism of C: Moreover, because all considered transformations are linear over F p , we have AutM(φ(C)) AutL p (C).
From Lemma 5, we have the inverse correspondence.It remains to note that AutM of a code and its dual are isomorphic.

IV. CLASSICAL KASAMI CODES
Let q = 2 m for some integer m ≥ 1.Consider the cyclic code M ⊥ q of length q + 1 defined over F q by the check polynomial h(x) = (x − 1)(x − ζ)(x − ζ q ), for the root ζ = α q−1 of order q + 1 over F q 2 , where α is a primitive root of F q 2 (for some notation reasons, we first define M ⊥ q and then M q as the dual to M ⊥ q ).Note that ζ q 2 = ζ, so that has its coefficients in F q .
The frequency of weight q is derived on applying [13, p. 320].
The frequency of weight q + 1 is derived by complementation Denote by S q the binary Simplex code of parameters [q − 1, m, q 2 ] 2 .The main result of this section is the following theorem.

Theorem 2. The concatenation of M ⊥
q with S q is a binary cyclic code K ⊥ q of parameters [q 2 − 1, 3m], with nonzeros α, α 1+q , with α a primitive root of F q 2 .Proof.As ζ = α q−1 is a root of order q + 1 of F q 2 , by the facts of Section 2.4, we have Let θ = α 1+q .Clearly θ is a root of order q − 1 of F q .The concatenation map φ from F q to S q is conveniently described by using the trace function Tr q/2 .For all β ∈ F q let φ(β) = Tr q/2 (βθ), Tr q/2 (βθ 2 ), . . ., Tr q/2 (βθ q−1 ) = Tr q/2 (βθ i ) q−1 i=1 .Replacing β by the generic coordinate of M ⊥ q , we obtain an expression depending on i and j.
By using the Chinese Remainder Theorem for integers for the product q 2 − 1 = (q + 1) × (q − 1), we see that the exponent of α in the second sum ranges over 1, . . ., q 2 − 1 modulo q 2 − 1.This is the Trace formula for a cyclic code with nonzeros α, θ = α 1+q .

Corollary 2. The weight distribution of
Proof.Concatenation with S q multiplies the weights of M ⊥ q by a factor q 2 , while leaving their frequencies unchanged.Remark 1.This result is derived in [13, Th. 32, p. 252] by the complex formula of [13, Ch. 6, Th. 2].
Corollary 3. The coset graphs of K q and M q are isomorphic.In particular [3], K q is a completely regular code of diameter 3 and intersection array {q 2 − 1, q(q − 1), 1; 1, q, q 2 − 1}. ( Proof.The first claim holds by Lemma 4, where C = M q , C ⊥ = M ⊥ q , φ(C) = K ⊥ q , and φ(C) ⊥ = K q .Since M q is a completely regular code with intersection array (5), see [5, F.5], the coset graphs are distance regular and the code K q is completely regular with the same intersection array.
In the rest of this section, we find the automorphism groups of K q and related codes.
Remark 2. The concatenation construction for the special case q = 4 of the code K q was suggested in [4,Sect. 4.1], without considering the cyclicity.

A. Automorphism groups
According to Lemma 6, to know the automorphism group of K q , we have to find AutL 2 (M ⊥ q ).We first prove that it coincides with AutS(M ⊥ q ).Lemma 7. The automorphism groups of the linear [q+1, 3, q− 1] q MDS code M ⊥ q satisfy Aut0(M ⊥ q ) = AutL 2 (M ⊥ q ) = AutS(M ⊥ q ).Proof.The proof applies ideas from [9] for different code parameters.Assume that π is a permutation of coordinates and σ . Denote by πM ⊥ q the code whose codewords are obtained from the codewords of M ⊥ q by applying the coordinate permutation π.So, σ(πM ⊥ q ) = M ⊥ q .We split the proof into four steps.The first step is sufficient to see the first equality in the claim of the lemma.
(i) We state that for every coordinate i and every a, b ∈ F q it holds σ . Indeed, consider two codewords ȳ, z ∈ πM ⊥ q of minimum weight, q − 1, with zeros in different positions and having a and b in the i-th position.Consider the two words ū = σ(ȳ + z) and v = σ(ȳ) + σ(z).They both lie in M ⊥ q .Moreover, they coincide in every position where ȳ or z has 0. Since ȳ has 0 in two positions and z has 0 in another pair of positions, ū or v differ in less than q −1 positions.As the code distance is q − 1, we have ū = v.In particular, their values σ i (a + b) and σ i (a) + σ i (b) in the i-th coordinate coincide, which proves (i).
In the next step, we still consider i = 2.A straightforward and well-known property of an MDS code of dimension k (and distance n − k + 1) is that there is exactly one codeword having chosen values in chosen k distinct coordinates.By ȳ(l) , l = 2, . . ., n−1, we denote the unique codeword of πM ⊥ q with 1 in the first coordinate and 0 in the l-th and n-th coordinates.For different l and t, the words ȳ(l) and ȳ(t) are different (indeed, ȳ(l) cannot have 0 in the t-th position because its weight cannot be less than the code distance q−1).Hence, they are different in all positions except the first and the last (the distance cannot be less than q − 1).So, ȳ(l) , l = 2, . . ., n − 1, possess n − 2 = q − 1 different values in the second position.Therefore, for any given a, (6) holds for q − 1 distinct values b ∈ F q .It immediately follows from the bijectivity of σ i that (6) holds for the remaining value of b.So, ( 6) is true for i = 2 for any a and b.Similarly, it is true for any i = 1.
The remaining case i = 1 is derived from the case i = 1.
From (6) we see that the ratio does not depend on b.
By similarity, this holds for any i including i = 1.So, we , which is (6) with i = 1.(i) is proven.
(iii) We state that there is an integer degree d such that for every i from 1 to n and every a in F q .Indeed, assume β is a primitive element.From (6) we have (7) by induction on k.
(iv) The mapping a → a d , where d is from (iii), is an automorphism of the field F q .Indeed, this mapping preserves the multiplication: . By (i), it preserves the addition as well.
So, the action of every automorphism σ•π from Aut0(M ⊥ q ) can be represented as the combination of a coordinate permutation, applying an automorphism of F q to the values in all coordinates, and multiplying the values of every coordinate by a constant.By the definition, such automorphism belongs to AutS(M ⊥ q ).To find AutS(M ⊥ q ), we consider the isomorphic group AutS(M q ).The next two lemmas establish the tight upper and lower bounds for this group, respectively.Lemma 8.The semilinear automorphism group AutS(M q ) of the code M q coincides with Aut0(M q ) (and, in particular, with the intermediate AutL 2 (M q )) and is isomorphic to a subgroup of the general semilinear group ΓL(2, q).Proof.Denote by H q the Hamming [q + 1, q − 1, 3] q code defined by the generator polynomial h(x) = (x − ζ)(x − ζ q ).Note that M q is a distance-4 subcode of H q .From the intersection array (5) of the completely regular code M q , we find that the number of vertices at distance at least 3 from M q is i.e., coincides with |H q \M q |.It follows that H q is a unique distance-3 code of size q q−1 that includes M q .It follows that any automorphism π from Aut0(M q ) also belongs to Aut0(H q ) (otherwise, π(H q ) is another distance-3 code including M q ).It is known that AutS(H q ) is isomorphic to ΓL(2, q) [10, Thm 7.2] and, moreover, Aut0(H q ) = AutS(H q ) [9].So, all automorphisms from Aut0(M q ) are also semilinear, and we get Aut0(M q ) = AutS(M q ) ≤ Aut0(H q ) = AutS(H q ) ≃ ΓL(2, q).
In [3,Prop. 3.3] (where their C (u) is our K q ), it is shown that Aut0(K q ) contains a subgroup isomorphic to the general linear group GL(2, q).The proof of the following lemma pirates arguments from [3], adopting them to the q-ary code M q , instead of the binary K q , and extending from GL(2, q) to ΓL(2, q).Lemma 9.The semilinear automorphism group AutS(M q ) of the code M q contains a subgroup of size |ΓL(2, q)|.
Proof.(i) In the first part of the proof, we consider different equations defining M q .For each i, we express ζ i as γ i,0 + γ i,1 α, where γ i,0 , γ i,1 ∈ F q .The code M q consists of all c = (c 1 , . . ., c q+1 ) from F q+1 q such that q+1 i=1 Assuming that (9) holds, we express the left part of (8) as follows.
Therefore, in the system (8)-( 9), the equation ( 8) can be replaced by The same arguments can be applied if we replace α by the primitive element α t , where t is a power of two.So, (10) can be replaced by where γ i,1 ∈ F q are the coefficients in the expansion i,1 α t .(ii) Now, consider an arbitrary nonsingular semilinear transform a two-dimensional vector space over F q , where a, a ′ , b, b ′ are coefficients from F q such that det a a ′ b b ′ = ab ′ +a ′ b = 0 and t is a power of two.So, (•) t is an automorphism of F q , and Ψ ∈ ΓL(2, q).Denote by ē(i) , i = 1, . . ., q+1, the weight-1 vector in F q+1 q with 1 in the i-th coordinate.Consider the mapping ψ that maps ē(i) (1), every nonzero element of F q 2 is uniquely represented as dζ l for some l ∈ {1, . . ., q + 1} and d ∈ F × q ).Using the semilinearity identity ψ(λȳ + µz) = λ t ψ(ȳ) + µ t ψ(z), we expand the domain of ψ to the whole vector space F q+1 q .We will show that ψ lies in AutS(M q ).Consider a codeword z = (z 1 , . . ., z q+1 ) ∈ M q .It satisfies ( 9) and ( 10) with c = z.We have to show that ( 9) and (11) hold for c = ψ(z).We start with (9).Note that in the case c = ψ(ē (i) ), the expression So, for we have (the last two sums are zeros because of (9) for c = z), which is exactly (9).Next, deal with (11).If c = ψ(ē (i) ), then the only nonzero element of c is the j i -th element, with the value c ji = d i , and ji,1 α t = (aγ i,0 + a ′ γ i,1 ) t + (bγ i,0 + b ′ γ i,1 ) t α t .Hence, for c = ψ(ē (i) ) we have Therefore, for c = ψ(z) we have (the last three sums are zeros because of ( 9) and ( 10) for c = z), which is exactly (11).Clearly, different Ψ correspond to different ψ; so, the number of semilinear automorphisms of M q is at least |ΓL(2, q)|.

V. GENERALIZED KASAMI CODES
Let q = p m for some integer m ≥ 1, and some power of two p.Thus the preceding section is the special case p = 2 of the present section.As in the previous section, we consider the cyclic code M ⊥ q of length q + 1 defined over F q by the check polynomial h for some root ζ of order q + 1 over F q 2 .By Theorem 1, M ⊥ q is a [q + 1, 3, q − 1] q MDS code with weight distribution (4).
Denote by S q the p-ary Simplex code of parameters [ q−1 p−1 , m, q p ] p .This code is cyclic when m and p − 1 are coprime.The main result of this section is the following theorem.

Theorem 4. The concatenation of M ⊥
q with S q is a pary code K p q ⊥ of parameters [ q 2 −1 p−1 , 3m] p , with nonzeros α, α (1+q)(p−1) , with α a primitive root of F q 2 .If m and p − 1 are coprime, then this code is cyclic.
Proof.The proof is analogous to that of Theorem 2. The only difference is the definition of θ = α (1+q)(p−1) , which is now a root of order q−1 p−1 in F q 2 .When p > 2, as far as we know, the codes K p q are new, and will be called generalized Kasami codes in this paper.

Corollary 4. The weight distribution of K
Proof.Concatenation with S q multiplies the weights of M ⊥ q by a factor q p , while leaving their frequencies unchanged.Corollary 5.The coset graphs of K p q and M q are identical.In particular, when p is even, K p q is completely regular of diameter 3, and intersection array {q 2 − 1, q(q − 1), 1; 1, q, q 2 − 1}.
Proof.This follows by Corollary 1.
Remark 3. We conjecture that AutS(K p q ) and Aut0(K p q ) are isomorphic to ΓL(2, q), because it is so for M q = K q q and K q = K 2 q .However, our current tools do not allow to prove this easily.

VI. UNION OF COSETS
In this section, we prove a simple but important fact that cosets of a linear completely regular code from the classes considered in this paper can be merged to result in another completely regular code with different parameters, which can be linear, additive, or even non-additive.Proposition 1.Let p, q be powers of 2, and let C be an additive completely regular code over F p with intersection array {p 2m − 1, p 2m − q, 1; 1, q, p 2m − 1}.Then (i) for every k from 1 to p 2m q − 1, there is a completely regular code B k with intersection array By the definition of a completely regular code, (C (0) , C (1) , C (2) , C (3) ) is an equitable partition of H( ) By standard double-counting arguments, we have |C (3) |/|C (0) | = |C (2) |/|C (1) | = (p 2m − q)/q = r − 1, where r = p 2m /q.Let C 0 = C (0) = C and let {C 1 , . . ., C r−1 } be a partition of C (3) into cosets of C (0) .Each of the cosets of C is a completely regular code with the same parameters.For each i from 0 to r − 1, by C r+i we denote the set of vertices at distance 1 from C i .In particular, C (1) = C r and C (2) = ∪ r−1 i=1 C r+i .We state that (C i ) 2r−1 i=0 is an equitable partition with the quotient matrix To show this, we first note that it is a partition; this is straightforward from the fact that C 0 , . . ., C r−1 are at distance 3 from each other (from s 33 = 0 and s 23 = 1 in ( 12)).Next, we see that all the neighbors of C i , i = 0, . . ., r − 1 are in C r+i .Finally, every vertex of C r+i has one neighbor from C i (by the definition), exactly s 11 = q − 2 neighbors from C r+i (because C i is completely regular with intersection array ( 12)), and exactly s 21 = q neighbors from C r+j for every j from {0, . . ., r − 1}\{i} (because C j is completely regular with intersection array (12)).Now, it is straightforward to check that denoting we obtain an equitable partition (B (0) , B (1) , B (2) , B (3) ) with the intersection matrix     Therefore, the set B k = B (0) is a completely regular code with the required intersection array.
(ii) We first note that the set B 2 constructed as in (i) is automatically additive.Then, we see that B 2 satisfies the hypothesis of the proposition for the code C, with 2q instead of q.So, repeating the construction log 2 k times, we get an additive completely regular code with the required parameters.
In the case m = 1, the code C from Proposition 1 can be chosen as a 1  p -th part of the p-ary Hamming code of length p + 1 in the sense of [5, (F.5)] (note that p is a power of 2), in particular, as the code M q , in notation of Section IV.
In [5], this code is classified as belonging to the group of completely regular codes obtained from perfect codes.Proposition 1 shows that not only 1 p -th part, but also 1 2 i -th part, i = 1, 2, . . ., log 2 p, of the p-ary Hamming code of length p + 1 can be chosen to be an additive completely regular code.This remark essentially extends the class of completely regular codes obtained from perfect codes.

VII. CONCLUSION AND OPEN PROBLEMS
In this article, we have used a concatenation scheme to produce new completely regular codes from known ones.The use of a one-weight code as the inner code is essential in preserving the coset graph structure from the outer code to concatenated code, as evidenced in the proof of Lemma 4. The Simplex code is essentially the only one-weight code in the Hamming graph by a classical result of Bonisoli [2].It is worth investigating systematically if another choice of the outer code than the cyclic MDS code used here can lead to new constructions of completely regular codes.More generally, replacing the Hamming graph by other distance regular graphs with a larger choice of one-weight codes could lead to new constructions of completely regular codes in these graphs.
then there is an additive code with intersection array I k .Proof.(i) Denote by C (d) the set of vertices at distance d from C, d = 0, 1, 2, 3.