Let n be a composite positive integer coprime to char(Fq) and let t=lpf(n) be the least prime factor of n. In this paper we study the cyclic codes Cn,t=⟨Qn(X)Qt(X)⟩ and Cn,t,1=⟨Qn(X)Qt(X)Q1(X)⟩ over Fq, where Qd(X) denotes the d-th cyclotomic polynomial. These codes extend the families Cn=⟨Qn(X)⟩ and Cn,1=⟨Qn(X)Q1(X)⟩ recently studied by Bhagat and Sarma. We determine the exact minimum distances of Cn,t and Cn,t,1, showing that d(Cn,t,1)=2t and that d(Cn,t) equals t if t2∤n, and 2t if t2∣n. For the dual codes, we establish d(Cn,t⊥)=2ω(n), handling the case ω(n)≤2 via the Hartmann–Tzeng bound, and the case ω(n)≥3 via a direct-sum decomposition Cn,t⊥=Cn⊥⊕Vt and the tensor-product structure of Cn⊥ over its prime-power components. As applications, we show that all four code families are linear complementary dual (LCD) and locally recoverable (LRC), and we determine their locality parameters, identifying several infinite families that are r-optimal or d-optimal with respect to the Singleton-type bound for LRC codes.
Introduction
For a prime power q and a positive integer n with gcd(n,q)=1, cyclic codes of length n over Fq are ideals of the quotient ring Fq[X]/⟨Xn−1⟩, and are generated by divisors of Xn−1. Since Xn−1=∏d∣nQd(X) over Fq, where Qd(X) denotes the d-th cyclotomic polynomial (see [7]), cyclic codes generated by products of cyclotomic polynomials form a natural and algebraically well-structured subclass. Well-known families such as BCH codes and Reed–Solomon codes fall within this framework; we refer the reader to [6, 10, 8] for background.
For a positive integer n>1 coprime to char(Fq), the cyclic codes generated by Qn(X) and by Qn(X)Q1(X) were studied by Bhagat and Sarma in [1, 2]. Denoting these codes by Cn=⟨Qn(X)⟩ and Cn,1=⟨Qn(X)Q1(X)⟩, and letting ω(n) the number of distinct prime factors of n and lpf(n) the least prime factor of n, they determined the exact parameters
as well as the parameters [n,φ(n),2ω(n)]q and [n,φ(n)+1,2ω(n)]q of their Euclidean duals, and established that all four codes are LCD-LRC codes with explicit locality parameters and optimality properties.
In this paper, we extend this study to two families obtained by incorporating an additional cyclotomic factor. Let n be a composite integer coprime to char(Fq) and let t=lpf(n) denote its least prime factor. We consider the cyclic codes
The inclusions Cn,t⊊Cn and Cn,t,1⊊Cn,1 imply Cn⊥⊊Cn,t⊥ and Cn,1⊥⊊Cn,t,1⊥, so the codes Cn,t and Cn,t,1 have smaller dimension than their counterparts in [1], while their duals have larger dimension and minimum distance at most 2ω(n).
We determine the exact minimum distances of Cn,t and Cn,t,1 in Section 2. We show that d(Cn,t,1)=2t in all cases, while d(Cn,t) exhibits a dichotomy depending on the divisibility of n by t2: it equals t if t2∤n, and 2t if t2∣n. The upper bounds are achieved by explicit low-weight codewords, and the lower bounds follow either from inclusion inequalities or from the BCH bound applied to the defining set of Cn,t.
For the dual codes, we establish d(Cn,t⊥)=2ω(n) (assuming n>t2). The case ω(n)≤2 is treated in Section 3 via the Hartmann–Tzeng bound [5], together with direct arguments for the special cases n=ℓa and n=p1p2. The case ω(n)≥3, handled in Section 4, requires a more structural approach. We prove that Cn,t⊥ decomposes as the direct sum Cn⊥⊕Vt, where Vt is a periodic cyclic subspace of Fqn. We then use the tensor-product factorization
Cn⊥=Ψk(Cp1a1⊥⊗⋯⊗Cpkak⊥),
established via the Chinese Remainder Theorem as a generalization of a result of [2], together with parity constraints along each tensor direction and the periodic structure of Vt, to prove that every nonzero codeword of Cn,t⊥ has weight at least 2ω(n).
Section 5 presents two applications of these results. First, we show that Cn,t, Cn,t,1, and their duals are linear complementary dual (LCD) codes, a class introduced by Massey [11] and of renewed interest due to applications in side-channel attack countermeasures in cryptographic hardware implementations [3]. The LCD property follows from the fact that the generator polynomials of all four codes are products of cyclotomic polynomials, which are self-reciprocal for d>1. Second, we show that all four families are locally recoverable (LRC) codes in the sense of [4], by relating the locality of each cyclic code to the minimum distance of its dual code. In particular, we identify several infinite families that are r-optimal or simultaneously r-optimal and d-optimal with respect to the Singleton-type bound for LRC codes established in [4] (see also [1]).
The paper is organized as follows. Section 1 collects the necessary background on cyclotomic polynomials, cyclic codes, and LCD and LRC codes. Section 2 determines the minimum distances of Cn,t and Cn,t,1. Section 3 treats d(Cn,t⊥) for ω(n)≤2, and Section 4 handles the case ω(n)≥3. Section 5 presents the LCD and LRC applications.
1. Preliminaries and Notation
Let p be a prime integer, q be a power of p, and Fq be the finite field with q elements. We denote the characteristic of Fq by char(Fq). Let N denote the set of non-negative integers. For 0=n∈N, we denote by ω(n) the number of distinct prime factors of n, and by lpf(n) the least prime factor of n. If an integer a divides the integer b we write a∣b. Otherwise we write a∤b.
1.1. Cyclotomic polynomials.
Let n be a positive integer not divisible by p and let α be a primitive n-th root of unity over Fq. The n-th cyclotomic polynomial over Fq, denoted by Qn(X), is defined as the monic polynomial whose roots are precisely all primitive n-th roots of unity, that is:
Qn(X):=1≤k≤ngcd(k,n)=1∏(X−αk).
Note that, the polynomial Qn(X) is independent of the choice of α and its degree is given by Euler’s totient function φ, deg(Qn(X))=φ(n). In addition, Qn(X)∈Fq[X] and we have the following fundamental identity decomposing Xn−1 into the product of the cyclotomic polynomials associated with the divisors of n.
Theorem 1.1.
[7, Theorem 2.45] Let n∈N be such that gcd(n,p)=1. Then,
Xn−1=d∣n∏Qd(X).
The following property of the roots of cyclotomic polynomials of prime index will be useful in this work.
Remark 1.2.
Let t be a prime such that char(Fq)∤t. By Theorem 1.1 we have that Xt−1=Q1(X)Qt(X). So, Qt(X)=1+X+⋯+Xt−1, since Q1(X)=X−1. Moreover, if ζ is a primitive n-th root of unity and t divides n, then η=ζn/t has order gcd(n,n/t)n=t, and so η is a primitive t-th root of unity. Therefore, we can conclude that Qt(ζn/t)=0.
Let m be a positive integer divisible by a prime ℓ=char(Fq). Then Qℓm(X)=Qm(Xℓ) (see [7, Exercise 2.57]). As a consequence of this fact we get the following result.
Lemma 1.3.
Let n be a positive integer divisible by 4 and such that char(Fq)∤n. Then, Qn(X)=Qn/2(X2). In particular, Qn(−X)=Qn(X).
Lemma 1.4.
Let n be a composite integer with char(Fq)∤n and let t=lpf(n) with n>t2. Let P(X)=Xs−1Xn−1, where s=tn. Then the cyclotomic polynomial Qt(X) divides P(X) if and only if t2∤n.
Proof.
Let ζ be a primitive n-th root of unity over Fq. The roots of P(X) are the roots of Xn−1 that are not roots of Xs−1. A power ζj is a root of Xs−1 if and only if n∣js. Since n=st, the condition n∣js is equivalent to t∣j. Thus, the set of roots of P(X) is given by those ζj such that t∤j. The roots of Qt(X) are the primitive t-th roots of unity, given by ζks with gcd(k,t)=1.
Since char(Fq)∤n, the polynomial Xn−1 has only simple roots. Therefore, Qt(X) divides P(X) if and only if all roots of Qt(X) are also roots of P(X). For this to occur, the exponent ks must not be a multiple of t, that is, t∤ks.
Now, k and t are coprime, and so the condition t∤ks is equivalent to t∤s. Setting s=n/t, we find that t∤(n/t), and thus t2∤n.
Therefore, if t2∣n, the roots of Qt(X) are zeros of Xs−1. Then gcd(Qt(X),P(X))=1 and Qt(X) does not divide P(X). Conversely, if t2∤n, then Qt(X) divides P(X). ∎
For f(X)∈Fq[X] with degf(X)=λ, the polynomial f∗(X):=Xλf(X−1) is called the reciprocal polynomial of f(X). If f(X)=f∗(X), we say that f(X) is a self-reciprocal polynomial.
For n>1, the cyclotomic polynomial Qn(X) is a self-reciprocal polynomial. Indeed, the set of primitive n-th roots of unity is closed under α↦α−1, so Qn∗(X)=Qn(0)Qn(X), and Qn(0)=1: for n>2 the roots can be paired as {α,α−1} with αα−1=1 and φ(n) is even, while Q2(0)=1. On the other hand, Q1∗(X)=−Q1(X).
1.2. Cyclic codes.
A linear code C of length n and dimension k over Fq, that we simply refer to as [n,k]q-code, is a k-dimensional subspace of the vector space Fqn. A generator matrix G for a [n,k]q-code C is a k by n matrix for which the rows are a basis of C. If G is a generator matrix for C, then \mathcal{C}=\{\text{\boldmatha}G\mbox{ ; }\text{\boldmatha}\in\mathbb{F}_{q}^{k}{}\}. The weight of an element \text{\boldmathc}=(c_{0},\ldots,c_{n-1})\in\mathcal{C} is defined by \operatorname{wt}(\text{\boldmathc}):=\#\{0\leq i\leq n-1\mbox{ ; }c_{i}\neq 0\} and the minimum distance of C is given by d(\mathcal{C})=\min\{\operatorname{wt}(\text{\boldmathc})\mbox{ ; }\text{\boldmathc}\in\mathcal{C}\setminus\{\mathbf{0}\}\}. An [n,k]q-code with minimum distance d is called a [n,k,d]q-code.
Two linear codes C1 and C2 of length n over Fq, where G1 is a generator matrix for C1, are called permutation equivalent if there exists a n×n permutation matrix P such that G1P is a generator matrix for C2.
An [n,k,d]q-code is called cyclic if for every \text{\boldmathc}=(c_{0},c_{1},\ldots,c_{n-1})\in\mathcal{C}, the vector (cn−1,c0,…,cn−2) also belongs to C. A cyclic [n,k,d]q-code C can be identified with an ideal of the quotient ring Rq,n:=Fq[X]/⟨Xn−1⟩ by associating each vector (c0,c1,…,cn−1)∈Fqn with the residue class
\boldmathc(X)+⟨Xn−1⟩∈Rq,n,
where \text{\boldmathc}(X):=c_{0}+c_{1}X+\ldots+c_{n-1}X^{n-1}. We denote this residue class by \overline{\text{\boldmathc}}(X)
With this identification and using that Rq,n is a principal ideal ring, the cyclic [n,k,d]q-code C is generated by a unique monic polynomial gC(X) dividing Xn−1, that is, C=⟨gC(X)⟩. It is well known in the theory of error-correcting codes that k=n−deg(gC(X)). The polynomial hC(X):=gC(X)Xn−1 is called parity-check polynomial of C and deg(hC(X))=k.
The dual of an [n,k]q-code C over Fq is the linear code defined by \mathcal{C}^{\perp}:=\{\text{\boldmathx}\in\mathbb{F}_{q}^{n}\mbox{ ; }\langle\text{\boldmathx},\text{\boldmathc}\rangle=0\mbox{, for all }\text{\boldmathc}\in\mathcal{C}\}, where ⟨,⟩ denotes the Euclidean inner product on Fqn. If C is a cyclic [n,k]q-code, then C⊥ is a cyclic [n,n−k]q-code and C⊥=⟨hC∗(X)/hC(0)⟩, where hC∗ is the reciprocal polynomial of parity-check polynomial hC(X).
We now introduce two auxiliary lemmas on the duals of cyclic codes whose generator polynomials are products of cyclotomic polynomials. They will be used repeatedly in Sections 3 and 4.
Lemma 1.5.
Let n be a positive integer with char(Fq)∤n, let S be a set of divisors of n, and let C be the cyclic code of length n over Fq with generator polynomial gC(X)=∏d∈SQd(X). Then the dual code C⊥ is cyclic with generator polynomial
gC⊥(X)=gC(X)Xn−1=d∣nd∈/S∏Qd(X).
Proof.
By Theorem 1.1, Xn−1=∏d∣nQd(X), so gC(X) divides Xn−1 and the parity-check polynomial of C is
hC(X)=gC(X)Xn−1=d∣nd∈/S∏Qd(X).
Recall that C⊥=⟨hC∗(X)/hC(0)⟩. The reciprocal of a product is the product of the reciprocals. Each Qd(X) with d>1 is self-reciprocal, and Q1∗(X)=−Q1(X). Hence hC∗(X)=εhC(X) with ε∈{1,−1}. Comparing leading coefficients (the leading coefficient of hC∗ is hC(0), and hC is monic) gives hC(0)=ε. Therefore hC∗(X)/hC(0)=hC(X), which is monic and divides Xn−1, so it is the generator polynomial gC⊥(X). ∎
Lemma 1.6.
Let ℓ be a prime with ℓ=char(Fq), let a≥1, and let C be the cyclic code of length ℓa with generator polynomial gC(X)=Qℓa(X). Then
gC⊥(X)=Qℓa(X)Xℓa−1=Xℓa−1−1.
Proof.
The divisors of ℓa are 1,ℓ,…,ℓa. By Theorem 1.1,
Xℓa−1=i=0∏aQℓi(X)andXℓa−1−1=i=0∏a−1Qℓi(X).
Hence Qℓa(X)Xℓa−1=Xℓa−1−1. The expression for gC⊥(X) follows from Lemma 1.5 with S={ℓa}. ∎
Let Fq∗=Fq∖{0} be the cyclic group of order q−1 under the multiplication of Fq and if γ is a generator of this cyclic group, then Fq={0,1=γ0,γ,…,γq−2} and γj=1 if and only if q−1 divides j. Let Fqμ be a finite extension field of Fq. For α∈Fqμ let Mα(X)∈Fq[X] be the minimal polynomial of α over Fq. The roots of Mα(X) are distinct and lie in Fqμ. Since Mα(Xq)=Mα(X)q, we have that α,αq,αq2,… are all roots of Mα(X). Note that this sequence stops after r terms, for some integer r where αqr=α. Suppose now that γ is a primitive element of Fqμ. Thus, α=γs for some s, and so αqr=α if and only if γsqr−s=1. Then, sqr≡s(\mboxmodqμ−1). Based on this, we define the q-cyclotomic coset of s modulo qμ−1 to be the set Cs={s,sq,…,sqr−1}(\mboxmodqμ−1), where r is the smallest positive integer such that sqr≡s(\mboxmodqμ−1). The sets Cs partition the set {0,1,2,…,qμ−2} into disjoint sets. We can extend this concept as follows. Let n be a positive integer with gcd(n,q)=1 and let s be an integer with 0≤s<n. The q-cyclotomic coset of s modulo n is the set Cs={s,sq,…,sqr−1}(\mboxmodn), where r is the smallest positive integer such that sqr≡s(\mboxmodn).
Let C be a cyclic code with generator polynomial gC(X)∈Rq,n. Then, by [6, Theorems 4.1.1 and 4.2.1], gC(X)=∏s∏i∈Cs(X−αi), where α is a primitive n-th root of unity (recall that gcd(n,q)=1) and s runs through some subset of representatives of the q-cyclotomic cosets Cs modulo n. The set TCα:=⋃sCs is called defining set of the cyclic code C. Note that, TCα={0≤i<n\mbox;gC(αi)=0}.
We say that TCα contains ℓ consecutive elements provided there is a set {λ,λ+1,…,λ+ℓ−1} of ℓ consecutive integers such that {λ,λ+1,…,λ+ℓ−1}(\mboxmodn)⊆TCα.
Theorem 1.7.
(BCH bound) [6, Theorem 4.5.3] Let C be a cyclic code of length n over Fq with minimum distance d(C) and defining set TCα . If TCα contains δ−1 consecutive elements, then d(C)≥δ.
Theorem 1.8.
(Generalized BCH bound) [5, Theorem 2] Let C be a cyclic code of length n over Fq with minimum distance d(C) and generator polynomial gC(X). Let α be a primitive n-th root of unity. Suppose that there are integers b,c,δ and s such that δ≥2, s≥0 and gcd(c,n)=1. If gC(αb+i+jc)=0 for all 0≤i≤δ−2 and 0≤j≤s, then
d(C)≥δ+s.
For more details about coding theory, see e.g. [8].
Now, assume that n is a composite positive integer and let t=lpf(n), that is, t is the least prime factor of n. We denote by Cn,t and Cn,t,1 the cyclic codes in Fqn generated, respectively, by the polynomials Qn(X)Qt(X) and Qn(X)Qt(X)Q1(X), where Q1(X), Qt(X) and Qn(X) are cyclotomic polynomials as in (1).
In the next sections, we study the cyclic codes Cn,t and Cn,t,1 and their respective duals. This study was motivated by two works of A. K. Bhagat and R. Sarma, [1, 2]. In those works, Bhagat and Sarma studied the cyclic codes Cn and Cn,1 generated, respectively, by the polynomials Qn(X) and Qn(X)Q1(X), as well as their respective duals, and presented the following results.
Theorem 1.9.
[1, Theorem 3.5] Let n>1 be an integer with gcd(n,p)=1. Then Cn is an [n,n−φ(n),lpf(n)]q cyclic code.
Theorem 1.10.
[1, Theorem 3.6] Let n be a composite integer such that gcd(n,p)=1. Then Cn,1 is an [n,n−φ(n)−1,2⋅lpf(n)]q cyclic code.
Theorem 1.11.
[2, Theorem 4.7] Let n>1 be an integer with gcd(n,p)=1. Then Cn⊥ is an [n,φ(n),2ω(n)]q cyclic code.
Theorem 1.12.
[2, Theorem 4.11] Let n be a composite integer such that gcd(n,p)=1. Then Cn,1⊥ is an [n,φ(n)+1,2ω(n)]q cyclic code.
Remark 1.13.
Since Cn,t⊆Cn and Cn,t,1⊆Cn,1, by Theorems 1.9 and 1.10, it follows that
(i) d(Cn,t)≥t,
(ii) d(Cn,t,1)≥2t.
1.3. LCD and LRC codes
A linear complementary dual (LCD) code is a linear code C over Fq such that C∩C⊥={0}. Such codes were introduced by Massey [11], who showed that they provide an optimal linear coding solution to the wire-tap channel of type II. More recently, LCD codes have been shown to provide protection against side-channel attacks and fault-injection attacks in cryptographic hardware implementations [3].
Let C be a linear [n,k,d]q-code over Fq. The i-th coordinate of C, with 0≤i≤n−1, is said to have locality r if the symbol ci of any codeword c=(c0,c1,…,cn−1)∈C can be recovered from r other coordinates, that is, if ci can be expressed as a function of ci1,…,cir, where 0≤i1<i2<⋯<ir≤n−1 and ij=i for all j∈{1,…,r}.
The code C is said to have locality r if every coordinate has locality at most r. In this case, C is called a locally recoverable code (LRC) and its parameters are denoted by [n,k,d;r]q. Locally recoverable codes were introduced by Gopalan, Huang, Simitci, and Yekhanin [4] in the context of distributed storage systems, where the need to repair a failed storage node by accessing only a small number of surviving nodes motivates the locality constraint. A cyclic LRC code that is also LCD is called a cyclic LCD-LRC code.
The parameters of any LRC code are subject to a generalization of the classical Singleton bound, known as the Singleton-type bound.
Any LRC code over Fq with parameters [n,k,d;r]q satisfies
d≤n−k−⌈rk⌉+2.
Based on this bound, we adopt the following standard terminology to assess the quality of the LRC codes constructed:
d-optimal (or simply optimal): An LRC code [n,k,d;r]q over Fq that achieves equality in (3), that is, d=n−k−⌈rk⌉+2.
Almost d-optimal: An LRC code [n,k,d;r]q over Fq such that an LRC code with parameters [n,k,d+1;r]q would be d-optimal (i.e., the minimum distance d falls exactly one unit short of the bound in (3)).
r-optimal: An LRC code [n,k,d;r]q over Fq for which no LRC code over Fq with the same parameters [n,k,d]q achieves a strictly smaller locality s<r.
The following lemma directly relates the locality of a cyclic code to the minimum distance of its dual, and will be the main tool for determining the locality of our codes.
Lemma 1.15 ([9], [1, Lemma 5.4]).
Any cyclic code C over Fq whose dual distance satisfies d(C⊥)≤r+1 has locality r.
2. The minimum distance of the cyclic codes Cn,t and Cn,t,1
Let q be a power of the prime p, let n be a composite positive integer coprime to p, and let t=lpf(n). Let Cn,t=⟨Qn(X)Qt(X)⟩ and Cn,t,1=⟨Qn(X)Qt(X)Q1(X)⟩ be the cyclic codes in Fqn defined in the previous section.
Note that these codes have length n and their dimensions are given by
In what follows, we assume that n>t2, which excludes the trivial case for the dimensions of the codes Cn,t and Cn,t,1.
Theorem 2.1.
Let n and t=lpf(n) be as above. If t2∤n, then d(Cn,t)=t.
Proof.
By Remark 1.13, we have d(Cn,t)≥t. Let P(X)=Xs−1Xn−1, where s=n/t. Then P(X)=1+Xs+X2s+⋯+X(t−1)s has exactly t nonzero terms, since the exponents 0,s,…,(t−1)s are pairwise distinct and smaller than n.
By Lemma 1.4, since t2∤n, we have that Qt(X) divides P(X). Moreover, by Theorem 1.1, Qn(X) divides Xn−1=P(X)(Xs−1). The roots of Xs−1 have order dividing s<n, while the roots of Qn(X) have order exactly n. Hence gcd(Qn(X),Xs−1)=1, and thus Qn(X) divides P(X). Now, Qn(X) and Qt(X) are distinct factors of the separable polynomial Xn−1, hence coprime, and thus Qn(X)Qt(X) divides P(X). Since degP(X)=(t−1)s<n, P(X) is a nonzero codeword of Cn,t of weight t. Therefore, d(Cn,t)=t. ∎
Theorem 2.2.
Let n and t=lpf(n) be as above. If t2∣n, then
d(Cn,t)=2t.
Proof.
Let ζ be a primitive n-th root of unity over Fq. By Equation (1) and Theorem 1.1, we conclude that the defining set TCn,tζ={0≤i<n\mbox;Qt(ζi)=0\mboxorQn(ζi)=0}, where Qn(ζi)=0 if and only if gcd(n,i)=1, and Qt(ζi)=0 if and only if i=ks, where s=tn and gcd(k,t)=1. Note that s∈TCn,tζ, since k=1 satisfies the condition above.
Define the set
B:={s−(t−1),…,s−1,s+1,…,s+(t−1)}.
We claim that B⊆TCn,tζ. Indeed, let ℓ be a prime factor of n. If ℓ=t, since t2∣n, we have that t divides s=tn. Thus, s±j≡±j(modt) and so t∤(s±j), since 0<j<t. Now, let ℓ be a prime factor of n with ℓ>t. Since n=st and ℓ>t, we have that ℓ∣s. Thus, s±j≡±j(modℓ) and so ℓ∤(s±j), since 0<j<t<ℓ. Then, we obtain that gcd(s±j,n)=1 for every j∈{1,…,t−1}, and thus Qn(ζi)=0 for all i∈B.
Therefore, B∪{s}⊆TCn,tζ. Thus, TCn,tζ contains 2t−1 consecutive elements and so, by Theorem 1.7, d(Cn,t)≥2t.
Now, let P(X)=Xs−1Xn−1=1+Xs+X2s+⋯+X(t−1)s, where s=tn. As in the proof of Theorem 2.1, we have that Qn(X) divides P(X). Using that Qt(X) divides Xt−1, we obtain (Xt−1)P(X)=∑j=0t−1Xjs+t−∑j=0t−1Xjs belongs to Cn,t. Since n>t2, we have s>t, so the exponents js and js+t, 0≤j≤t−1, are pairwise distinct and smaller than n. Hence (Xt−1)P(X) has degree smaller than n and exactly 2t nonzero terms, and we have d(Cn,t)≤2t. Therefore, d(Cn,t)=2t.
∎
Theorem 2.3.
Let n and t=lpf(n) be as above. Then
d(Cn,t,1)=2t.
Proof.
Let ζ be a primitive n-th root of unity over Fq. By definition, ζ is a root of Qn(X). Since n is coprime to char(Fq) and t=lpf(n), Remark 1.2 gives Qt(ζn/t)=0. Moreover, every root of Qn(X) has the form ζk with gcd(k,n)=1, and (ζk)n/t=ηk, where η=ζn/t is a primitive t-th root of unity. Since gcd(k,t)=1, ηk is also a primitive t-th root of unity, so Qt((ζk)n/t)=0. As Qn(X) has simple roots, Qn(X) divides Qt(Xn/t), and so there exists a polynomial A(X) such that A(X)Qn(X)=Qt(Xn/t). Then A(X)Qn(X)(Xt−1)=A(X)Qn(X)Qt(X)Q1(X)∈Cn,t,1. Now,
Therefore, since n>t2 implies n/t>t, the exponents nj/t+t and nj/t, 0≤j≤t−1, are pairwise distinct and smaller than n, and we obtain an element \text{\boldmathc}\in\mathcal{C}_{n,t,1} with \operatorname{wt}(\text{\boldmathc})=2t. Hence d(Cn,t,1)≤2t and the result follows from Remark 1.13.
∎
3. The minimum distance of Cn,t⊥ for ω(n)≤2
In this section, we study the dual code Cn,t⊥. We characterize the generator polynomial of Cn,t⊥, determine its exact dimension, and establish an upper bound for its minimum distance, using inclusion properties inherited from the base codes. We use the same notation as in the previous sections: n is a composite integer with char(Fq)∤n and t=lpf(n). The assumption n>t2 of Section 2 is not needed here. The first information about Cn,t⊥ is presented below.
Since Cn,t=⟨Qn(X)Qt(X)⟩ and deg(Qn(X)Qt(X))=φ(n)+t−1, we have dim(Cn,t⊥)=φ(n)+t−1. Moreover, the parity-check polynomial of Cn,t is hCn,t(X)=Qn(X)Qt(X)Xn−1, and thus Cn,t⊥=⟨h⊥(X)⟩, where h⊥(X) is the reciprocal polynomial of hCn,t(X), that is, h⊥(X)=Xdeg(hCn,t)hCn,t(X−1). By Lemma 1.5 (with S={n,t}), we have Cn,t⊥=⟨hCn,t(X)⟩.
Lemma 3.1.
Let n and t be as above. Then
d(Cn,t⊥)≤2ω(n).
Proof.
Since Cn,t⊆Cn, we have Cn⊥⊆Cn,t⊥ and thus d(Cn,t⊥)≤d(Cn⊥). So, the result follows from Theorem 1.11.
∎
Proposition 3.2.
Let ℓ be a prime and n=ℓa, where a≥2 is an integer. Suppose that char(Fq)∤n. Then
d(Cℓa,ℓ⊥)=2.
Proof.
Since n=ℓa, we have ω(n)=1. Thus, by Lemma 3.1, it follows that d(Cℓa,ℓ⊥)≤2. Note that, for every a≥2, we have deg(Qℓa(X)Qℓ(X))=φ(ℓa)+ℓ−1=ℓa−ℓa−1+ℓ−1<ℓa=n, and hence dim(Cℓa,ℓ)≥1. Now, suppose there exists \text{\boldmathc}\in\mathcal{C}_{\ell^{a},\ell}^{\perp} with \operatorname{wt}(\text{\boldmathc})=1. Since Cℓa,ℓ⊥ is cyclic, it contains all cyclic shifts of c, and hence all unit vectors. Thus Cℓa,ℓ⊥=Fqn and Cℓa,ℓ={0}, which contradicts dim(Cℓa,ℓ)≥1. Therefore, d(Cℓa,ℓ⊥)≥2, and the result follows.
∎
By the previous result, we observe that for a=2, that is, n=ℓ2, the code Cℓ2,ℓ⊥ has minimum distance equal to 2, the code Cℓ2,ℓ has parameters [ℓ2,1,ℓ2]q, and Cℓ2,ℓ⊥ is a [ℓ2,ℓ2−1,2]q-code. In this case, the parameters of both cyclic codes attain the Singleton bound, that is, the codes are MDS.
Proposition 3.3.
Let n=p1p2, where p1<p2 are distinct prime integers, and char(Fq)∤n. Then
d(Cp1p2,p1⊥)=2.
Proof.
Note that, Qp1p2(X)Qp1(X)Xp1p2−1=Qp2(X)Q1(X)=Xp2−1. Thus, Cp1p2,p1⊥=⟨Xp2−1⟩ and we get \text{\boldmathc}\in\mathcal{C}_{p_{1}p_{2},p_{1}}^{\perp} such that \operatorname{wt}(\text{\boldmathc})=2. So, d(Cp1p2,p1⊥)≤2. Now, suppose that there exists \text{\boldmathc}^{\prime}\in\mathcal{C}_{p_{1}p_{2},p_{1}}^{\perp} with \operatorname{wt}(\text{\boldmathc}^{\prime})=1. Since Cp1p2,p1⊥ is cyclic, it contains all unit vectors, so Cp1p2,p1⊥=Fqn and Cp1p2,p1={0}. But dim(Cp1p2,p1)=n−φ(n)−(p1−1)=p2>0, a contradiction. Therefore, d(Cp1p2,p1⊥)=2.
∎
Proposition 3.4.
Let n=p1λ1p2λ2, where p1<p2 are distinct prime integers, λ1 and λ2 are positive integers such that n>p1p2. If char(Fq)∤n, then
d(Cn,p1⊥)=4.
Proof.
Since ω(n)=2, by Lemma 3.1, we have d(Cn,p1⊥)≤4.
Let α be a primitive n-th root of unity. Let g⊥(X)=Qn(X)Qp1(X)Xn−1. Since Cn,p1⊥=⟨g⊥(X)⟩, the roots of g⊥(X) are not roots of Qn(X)Qp1(X). So, for 0<m<n, αm is a root of g⊥(X) if and only if
(1) gcd(m,n)=1, and
(2) by Remark 1.2, m is not a multiple of p1n=p1λ1−1p2λ2.
Now, to apply the bound in Theorem 1.8, we consider the following systems of congruences:
b≡0(modp1)b≡p2−1(modp2λ2)
and
c≡−1(modp1)c≡1(modp2λ2).
Since c≡−1(modp1) and c≡1(modp2λ2), we have that p1∤c and p2∤c. So, gcd(c,n)=1. Let s=1 and δ=3 be as in Theorem 1.8. Thus, we get four possibilities for the exponent m such that g⊥(αm)=0: m∈{b,b+1,b+c,b+c+1}.
Note that p1∣b and p1∣(b+c+1). Thus, gcd(b,n)=1 and gcd(b+c+1,n)=1. Moreover, since b+1≡p2(modp2λ2) and b+c≡p2(modp2λ2), we have p2∣(b+1) and p2∣(b+c). Hence, gcd(b+c,n)=1 and gcd(b+1,n)=1. Next, we show that none of b, b+1, b+c and b+c+1 is a multiple of p1λ1−1p2λ2.
Since p2∣(b+1) and p2∣(b+c), neither b nor b+c+1 is divisible by p2. Hence, neither of them is a multiple of p1λ1−1p2λ2.
Since p1∣b and p1∣(b+c+1), neither b+1 nor b+c is divisible by p1. If λ1≥2, then p1∣p1λ1−1p2λ2, so neither b+1 nor b+c is a multiple of p1λ1−1p2λ2. If λ1=1, then λ2≥2 and p1λ1−1p2λ2=p2λ2. In this case, both b+1 and b+c leave remainder p2=0 modulo p2λ2, so neither is a multiple of p1λ1−1p2λ2.
Thus, if m∈{b,b+1,b+c,b+c+1} (taken modulo n; none of them is ≡0(modn), because 0 is a multiple of n/p1), then g⊥(αm)=0. Therefore, by Theorem 1.8, d≥δ+s=3+1=4, and the result follows.
∎
4. The minimum distance of Cn,t⊥ for ω(n)≥3
The technique employed to determine the minimum distance of Cn,t⊥ in the case ω(n)≤2 cannot be extended to the case ω(n)≥3. In this case, our approach relies instead on a certain product of codes, which is defined as follows.
Definition 4.1.
Given r≥2 linear codes C1,…,Cr over Fq, with parameters [ni,ki,di]q for i=1,…,r, the direct product C1⊗⋯⊗Cr is defined as the vector space whose codewords can be represented as r-dimensional arrays c=(cj1,…,jr), with ji∈Zni, of size n1×⋯×nr over Fq, such that, for each i∈{1,…,r}, every line of c along the i-th direction belongs to Ci. That is, for every choice of indices (j1,…,ji−1,ji+1,…,jr), the vector
(cj1,…,ji−1,τ,ji+1,…,jr)τ=0ni−1∈Fqni
is a codeword of Ci.
In [2], Bhagat and Sarma work with the case r=2 and observed that if G1 and G2 are generator matrices of the linear codes C1 and C2, respectively, then G1⊗G2 is a generator matrix of C1⊗C2, where G1⊗G2 denotes the Kronecker product of matrices. Moreover, for two matrices M1 and M2 over Fq, the code generated by M1⊗M2 and the code generated by M2⊗M1 are permutation equivalent. If C1 and C2 are both cyclic codes, then C1⊗C2 is closed under cyclic shift of all rows simultaneously and cyclic shift of all columns simultaneously. Algebraically, if C1 is an ideal of Fq[X]/⟨Xn1−1⟩ and C2 is an ideal of Fq[X]/⟨Xn2−1⟩, and if we identify a typical element c=(ci,j) of C1⊗C2 by
f(X,Y)=i=0∑n1−1j=0∑n2−1ci,jXiYj,
then Xf(X,Y) and Yf(X,Y) represent the cyclic shift of all rows simultaneously and of all columns simultaneously, respectively. Now, set Rn1,n2:=Fq[X,Y]/⟨Xn1−1,Yn2−1⟩ and assume gcd(n1,n2)=1. By the Chinese Remainder Theorem, for each (i,j)∈Zn1×Zn2, there is a unique ψ(i,j)∈Zn1n2 such that
ψ(i,j)≡i(modn1),ψ(i,j)≡j(modn2).
Therefore, we have a ring isomorphism Φ:Rn1,n2→Fq[Z]/⟨Zn1n2−1⟩ given by Φ(XiYj)=Zψ(i,j), where Z=XY. Thus, for any codeword f(X,Y)∈C1⊗C2, we have g(Z):=Φ(f(X,Y))∈Φ(C1⊗C2). Then, Bhagat and Sarma provided the following result.
Theorem 4.2.
[2, Theorem 4.6] Let n1,n2>1 be integers coprime to char(Fq). If gcd(n1,n2)=1, then Cn1n2⊥ and Cn1⊥⊗Cn2⊥ are permutation equivalent.
In what follows, we generalize this result to an arbitrary number of factors. We first fix some notation.
Let n1,…,nj be pairwise coprime positive integers. By the Chinese Remainder Theorem, there is a bijection
Ψj:Zn1×⋯×Znj→Zn1⋯nj
that sends (i1,…,ij) to the unique element x∈Zn1⋯nj satisfying
x≡im(modnm)for all m∈{1,…,j}.
Lemma 4.3.
Let n1,…,nk be pairwise coprime positive integers and set n′=∏m=1k−1nm. Let Ψk−1 and Ψk be the bijections as above associated with n1,…,nk−1 and n1,…,nk, respectively, and let ψ:Zn′×Znk→Zn′nk be the bijection associated with the coprimes n′ and nk. Then, for all (i1,…,ik)∈Zn1×⋯×Znk,
ψ(Ψk−1(i1,…,ik−1),ik)=Ψk(i1,…,ik).
Proof.
Fix (i1,…,ik) and set a=Ψk−1(i1,…,ik−1)∈Zn′ and x=ψ(a,ik)∈Zn′nk. By the definition of Ψk−1,
a≡im(modnm),m=1,…,k−1.
By the definition of ψ,
x≡a(modn′),x≡ik(modnk).
Since nm∣n′ for every m∈{1,…,k−1}, congruence (12) implies x≡a(modnm). Combining this with (11) yields
x≡a≡im(modnm),m=1,…,k−1.
Together with (13), this shows that x satisfies x≡im(modnm) for all m∈{1,…,k}. By the Chinese Remainder Theorem, the system of these k congruences has a unique solution modulo n1⋯nk=n′nk, and by definition of the bijection this solution is Ψk(i1,…,ik). Hence x=Ψk(i1,…,ik), and the result follows. ∎
This explicit description of the permutation allows us to extend the result, by induction on the number of prime factors, to an arbitrary number of coprime factors.
Let Fqn1×⋯×nj denote the Fq-vector space of arrays c=(ci1,…,ij) with entries in Fq indexed by Zn1×⋯×Znj. It is isomorphic to the tensor product of the underlying vector spaces:
Fqn1⊗⋯⊗Fqnj≅Fqn1×⋯×nj,
where the isomorphism sends v1⊗⋯⊗vj, with vm=(vm,i)i∈Znm, to the array (v1,i1v2,i2⋯vj,ij)(i1,…,ij).
Example 4.4.
This example only illustrates the notation; no coprimality of the sizes is needed here. For j=2, an array is a matrix; for j=3, it is a three-dimensional block of entries of Fq, that is, a cube (more precisely, a rectangular parallelepiped) with n1 rows, n2 columns and n3 layers, where ci1,i2,i3 is the entry at position (i1,i2,i3).
Let q=2 and (n1,n2,n3)=(2,3,2). Thus, an array c=(ci1,i2,i3)∈F22×3×2 is a 2×3×2 parallelepiped with 2⋅3⋅2=12 entries. We can visualize it as two layers, obtained by fixing i3=0 and i3=1, each being a 2×3 matrix whose rows are indexed by i1 and whose columns are indexed by i2:
c⋅,⋅,0=(100111),c⋅,⋅,1=(010110).
For instance, c0,0,0=1, c1,2,0=1, c0,2,1=1 and c1,0,1=1.
The lines of c along each direction are the vectors obtained by letting one index vary while the other two are fixed:
along direction 1, for fixed (i2,i3), we obtain vectors in F22; for example, (i2,i3)=(0,0) gives (c0,0,0,c1,0,0)=(1,0);
along direction 2, for fixed (i1,i3), we obtain vectors in F23; for example, (i1,i3)=(0,0) gives (c0,0,0,c0,1,0,c0,2,0)=(1,0,1);
along direction 3, for fixed (i1,i2), we obtain vectors in F22; for example, (i1,i2)=(0,0) gives (c0,0,0,c0,0,1)=(1,0).
The array c belongs to C1⊗C2⊗C3 if and only if, for each i∈{1,2,3}, all lines of c along direction i are codewords of Ci. The array above is only an arbitrary element of F22×3×2 and need not satisfy this condition.
Arrays of the form ci1,i2,i3=v1,i1v2,i2v3,i3 correspond to the pure tensors v1⊗v2⊗v3. For example, for v1=(1,1), v2=(1,0,1) and v3=(1,0), the layer i3=0 is (110011) and the layer i3=1 is the zero matrix.
Now, let n1,…,nj be pairwise coprime positive integers, and let D⊆Fqn1×⋯×nj be a linear code whose coordinates are indexed by Zn1×⋯×Znj (ordered, say, lexicographically, so that permutation equivalence makes sense). For c=(ci1,…,ij)∈D, let Ψj(c)∈Fqn1⋯nj be the word with coordinates indexed by Zn1⋯nj given by
Ψj(c)Ψj(i1,…,ij)=ci1,…,ij.
We write Ψj(D)={Ψj(c):c∈D}. Thus Ψj(D) is obtained from D by permuting coordinates, and in particular D and Ψj(D) are permutation equivalent. The same convention applies to ψ.
The following refinement of Theorem 4.2 shows that the permutation can be taken to be ψ. We include a proof, since this is exactly what is used in the proof of Proposition 4.6.
Lemma 4.5.
Let n1,n2>1 be coprime integers, both coprime to char(Fq). Then
Cn1n2⊥=ψ(Cn1⊥⊗Cn2⊥).
Proof.
Put n=n1n2 and let ζ be a primitive n-th root of unity in an extension of Fq. Then β1=ζn2 and β2=ζn1 are primitive n1-th and n2-th roots of unity, respectively. For i=1,2 let Zi={a∈Zni:gcd(a,ni)=1}, and let Z={m∈Zn:gcd(m,n)=1}. By Lemma 1.5 with S={ni}, the code Cni⊥ is generated by the separable polynomial ∏d∣ni,d=niQd(X), whose roots are exactly the elements βia with a∈Zi. Hence a word u∈Fqni lies in Cni⊥ if and only if ∑lulβial=0 for all a∈Zi. In the same way, a word u∈Fqn lies in Cn⊥ if and only if ∑lulζml=0 for all m∈Z.
For an array c=(ci,j) indexed by Zn1×Zn2 put F(a,b)=∑i,jci,jβ1aiβ2bj. We claim that c∈Cn1⊥⊗Cn2⊥ if and only if F(a,b)=0 whenever a∈Z1 or b∈Z2. Indeed, if c belongs to the tensor product and a∈Z1, then F(a,b)=∑jβ2bj∑ici,jβ1ai=0, because every column of c lies in Cn1⊥; the case b∈Z2 is symmetric, using the rows. Conversely, suppose that F vanishes as stated, and fix a∈Z1. Then ∑j(∑ici,jβ1ai)β2bj=0 for every b∈Zn2. Since n2 is invertible in Fq, the inverse discrete Fourier transform in j gives ∑ici,jβ1ai=0 for every j. Hence every column of c lies in Cn1⊥. Symmetrically, every row lies in Cn2⊥.
Now let c′=ψ(c), that is, cψ(i,j)′=ci,j. Let u1,u2 be integers with u1n2≡1(modn1) and u2n1≡1(modn2). Then ψ(i,j)≡u1n2i+u2n1j(modn), since both sides are congruent to i modulo n1 and to j modulo n2. Hence, for every m∈Zn,
Since u1 is invertible modulo n1 and u2 is invertible modulo n2, we have a∈Z1 if and only if gcd(m,n1)=1, and b∈Z2 if and only if gcd(m,n2)=1. As gcd(n1,n2)=1, the condition “gcd(m,n1)=1 or gcd(m,n2)=1” is equivalent to gcd(m,n)=1, that is, to m∈Z. Therefore c∈Cn1⊥⊗Cn2⊥ if and only if ∑kck′ζmk=0 for all m∈Z, that is, if and only if c′∈Cn⊥. ∎
Proposition 4.6.
Let n=p1a1p2a2⋯pkak be the prime factorization of n, where p1,…,pk are distinct primes, ai≥1, k=ω(n)≥1, and char(Fq)∤n. Then the base dual code Cn⊥=⟨Qn(X)Xn−1⟩ is permutation equivalent, via the permutation Ψk given by the Chinese Remainder Theorem, to the tensor product of the dual codes associated with the prime powers piai:
Cn⊥=Ψk(Cp1a1⊥⊗Cp2a2⊥⊗⋯⊗Cpkak⊥).
Proof.
We proceed by induction on k=ω(n). For k=1 the claim is trivial, since Ψ1 is the identity. (For k=2 the claim is exactly Lemma 4.5, with Ψ2=ψ.)
Let k≥2 and assume the claim holds for integers with k−1 distinct prime factors. Set n′=∏i=1k−1piai and nk=pkak, so that n=n′nk and gcd(n′,nk)=1. Write
D=Cp1a1⊥⊗⋯⊗Cpk−1ak−1⊥andE=Cnk⊥.
By the induction hypothesis, Cn′⊥=Ψk−1(D). Applying Lemma 4.5 to the coprime integers n′ and nk, we obtain
Cn⊥=ψ(Cn′⊥⊗E)=ψ(Ψk−1(D)⊗E).
It remains to show that ψ(Ψk−1(D)⊗E)=Ψk(D⊗E). By associativity of the tensor product, D⊗E is the code of arrays c=(ci1,…,ik) whose lines in each direction m belong to the corresponding component code. Equivalently, it is spanned by the arrays d⊗e with d∈D and e∈E, where (d⊗e)i1,…,ik=di1,…,ik−1eik. For such an array, Lemma 4.3 gives
because ψ(Ψk−1(i1,…,ik−1),ik)=Ψk(i1,…,ik). Hence the two words coincide on every coordinate. By linearity, ψ(Ψk−1(D)⊗E)=Ψk(D⊗E). Substituting into (16) yields
Cn⊥=Ψk(D⊗E)=Ψk(Cp1a1⊥⊗⋯⊗Cpkak⊥),
which completes the induction. ∎
Lemma 4.7.
Let n=p1a1⋯pkak be as in Proposition 4.6, let c∈Cn⊥, and let Γ=Ψk−1(c) be the array defined by Γi1,…,ik=cΨk(i1,…,ik). Fix a direction j∈{1,…,k}, set Lj=pjaj−1, and let u=(u0,…,upjLj−1) be a line of Γ along direction j. Then
m=0∑pj−1ur+mLj=ur+ur+Lj+⋯+ur+(pj−1)Lj=0for every r∈{0,1,…,Lj−1}.
Proof.
By Proposition 4.6, Γ∈Cp1a1⊥⊗⋯⊗Cpkak⊥. By the definition of the direct product of codes, every line of Γ along direction j (that is, the vector obtained by letting ij vary while the other coordinates are fixed) is a codeword of Cpjaj⊥. Write L=Lj, so that the length of u is pjL. By Lemma 1.6, the code Cpjaj⊥ is generated by XL−1. Identifying u with the polynomial u(X)=∑i=0pjL−1uiXi, we have
u(X)≡a(X)(XL−1)(modXpjL−1)
for some polynomial a(X). Since XL−1 divides XpjL−1, it follows that
u(X)≡0(modXL−1).
Now split u into pj consecutive blocks of length L (the macro-blocks):
Equivalently, u(X)=∑m=0pj−1Um(X)XmL, where Um(X)=∑r=0L−1ur+mLXr has degree less than L. Since XL≡1(modXL−1), we obtain
u(X)≡m=0∑pj−1Um(X)(modXL−1),
and the right-hand side has degree less than L. By (18), it is the zero polynomial. Comparing coefficients gives (17). ∎
Remark 4.8.
Equation (17) says that, in every line of Γ along direction j, the coordinates in positions congruent to r modulo Lj sum to zero. In particular, if ur=0, then ur+mLj=0 for some m=0. Thus the nonzero entries of u cannot be isolated within a single macro-block: they are coupled across the pj macro-blocks. This long-range dependence contrasts with the structure of the periodic subspace Vt with t=p1, which is defined below.
To determine the minimum distance of Cn,t⊥ in the case ω(n)≥3, we express it as a direct sum of two simpler subspaces. To this end, we introduce the subspace Vt⊆Fqn and describe its structure.
From now on, n is a composite integer with char(Fq)∤n, and t=lpf(n). In particular, t is prime and t<n. We identify Fqn with Rq,n=Fq[X]/⟨Xn−1⟩. By Theorem 1.1, Xn−1=∏d∣nQd(X). The factors Qd are pairwise coprime, because Xn−1 is separable (as char(Fq)∤n) and the Qd have pairwise disjoint sets of roots.
Lemma 4.9.
The dual of the cyclic code of length n generated by Qt(X) is generated by
gVt(X)=Qt(X)Xn−1=(X−1)(1+Xt+X2t+⋯+Xn−t).
Proof.
The first equality is Lemma 1.5 with S={t}. Since t∣n, we may write
Qt(X)Xn−1=Xt−1Xn−1⋅Qt(X)Xt−1.
The first factor is 1+Xt+X2t+⋯+Xn−t. Since t is prime, Theorem 1.1 gives Xt−1=Q1(X)Qt(X), so the second factor equals Q1(X)=X−1. ∎
Definition 4.10.
Let Vt⊆Fqn be the cyclic code of length n over Fq with generator polynomial gVt(X)=Qt(X)Xn−1; equivalently, Vt=⟨Qt(X)⟩⊥ (Lemma 4.9).
Lemma 4.11.
We have dimVt=t−1. Moreover, Vt consists exactly of the vectors c∈Fqn of the form
c(X)=b(X)(1+Xt+X2t+⋯+Xn−t),degb≤t−1,b(1)=0.
That is, the vectors of Vt are those obtained by repeating n/t times a block (b0,…,bt−1) of length t whose entries sum to zero. In particular, every c∈Vt satisfies cm=cmmodt for all m∈Zn.
Proof.
By Lemma 4.9, deggVt=n−t+1, so dimVt=n−deggVt=t−1. Every codeword is c(X)=a(X)gVt(X) with dega≤t−2, and then degc≤n−1, so no reduction modulo Xn−1 is needed. Put b(X)=a(X)(X−1). As a ranges over the polynomials of degree at most t−2, b ranges over the polynomials of degree at most t−1 with b(1)=0. Then
c(X)=b(X)+Xtb(X)+X2tb(X)+⋯+Xn−tb(X).
Since degb<t, the shifted copies Xjtb(X) occupy disjoint blocks of t consecutive positions. This gives the stated description. ∎
Having described the codewords of Vt, we now show that Cn,t⊥ is the direct sum of Cn⊥ and Vt.
Lemma 4.12.
Let n be a composite integer with char(Fq)∤n and t=lpf(n). Then
Cn,t⊥=Cn⊥⊕Vt.
Proof.
Recall that Cn,t=⟨Qn(X)Qt(X)⟩. By Lemma 1.5, Cn,t⊥=⟨g⊥⟩ with g⊥(X)=Qn(X)Qt(X)Xn−1. Write
so that Cn⊥=⟨g1⟩ and Vt=⟨g2⟩ in Rq,n. Since t∣n and t<n, the divisors t and n are distinct.
The sum. The sum of two ideals of Rq,n is generated by the gcd of their generators. By the pairwise coprimality of the Qd,
gcd(g1,g2)=d∣nd=n,t∏Qd(X)=g⊥(X).
Hence Cn⊥+Vt=⟨g⊥⟩=Cn,t⊥.
The sum is direct. The intersection of two ideals of Rq,n is generated by the lcm of their generators. Here Qt divides g1 and Qn divides g2, and every other Qd divides both, so
lcm(g1,g2)=d∣n∏Qd(X)=Xn−1.
Since Xn−1=0 in Rq,n, we get Cn⊥∩Vt={0}. Therefore Cn,t⊥=Cn⊥⊕Vt. ∎
We now describe how the periodic structure of Vt looks in the multidimensional picture given by the permutation Ψk.
Remark 4.13.
Let n=p1a1⋯pkak with p1<⋯<pk, so that t=lpf(n)=p1. Let v∈Vt be a nonzero vector, and let V=Ψk−1(v) be the corresponding array, that is, Vi1,…,ik=vΨk(i1,…,ik).
By Lemma 4.11, vm=vmmodp1 for all m∈Zn. By the definition of Ψk, the index m=Ψk(i1,…,ik) satisfies m≡ij(modpjaj) for j=1,…,k. Since p1∣p1a1, it follows that m≡i1(modp1). Consequently,
Vi1,i2,…,ik=vm=vmmodp1=vi1modp1.
This identity has two consequences:
(1) Constancy transversal to direction 1. The entry Vi1,…,ik does not depend on i2,…,ik. Hence every line of V along a direction j≥2 is constant.
(2) Periodicity along direction 1. Every line of V along direction 1 is obtained by repeating the base block (v0,…,vp1−1), whose entries sum to zero by Lemma 4.11. Since the length of this line is p1a1, the block is repeated p1a1−1 times.
Theorem 4.14.
Let n be a composite integer with char(Fq)∤n and t=lpf(n). If k=ω(n)≥3, then
d(Cn,t⊥)=2ω(n).
Proof.
Write n=p1a1⋯pkak with p1<⋯<pk, so that t=p1. Since k≥3, we have n≥p1p2p3>t2.
By Lemma 3.1, d(Cn,t⊥)≤2ω(n). It therefore suffices to show that every nonzero w∈Cn,t⊥ satisfies wt(w)≥2k.
By Lemma 4.12, w=c+v with c∈Cn⊥ and v∈Vt. Let Γ=Ψk−1(c), V=Ψk−1(v) and W=Ψk−1(w)=Γ+V be the corresponding arrays. Since Ψk only permutes coordinates, wt(w)=wt(W). By Proposition 4.6, Γ∈Cp1a1⊥⊗⋯⊗Cpkak⊥.
Case 1: v=0. Then w=c is a nonzero codeword of Cn⊥, and wt(w)≥d(Cn⊥)=2ω(n) by Theorem 1.11.
Case 2: v=0. (This includes the case c=0.) We use two facts.
(a) Parity along direction 2. Let L=p2a2−1. Every line u=(u0,…,up2L−1) of Γ along direction 2 is a codeword of Cp2a2⊥, which is generated by XL−1 (Lemma 1.6). Lemma 4.7 with j=2 gives
m=0∑p2−1ur+mL=0for every r∈{0,…,L−1}.
(b) Structure of V. By Remark 4.13, Vi1,…,ik=f(i1), where f(i1)=vi1modp1 and (v0,…,vp1−1) is the base block of v, whose entries sum to zero (Lemma 4.11). Since v=0, this block is nonzero. A nonzero block with zero sum has at least two nonzero entries, because a single nonzero entry cannot sum to zero. Hence the set
A={i1∈Zp1a1:f(i1)=0}
satisfies ∣A∣≥2p1a1−1.
Fix i1∈A and (i3,…,ik), and let K=f(i1)=0. Consider the line ℓ of W along direction 2 through these coordinates. Its entries are Wi1,i2,i3,…,ik=ui2+K, where u is the corresponding line of Γ. For each r∈{0,…,L−1}, equation (22) gives
m=0∑p2−1(ur+mL+K)=0+p2K=0,
because char(Fq)∤n implies p2=0 in Fq. Hence, for each r, at least one of the p2 entries W indexed by r,r+L,…,r+(p2−1)L is nonzero. These L residue classes are disjoint, so ℓ contains at least L=p2a2−1 nonzero entries of W.
The lines along direction 2 indexed by distinct tuples (i1,i3,…,ik) are pairwise disjoint. There are
∣A∣⋅m=3∏kpmam≥2p1a1−1m=3∏kpmam
such tuples with i1∈A. Therefore
wt(w)≥2p1a1−1p2a2−1m=3∏kpmam=p1p22n.
Since p1≥2 and the primes are increasing, pm≥5 for every m≥3. Hence
Because k≥3, we have (5/2)k−2≥5/2>2, that is, 2⋅5k−2>2k. By (23),
wt(w)≥2⋅5k−2>2k=2ω(n).
In both cases wt(w)≥2ω(n) for every nonzero w∈Cn,t⊥, so d(Cn,t⊥)≥2ω(n). Combined with the upper bound, d(Cn,t⊥)=2ω(n). ∎
5. LCD and LRC Codes from Cn,t and Cn,t,1
In this section, we apply the results obtained in the preceding sections to study the properties of the cyclic codes Cn,t and Cn,t,1, together with their respective duals Cn,t⊥ and Cn,t,1⊥, in the context of linear complementary dual (LCD) codes and locally recoverable codes (LRC).
5.1. LCD Codes Generated by Cyclotomic Polynomials
We begin by recalling the definition of an LCD code and the sufficient criterion for cyclic codes used in [1].
Theorem 5.1 ([12], [1, Theorem 2.8]).
Let C be a cyclic code of length n over Fq with \charac(Fq)∤n, generated by gC(X). Then C is an LCD code if the inverse of every root of gC(X) is again a root of gC(X).
As a direct consequence of Theorem 5.1 and Lemma 1.5, we show that all codes studied in this paper are LCD codes.
Theorem 5.2.
Let n be a composite integer with \charac(Fq)∤n and let t=\lpf(n). Then the cyclic codes Cn,t, Cn,t,1 and their respective duals Cn,t⊥ and Cn,t,1⊥ are LCD codes.
Proof.
For any divisor d∣n, the set of roots of Qd(X) — that is, the primitive d-th roots of unity — is closed under inversion α↦α−1 (note that for d=1, the unique root of Q1(X)=X−1 is 1=1−1). Consequently, if a polynomial g(X) is a product of cyclotomic polynomials, then the inverse of each root of g(X) is again a root of g(X).
By definition, the generator polynomials of Cn,t and Cn,t,1 are Qn(X)Qt(X) and Qn(X)Qt(X)Q1(X), respectively. Moreover, by Lemma 1.5 (with S={n,t} and S={n,t,1}), the generator polynomials of Cn,t⊥ and Cn,t,1⊥ are
Since all four generator polynomials are products of cyclotomic polynomials, the result follows immediately from Theorem 5.1. ∎
Combining the parameters determined in Sections 2, 3, and 4 with Theorem 5.2 and Lemma 1.15, we establish the locality of the codes Cn,t and Cn,t⊥, as well as the optimality of several subfamilies with respect to the Singleton-type bound (Lemma 1.14).
Theorem 5.3.
Let n=p1a1p2a2⋯pkak be a composite integer with \charac(Fq)∤n, where p1<p2<⋯<pk are distinct primes, ai≥1, k=ω(n)≥2, and n>p1p2. Let t=\lpf(n)=p1.
(1) If t2∤n, then: (a) Cn,t is a cyclic LCD-LRC code over Fq with parameters [n,n−φ(n)−t+1,t;2ω(n)−1]q; (b) Cn,t⊥ is a cyclic LCD-LRC code over Fq with parameters [n,φ(n)+t−1,2ω(n);t−1]q.
(2) If t2∣n, then: (a) Cn,t is a cyclic LCD-LRC code over Fq with parameters [n,n−φ(n)−t+1,2t;2ω(n)−1]q; (b) Cn,t⊥ is a cyclic LCD-LRC code over Fq with parameters [n,φ(n)+t−1,2ω(n);2t−1]q.
Proof.
By Theorem 5.2, the codes Cn,t and Cn,t⊥ are cyclic LCD codes. Their dimensions were determined in previous sections, and we have d(Cn,t⊥)=2ω(n) by Proposition 3.4 (for ω(n)=2) and Theorem 4.14 (for ω(n)≥3).
(1) If t2∤n, Theorem 2.1 gives d(Cn,t)=t. Since d(Cn,t⊥)=2ω(n), Lemma 1.15 implies that Cn,t has locality 2ω(n)−1. Analogously, since (Cn,t⊥)⊥=Cn,t has minimum distance t, Lemma 1.15 ensures that Cn,t⊥ has locality t−1.
(2) If t2∣n, Theorem 2.2 gives d(Cn,t)=2t. Applying Lemma 1.15 to both Cn,t and Cn,t⊥ yields localities 2ω(n)−1 and 2t−1, respectively. ∎
When n is even but not divisible by 4, we have t=\lpf(n)=2 and t2∤n, which yields an infinite family of r-optimal cyclic LCD-LRC codes with minimum distance 2ω(n).
Corollary 5.4.
Let n=2p2a2⋯pkak be an integer with \charac(Fq)∤n, where 2<p2<⋯<pk are odd primes, ai≥1 for 2≤i≤k, k=ω(n)≥2, and n>2p2. Then Cn,2⊥ is an r-optimal cyclic LCD-LRC code over Fq with parameters
[n,φ(n)+1,2ω(n);1]q.
Proof.
Since t=\lpf(n)=2 and 4∤n, Theorem 5.3(1)(b) gives that Cn,2⊥ is a cyclic LCD-LRC code with parameters [n,φ(n)+1,2ω(n);1]q. The r-optimality of Cn,2⊥ is immediate, as r=1 is the smallest possible locality. ∎
We now analyze the case n=p1p2, where p1<p2 are distinct primes, obtaining infinite families of cyclic LCD-LRC codes that are simultaneously r-optimal and d-optimal.
Theorem 5.5.
Let p1<p2 be distinct primes and let n=p1p2 with \charac(Fq)∤n. Then:
(1) The code Cp1p2,p1 is an r-optimal cyclic LCD-LRC code over Fq with parameters [p1p2,p2,p1;1]q. Moreover, if p1=2, then C2p2,2 is also d-optimal, with parameters [2p2,p2,2;1]q.
(2) The dual code Cp1p2,p1⊥ is a cyclic LCD-LRC code over Fq with parameters [p1p2,p2(p1−1),2;p1−1]q, which is both r-optimal (with locality r=p1−1) and d-optimal (with minimum distance d=2).
Proof.
For n=p1p2 with p1<p2, we have t=\lpf(n)=p1, n>p12, and p12∤n. Moreover, φ(n)=(p1−1)(p2−1), so
dim(Cp1p2,p1)=p1p2−(p1−1)(p2−1)−p1+1=p2
and dim(Cp1p2,p1⊥)=p1p2−p2=p2(p1−1). By Theorem 2.1 and Proposition 3.3, we have d(Cp1p2,p1)=p1 and d(Cp1p2,p1⊥)=2.
(1) Since d(Cp1p2,p1⊥)=2, Lemma 1.15 implies that Cp1p2,p1 has locality r=1, and hence is r-optimal. If p1=2, the right-hand side of (3) for [2p2,p2,2;1]q equals 2p2−p2−⌈1p2⌉+2=2=d(C2p2,2), showing that C2p2,2 is d-optimal.
(2) Since d(Cp1p2,p1)=p1, Lemma 1.15 ensures that Cp1p2,p1⊥ has locality r=p1−1. By (3), d(Cp1p2,p1⊥)≤p1p2−p2(p1−1)−⌈p1−1p2(p1−1)⌉+2=p2−p2+2=2, and since d(Cp1p2,p1⊥)=2, we conclude that Cp1p2,p1⊥ is d-optimal. If p1=2, then r=1 and r-optimality of C2p2,2⊥ is immediate. For p1≥3, suppose for contradiction that there exists an LRC code over Fq with parameters [p1p2,p2(p1−1),2;s]q for some 1≤s<p1−1. By (3), we would need 2≤p1p2−p2(p1−1)−⌈sp2(p1−1)⌉+2=p2−⌈sp2(p1−1)⌉+2, which gives ⌈sp2(p1−1)⌉≤p2. However, since 0<s<p1−1, we have sp1−1>1, so sp2(p1−1)>p2 and hence ⌈sp2(p1−1)⌉≥p2+1, a contradiction. Therefore Cp1p2,p1⊥ is r-optimal. ∎
We now consider the case in which the length n is a prime power, n=la with a≥2, using Proposition 3.2 and Theorem 2.2.
Theorem 5.6.
Let l be a prime and let n=la with a≥2 and \charac(Fq)∤n. Then:
(1) For a=2, the codes Cl2,l and Cl2,l⊥ are both r-optimal and d-optimal cyclic LCD-LRC codes over Fq, with parameters [l2,1,l2;1]qand[l2,l2−1,2;l2−1]q, respectively.
(2) For a≥3: (a) Cla,l is an r-optimal cyclic LCD-LRC code over Fq with parameters [la,la−1−l+1,2l;1]q. Moreover, if l=2 (with q odd), then C2a,2 is also d-optimal for every a≥3, with parameters [2a,2a−1−1,4;1]q. (b) Cla,l⊥ is a cyclic LCD-LRC code over Fq with parameters [la,la−la−1+l−1,2;2l−1]q.
Proof.
By Theorem 5.2, Cla,l and Cla,l⊥ are cyclic LCD codes, and by Proposition 3.2, d(Cla,l⊥)=2 for all a≥2.
(1) For a=2, we noted in Section 3 (immediately after Proposition 3.2) that Cl2,l and Cl2,l⊥ have parameters [l2,1,l2]q and [l2,l2−1,2]q, respectively. By Lemma 1.15, the locality of Cl2,l is r=2−1=1 (hence r-optimal) and the locality of Cl2,l⊥ is r=l2−1. For Cl2,l, the right-hand side of (3) is l2−1−⌈1/1⌉+2=l2=d(Cl2,l), so Cl2,l is d-optimal. For Cl2,l⊥, the right-hand side of (3) is l2−(l2−1)−⌈l2−1l2−1⌉+2=1−1+2=2=d(Cl2,l⊥), so Cl2,l⊥ is also d-optimal. Furthermore, if there existed an LRC code with parameters [l2,l2−1,2;s]q for some 1≤s<l2−1, then ⌈(l2−1)/s⌉≥2, and (3) would yield 2≤1−⌈(l2−1)/s⌉+2≤1, a contradiction. Hence Cl2,l⊥ is r-optimal.
(2) For a≥3, we have n=la>l2 and l2∣n. By Theorem 2.2, d(Cla,l)=2l. Since φ(la)=la−la−1, the dimensions of Cla,l and Cla,l⊥ are la−1−l+1 and la−la−1+l−1, respectively. Applying Lemma 1.15, we find that Cla,l has locality r=2−1=1 (hence r-optimal) and Cla,l⊥ has locality r=2l−1. Finally, for l=2, the parameters of C2a,2 are [2a,2a−1−1,4;1]q. Evaluating the right-hand side of (3) gives 2a−(2a−1−1)−⌈12a−1−1⌉+2=2a−2(2a−1−1)+2=4=d(C2a,2), so C2a,2 is d-optimal for every a≥3. ∎
Finally, we determine the LCD-LRC parameters of the code Cn,t,1 and its dual Cn,t,1⊥.
Theorem 5.7.
Let n be a composite integer with \charac(Fq)∤n and let t=\lpf(n) with n>t2. Then:
(1) The code Cn,t,1 is a cyclic LCD-LRC code over Fq with parameters [n,n−φ(n)−t,2t;2ω(n)−1]q. Moreover, if n=la for some prime l and a≥3, or if n=p1p2 for distinct primes p1<p2, then Cn,t,1 is an r-optimal cyclic LCD-LRC code with locality r=1, that is, with parameters [la,la−1−l,2l;1]q and [p1p2,p2−1,2p1;1]q, respectively. In particular, for p1=2, the code C2p2,2,1 is simultaneously r-optimal and d-optimal, with parameters [2p2,p2−1,4;1]q.
(2) The dual code Cn,t,1⊥ is a cyclic LCD-LRC code over Fq with parameters [n,φ(n)+t,≤2ω(n);2t−1]q, with d(Cn,t,1⊥)=2 in the cases n=la (a≥3) and n=p1p2 (p1<p2).
Proof.
By Theorem 5.2, Cn,t,1 and Cn,t,1⊥ are cyclic LCD codes. As computed in Section 2, dim(Cn,t,1)=n−φ(n)−t≥1 (since n>t2), so dim(Cn,t,1⊥)=φ(n)+t<n and, by the same argument as in Proposition 3.2, d(Cn,t,1⊥)≥2. By Theorem 2.3, d(Cn,t,1)=2t.
On the other hand, the inclusions Cn,t,1⊆Cn,t⊆Cn imply Cn⊥⊆Cn,t⊥⊆Cn,t,1⊥. By Theorem 1.11, it follows that
2≤d(Cn,t,1⊥)≤d(Cn,t⊥)≤d(Cn⊥)=2ω(n).
Applying Lemma 1.15 with the bound d(Cn,t,1⊥)≤(2ω(n)−1)+1, we conclude that Cn,t,1 has locality 2ω(n)−1, and since d(Cn,t,1)=2t=(2t−1)+1, the dual code Cn,t,1⊥ has locality 2t−1.
When n=la (a≥3) or n=p1p2 (p1<p2), Propositions 3.2 and 3.3 give d(Cn,t⊥)=2, so d(Cn,t,1⊥)=2. By Lemma 1.15, it follows that Cn,t,1 has locality r=2−1=1, and is therefore r-optimal. Finally, for n=2p2 with p2>2 prime, the parameters of C2p2,2,1 are [2p2,p2−1,4;1]q, and the right-hand side of (3) equals
2p2−(p2−1)−⌈1p2−1⌉+2=4=d(C2p2,2,1),
showing that C2p2,2,1 is also d-optimal. ∎
We close this section with two numerical examples that illustrate the main results of the paper. The first covers the case in which n is a product of two distinct primes (t2∤n), and the second covers a prime-power length with t2∣n.
Example 5.8.
Let n=15=3⋅5, so t=lpf(15)=3 and ω(15)=2. Let q=2. Since t2=9∤15, Theorem 2.1 gives d(C15,3)=t=3. By Theorem 2.3, d(C15,3,1)=2t=6. Since n=3⋅5 is a product of two distinct primes, Proposition 3.3 gives d(C15,3⊥)=2. Moreover, (X15−1)/(Q15(X)Q3(X))=Q1(X)Q5(X)=X5−1, so C15,3⊥=⟨X5−1⟩. Using φ(15)=8, the parameters of the four codes are:
By Theorem 5.2, all four codes are LCD. By Theorem 5.5, C15,3 is an r-optimal cyclic LCD-LRC code with parameters [15,5,3;1]2, and C15,3⊥ is both r-optimal and d-optimal with parameters [15,10,2;2]2. Indeed,
n−k−⌈rk⌉+2=15−10−⌈210⌉+2=2=d(C15,3⊥),
so the Singleton-type bound (3) is tight. By Theorem 5.7, C15,3,1 is an r-optimal cyclic LCD-LRC code with parameters [15,4,6;1]2. For both C15,3 and C15,3,1, the locality r=1 follows from d(C15,3⊥)=2 via Lemma 1.15.
Example 5.9.
Let n=8=23, so t=lpf(8)=2 and ω(8)=1. Let q be an odd prime power with gcd(8,q)=1 (e.g., q=5). Since t2=4∣8 and n=8>4=t2, Theorem 2.2 gives d(C8,2)=2t=4. By Theorem 2.3, d(C8,2,1)=4. By Proposition 3.2 (n=23), d(C8,2⊥)=2. Using φ(8)=4, the parameters are:
By Theorem 5.2, all four codes are LCD. By Theorem 5.6(2a), with l=2 and a=3, C8,2 is simultaneously r-optimal and d-optimal with parameters [8,3,4;1]q. The d-optimality is verified directly:
n−k−⌈rk⌉+2=8−3−⌈13⌉+2=4=d(C8,2).
By Theorem 5.6(2b), C8,2⊥ is a cyclic LCD-LRC code with parameters [8,5,2;3]q, where the locality 2l−1=3 follows from d(C8,2)=4 via Lemma 1.15. By Theorem 5.7 (with n=23, a=3≥3), C8,2,1 is an r-optimal cyclic LCD-LRC code with parameters [8,2,4;1]q, where the locality r=1 follows from d(C8,2⊥)=2 via Lemma 1.15.
References
[1] A. K. Bhagat and R. Sarma, Cyclic locally recoverable LCD codes with the help of cyclotomic polynomials, Finite Fields and Their Applications 101 (2025), 102519.
[2] A. K. Bhagat and R. Sarma, On the Euclidean duals of the cyclic codes generated via cyclotomic polynomials, arXiv preprint arXiv:2601.03165v2 (2026).
[3] C. Carlet and S. Guilley, Complementary dual codes for counter-measures to side-channel attacks, Advances in Mathematics of Communications 10 (2016), no. 1, 131–150.
[4] P. Gopalan, C. Huang, H. Simitci, and S. Yekhanin, On the locality of codeword symbols, IEEE Transactions on Information Theory 58 (2012), no. 11, 6925–6934.
[5] C. R. P. Hartmann and K. K. Tzeng, Generalizations of the BCH bound, Information and Control 20 (1972), no. 5, 489–498.
[6] W. C. Huffman and V. Pless, Fundamentals of Error Correcting Codes, Cambridge University Press, New York, 2003.
[7] R. Lidl and H. Niederreiter, Introduction to Finite Fields and their Applications, Cambridge Univ. Press, Cambridge, 1994.
[8] S. Ling and C. Xing, Coding Theory: A First Course, Cambridge University Press, Cambridge, 2004.
[9] Y. Luo, C. Xing, and C. Yuan, Optimal locally repairable codes of distance 3 and 4 via cyclic codes, IEEE Trans. Inf. Theory 65 (2) (2019) 1048–1053.
[10] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, North-Holland Publishing Company, Amsterdam, 1977.
[11] J. L. Massey, Linear codes with complementary duals, Discrete Mathematics 106/107 (1992), 337–342.
[12] X. Yang, J. L. Massey, The condition for a cyclic code to have a complementary dual, Discrete Math. 126 (1–3) (1994) 391–393.