Classification of the Z2Z4-Linear Hadamard Codes and Their Automorphism Groups

A $Z_2Z_4$-linear Hadamard code of length $\alpha+2\beta=2^t$ is a binary Hadamard code which is the Gray map image of a $Z_2Z_4$-additive code with $\alpha$ binary coordinates and $\beta$ quaternary coordinates. It is known that there are exactly $\lfloor (t-1)/2 \rfloor$ and $\lfloor t/2 \rfloor$ nonequivalent $Z_2Z_4$-linear Hadamard codes of length $2^t$, with $\alpha=0$ and $\alpha \not= 0$, respectively, for all $t\geq 3$. In this paper, it is shown that each $Z_2Z_4$-linear Hadamard code with $\alpha=0$ is equivalent to a $Z_2Z_4$-linear Hadamard code with $\alpha \not= 0$; so there are only $\lfloor t/2 \rfloor$ nonequivalent $Z_2Z_4$-linear Hadamard codes of length $2^t$. Moreover, the order of the monomial automorphism group for the $Z_2Z_4$-additive Hadamard codes and the permutation automorphism group of the corresponding $Z_2Z_4$-linear Hadamard codes are given.

quaternary vectors of length n. For a vector x = (x 1 , . . . , x n ) ∈ Z n 2 and a set I ⊆ {1, . . . , n}, we denote by x| I the vector x restricted to the coordinates in I.
Any nonempty subset C of Z n 2 is a binary code and a subgroup of Z n 2 is called a binary linear code. Similarly, any nonempty subset C of Z n 4 is a quaternary code and a subgroup of Z n 4 is called a quaternary linear code. Let C be a quaternary linear code. Since C is a subgroup of Z n 4 , it is isomorphic to an Abelian group Z γ 2 ×Z δ 4 , for some γ and δ, and we say that C is of type 2 γ 4 δ as a group. Quaternary codes can be seen as binary codes under the usual Gray map defined as ϕ(0) = (0, 0), ϕ(1) = (0, 1), ϕ(2) = (1, 1), ϕ(3) = (1, 0) in each coordinate. If C is a quaternary linear code, then the binary code C = ϕ(C) is called a Z 4 -linear code.
Additive codes were first defined by Delsarte in 1973 as subgroups of the underlying Abelian group in a translation association scheme [7,8]. In the special case of a binary Hamming scheme, that is, when the underlying Abelian group is of order 2 n , the additive codes coincide with the codes that are subgroups of Z α 2 × Z β 4 . In order to distinguish them from additive codes over finite fields [3], they are called Z 2 Z 4 -additive codes [4]. Since Z 2 Z 4additive codes are subgroups of Z α 2 × Z β 4 , they can be seen as a generalization of binary (when β = 0) and quaternary (when α = 0) linear codes. As for quaternary linear codes, Z 2 Z 4 -additive codes can also be seen as binary codes by considering the extension of the usual Gray map: Φ : Z α 2 × Z β 4 −→ Z n 2 , where n = α + 2β, given by Φ(x, y) = (x, ϕ(y 1 ), . . . , ϕ(y β )) ∀x ∈ Z α 2 , ∀y = (y 1 , . . . , y β ) ∈ Z β 4 . If C is a Z 2 Z 4 -additive code, C = Φ(C) is called a Z 2 Z 4 -linear code. Moreover, a Z 2 Z 4 -additive code C is also isomorphic to an Abelian group Z γ 2 × Z δ 4 , and we say that C (or equivalently the corresponding Z 2 Z 4 -linear code C = Φ(C)) is of type (α, β; γ, δ).
A (binary) Hadamard code of length n is a binary code with 2n codewords and minimum distance n/2 [19]. The Z 2 Z 4 -additive codes that, under the Gray map, give a Hadamard code are called Z 2 Z 4 -additive Hadamard codes and the corresponding Z 2 Z 4 -linear codes are called Z 2 Z 4 -linear Hadamard codes, or just Z 4 -linear Hadamard codes when α = 0. The classification of Z 2 Z 4 -linear Hadamard codes is given by the following results. For any integer t ≥ 3 and each δ ∈ {1, . . . , (t + 1)/2 }, there is a unique (up to equivalence) Z 4 -linear Hadamard code of type (0, 2 t−1 ; t + 1 − 2δ, δ), and all these codes are pairwise nonequivalent, except for δ = 1 and δ = 2, where the codes are equivalent to the linear Hadamard code, that is, the dual of the extended Hamming code [16]. Therefore, the number of nonequivalent Z 4 -linear Hadamard codes of length 2 t is t−1 2 for all t ≥ 3. On the other hand, for any integer t ≥ 3 and each δ ∈ {0, . . . , t/2 }, there is a unique (up to equivalence) Z 2 Z 4 -linear Hadamard code of type (2 t−δ , 2 t−1 −2 t−δ−1 ; t+1− 2δ, δ). All these codes are pairwise nonequivalent, except for δ = 0 and δ = 1, where the codes are equivalent to the linear Hadamard code [5]. Therefore, the number of nonequivalent Z 2 Z 4 -linear Hadamard codes of length 2 t with α = 0 is t/2 for all t ≥ 3. In this paper, we show that any Z 4 -linear Hadamard code is equivalent to a Z 2 Z 4 -linear Hadamard code with α = 0.
Two structural properties of binary codes are the rank and the dimension of the kernel. The rank of a code C is simply the dimension of the linear span, C , of C. The kernel of a code C is defined as Ker(C) = {x ∈ Z n 2 | x + C = C} [2]. If the all-zero vector belongs to C, Ker(C) is a linear subcode of C.
In general, C can be written as the union of cosets of Ker(C), and Ker(C) is the largest linear code for which this is true [2]. The Z 2 Z 4 -linear Hadamard codes can also be classified using either the rank or the dimension of the kernel, as it is proven in [16,23], where these parameters are computed.
Two Z 2 Z 4 -additive codes C 1 and C 2 both of type (α, β; γ, δ) are said to be monomially equivalent, if one can be obtained from the other by permuting the coordinates and (if necessary) changing the signs of certain Z 4 coordinates. Two Z 2 Z 4 -additive or Z 2 Z 4 -linear codes are said to be permutation equivalent if they differ only by a permutation of coordinates. The monomial automorphism group of a Z 2 Z 4 -additive code C, denoted by MAut(C), is the group generated by all permutations and sign-changes of the Z 4 coordinates that preserves the set of codewords of C, while the permutation automorphism group of C or C = Φ(C), denoted by PAut(C) or Aut(C), respectively, is the group generated by all permutations that preserves the set of codewords [14].
The permutation automorphism group of a binary code is also an invariant, so it can help in the classification of some families of binary codes. Moreover, the automorphism group can also be used in decoding algorithms and to describe some other properties like the weight distribution [19, Ch. 8, §5 and Ch. 16, §9]. The permutation automorphism group of Z 2 Z 4 -linear (extended) 1-perfect codes has been studied in [22,17]. The permutation automorphism group of (nonlinear) binary 1-perfect codes has also been studied before, obtaining some partial results [13,12,1,9]. For Z 2 Z 4 -additive Hadamard codes with α = 0, the permutation automorphism group was characterized in [21], while the monomial automorphism group as well as the permutation automorphism group of the corresponding Z 2 Z 4 -linear codes had not been studied yet. In this paper, we completely solve this problem giving the structure and order of these two automorphism groups for any α.
The structure of the current paper is as follows. In Section 2, we suggest a new representation for the Z 2 Z 4 -linear Hadamard codes, separately for the cases α = 0 and α = 0, and prove that the Z 2 Z 4 -linear Hadamard codes of types (0, n/2; γ, δ) and (α, (n − α)/2; γ + 2, δ − 1) with α = n/2 δ−1 = 0 are permutation equivalent. In Sections 3 and 4, we establish the structure and the order of the monomial automorphism group of the Z 2 Z 4 -additive Hadamard codes, for α = 0 and α = 0, respectively. In Sections 5 and 6, we establish the structure and the order of the permutation automorphism group of the Z 2 Z 4 -linear Hadamard codes. The main results of the paper are Theorem 1 on the equivalence, Theorems 2 and 3 on the monomial automorphism group of the Z 2 Z 4 -additive Hadamard codes, Theorems 4 and 5 on the permutation automorphism group of the corresponding binary codes, and a representation of Z 2 Z 4 -linear Hadamard codes in Section 2.

