Partial permutation decoding for binary linear and Z4-linear Hadamard codes

Permutation decoding is a technique which involves finding a subset $S$, called PD-set, of the permutation automorphism group of a code $C$ in order to assist in decoding. An explicit construction of $\left \lfloor{\frac{2^m-m-1}{1+m}} \right \rfloor$-PD-sets of minimum size $\left \lfloor{\frac{2^m-m-1}{1+m}} \right \rfloor + 1$ for partial permutation decoding for binary linear Hadamard codes $H_m$ of length $2^m$, for all $m\geq 4$, is described. Moreover, a recursive construction to obtain $s$-PD-sets of size $l$ for $H_{m+1}$ of length $2^{m+1}$, from a given $s$-PD-set of the same size for $H_m$, is also established. These results are generalized to find $s$-PD-sets for (nonlinear) binary Hadamard codes of length $2^m$, called $\mathbb{Z}_4$-linear Hadamard codes, which are obtained as the Gray map image of quaternary linear codes of length $2^{m-1}$.


Introduction
Denote by Z 2 and Z 4 the rings of integers modulo 2 and modulo 4, respectively. Let Z n 2 denote the set of all binary vectors of length n and let Z n 4 be the set of all n-tuples over the ring Z 4 . The Hamming weight wt(v) of a vector v ∈ Z n 2 is the number of nonzero coordinates in v. The Hamming distance d(u, v) between two vectors u, v ∈ Z n 2 is the number of coordinates in which u and v differ, that is, d(u, v) = wt (u+v). Let e i be the binary vector or tuple over Z 4 with a one in the ith coordinate and zeros elsewhere. Let 0, 1, 2 and 3 be the binary vectors or tuples over Z 4 having 0, 1, 2 and 3, respectively, repeated in each coordinate. It will be clear by the context whether we refer to binary vectors or tuples over Z 4 .
Let C be a binary code of length n and size |C| = 2 k . For a vector v ∈ Z n 2 and a set I ⊆ {1, . . . , n}, we denote by v I the restriction of v to the coordinates in I and by C I the set {v I : v ∈ C}. A set I ⊆ {1, . . . , n} of k coordinate positions is an information set for C if |C I | = 2 k . If such an I exists, C is said to be a systematic code. For each information set I of size k, the set {1, . . . , n}\I of the remaining n − k coordinate positions is a check set for C. Let Sym(n) be the symmetric group of permutations on the set {1, . . . , n} and let id ∈ Sym(n) be the identity permutation. The group operation in Sym(n) is the function composition σ 1 σ 2 , which maps any element x to σ 1 (σ 2 (x)), σ 1 , σ 2 ∈ Sym(n). A σ ∈ Sym(n) acts linearly on words of Z n 2 or Z n 4 by permuting their coordinates as follows: σ((v 1 , . . . , v n )) = (v σ −1 (1) , . . . , v σ −1 (n) ). The permutation automorphism group of C or C = Φ(C), denoted by PAut(C) or PAut(C), respectively, is the group generated by all permutations that preserve the set of codewords.
A binary Hadamard code of length n has 2n codewords and minimum distance n/2. It is well-known that there exists an unique binary linear Hadamard code H m of length n = 2 m , for any m ≥ 2. The quaternary linear codes such that, under the Gray map, give a binary Hadamard code are called quaternary linear Hadamard codes and the corresponding Z 4 -linear codes are called Z 4 -linear Hadamard codes. These codes have been studied and classified in [10,13], and their permutation automorphism groups have been determined in [9,14].
Permutation decoding is a technique, introduced in [11] by MacWilliams for linear codes, which involves finding a subset of the permutation automorphism group of a code in order to assist in decoding. A new permutation decoding method for Z 4 -linear codes (not necessarily linear) was introduced in [2]. In general, the method works as follows. Given a systematic t-error-correcting code C with information set I, we denote by y = x + e the received vector, where x ∈ C and e is the error vector. Suppose that at most t errors occur, that is, wt(e) ≤ t. The permutation decoding consists on moving all errors in y out of I, by using an automorphism of C. This technique is strongly based on the existence of some special subsets of PAut(C), called PD-sets. Specifically, a subset S ⊆ PAut(C) is said to be an s-PD-set for the code C if every s-set of coordinate positions is moved out of I by at least one element of S, where 1 ≤ s ≤ t. When s = t, S is said to be a PD-set.
In [4], it is shown how to find s-PD-sets of size s + 1 that satisfy the Gordon-Schönheim bound for partial permutation decoding for the binary simplex code of lenght 2 m − 1 for all m ≥ 4 and 1 < s ≤ 2 m −m−1 m . In this paper, following the same technique, similar results for binary linear and Z 4 -linear Hadamard codes are established. In [15], 2-PD-sets of size 5 and 4-PD-sets of size m+1 2 + 2 are found for binary linear Hadamard codes H m , for all m > 4. Small PDsets that satisfy the Gordon-Schönheim bound have also been found for binary Golay codes [5,16] and for the binary simplex code S 4 [8].
This work is organized as follows. In Section 2, we prove that the Gordon-Schönheim bound can be adapted to systematic codes, not necessarily linear. Furthermore, we apply this bound on the minimum size of s-PD-sets to binary linear and Z 4 -linear Hadamard codes, which are systematic but nonlinear in general, and we prove that their minimum size is s + 1. In Section 3, we regard the permutation automorphism group PAut(H m ) as a certain subgroup of the general linear group GL(m + 1, 2) and we provide a criterion on subsets of matrices of such subgroup to be an s-PD-set of size s + 1 for H m . In Section 4, we define recursive constructions to obtain s-PD-sets of size l for H m+1 from a given s-PD-set of the same size for H m , where l ≥ s + 1. Finally, in Sections 5 and 6, we establish equivalent results for (nonlinear) Z 4 -linear Hadamard codes.

