arXiv:2610.18409cs.ITOct 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2610.18409

Full classification of Zps\mathbb{Z}_{p^s}-linear generalized Hadamard codes

Dipak K. Bhunia

Abstract

The Zps\mathbb{Z}_{p^s}-additive codes are subgroups of Zpsn\mathbb{Z}_{p^s}^n. A Zps\mathbb{Z}_{p^s}-linear generalized Hadamard (GH) code is a GH code over Zp\mathbb{Z}_p which is the Gray map image of a Zps\mathbb{Z}_{p^s}-additive code. A recursive construction gives such codes Hpt1,…,tsH_p^{t_1,\ldots,t_s}, of type (n;t1,…,ts)(n;t_1,\ldots,t_s) and length ptp^t, and a partial classification of them is known. In this paper, we complete the classification of these codes for every prime pp. The main tool is the derived code, obtained by puncturing the code outside a block of coordinates determined by its kernel. For a nonlinear code Hpt1,…,tsH_p^{t_1,\ldots,t_s} with t1≥2t_1 \geq 2, the derived code is a Zps−1\mathbb{Z}_{p^{s-1}}-linear GH code of the same family, although the mechanism for odd pp differs from the binary one. As a consequence, for t≥3t \geq 3, there are P(t+1)−P(t)\mathcal{P}(t+1) - \mathcal{P}(t) nonequivalent such codes of length ptp^t if pp is odd, and P(t+1)−P(t)−1\mathcal{P}(t+1) - \mathcal{P}(t) - 1 if p=2p = 2, where P(n)\mathcal{P}(n) is the number of partitions of nn. In particular, this completes the classification of the Z2s\mathbb{Z}_{2^s}-linear Hadamard codes. We also prove a conjecture on the codes with t1≥2t_1 \geq 2 and ts=0t_s = 0.

Keywords: Generalized Hadamard code, ZpsZ_{p^{s}}-linear code, Z2sZ_{2^{s}}-linear Hadamard code, Gray map, kernel, derived code, equivalence, classification, partition.

2020 Mathematics Subject Classification: 94B25, 94B60.

1 Introduction

Let Zps\mathbb{Z}_{p^s} be the ring of integers modulo psp^s with pp prime and s≥1s \geq 1. The set of nn-tuples over Zps\mathbb{Z}_{p^s} is denoted by Zpsn\mathbb{Z}_{p^s}^n, and its elements are also called vectors. The order of a vector u∈Zpsn\mathbf{u} \in \mathbb{Z}_{p^s}^n, denoted by o(u)\mathbf{o}(\mathbf{u}), is the smallest positive integer kk such that ku=0k\mathbf{u} = \mathbf{0}. The vectors 0\mathbf{0} and 1\mathbf{1} are the all-zero and the all-one vectors, the length being always clear from the context. A code over Zp\mathbb{Z}_p of length NN is a nonempty subset of ZpN\mathbb{Z}_p^N, and it is linear if it is a subspace of ZpN\mathbb{Z}_p^N. Similarly, a nonempty subset of Zpsn\mathbb{Z}_{p^s}^n is a Zps\mathbb{Z}_{p^s}-additive code if it is a subgroup of Zpsn\mathbb{Z}_{p^s}^n. Note that, when s=1s = 1, a Zps\mathbb{Z}_{p^s}-additive code is a linear code over Zp\mathbb{Z}_p.

The Hamming weight of a vector u∈ZpN\mathbf{u} \in \mathbb{Z}_p^N, denoted by wtH(u)\text{wt}_H(\mathbf{u}), is the number of its nonzero coordinates. The Hamming distance of two vectors u,v∈ZpN\mathbf{u}, \mathbf{v} \in \mathbb{Z}_p^N is dH(u,v)=wtH(v−u)d_H(\mathbf{u}, \mathbf{v}) = \text{wt}_H(\mathbf{v} - \mathbf{u}), and the minimum distance of a code CC over Zp\mathbb{Z}_p is d(C)=min⁡{dH(u,v):u,v∈C,u≠v}d(C) = \min\{d_H(\mathbf{u}, \mathbf{v}) : \mathbf{u}, \mathbf{v} \in C, \mathbf{u} \neq \mathbf{v}\}. Let SNS_N be the symmetric group of permutations on {1,…,N}\{1, \ldots, N\}, and let Zp∗=Zp∖{0}\mathbb{Z}_p^* = \mathbb{Z}_p \setminus \{0\}. For π∈SN\pi \in S_N and a=(a1,…,aN)∈(Zp∗)N\mathbf{a} = (a_1, \ldots, a_N) \in (\mathbb{Z}_p^*)^N, we define the monomial map μπ,a\mu_{\pi, \mathbf{a}} of ZpN\mathbb{Z}_p^N by μπ,a(x)π(i)=aixi\mu_{\pi, \mathbf{a}}(\mathbf{x})_{\pi(i)} = a_i x_i for 1≤i≤N1 \leq i \leq N. That is, the entry of x\mathbf{x} at the position ii is multiplied by aia_i and moved to the position π(i)\pi(i). When a=1\mathbf{a} = \mathbf{1}, we simply write π\pi for μπ,1\mu_{\pi, \mathbf{1}}. Two codes C1C_1 and C2C_2 over Zp\mathbb{Z}_p of length NN are said to be equivalent if there are a vector y∈ZpN\mathbf{y} \in \mathbb{Z}_p^N and a monomial map μ\mu such that