Classification of Z 2 Z 4 -linear Hadamard codes
In [16] and [5], Z 2 Z 4 -linear Hadamard codes are classified independently for α = 0 and α = 0. In this section, we show that each Z 2 Z 4 -linear Hadamard code with α = 0 is equivalent to a Z 2 Z 4 -linear Hadamard code with α = 0, so there are only t 2 nonequivalent Z 2 Z 4 -linear Hadamard codes of length 2 t .
Proof. There are 4 · 2 γ · 4δ = 2n affine functions in B. The set B is closed under the addition over Z 4 ; so after applying the Gray map, B γ,δ is a Z 4 -linear code of length 2 γ · 4δ · 2 = n. Clearly, the minimum Hamming distance is n/2.
Proof. There are 2 · 2γ · 4 δ = 2n affine functions in A. The set A is closed under the addition over Z 4 ; so the Gray map image A = Φ(A) can also be considered as a Z 2 Z 4 -linear code with 2γ +δ+1 coordinates over Z 2 , which correspond to the elements of order at most 2 of Zγ 2 × Z δ 4 . Now, we will see that the code A can be obtained from Cγ ,δ by repeating twice every coordinate. That is, strictly speaking, A is permutation equiva- ). Finally, it is easy to check that the minimum Lee distance for the set of affine functions A is n = 2γ +2δ ; so the minimum Hamming distance of Cγ ,δ is the half of this value, that is, n/2.
We can see that In order to check these equalities, it is convenient to represent Since g is an affine function from v ∈ Z γ+1 2 × Zδ 4 to Z 4 , we can deduce from Lemma 3 that there is a fixed coordinate permutation that sends every codeword of B γ,δ to a codeword of C γ+1,δ .
3. The monomial automorphism group of the Z 2 Z 4 -additive Hadamard codes, α = 0 In this and next section, we establish the structure and the order of the monomial automorphism group for the Z 2 Z 4 -additive Hadamard codes. We start with the Z 2 Z 4 -additive Hadamard codes with α = 0. Recall that the Z 2 Z 4 -additive Hadamard code of type (0, 2 γ+2δ ; γ,δ + 1) can be considered as the set B = B γ,δ of all affine functions from Z γ 2 × Zδ 4 to Z 4 . As the elements of Z γ 2 × Zδ 4 play the role of coordinates, the coordinate permutations are the permutations of Z γ 2 × Zδ 4 , and the action of such permutation σ on a function f on Z γ 2 × Zδ 4 can be expressed as . The action of a sign change τ can be expressed as Let supp(r) be the set of elements of Z γ 2 × Zδ 4 whose image by r is 3. By τ r , we denote the transformation that changes the sign of the value of a function f ∈ B γ,δ at the coordinates given by the elements of supp(r): . By ρ r , we denote the permutation of Z γ 2 × Zδ 4 that changes the sign of the elements of supp(r): The monomial automorphism group MAut(B γ,δ ) of the Z 2 Z 4additive Hadamard code B γ,δ of type (0, 2 γ+2δ ; γ,δ + 1) consists of all transformations τ r ρ r σ where σ is an affine permutation of Z γ 2 × Zδ 4 and r is an affine function from Z γ 2 × Zδ 4 to {1, 3} (τ r and ρ r are the sign change and the permutation of Z γ 2 × Zδ 4 assigned to r as above). The cardinality of this group satisfies Proof. The statement of the theorem is straightforward from the following three claims.
(i) Every transformation from the statement of the theorem belongs to MAut(B). Obviously, σ sends B to B, as the composition of an affine permutation and an affine function is an affine function, too. It remains to check that τ r ρ r ∈ MAut(B). Consider an affine function g(·) = l(·) + c(·), where l is a linear function and c is a constant function, c(·) ≡ a. Since l(−v) = −l(v) and r(v) = r(−v), we have τ r (ρ r (l)) = l. Further, ρ r c(·) = c(·) and τ r c(·) = ar(·). Therefore, we see that τ r ρ r (g) is an affine function and claim (i) is proved.
Let us calculate the cardinality of the group. An affine permutation is uniquely represented as the composition of a linear permutation and a translation. There are T = |Z Recall that the Z 2 Z 4 -linear Hadamard code Cγ ,δ of type (2γ +δ , β;γ +1, δ) can be considered as the set of functions ϕ + (f (·)) where f belongs to the set A of affine functions from Zγ 2 × Z δ 4 to Z 4 that map the all-zero vector to 0 or 2. Equivalently, A pair of opposite elements of Zγ 2 ×Z δ 4 , considered as a pair of coordinates of the code Cγ ,δ , corresponds to one Z 4 coordinate of the corresponding Z 2 Z 4additive Hadamard code Cγ ,δ = Φ −1 (Cγ ,δ ). A self-opposite element (i.e., an element of order 1 or 2) of Zγ 2 × Z δ 4 corresponds to a Z 2 coordinate of Cγ ,δ . Hence, every monomial automorphism of Cγ ,δ corresponds to a permutation automorphism σ of Cγ ,δ that preserves the negation, i.e., σ(−x) = −σ(x). Denote the set of all such automorphisms by Aut − (Cγ ,δ ); so, Aut − (Cγ ,δ ) MAut(Cγ ,δ ).
Following the arguments of claim (iii) in the proof of Theorem 2, we can see that any component of σ from PAut(A) is affine and, moreover, preserves the negation. Hence, it is true for the whole σ. Proof. It is straightforward from the definition of Cγ ,δ that PAut(A) ⊆ Aut(Cγ ,δ ). Since by Lemma 4 the permutations from PAut(A) preserve the negation, we have PAut(A) ⊆ Aut − (Cγ ,δ ).
Given a Z 2 -valued function x from Cγ ,δ , we can reconstruct the corresponding Z 4 -valued function f x from A by the rule f x (v) = ϕ −1 (x(v), x(−v)).
Since an automorphism σ from Aut − (Cγ ,δ ) preserves the negation, we have Consequently, such σ sends functions from A to functions from A, which means Aut − (Cγ ,δ ) ⊆ PAut(A). The above lemmas and direct calculations, similar to that in Section 3, give the following result.