Minimum size of s-PD-sets for Hadamard codes
There is a well-known bound on the minimum size of PD-sets for linear codes based on the length, dimension and minimum distance of such codes that can be adapted to systematic codes (not necessarily linear) easily. Proposition 1. Let C be a systematic t-error correcting code of length n, size |C| = 2 k and minimum distance d. Let r = n − k be the redundancy of C. If S is a PD-set for C, then The above inequality (1) is often called the Gordon-Schönheim bound. The result given by Proposition 1 is quoted and proved for linear codes in [6]. We can follow the same proof, since the linearity of the code is only used to guarantee that the code is systematic. In [2], it is shown that Z 4 -linear codes are systematic, and a systematic encoding is given for these codes. Therefore, the result can be applied to any Z 4 -linear code, not necessarily linear.
The Gordon-Schönheim bound can be adapted to s-PD-sets for all s up to the error correcting capability of the code. Note that the error-correcting capability of any binary linear or Z 4 -linear Hadamard code of length n = 2 m is t m = (d − 1)/2 = (2 m−1 − 1)/2 = 2 m−2 − 1 [12]. Moreover, all these codes are systematic and have size 2n = 2 m+1 . Therefore, the right side of the bound given by (1), for binary linear and Z 4 -linear Hadamard codes of length 2 m and for all 1 ≤ s ≤ t m , becomes We compute the minimum value of g m (s) in the following lemma.
where t m = 2 m−2 − 1 is the error-correcting capability of any binary linear and Z 4 -linear Hadamard code of length 2 m .
Proof. We need to prove that g m (s) ≥ s + 1. This fact is clear, since the central term for all s ∈ {1, . . . , 2 m−2 − 1}, and in each stage of the ceiling function working from inside, g m (s) increases its value by at least 1.
The smaller the size of the PD-set is, the more efficient permutation decoding becomes. Because of this, we will focus on the case when we have that g m (s) = s + 1. For each binary linear and Z 4 -linear Hadamard code of length 2 m , m ≥ 4, we define the following integer: which represents the greater s in which we can find s-PD-sets of size s + 1. The following result characterize this parameter from the value of m. Note that for m = 3, since the error-correcting capability is t 3 = 1, the permutation decoding becomes unnecessary and we do not take it into account in the results.
where G is any matrix having as column vectors the 2 m − 1 nonzero vectors from Z m 2 , with the vectors e i , i ∈ {1, . . . , m}, in the first m positions. Note that G can be seen as a generator matrix of the binary simplex code of length 2 m − 1.
It is known that the permutation automorphism group PAut(H m ) of H m is isomorphic to the general affine group AGL(m, 2) [12]. Let GL(m, 2) be the general linear group over Z 2 . Recall that AGL(m, 2) consists of all mappings 2 , together with the function composition as the group operation. The monomorphism defines an isomorphism between AGL(m, 2) and the subgroup of GL(m + 1, 2) consisting of all nonsingular matrices whose first column is e 1 . Therefore, from now on, we also regard PAut(H m ) as this subgroup. Note that any matrix M ∈ PAut(H m ) can be seen as a permutation of coordinate positions, that is, as an element of Sym(2 m ). By multiplying each column vector w i of G m by M , we obtain another column vector w j = w i M , which means that the ith coordinate position moves to the jth coordinate position, i, j ∈ {1, . . . , 2 m }. Proof. Suppose that the set P s = {M i : 0 ≤ i ≤ s} satisfies that no two 2 be a set of s different column vectors of the generator matrix G m regarded as row vectors, which represents a set of s error positions. Assume we cannot move all the error positions to the check set by any element of P s . Then, for each i ∈ {0, . . . , s}, there is a v ∈ E such that vM i ∈ I m . In other words, there is at least an error position that remains in the information set I m after applying any permutation of P s . Note that there are s + 1 values for i, but only s elements in E. Therefore, vM i ∈ I m and vM j ∈ I m for some v ∈ E and i = j.
Taking into account the form of the vectors in the information set I m = {w 1 , . . . , w m+1 }, by multiplying for such inverse matrices M −1 i and M −1 j , we get the first row or a certain addition between the first row and another row of each matrix. Thus, we obtain that (M −1 i ) * and (M −1 j ) * have a row in common, contradicting our assumption. Let P k ⊆ P s of size k + 1. If this set satisfies the condition on the inverse matrices and we suppose that it is not a k-PD-set, we arrive to a contradiction in the same way as before.
Conversely, suppose that the set P s = {M i : 0 ≤ i ≤ s} forms an s-PDset for H m , but does not satisfy the condition on the inverse matrices. Thus, some v ∈ {w 1 , . . . , w 2 m } must be the rth row of (M −1 i ) * and the tth row of (M −1 j ) * for some r, t ∈ {1, . . . , m + 1}, i, j ∈ {0, . . . , s}. In other words, we Finally, we obtain that vM i = w r and vM j = w t . These equalities implies that the vector v, which represents an error position, cannot be moved to the check set by the permutations defined by matrices M i and M j . Let Finally, since some of the v l may repeat, we obtain a set E = {v l : l ∈ L} ∪ {v} of size at most s. Nevertheless, no matrix in P s will map every member of E into the check set, fact that contradicts our assumption.
We give now an explicit construction of an f m -PD-set {M 0 , . . . , M fm } ⊆ PAut(H m ) of minimum size f m +1 for the binary linear Hadamard code H m of length 2 m . We follow a similar technique to the one described for simplex codes in [4].
Note that α m − 1 = . . , f m }, consider the following (m+1)×(m+1) binary matrices: where Id 5 is the 5 × 5 identity matrix, are elements of PAut(H 4 ) and It is straightforward to chech that matrices N * 0 ,  Proof. Following the condition on sets of matrices to be s-PD-sets of size s + 1, given by Theorem 5, we have to obtain certain s + 1 matrices with no rows in common. Note that the number of possible vectors of length m + 1 over Z 2 with 1 in the first coordinate is 2 m . Thus, taking this fact into account and counting the number of rows of each one of these s + 1 matrices, we have that (s + 1)(m + 1) ≤ 2 m , so s + 1 ≤ Given a matrix M ∈ PAut(H m ) and an integer κ ≥ 1, we define the matrix M (κ) ∈ PAut(H m+κ ) as where Id κ denotes the κ × κ identity matrix. It is important to note that the bound f m+1 for H m+1 cannot be achieved recursively from an s-PD-set for H m , since the above recursive construction works for a given fixed s, increasing the length of the Hadamard code.
The above recursive construction only holds when the size of the s-PD-set is exactly s + 1. Now, we will show a second recursive construction which holds when the size of the s-PD-set is any integer l, l ≥ s+1. In this case, the elements of PAut(H m ) will be regarded as permutations of coordinate positions, that is, as elements of Sym(2 m ) instead of matrices of GL(m + 1, 2).
Let e = (a, b) ∈ Z 2n 2 , where a = (a 1 , . . . , a n ), b = (b 1 , . . . , b n ) ∈ Z n 2 , and n = 2 m . Finally, we will prove that for every e ∈ Z 2n 2 with wt(e) ≤ s, there is (σ|σ) ∈ (S|S) such that (σ|σ)(e) I = 0. Let c = (c 1 , . . . , c n ) be the binary vector defined as follows: c i = 1 if and only if a i = 1 or b i = 1, for all i ∈ {1, . . . , n}. Note that wt(c) ≤ s, since wt(e) ≤ s. Taking into account that S is an s-PD-set with respect to I, there is σ ∈ S such that σ(c) I = 0. Therefore, we also have that (σ|σ)(a, b) I∪J = 0, where J = {i + n : i ∈ I}. The result follows trivially since I ⊆ I ∪ J. Let H γ,δ be the quaternary linear Hadamard code of length β = 2 m−1 and type 2 γ 4 δ , where m = γ + 2δ − 1, and let H γ,δ = Φ(H γ,δ ) be the corresponding Z 4 -linear code of length 2β = 2 m . A generator matrix G γ,δ for the code H γ,δ can be constructed by using the following recursive constructions: starting from G 0,1 = (1). We first obtain G 0,δ from G 0,1 by using recursively δ times construction (8). Then, G γ,δ is managed from G 0,δ by using γ times construction (7). Note that the rows of order four remain in the upper part of G γ,δ while those of order two stay in the lower part. A set I = {i 1 , . . . , i γ+δ } ⊆ {1, . . . , β} of γ + δ coordinate positions is said to be a quaternary information set for a quaternary linear code C of type 2 γ 4 δ if |C I | = 2 γ 4 δ . If the coordinates in I are ordered in such a way that |C {i1,...,i δ } | = 4 δ , it is easy to see that the set Φ(I), defined as is an information set for C = Φ(C). For example, the set I = {1} is a quaternary information set for H 0,1 , so Φ(I) = {1, 2} is an information set for H 0,1 = Φ(H 0,1 ). In general, there is not an unique way to obtain a quaternary information set for the code H γ,δ . The following result provides a recursive and simple form to obtain such a set.
Let GL(k, Z 4 ) denote the general linear group of degree k over Z 4 and let L be the set consisting of all matrices over Z 4 of the following form: and θ ∈ Z γ 4 . Lemma 15. The set L is a subgroup of GL(γ + δ, Z 4 ).
Proof. We first need to check that L ⊆ GL(γ + δ, Z 4 ), in other words, that It is straightforward to check that MN ∈ L for all M, N ∈ L.