C2={y+μ(x):x∈C1}.C_{2}=\{\mathbf{y}+\mu(\mathbf{x}):\mathbf{x}\in C_{1}\}.

∗^{*}This work has been granted by the Juan de la Cierva 2024 grant (JDC2024-053082-I), funded by Ministerio de Ciencia, Innovación y Universidades (MICIU/AEI/10.13039/501100011033) and co-funded by the European Social Fund Plus (FSE+).

They are said to be permutation equivalent if moreover y=0\mathbf{y} = \mathbf{0} and μ\mu is a permutation. For p=2p = 2, every monomial map is a permutation, and we obtain the usual notion of equivalence of binary codes. In [8], two codes are called equivalent when they differ by a monomial map, and in [19, 6] when they differ by a translation and a permutation. Both notions are particular cases of the one above. Therefore, the nonequivalence results of this paper hold for each of them, while all the equivalences that we establish are permutation equivalences.

Two structural properties of codes over Zp\mathbb{Z}_p are the rank and the dimension of the kernel. The rank of a code CC over Zp\mathbb{Z}_p, denoted by rank(C)\text{rank}(C), is the dimension of its linear span ⟨C⟩\langle C \rangle. Following [3, 27], the kernel of CC is

K(C)={x∈ZpN:x+C=C},\mathrm{K}(C)=\{\mathbf{x}\in\mathbb{Z}_{p}^{N}:\mathbf{x}+C=C\},

and its dimension is denoted by ker⁡(C)\ker(C). If 0∈C\mathbf{0} \in C, then K(C)\mathrm{K}(C) is a linear subcode of CC. Note also that, if CC is linear, then K(C)=C=⟨C⟩\mathrm{K}(C) = C = \langle C \rangle. By Lemma 4.3, two equivalent codes containing 0\mathbf{0} have the same rank and the same dimension of the kernel. Hence, these parameters can be used to distinguish between nonequivalent codes.

A generalized Hadamard (GH) matrix H(p,λ)=(hij)H(p, \lambda) = (h_{ij}) of order pλp\lambda over Zp\mathbb{Z}_p is a pλ×pλp\lambda \times p\lambda matrix with entries from Zp\mathbb{Z}_p such that, for every ii and jj with 1≤i<j≤pλ1 \leq i < j \leq p\lambda, the multiset {hik−hjk:1≤k≤pλ}\{h_{ik} - h_{jk} : 1 \leq k \leq p\lambda\} contains every element of Zp\mathbb{Z}_p exactly λ\lambda times [22]. These matrices are also known as Butson Hadamard matrices [13], and a GH matrix H(2,λ)H(2, \lambda) over Z2\mathbb{Z}_2 corresponds to an ordinary Hadamard matrix of order 2λ2\lambda [2]. Two GH matrices are equivalent if one of them can be obtained from the other by permuting rows and columns and by adding the same element of Zp\mathbb{Z}_p to all the entries of a row or of a column. Hence, every GH matrix is equivalent to a normalized one, that is, to one whose first row and first column contain only zeros. If HH is a normalized GH matrix and FHF_H is the set of its rows, then the code

CH=⋃α∈Zp(FH+α1)C_{H}=\bigcup_{\alpha\in\mathbb{Z}_{p}}(F_{H}+\alpha\mathbf{1})

is called a generalized Hadamard (GH) code over Zp\mathbb{Z}_p [16]. A GH code over Zp\mathbb{Z}_p of length NN has pNpN codewords and minimum distance N(p−1)/pN(p-1)/p. For p=2p=2, GH codes are the usual binary Hadamard codes.