An upper bound on the order of the permutation automorphism group
In this and next section, we establish the structure and the order of the permutation automorphism group for the Z 2 Z 4 -linear Hadamard codes. In the rest of the paper, we consider Z 2 Z 4 -linear codes, which are binary codes, and in the examples, we will use 0, 1, 2, and 3 as short notations for 00, 01, 11, and 10, respectively, placed in the coordinates α + 2i − 1, α + 2i, i ∈ {1, . . . , β}.

Proof. Straightforward using that
Example 3. Considering the Z 2 Z 4 -linear Hadamard code C 1,2 from Example 1, Similarly, considering the Z 2 Z 4 -linear Hadamard code C 0,3 from Example 2, Proof. Since any automorphism of the code C is an automorphism of its kernel Ker(C) [22], the image of any block is obviously a block.
In order to find an invariant for the macroblocks, we use the structure of the linear span of C. As was shown in [23], the linear span is generated by the words y; It is straightforward to see the following fact: (i) The matrix formed from w 1 , . . . , w δ , v 1 , . . . , v δ , u 1 , . . . , uγ as rows consists of all different binary columns of heightγ + 2δ.
Then, we observe the next two facts: (ii) Every word of the linear span whose weight is different from n/2 has the same value in the coordinates of a fixed macroblock. Indeed, if a linear combination x of the basis words (3) has different values in the same macroblock, then either some u i or some v j is involved to generate x. Assume z, which is u i or v j , is involved. As follows from claim (i), for every coordinate, there is another one such that the values of z are different in these two coordinates, while the values of any other basis word from (3) coincide. Hence, x has different values in each such pair of coordinates, which means that its weight is n/2.
(iii) For every two different macroblocks I and I , the linear span contains a word of weight n/4 that has different values in the coordinates from these two macroblocks. Indeed, by the definition of the macroblocks, there is w j that has different values in the coordinates of I and I . Then, for any other w j (recall that δ ≥ 2), we have w j = w j • w j + w j • (w j + y). Hence, at least one of two words w j • w j and w j • (w j + y) of weight n/4 differs in the coordinates of I and I .
As follows from claims (ii) and (iii), there is an invariant that indicates whether two coordinates belong to the same macroblock or not: coordinates k and k are in different macroblocks if and only if the liner span of C contains a word x = (x 1 , . . . , x n ) of weight less than n/2 such that x k = x k . As an automorphism of a code is obviously an automorphism of its linear span, the partition of the coordinates into macroblocks is stabilized.
Lemma 9. Let ψ be an automorphism of C. Then (i) For every j from 1 to δ, ψ(w j ) is a linear combination of y, w 1 , . . . , w δ .
(iii) For every s ∈ {0, 1} δ , where σ is a permutation of the set {0, (iv) The permutation σ is linear. Proof. Since ψ is an automorphism of Ker(C) [22], the permuted matrix ψ(K) remains a generator matrix for Ker(C). So, (ii) is obvious. Taking into account Lemma 8, we see that (i) holds as well.
6. The permutation automorphism group of a Z 2 Z 4 -linear Hadamard code By Lemma 3, any nonsingular affine transformation of Zγ 2 × Z δ 4 belongs to Aut(C). Therefore, since for δ ≥ 3, the number of nonsingular affine transformations coincides with the upper bound given in Proposition 1, we obtain the following result: Theorem 4. The permutation automorphism group of the Z 2 Z 4 -linear Hadamard code C of type (α, β;γ +1, δ), with δ ≥ 3, is the group of nonsingular affine transformations of Zγ 2 × Z δ 4 . Therefore, its order is (2 j − 1).
It remains to consider the case δ = 2.
(ii) Moreover, if this automorphism ψ is not identical, then it is not an affine transformation of Zγ 2 × Z 2 4 .
Proof. (i) There are exactly p = 6 = (2 2 − 1)(2 2 − 2) such permutations. Forγ = 0, it is easy to check that the result is true. The coordinate permutations ψ corresponding to two permutations σ are shown on the following diagram; the other three nonidentity variants for σ can be expressed from these two using composition. Forγ ≥ 1, the 4 rows v(s) of Sγ ,2 , s ∈ {0, 1} 2 , contain in each one of their 4 macroblocks of size 2γ +2 , the same coordinates corresponding to the same macroblock in the row v(s) of S 0,2 repeated 2γ times. Therefore, the result follows.
(ii) We first note that, as follows from the first part of the proof, the considered automorphisms fix a coordinate from every block. Now, let us consider an arbitrary affine permutation ψ that fixes a coordinate from every block and show that it is the identity permutation id. Assume, seeking a contradiction, that ψ = id. Consider the map ξ = ψ − id. It is an affine map from Zγ 2 × Z 2 4 to Zγ 2 × Z 2 4 . It possesses the zero value in a point from every block and a nonzero value in at least one point. Consider a nonconstant linear mapping λ from the image of ξ onto {0, 2}. Then, the map λξ from Zγ 2 ×Z 2 4 to {0, 2} is affine and is not constantly zero. By Lemma 6, λξ belongs to the kernel of C. However, as λξ is zero in a point from every block, by the definition of the blocks, it is constantly zero. We get a contradiction.
Proof. By Lemma 11(i), all the permutations are automorphisms of C. By Lemma 11(ii), they are mutually different. We can see that the lower bound given by counting all such permutations coincides with the upper bound from Proposition 1.