Lemma 16.
Let H γ,δ be the quaternary linear Hadamard code of length β and type 2 γ 4 δ and let P ⊆ PAut(H γ,δ ). Then, Φ(P) is an s-PD-set for H γ,δ with information set Φ(I γ,δ ) if and only if for every s-set E of column vectors of G γ,δ there is M ∈ P such that {gM : g ∈ E} ∩ I γ,δ = ∅.
Corollary 18. Let P s be a set of s + 1 matrices in PAut(H γ,δ ). If Φ(P s ) is an s-PD-set of size s + 1 for H γ,δ , then any ordering of elements in Φ(P s ) provides nested k-PD-sets for k ∈ {1, . . . , s}.
Corollary 19. Let P s be a set of s + 1 matrices in PAut(H γ,δ ). If Φ(P s ) is an s-PD-set of size s + 1 for H γ,δ , then s ≤ f γ,δ , where Proof. Following the condition on sets of matrices to be s-PD-sets of size s + 1, given by Theorem 17, we have to obtain certain s + 1 matrices with no rows in common. Since the rows of length δ + γ must have 1 in the first coordinate, and elements from {0, 2} in the last γ coordinates, the number of possible rows is 4 δ−1 2 γ = 2 γ+2δ−2 . Thus, taking this fact into account and counting the number of rows of each one of these s+1 matrices, we have that (s+1)(γ +δ) ≤ 2 γ+2δ−2 , and the result follows.
It is easy to check that matrices N * 0 = Id * 3 , have no rows in common. Let The set Φ(P 4 ) is a 4-PD-set of size 5 for H 0,3 . Note that the bound f 5 = 4 is attained for H 0,3 despite the search of the 4-PD-set is done in the subgroup We have that the Z 4 -linear Hadamard code of length 2 m with δ = 1 or δ = 2 is equivalent to the binary linear Hadamard code of length 2 m [10]. However, the technique explained for binary linear Hadamard codes in Section 3 provides better results (in terms of s) that the one explained for Z 4 -linear Hadamard codes when applied for linear codes, since f γ,δ ≤ f m , where m = γ + 2δ − 1.
Example 22. We have provided a 2-PD-set of size 3 for the binary linear Hadamard code H 4 of length 16 in Example 8. The code H 4 is equivalent to both Z 4 -linear Hadamard codes H 1,2 and H 3,1 . However, a 2-PD-set of size 3 is not achievable for H 4 by using Theorem 17, since f 1,2 = f 3,1 = 1.
Example 23. The binary linear Hadamard code H 5 of length 32 admits a 4-PD-set of size 5 by Theorem 5, since f 5 = 4. Considering H 5 as the Gray map image of the quaternary linear Hadamard code H 2,2 or H 4,1 , no more than a 3-PD-set of size 4 can be found by using Theorem 17, since f 4,1 = 2 and f 2,2 = 3.

Recursive construction of s-PD-sets for Z 4 -linear Hadamard codes
In this section, given an s-PD-set of size l for the Z 4 -linear Hadamard code H γ,δ of length 2 m and type 2 γ 4 δ , where m = γ + 2δ − 1 and l ≥ s + 1, we show how to construct recursively an s-PD-set of the same size for H γ+i,δ+j of length 2 m+i+2j and type 2 γ+i 4 δ+j for all i, j ≥ 0.
As a future research in this topic, it would be interesting to provide explicitly an f γ,δ -PD-set of size f γ,δ + 1 for H γ,δ , s-PD-sets of minimum size for Z 2 Z 4linear Hadamard codes in general [13], or other families of Z 4 -linear codes such as Kerdock codes [7].