Linear codes over Zps\mathbb{Z}_{p^s} were studied by Blake [10] and Shankar [29]. Interest in their images under Gray maps increased after it was established in [21] that the Kerdock and Preparata codes can be represented as Gray images of linear codes over Z4\mathbb{Z}_4. The Gray map from Z4\mathbb{Z}_4 to Z22\mathbb{Z}_2^2 given in [21] has several generalizations, which go from Z2s\mathbb{Z}_{2^s} to Z22s−1\mathbb{Z}_2^{2^{s-1}} [14, 11, 15, 24, 26] and, more generally, from Zps\mathbb{Z}_{p^s} to Zpps−1\mathbb{Z}_p^{p^{s-1}} [20, 30]. As in [17, 8, 6], we use Carlet's Gray map [14] and its generalization given in [20], which is recalled in Section 2 and denoted by ϕs\phi_s. We write Φs:Zpsn→Zpnps−1\Phi_s : \mathbb{Z}_{p^s}^n \to \mathbb{Z}_p^{np^{s-1}} for its component-wise extension. Let C\mathcal{C} be a Zps\mathbb{Z}_{p^s}-additive code of length nn. Its image C=Φs(C)C = \Phi_s(\mathcal{C}) is called a Zps\mathbb{Z}_{p^s}-linear code, and it has length ps−1np^{s-1}n. As a subgroup of Zpsn\mathbb{Z}_{p^s}^n, the code C\mathcal{C} is isomorphic to

Zpst1×Zps−1t2×⋯×Zpts\mathbb{Z}_{p^{s}}^{t_{1}}\times\mathbb{Z}_{p^{s-1}}^{t_{2}}\times\cdots\times\mathbb{Z}_{p}^{t_{s}}

for some nonnegative integers t1,…,tst_1, \ldots, t_s, and we say that C\mathcal{C}, or equivalently CC, is of type (n;t1,…,ts)(n; t_1, \ldots, t_s). Note that ∣C∣=pst1p(s−1)t2⋯pts|\mathcal{C}| = p^{st_1} p^{(s-1)t_2} \cdots p^{t_s}, and that C\mathcal{C} has a generator matrix with t1+⋯+tst_1 + \cdots + t_s rows, exactly tit_i of which have order ps−i+1p^{s-i+1} for 1≤i≤s1 \leq i \leq s. If Φs(C)\Phi_s(\mathcal{C}) is a GH code, then C\mathcal{C} is called a Zps\mathbb{Z}_{p^s}-additive GH code, and Φs(C)\Phi_s(\mathcal{C}) is called a Zps\mathbb{Z}_{p^s}-linear GH code. For p=2p = 2, these codes are called Z2s\mathbb{Z}_{2^s}-linear Hadamard codes.

A recursive construction of Zps\mathbb{Z}_{p^s}-additive GH codes is given in [17] for p=2p = 2 and in [8] for any prime pp. For nonnegative integers t1,…,tst_1, \ldots, t_s with t1≥1t_1 \geq 1, it provides a Zps\mathbb{Z}_{p^s}-additive GH code Hpt1,…,ts\mathcal{H}_p^{t_1, \ldots, t_s} of type (n;t1,…,ts)(n; t_1, \ldots, t_s). Its image Hpt1,…,ts=Φs(Hpt1,…,ts)H_p^{t_1, \ldots, t_s} = \Phi_s(\mathcal{H}_p^{t_1, \ldots, t_s}) is a Zps\mathbb{Z}_{p^s}-linear GH code of length ptp^t, where

t+1=∑i=1s(s−i+1)ti,t+1=\sum_{i=1}^{s}(s-i+1)t_{i},

(1) and we call (t1,…,ts)(t_1, \ldots, t_s) the parameters of this code. For p=2p = 2, every Z2s\mathbb{Z}_{2^s}-linear Hadamard code is equivalent to one of these codes [24, 17]. As in [8, 6], by the Zps\mathbb{Z}_{p^s}-linear GH codes of length ptp^t we mean the codes Hpt1,…,tsH_p^{t_1, \ldots, t_s} of that length, with s≥1s \geq 1. Let At,s,p\mathcal{A}_{t,s,p} be the number of nonequivalent such codes for a fixed s≥2s \geq 2, and let At,p\mathcal{A}_{t,p} be the number of nonequivalent such codes when s≥2s \geq 2 is allowed to vary. Let also Xt,s,pX_{t,s,p} be the number of nonnegative integer solutions (t1,…,ts)(t_1, \ldots, t_s) of (1) with t1≥1t_1 \geq 1, and let X~t,s,p\widetilde{X}_{t,s,p} be the number of those solutions with t1≥2t_1 \geq 2 for which Hpt1,…,tsH_p^{t_1, \ldots, t_s} is nonlinear.

The Z4\mathbb{Z}_4-linear Hadamard codes of length 2t2^t are classified by either the rank or the dimension of the kernel, and there are exactly ⌊(t−1)/2⌋\lfloor(t-1)/2\rfloor nonequivalent such codes for any t≥3t \geq 3 [23, 28]. For p=2p = 2 and s≥3s \geq 3, the linearity and the kernel of the codes Hpt1,…,tsH_p^{t_1,\ldots,t_s} are determined in [17]. For odd pp and s≥2s \geq 2, they are determined in [8]. For p=2p = 2, the rank is computed in [28] for s=2s = 2 and in [18] for s=3s = 3. In the other cases, the rank has been computed with MAGMA [12] for small lengths [17, 8, 6]. In [17, 8], it is also shown that At,s,2≤Xt,s,2−1\mathcal{A}_{t,s,2} \leq X_{t,s,2} - 1 for 2≤s≤t−12 \leq s \leq t - 1, and that At,s,p≤Xt,s,p\mathcal{A}_{t,s,p} \leq X_{t,s,p} for odd pp. The dimension of the kernel shows that these bounds are tight for all t≥3t \geq 3 and 2≤s≤t−12 \leq s \leq t - 1 outside the range given by t≥8t \geq 8 and 3≤s≤t−53 \leq s \leq t - 5. In that range, the dimension of the kernel does not classify the codes in general. It is conjectured in [8, Section 7] that these bounds are always tight, and that the rank classifies the codes. In [19] for p=2p = 2, and in [6] for any prime pp, it is shown that some of these codes with different values of ss are permutation equivalent. This gives the upper bound

At,p≤1+∑s=2⌊(t+1)/2⌋X~t,s,p(2)\mathcal{A}_{t,p}\leq1+\sum_{s=2}^{\lfloor(t+1)/2\rfloor}\widetilde{X}_{t,s,p} \tag{2}

of [19] and [6, Theorem 10]. By the computations of the rank mentioned above, this bound is tight for 3≤t≤113 \leq t \leq 11 if p=2p = 2, for 3≤t≤103 \leq t \leq 10 if p=3p = 3, and for 3≤t≤83 \leq t \leq 8 if p=5p = 5. It is also conjectured in [6, Section 3] that a code Hpt1,…,tsH_p^{t_1,\ldots,t_s} with t1≥2t_1 \geq 2 and ts=0t_s = 0 is not equivalent to any other code Hpt1′,…,ts′H_p^{t_1',\ldots,t_s'} of the same length. Finally, it is pointed out in [6, Section 5] that computing the rank of the codes with t1≥2t_1 \geq 2 and 2≤s≤⌊(t+1)/2⌋2 \leq s \leq \lfloor(t+1)/2\rfloor would be enough to obtain the full classification.

Our approach is based on an invariant computed on a part of the code, and it does not need the rank except in one binary case. Let CC be a code over Zp\mathbb{Z}_p containing 0\mathbf{0}. We say that two coordinates of CC lie in the same kernel block when the vectors of K(C)\mathrm{K}(C) which vanish at one of them are exactly those which vanish at the other one. For p=2p = 2, this means that every vector of K(C)\mathrm{K}(C) takes the same value at both coordinates, which is the definition given in [4]. For odd pp, we use the vanishing condition because it is compatible with monomial maps. Puncturing CC outside a set of coordinates means deleting all the coordinates outside this set. When the codes obtained by puncturing CC outside each of its kernel blocks are pairwise equivalent, any of them is called the derived code of CC. It is an equivalence invariant of CC. When the derived code has the same property, it can be derived again. For p=2p = 2, it is shown in [5] that the kernel blocks of a nonlinear code H2t1,…,tsH_2^{t_1,\ldots,t_s} with s≥2s \geq 2 and t1≥2t_1 \geq 2 are interchangeable, and that the code punctured outside any of them is permutation equivalent to H2t1,…,ts−1H_2^{t_1,\ldots,t_{s-1}}.

In this paper, we obtain the full classification of the Zps\mathbb{Z}_{p^{s}}-linear GH codes for every prime pp. We treat all primes together, and we point out where the binary case and the case of odd primes differ. We show that the derived code of a nonlinear code Hpt1,…,tsH_{p}^{t_{1},\ldots,t_{s}} with s≥2s \geq 2 and t1≥2t_{1} \geq 2 is a Zps−1\mathbb{Z}_{p^{s-1}}-linear GH code of the same family. Since this descent can be iterated, the classification follows by induction on the length. However, the mechanism depends on the prime. For p=2p = 2, the kernel of such a code contains a vector which splits each group of 2s−12^{s-1} coordinates coming from one coordinate of the Z2s\mathbb{Z}_{2^{s}}-additive code into two halves [17], and the derived code is H2t1,…,ts−1H_{2}^{t_{1},\ldots,t_{s-1}}. The induction then closes in every case except one, in which a Z4\mathbb{Z}_{4}-linear Hadamard code is compared with a Z8\mathbb{Z}_{8}-linear Hadamard code whose first parameter is 2. In that case, both derived codes are linear, and the known formulas for the rank decide. For odd pp, every vector of the kernel is constant on each such group [8], and each kernel block is a union of these groups. As a consequence, the derived code of Hpt1,…,tsH_p^{t_1,\ldots,t_s} is Hpt1,…,ts−2,ts−1+1H_p^{t_1,\ldots,t_{s-2},t_{s-1}+1}. Compared with Hpt1,…,ts−1H_p^{t_1,\ldots,t_{s-1}}, its Zps−1\mathbb{Z}_{p^{s-1}}-additive code has one more generator of order pp. Moreover, for odd pp, all the codes Hpt1,…,tsH_p^{t_1,\ldots,t_s} with s≥2s \geq 2 and t1≥2t_1 \geq 2 are nonlinear [8]. Hence, the exceptional case does not occur, and no rank is needed. In fact, for odd pp, the parameters of such a code can be recovered from the dimensions of the kernels of its successive derived codes. Figure 1 shows the kernel blocks of a small code for p=3p = 3 and for p=2p = 2.

The main result is Theorem 7.2, which states that two codes Hpt1,…,tsH_p^{t_1,\ldots,t_s} and Hpt1′,…,ts′H_p^{t_1',\ldots,t_s'} of the same length, with s,s′≥2s, s' \geq 2 and t1,t1′≥2t_1, t_1' \geq 2, are equivalent if and only if their parameters are equal. We deduce that the bound (2) is tight for every prime pp and every t≥3t \geq 3. Moreover, we obtain

At,p={P(t+1)−P(t)ifpisodd,P(t+1)−P(t)−1ifp=2,\mathcal{A}_{t,p}=\begin{cases}\mathcal{P}(t+1)-\mathcal{P}(t)&if p is odd,\\\mathcal{P}(t+1)-\mathcal{P}(t)-1&if p=2,\end{cases}

where P(n)\mathcal{P}(n) denotes the number of partitions of nn, that is, the number of ways of writing nn as a sum of positive integers without regard to order. In particular, we obtain the full classification of the Z2s\mathbb{Z}_{2^s}-linear Hadamard codes. The parameters (t1,…,ts)(t_1, \ldots, t_s) of the codes of length ptp^t with t1≥2t_1 \geq 2 correspond to the P(t+1)−P(t)\mathcal{P}(t+1) - \mathcal{P}(t) partitions of t+1t+1 with all parts at least 2. The partition of the derived code is obtained from that of the code by deleting the largest part and, if pp is odd, by adding 1 to the new largest part. Figure 2 shows two examples. Each equivalence class of the codes of length ptp^t contains exactly one of these codes, except that, for p=2p = 2, the two codes given by (t+1)(t+1) and (t−1,2)(t-1, 2) are equivalent. Figure 3 shows the classes for t=6t = 6. We also show that At,s,p=Xt,s,p\mathcal{A}_{t,s,p} = X_{t,s,p} if pp is odd, and that At,s,2=Xt,s,2−1\mathcal{A}_{t,s,2} = X_{t,s,2} - 1 for 2≤s≤t−12 \leq s \leq t - 1. This proves the equality conjectured in [8, Section 7], although not through the rank. Finally, we prove the conjecture of [6, Section 3] on the codes with t1≥2t_1 \geq 2 and ts=0t_s = 0 for every prime pp. For p=2p = 2, a single linear code has to be excluded.

The paper is organized as follows. In Section 2, we recall the Gray map, the construction of the codes Hpt1,…,tsH_p^{t_1,\ldots,t_s}, and the known results on their linearity, kernel, rank and equivalences. In Section 3, we reduce the classification to the codes with s≥2s \geq 2 and t1≥2t_1 \geq 2. In Section 4, we introduce the kernel blocks and the derived code of a code over ZpZ_p. In Section 5, we determine the kernel blocks of the codes with s≥2s \geq 2 and t1≥2t_1 \geq 2, and we show that they are interchangeable. In Section 6, we identify the derived code of these codes. In Section 7, we establish the classification. In Section 8, we describe the codes and their derived codes in terms of partitions, and we determine the exact number of nonequivalent codes. Finally, in Section 9, we give some conclusions and further research on this topic.

References (22)