Linear Codes over Fq+uFq associated with Simplicial Complexes, Their Gray Images, and Subfield Codes
Ankit Yadav, Akanksha Tiwari, Ritumoni Sarma
Abstract
In recent years, simplicial complexes have gained considerable attention as a useful tool for constructing distance-optimal codes over finite fields. In this article, we construct four infinite families of linear codes over the ring R=Fq+uFq with u2=0 using simplicial complexes with one or two maximal elements, and completely determine their Lee weight distributions via exponential-sum techniques. By employing a Gray map on R, we obtain infinite families of distance-optimal codes over Fq, including a near-Griesmer family, and establish sufficient conditions for their minimality. Furthermore, we investigate the corresponding subfield codes and derive sufficient conditions for their distance-optimality and minimality, yielding infinite families of Griesmer and near-Griesmer codes.
Let Fq denote the finite field with q elements, where q is a prime power. A linear code with parameters [n,k,d] is said to be distance-optimal if there exists no [n,k,D]-linear code over the same field with D>d. For fixed length and dimension, distance-optimal codes achieve the largest possible error-detection and error-correction capabilities. Thus, the construction of distance-optimal codes is a fundamental objective in coding theory. Various approaches have been developed for constructing such codes, one of which involves studying codes over finite rings and investigating their Gray images. The study of codes over finite rings has attracted considerable attention following the seminal article by Hammons et al. [23], which demonstrated that several well-known binary non-linear codes can be realized as the Gray images of linear codes over Z4. Since then, researchers have investigated various families of codes over finite rings, including local rings, chain rings, and non-chain rings; see [3], [1], [19], [45] and the references therein. The study of the Lee weight distribution of codes over finite rings is of considerable interest. The weight distribution of a linear code plays a crucial role.
‡email: ritumoni407@gmail.com in determining its error-correcting capability and calculating the probabilities of error detection and correction [30,36]. Furthermore, minimal linear codes have been extensively studied because of their applications in secret sharing schemes [39,52] and secure two-party computation [10].
In [17], the authors introduced a generic construction of linear codes over finite fields using trace functions. Subsequently, this approach has been widely employed to construct linear codes with good parameters; for instance, see [14,16,18,24] and the references therein. This construction has also been extended to various finite rings. In [43], the authors studied trace codes over F2+uF2 with u2=0. Trace codes over Fp+uFp with u2=0 and u2=u were investigated in [44] and [40], respectively. More recently, in [33], the authors studied the trace codes over Fq+uFq with u2=0 and determined their Lee weight distributions.
On the other hand, simplicial complexes have been shown to be an effective tool for constructing distance-optimal codes, as demonstrated by the following works in the literature. Chang and Hyun [11] were the first to utilize simplicial complexes in the construction of binary linear codes and obtained infinite families of optimal few-weight binary linear codes. Subsequently, in [28], the authors employed the defining-set technique proposed by Ding and Niederreiter [17] to construct infinite families of optimal few-weight binary linear codes from simplicial complexes with one or two maximal elements. Since then, many researchers have constructed the distance-optimal codes over the finite field from simplicial complexes, see [13,20,25,27,29,35,38,47,49,51]. Wu et al. [50] constructed the linear codes over the ring F2+uF2 with u2=0 from simplicial complexes with one maximal element and obtained two classes of binary optimal codes using a Gray map. Furthermore, Wu et al. [46] constructed linear codes over Fp+uFp with u2=0 simplicial complexes with one maximal element and obtained optimal linear codes over Fp. Following these developments, simplicial complexes were employed to construct linear codes over F2+uF2+u2F2 [31], F2+uF2+vF2+uvF2 with u2=v2=0 and uv=vu [42], and Fp+uFp with u2=u [41], yielding optimal linear codes over finite fields through Gray maps. Most recently, Chen et al. [12] constructed four families of linear codes over Fq+uFq with u2=0 by using the simplicial complexes with one maximal element. They have determined their Lee weight distributions and obtained several families of distance-optimal codes over Fq.
The notion of subfield codes was first considered in [8,9], although the term “subfield codes” was not used explicitly. The authors demonstrated that the subfield codes of several linear codes are distance-optimal. Subfield codes were formally introduced in [7, p. 5117]. In [15], the authors developed a general theory of subfield codes and studied subfield codes of two families of ovoid codes. For further studies on subfield codes of codes over various fields, one may refer to [34,37,48]. Recently, Bhagat et al. [6] investigated the subfield codes of linear codes constructed using simplicial complexes over the ring F2+uF2+u2F2 with u3=u. Furthermore, the authors in [4] studied subfield codes of codes over F2[u]/⟨us⟩ for s≥2, while the authors in [51] considered subfield codes of codes over the ring F2+uF2+vF2+uvF2, where u2=v2=0 and uv=vu.
Motivated by the above developments, we in this article study the construction of linear codes over the ring R=Fq+uFq, where u2=0, using simplicial complexes having one or two maximal elements, and determine their Lee-weight distributions. By employing a Gray map on R, we obtain infinite families of few-weight distance-optimal codes over Fq. We further establish sufficient conditions under which these Gray images are minimal. In addition, we investigate their subfield codes and derive conditions for their distance-optimality and minimality. To the best of our knowledge, this is the first study of subfield codes arising from codes over an Fq-algebra for arbitrary q.
The remainder of this article is organized as follows. Section 2 recalls the necessary preliminary concepts and results. In Section 3, we construct four infinite families of linear codes over R and determine their Lee-weight distributions. Section 4 investigates their Gray images and establishes sufficient conditions for distance-optimality and minimality. In Section 5, we study the corresponding subfield codes and derive sufficient conditions for their distance-optimality and minimality. Finally, Section 6 presents the concluding remarks.
2 Preliminaries
Throughout this article, we use the following notation.
Notation
Description
m
a positive integer
[m]
the set {1,2,…,m}
#S
the cardinality of S
P(S)
the power set of S
Fq
the finite field of size q
R
the Fq-algebra Fq+uFq with u2=0
Supp(v)
{j∈[m]:vj=0}, for v∈Fqm
wtH(v)
#Supp(v)
ζp
a primitive complex p-th root of unity
A linear code C with parameters [n,k,d] of length n over Fq is a k-dimensional subspace of Fqn, where d is the minimum (Hamming) distance of C. Let Aj be the number of codewords of C having weight j, then the string (A0,A1,…,An) is said to be the Hamming weight distribution of C and the homogeneous polynomial
WC(x,y)=i=0∑nAixn−iyi
is said to be the Hamming Weight Enumerator of C. The code C is called a t-weight linear code if exactly t entries among A1,A2,…,An are non-zero. Let
gq(k,d):=i=0∑k−1⌈qid⌉.
The Griesmer bound for an [n,k,d]-linear code over Fq is n≥gq(k,d). An [n,k,d]-linear code is called a Griesmer code if n=gq(k,d), and a near-Griesmer code if n−1=gq(k,d). It is immediate that every Griesmer code is distance-optimal.
2.1 Lee Weight and Gray Map
A linear code of length n over R is an R-submodule of Rn. We recall the Gray map ϕ:R→Fq2 defined by
a+ub↦(b,a+b).
This map extends componentwise to a map Φ:Rn→Fq2n, defined by
a+ub↦(b,a+b),
where b,c∈Fqn. The Lee weight of a vector v=a+ub∈Rn is defined as
wtL(v):=wtH(Φ(v))=wtH(b)+wtH(a+b).
The Lee distance between two vectors u and v is defined as
dL(u,v):=wtL(u−v).
The Gray map Φ is a distance-preserving map from Rn, equipped with the Lee distance, to Fq2n, equipped with the Hamming distance. Consequently, the Lee weight distribution of a linear code C over R coincides with the Hamming weight distribution of its Gray image Φ(C).
2.2 Simplicial Complex
Let v,w∈Fqm. Then, w covers v (we write v⪯w) if Supp(w)⊇Supp(v). A simplicial complex Δ is a subset of Fqm such that if v∈Δ, then w∈Δ for all w⪯v.
An element v∈Δ with entries 0 or 1 is called maximal if there is no w∈Δ∖{v} such that Supp(v)⊊Supp(w). Let F={F1,F2,…,Fl} denote the set of maximal elements of Δ. For each i, let Ai=Supp(Fi), and define A={A1,A2,…,Al}. We refer to A as the support of Δ. Observe that Δ is uniquely generated by A. A simplicial complex generated by a single maximal element A⊆[m] (denoted by ΔA) is
ΔA:={v∈Fqm:Supp(v)⊆A}.
Observe that ΔA is a ∣A∣-dimensional subspace of Fqm, and let ΔA∗=ΔA∖{0}. Furthermore, a simplicial complex generated by two maximal elements A and B, denoted by ΔA,B, is ΔA,B:=ΔA∪ΔB. Note that ΔA∩ΔB=ΔA∩B. For a simplicial complex ΔA⊆Fqm, it is easy to verify that ΔA⊥={v∈Fqm:Supp(v)∩A=∅}=ΔAc.
2.3 Auxiliary Lemmas
Let q=ps, where p is a prime number and s≥1. Let H be an r-dimensional Fq-subspace of the vector space Fqm. The dual of H, denoted by H⊥, is defined as
H⊥={v∈Fqm:⟨v,w⟩q=0forallw∈H},
where ⟨⋅,⋅⟩q is the Euclidean inner product on Fqm. Note that H⊥ is (m−r)-dimensional Fq-subspace of Fqm.
Identify the field Fq with the vector space Fps, and let ⟨⋅,⋅⟩p denote the Euclidean inner product on Fps. Then, by [49], we have the following lemma.
Lemma 2.1. Let H be an r-dimensional Fq-subspace of Fqm. Then for any v∈Fps∖{0}, we have
x∈H∑ζp⟨v,⟨y,x⟩q⟩p={qr,0,ify∈H⊥;otherwise.
Let C⊆Fqm be a linear code and 0=v∈C. Then v is said to be minimal if w⪯v implies w=αv for some α∈Fq. If every non-zero codeword of C is minimal, then C is called a minimal code. The following lemma, due to Ashikhmin and Barg [2], provides a sufficient condition for a linear code to be minimal.
Lemma 2.2. Let C be a linear code over Fq. Then C is minimal if
wtmaxwtmin>qq−1,
where wtmin and wtmax represent the minimum and maximum non-zero Hamming weights of C, respectively.
The following result, due to [26], establishes the distance-optimality of a near-Griesmer code.
Lemma 2.3. Let C be an [n,k,d] near-Griesmer code over Fq with k>1. Then C is distance-optimal if q divides d.
The following lemma is useful in proving the optimality of the codes constructed in this article.
In this section, we investigate four classes of CD-codes over the ring R, where the defining set D is constructed from a simplicial complex with one or two maximal elements.
Theorem 3.1. Let m≥2 be a positive integer and A,B⊆[m]. Define D=ΔA∗+uΔB∗. Then the code CD defined in (2.1) is an at most five-weight linear code of length (q∣A∣−1)(q∣B∣−1) and cardinality q∣A∣+∣A∪B∣. Its Lee weight distribution is given by
Since the frequency corresponding to Lee weight 0 is q2m−∣A∣−∣A∪B∣, all the above frequencies must be divided by q2m−∣A∣−∣A∪B∣ to obtain the Lee weight distribution.
Corollary 3.2. If A⊆B in Theorem 3.1, then the code CD in (2.1) is a four-weight linear code of length (q∣A∣−1)(q∣B∣−1) and cardinality q∣A∣+∣B∣. Its Lee weight distribution is given by
Weight
Frequency
0
1
2(q−1)(q∣A∣+∣B∣−1−q∣A∣−1)
q∣A∣−1
2(q−1)(q∣A∣+∣B∣−1−q∣B∣−1)
q∣B∣−∣A∣−1
(q−1)(2q∣A∣+∣B∣−1−q∣A∣−1−2q∣B∣−1)
2(q∣B∣−q∣B∣−∣A∣)
2(q−1)(q∣A∣+∣B∣−1−q∣A∣−1−q∣B∣−1)
q∣A∣+∣B∣−q∣A∣−2q∣B∣+q∣B∣−∣A∣+1
Theorem 3.3. Let m≥2 be a positive integer and A,B⊆[m] such that ∣A∣+∣B∣<2m. Define D=(ΔA+uΔB)c. Then the code CD defined in (2.1) is an at most three-weight linear code of length q2m−q∣A∣+∣B∣ and cardinality q2m. Its Lee weight distribution is given by
Weight
Frequency
w0=0
f0=1
w1=2(q−1)q2m−1
f1=q2m−∣A∣−∣A∪B∣−1
w2=(q−1)(2q2m−1−q∣A∣+∣B∣−1)
f2=2(q2m−∣A∣−∣B∣−q2m−∣A∣−∣A∪B∣)
w3=2(q−1)(q2m−1−q∣A∣+∣B∣−1)
f3=q2m−2q2m−∣A∣−∣B∣+q2m−∣A∣−∣A∪B∣
Proof. The length of the code CD is n=∣D∣=q2m−q∣A∣+∣B∣. Observe that
To determine the frequency corresponding to the weight
w3=2(q−1)(q2m−1−q∣A∣+∣B∣−1),
we subtract the sum of the frequencies of all other weights from the total number of codewords q2m. Consequently, the frequency is
q2m−2q2m−∣A∣−∣B∣+q2m−∣A∣−∣A∪B∣.
11
☐
Corollary 3.4. If A⊆B in Theorem 3.3, then the code CD in (2.1) is a two-weight linear code of length q2m−q∣A∣+∣B∣ and cardinality q2m. Its Lee weight distribution is given by
Weight
Frequency
0
1
2(q−1)q2m−1
q2m−∣A∣−∣B∣−1
2(q−1)(q2m−1−q∣A∣+∣B∣−1)
q2m−q2m−∣A∣−∣B∣
Theorem 3.5. Let m≥2 be a positive integer and let A,B,C⊆[m] such that ∣C∣≤∣B∣. Define D=ΔA+u(ΔB,C∖ΔB∩C)c. Then the code CD defined in (2.1) is an at most nine-weight linear code of length q∣A∣(qm−q∣B∣−q∣C∣+2q∣B∩C∣) and cardinality qm+∣A∣. Its Lee weight distribution is given by
To determine the frequency corresponding to the weight
w9=2(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣+2q∣B∩C∣),
we subtract the sum of the frequencies of all other weights from the total number of codewords q2m. Consequently, the frequency is
q2m+q2m−∣A∣−∣A∪(B∩C)∣−2q2m−∣A∣−∣B∩C∣.
Since the frequency corresponding to Lee weight 0 is qm−∣A∣, all the above frequencies must be divided by qm−∣A∣ to obtain the Lee weight distribution.
Theorem 3.6. Let m≥2 be a positive integer and let A,B,C⊆[m] such that ∣C∣≤∣B∣. Define D=ΔA+u(ΔB,C)c. Then the code CD defined in (2.1) is an at most nine-weight linear code of length q∣A∣(qm−q∣B∣−q∣C∣+q∣B∩C∣) and cardinality qm+∣A∣. Its Lee weight distribution is given by
Proof. The proof follows verbatim from Theorem 3.5.
4 Structure of the Gray Image Φ(CD)
4.1 Distance-Optimality
In this subsection, we investigate the distance-optimality of the Gray images Φ(CD) of the codes constructed in Section 3.
Theorem 4.1. Let D be as in Theorem 3.1 with A⊆B and f5>0. Then Φ(CD) is a [2(q∣A∣−1)(q∣B∣−1),∣A∣+∣B∣,2(q−1)(q∣A∣+∣B∣−1−q∣B∣−1−q∣A∣−1)]-linear code over Fq. Moreover, it is distance optimal if
∣A∣≥⎩⎨⎧2,4,3,ifq=2,ifq≥5and∣A∣=∣B∣,otherwise.
Proof. The length and dimension of Φ(CD) are clear. The minimum distance is
d=2(q−1)(q∣A∣+∣B∣−1−q∣B∣−1−q∣A∣−1).
By Lemma 2.4, we have
i=0∑k−1⌈qid+1⌉≥n+1
if and only if
∣A∣≥⎩⎨⎧2,4,3,ifq=2,ifq≥5and∣A∣=∣B∣,otherwise.
Example 4.2. This example illustrates Theorem 4.1. Let q=2, m=4, A={1,2} and B={1,2,3}. Then Φ(CD) is a four-weight binary linear code with parameters [42, 5, 20] and Hamming weight enumerator x42+15x22y20+12x20y22+x18y24+3x14y28. Furthermore, the code is distance-optimal according to the database [21].
Theorem 4.3. Let D be as in Theorem 3.3. Then Φ(CD) is a [2(q2m−q∣A∣+∣B∣),2m,2(q−1)(q2m−1−q∣A∣+∣B∣−1)]-linear code over Fq. Moreover, it is a near-Griesmer code and distance-optimal if ∣A∣+∣B∣>1.
Proof. The length and dimension of Φ(CD) are clear. The minimum distance is
Therefore, Φ(CD) is a near-Griesmer code, and by Lemma 2.3, the conclusion follows.
Example 4.4. This example illustrates Theorem 4.3. Let q=2, m=3, A={1,2}, and B={1,3}. Then Φ(CD) is a three-weight linear code with parameters [96, 6, 48] and Hamming weight enumerator x96+58x48y48+4x40y56+x32y64. Furthermore, the code is distance-optimal according to the database [21].
Theorem 4.5. Let D be as in Theorem 3.5 with f7>0. Then Φ(CD) is a [2q∣A∣(qm−q∣B∣−q∣C∣+2q∣B∩C∣),m+∣A∣,2(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣)]-linear code over Fq. Moreover, it is distance optimal if
Example 4.6. This example illustrates Theorem 4.5. Let q=2,m=8,A=∅,B={1,2,3,4}, and C={5,6,7,8}. Then Φ(CD) is a two-weight binary linear code with parameters [452, 8, 224] and Hamming weight enumerator x452+225x228y224+30x212y240. Furthermore, the code is distance-optimal.
Theorem 4.7. Let D be as in Theorem 3.6 with f7>0. Then Φ(CD) is a [2q∣A∣(qm−q∣B∣−q∣C∣+q∣B∩C∣),m+∣A∣,2(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣)]-linear code over Fq. Moreover it is distance optimal if
Example 4.8. This example illustrates Theorem 4.7. Let q=2,m=4,A=∅,B={1,2}, and C={3,4}. Then Φ(CD) is a two-weight linear code with parameters [18, 4, 8] and Hamming weight enumerator x18+9x10y8+6x6y12. Furthermore, the code is distance-optimal according to the database [21].
4.2 Minimality
In this subsection, we give the criterion for the Gray images of codes constructed in Section 3 to be minimal.
Theorem 4.9. Let CD be as defined in (2.1) and Φ(CD) be its Gray image. Then
Let D be as in Theorem 3.1. If A⊆B and ∣A∣>1, then Φ(CD) is minimal.
Let D be as in Theorem 3.3. If ∣A∣+∣B∣<2m−1, then Φ(CD) is minimal.
Let D be as in Theorem 3.5. If q∣B∣+q∣C∣<qm−1, then Φ(CD) is minimal.
Let D be as in Theorem 3.6. If q∣B∣+q∣C∣<qm−1, then Φ(CD) is minimal.
Proof.
By Corollary 3.2, wtmin=(q−1)(2q∣A∣+∣B∣−1−2q∣A∣−1−2q∣B∣−1) and wtmax=(q−1)(2q∣A∣+∣B∣−1−2q∣A∣−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣A∣−1+q∣B∣<q∣A∣+∣B∣−1⟺∣A∣>1.
By Theorem 3.3, wtmin=(q−1)(2q2m−1−2q∣A∣+∣B∣−1) and wtmax=(q−1)(2q2m−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣A∣+∣B∣<q2m−1⟺∣A∣+∣B∣<2m−1.
By Theorem 3.5, wtmin=(q−1)(2qm+∣A∣−1−2q∣A∣+∣B∣−1−2q∣A∣+∣C∣−1) and wtmax=(q−1)(2qm+∣A∣−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣B∣+q∣C∣<qm−1.
The proof of this part follows along the same lines as that of Part 3.
19
□
Example 4.10. This example illustrates Theorem 4.9 (1). Let m=4, A=B={1,2}. Then the three-weight code Φ(CD) is a minimal binary linear code with parameters [18, 4, 8] and Hamming weight enumerator x18+6x10y8+6x8y10+3x6y12, as verified by Magma.
Example 4.11. This example illustrates Theorem 4.9 (2). Let m=3, A={1} and B={1,2}. Then the two-weight code Φ(CD) is a minimal binary linear code with parameters [112, 6, 56] and Hamming weight enumerator x112+56x56y56+7x48y64, as verified by Magma.
Example 4.12. This example illustrates Theorem 4.9 (3). Let m=4, A={1}, B={1} and C={2}. Then the three-weight code Φ(CD) is a minimal binary linear code with parameters [56, 5, 26] and Hamming weight enumerator x56+8x30y26+20x28y28+3x24y32, as verified by Magma.
5 Subfield Codes
Definition 5.1. [22] Let R be a subring of the ring S (not necessarily commutative) such that R and S have the same unity. Then a surjective homomorphism of left R-modules TrRS:S→R is called an R-valued trace of S if ker(TrRS) does not contain any non-zero ideals of S.
Let R be a finite commutative Fq-algebra with an Fq-valued trace, denoted by τ, and let B be an Fq-basis of R. Assume that C is a linear code of length n over R and G is a generator matrix of C. If we replace each entry of the matrix G by its column representation with respect to the basis B, the resulting matrix generates a code known as the subfield code, denoted by C(q).
The following result follows from [5].
Theorem 5.2. Suppose C is a linear code of length n over R. Suppose G=(gij)k×n is a generator matrix of C, B={α1,α2,…,αm} is an Fq-basis of R and τ:R→Fq is an Fq-valued trace of R. Then C(q) is generated by
It is easy to see that the map τ:R→Fq defined by a+ub↦a+b is an Fq-valued trace of R by [5].
Theorem 5.3. Let B={1,u} be an Fq-basis of R. Suppose C is a linear code over R and G=G1+uG2 is its generator matrix, where Gi∈Mk×n(Fq) for i=1,2. Then C(q) is a linear code over
Fq of length n and is generated by
G(q)=[G1+G2G1]
Furthermore, if D=D1+uD2, then CD(q)=CD(q), where
D(q)={(d1+d2,d1):di∈Di,1≤i≤2}.
Proof. Let gjk=gjk(1)+ugjk(2)∈R, where gjk(1),gjk(2)∈Fq. Then
τ(gjk)τ(gjku)==gjk(1)+gjk(2),gjk(1).
Using Theorem 5.2, the result follows.
Consider the map
cD(q):(Fqm)2v⟶CD(q)⟼(v⋅d)d∈D(q),
where v⋅d=(a,b)⋅(d1+d2,d1), for v=(a,b)∈(Fqm)2, d=(d1+d2,d1)∈D(q), and ⋅ denotes the Euclidean inner product. Clearly, the map cD(q) is a surjective linear transformation. Thus,
Theorem 5.4. Let D be as in Theorem 3.1 with ∣A∣≤∣B∣. Then the subfield code CD(q) is an at most three-weight linear code over Fq with parameters [(q∣A∣−1)(q∣B∣−1),∣A∣+∣B∣,(q−1)(q∣A∣+∣B∣−1−q∣B∣−1−q∣A∣−1)]. Its Hamming weight distribution is given by
Weight
Frequency
w0=0
f0=1
w1=(q−1)q∣A∣−1(q∣B∣−1)
f1=q∣A∣−1
w2=(q−1)(q∣A∣−1)q∣B∣−1
f2=q∣B∣−1
w3=(q−1)(q∣A∣+∣B∣−1−q∣A∣−1−q∣B∣−1)
f3=q∣A∣+∣B∣−q∣B∣−q∣A∣+1
Moreover, if ∣A∣=∣B∣, then CD(q) is a near-Griesmer code and, for ∣A∣>1, is distance-optimal. If ∣A∣<∣B∣, then CD(q) is a Griesmer code and hence distance-optimal.
Proof. Here D1=ΔA∗,D2=ΔB∗. Consequently, the length of the code CD is n=∣D∣=(q∣A∣−1)(q∣B∣−1). Now,
To determine the frequency corresponding to the weight
(q−1)(q∣A∣+∣B∣−1−q∣B∣−1−q∣A∣−1),
we subtract the sum of the frequencies of all other weights from the total number of codewords q2m. Consequently, the frequency is
q2m−q2m−∣A∣−q2m−∣B∣+q2m−∣A∣−∣B∣.
Since the frequency corresponding to Lee weight 0 is q2m−∣A∣−∣B∣, all the above frequencies must be divided by q2m−∣A∣−∣B∣ to obtain the Hamming weight distribution.
Here n=q∣A∣+∣B∣−q∣A∣−q∣B∣+1, k=∣A∣+∣B∣ and d=(q−1)(q∣A∣+∣B∣−1−q∣B∣−1−q∣A∣−1). By the Griesmer bound,
Example 5.5. This example illustrates Theorem 5.4. Let q=3,m=4,A={1} and B={1,2}. Then CD(3) is a three-weight ternary linear code with parameters [16, 3, 10] and Hamming weight enumerator x16+16x6y10+8x4y12+2y16. Furthermore, the code is distance-optimal according to the database [21].
Theorem 5.6. Let D be as in Theorem 3.3. Then the subfield code CD(q) is a two-weight linear code over Fq with parameters [q2m−q∣A∣+∣B∣,2m,(q−1)(q2m−1−q∣A∣+∣B∣−1)]. Its Hamming weight distribution is given by
Weight
Frequency
0
1
(q−1)q2m−1
q2m−∣A∣−∣B∣−1
(q−1)(q2m−1−q∣A∣+∣B∣−1)
q2m−q2m−∣A∣−∣B∣
Moreover, CD(q) is a Griesmer code and hence distance-optimal.
Example 5.7. This example illustrates Theorem 5.6. Let q=2,m=3,A={1} and B={3}. Then CD(2) is a two-weight binary linear code with parameters [60, 6, 30] and Hamming weight enumerator x60+48x30y30+15x28y32. Furthermore, the code is distance-optimal according to the database [21].
Theorem 5.8. Let D be as in Theorem 3.5. Then the subfield code CD(q) is an at most five-weight linear code over Fq with parameters [q∣A∣(qm−q∣B∣−q∣C∣+2q∣B∩C∣),m+∣A∣,(q−1)(qm+∣A∣−1−q∣A∣+∣B∣−1−q∣A∣+∣C∣−1)]. Its Hamming weight distribution is given by
Weight
Frequency
0
1
(q−1)qm+∣A∣−1
qm−∣B∪C∣−1
(q−1)q∣A∣−1(qm−q∣C∣)
qm−∣B∣−qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣)
qm−∣C∣−qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣)
qm−∣B∩C∣−qm−∣B∣−qm−∣C∣+qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣+2q∣B∩C∣)
qm+∣A∣−qm−∣B∩C∣
Remark 5.9. In the above theorem, the code CD(q) is distance-optimal if 2q∣A∣+∣B∩C∣<∣A∣+∣C∣+⌊∣B∣∣C∣⌋(⌊q2⌋−1). This follows directly from [25, Theorem 10].
Theorem 5.10. Let D be as in Theorem 3.6. Then the subfield code CD(q) is an at most five-weight linear code over Fq with parameters [q∣A∣(qm−q∣B∣−q∣C∣+q∣B∩C∣),m+∣A∣,(q−1)(qm+∣A∣−1−q∣A∣+∣B∣−1−q∣A∣+∣C∣−1)]. Its Hamming weight distribution is given by
Weight
Frequency
0
1
(q−1)qm+∣A∣−1
qm−∣B∪C∣−1
(q−1)q∣A∣−1(qm−q∣C∣)
qm−∣B∣−qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣)
qm−∣C∣−qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣)
qm−∣B∩C∣−qm−∣B∣−qm−∣C∣+qm−∣B∪C∣
(q−1)q∣A∣−1(qm−q∣B∣−q∣C∣+q∣B∩C∣)
qm+∣A∣−qm−∣B∩C∣
Moreover, the code CD(q) is distance-optimal if q∣A∣+∣B∩C∣<∣A∣+∣C∣+⌊∣B∣∣C∣⌋(⌊q2⌋−1).
5.1 Minimality of Subfield Codes
In this subsection, we give the criterion for the subfield codes constructed in this article to be minimal.
Theorem 5.11. Let CD be as defined in (2.1) and CD(q) be the subfield code. Then
Let D be as in Theorem 3.1 and ∣A∣≤∣B∣. If ∣A∣>1, then CD(q) is minimal.
Let D be as in Theorem 3.3. If ∣A∣+∣B∣<2m−1, then CD(q) is minimal.
Let D be as in Theorem 3.5. If q∣B∣+q∣C∣<qm−1, then CD(q) is minimal.
Let D be as in Theorem 3.6. If q∣B∣+q∣C∣<qm−1, then CD(q) is minimal.
Proof.
By Theorem 5.4, wtmin=(q−1)(q∣A∣+∣B∣−1−q∣A∣−1−q∣B∣−1) and wtmax=(q−1)(q∣A∣+∣B∣−1−q∣A∣−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣A∣−1+q∣B∣<q∣A∣+∣B∣−1⟺∣A∣>1.
By Theorem 5.6, wtmin=(q−1)(q2m−1−q∣A∣+∣B∣−1) and wtmax=(q−1)(q2m−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣A∣+∣B∣<q2m−1⟺∣A∣+∣B∣<2m−1.
By Theorem 5.8, wtmin=(q−1)(qm+∣A∣−1−q∣A∣+∣B∣−1−q∣A∣+∣C∣−1) and wtmax=(q−1)(qm+∣A∣−1). Hence, by Lemma 2.2,
wtmaxwtmin>qq−1⟺q∣B∣+q∣C∣<qm−1.
The proof of this part follows along the same lines as that of Part 3.
Example 5.12. This example illustrates Theorem 5.11 (1). Let q=3,m=4,A={1,2},B={2,4}. Then the two-weight code CD(q) is a minimal ternary linear code with parameters [64, 4, 42] and Hamming weight enumerator x64+64x22y42+16x16y48, as verified by Magma.
6 Conclusion
In this work, we have investigated four classes of linear codes over the ring Fq+uFq, where u2=0, constructed using simplicial complexes with either one or two maximal elements, and explicitly determined their Lee weight distributions. Furthermore, with the help of a Gray map, we have obtained several families of optimal few-weight codes over Fq and established sufficient criteria ensuring their minimality. In addition, we have studied the subfield codes arising from our construction and derived mild sufficient conditions under which they are distance-optimal and minimal. Several examples have been presented to illustrate the theoretical results, and their parameters have been verified using MAGMA.
A natural avenue for future research is to seek other defining sets over Fq+uFq, where u2=0, or over other finite alphabets that lead to infinite families of distance-optimal codes.
Acknowledgements
The first author expresses gratitude to MHRD, India, for financial support in the form of a Senior Research Fellowship at the Indian Institute of Technology Delhi. The second author acknowledges the Prime Minister's Research Fellowship (PMRF ID: 1403187) for financial support. The authors also express their gratitude to Dr Anuj Kumar Bhagat for helpful discussions.
Declarations
Conflict of Interest
All authors declare that they have no conflict of interest.
References
[1] T. Abualrub and I. Siap. Cyclic codes over the rings Z2+uZ2 and Z2+uZ2+u2Z2. Designs, Codes and Cryptography, 42(3):273–287, 2007.
[2] A. Ashikhmin and A. Barg. Minimal vectors in linear codes. IEEE Trans. Inform. Theory, 44(5):2010–2017, 1998.
[3] T. Bag, H. Q. Dinh, K. Abdukhalikov, A. K. Upadhyay, and W. Yamaka. Constacyclic codes over Fq2[u]/⟨u2−w2⟩ and their application in quantum code construction. J. Appl. Math. Comput., 68(6):3821–3834, 2022.
[4] A. K. Bhagat, V. Sagar, and R. Sarma. Binary subfield codes of codes over a certain chain ring. Adv. Math. Commun., 19(4):1176–1191, 2025.
[5] A. K. Bhagat and R. Sarma. F-valued trace of a finite-dimensional commutative F-algebra. Finite Fields Appl., 94:Paper No. 102360, 16, 2024.
[6] A. K. Bhagat, R. Sarma, and V. Sagar. Subfield codes of CD-codes over F2[x]/⟨x3−x⟩. Discrete Math., 348(1):Paper No. 114223, 22, 2025.
[7] J. Cannon, W. Bosma, C. Fieker, and A. K. Steel. Handbook of magma functions. 2011.
[8] A. Canteaut, P. Charpin, and H. Dobbertin. Weight divisibility of cyclic codes, highly nonlinear functions on F2m, and crosscorrelation of maximum-length sequences. SIAM J. Discrete Math., 13(1):105–138, 2000.
[9] C. Carlet, P. Charpin, and V. Zinoviev. Codes, bent functions and permutations suitable for DES-like cryptosystems. Des. Codes Cryptogr., 15(2):125–156, 1998.
[10] H. Chabanne, G. Cohen, and A. Patey. Towards secure two-party computation from the wire-tap channel. In Information security and cryptology—ICISC 2013, volume 8565 of Lecture Notes in Comput. Sci., pages 34–46. Springer, Cham, 2014.
[11] S. Chang and J. Y. Hyun. Linear codes from simplicial complexes. Des. Codes Cryptogr., 86(10):2167–2181, 2018.
[12] B. Chen, Y. Xu, Z. Hu, N. Li, and X. Zeng. Optimal linear codes with few weights from simplicial complexes. IEEE Trans. Inform. Theory, 71(5):3531–3543, 2025.
[13] H. Chen. Griesmer and optimal linear codes from the affine Solomon-Stiffler construction. IEEE Trans. Inform. Theory, 71(9):6834–6843, 2025.
[14] C. Ding. Linear codes from some 2-designs. IEEE Trans. Inform. Theory, 61(6):3265–3275, 2015.
[15] C. Ding and Z. Heng. The subfield codes of ovoid codes. IEEE Trans. Inform. Theory, 65(8):4715–4729, 2019.
[16] C. Ding, J. Luo, and H. Niederreiter. Two-weight codes punctured from irreducible cyclic codes. In Proc. of the First International Workshop on Coding Theory and Cryptography, pages 119–124. World Scientific, 2008.
[17] C. Ding and H. Niederreiter. Cyclotomic linear codes of order 3. IEEE Trans. Inform. Theory, 53(6):2274–2277, 2007.
[18] K. Ding and C. Ding. Binary linear codes with three weights. IEEE Communications Letters, 18(11):1879–1882, 2014.
[19] H. Q. Dinh. Constacyclic codes of length ps over Fpm+uFpm. J. Algebra, 324(5):940–950, 2010.
[20] L. G. and A. Sharma. Infinite families of linear codes over finite fields with new parameters and their hull dimensions. Des. Codes Cryptogr., 94(4):Paper No. 77, 50, 2026.
[21] M. Grassl. Bounds on the minimum distance of linear codes and quantum codes. Online available at http://www.codetables.de, 2007. Accessed on 2026-08-18.
[22] M. Greferath and A. Nechaev. Generalized frobenius extensions of finite rings and trace functions. In 2010 IEEE Information Theory Workshop, pages 1–5. IEEE, 2010.
[23] A. R. Hammons, P. V. Kumar, A. R. Calderbank, N. J. Sloane, and P. Solé. The Z4-linearity of Kerdock, Preparata, Goethals, and related codes. IEEE Transactions on Information Theory, 40(2):301–319, 1994.
[24] Z. Heng, C. Ding, and W. Wang. Optimal binary linear codes from maximal arcs. IEEE Trans. Inform. Theory, 66(9):5387–5394, 2020.
[25] Z. Hu, N. Li, X. Zeng, S. Tian, and Y. Chen. Several classes of optimal linear codes with few weights from simplicial complexes. Finite Fields Appl., 114:Paper No. 102845, 2026.
[26] Z. Hu, N. Li, X. Zeng, L. Wang, and X. Tang. A subfield-based construction of optimal linear codes over finite fields. IEEE Trans. Inform. Theory, 68(7):4408–4421, 2022.
[27] Z. Hu, Y. Xu, N. Li, X. Zeng, L. Wang, and X. Tang. New constructions of optimal linear codes from simplicial complexes. IEEE Trans. Inform. Theory, 70(3):1823–1835, 2024.
[28] J. Y. Hyun, J. Lee, and Y. Lee. Infinite families of optimal linear codes constructed from simplicial complexes. IEEE Trans. Inform. Theory, 66(11):6762–6773, 2020.
[29] L. Jose, L. G., and A. Sharma. Linear codes over a mixed-alphabet ring and their gray images with applications to projective and locally repairable codes. arXiv preprint arXiv:2512.07343, 2025.
[30] T. Klø ve. Codes for error detection, volume 2 of Series on Coding Theory and Cryptology. World Scientific Publishing Co. Pte. Ltd., Hackensack, NJ, 2007.
[31] X. Li and M. Shi. A new family of optimal binary few-weight codes from simplicial complexes. IEEE Communications Letters, 25(4):1048–1051, 2020.
[32] R. Lidl and H. Niederreiter. Finite fields, volume 20 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, second edition, 1997. With a foreword by P. M. Cohn.
[33] H. Liu and Y. Maouche. Two or few-weight trace codes over Fq+uFq. IEEE Trans. Inform. Theory, 65(5):2696–2703, 2019.
[34] H. Liu and Z. Yu. Linear codes from simplicial complexes over F2n. Des. Codes Cryptogr., 92(10):2993–3016, 2024.
[35] N. K. Mondal and Y. Lee. Optimal binary few-weight codes using a mixed alphabet ring and simplicial complexes. IEEE Trans. Inform. Theory, 70(7):4865–4878, 2024.
[36] W. W. Peterson and D. T. Brown. Cyclic codes for error detection. Proc. IRE, 49:228–235, 1961.
[37] V. Sagar and R. Sarma. Octanary linear codes using simplicial complexes. Cryptogr. Commun., 15(3):599–616, 2023.
[38] V. Sagar and R. Sarma. Codes over the non-unital non-commutative ring E using simplicial complexes. IEEE Trans. Inform. Theory, 70(5):3373–3384, 2024.
[39] A. Shamir. How to share a secret. Comm. ACM, 22(11):612–613, 1979.
[40] M. Shi, Y. Guan, and P. Solé. Two new families of two-weight codes. IEEE Trans. Inform. Theory, 63(10):6240–6246, 2017.
[41] M. Shi and X. Li. Two classes of optimal p-ary few-weight codes from down-sets. Discrete Appl. Math., 290:60–67, 2021.
[42] M. Shi and X. Li. Few-weight codes over a non-chain ring associated with simplicial complexes and their distance optimal Gray image. Finite Fields Appl., 80:Paper No. 101994, 15, 2022.
[43] M. Shi, Y. Liu, and P. Solé. Optimal two-weight codes from trace codes over F2+uF2. IEEE Communications Letters, 20(12):2346–2349, 2016.
[44] M. Shi, R. Wu, Y. Liu, and P. Solé. Two and three weight codes over Fp+uFp. Cryptogr. Commun., 9(5):637–646, 2017.
[45] A. Tiwari, P. Kanwar, and R. Sarma. On polycyclic codes over ⟨ut⟩Fpm[u] and their cardinalities. arXiv preprint https://doi.org/10.48550/arXiv.2604.03991, 2026.
[46] Y. Wu and J. Y. Hyun. Few-weight codes over Fp+uFp associated with down sets and their distance optimal Gray image. Discrete Appl. Math., 283:315–322, 2020.
[47] Y. Wu, C. Li, and J. Y. Hyun. A survey on codes from simplicial complexes. arXiv preprint arXiv:2409.16310, 2024.
[48] Y. Wu, C. Li, and F. Xiao. Quaternary linear codes and related binary subfield codes. IEEE Trans. Inform. Theory, 68(5):3070–3080, 2022.
[49] Y. Wu, T. Pang, N. Li, Y. Pan, and X. Zeng. Infinite Families of Optimal Codes Over Non-Unital Non-Commutative Rings From Simplicial Complexes. IEEE Trans. Inform. Theory, 72(5):2823–2840, 2026.
[50] Y. Wu, X. Zhu, and Q. Yue. Optimal few-weight codes from simplicial complexes. IEEE Trans. Inform. Theory, 66(6):3657–3663, 2020.
[51] A. Yadav, R. Sarma, and A. K. Bhagat. Optimal binary codes from CD-codes over a non-chain ring. arXiv preprint arXiv:2510.09057, 2025.
[52] J. Yuan and C. Ding. Secret sharing schemes from three classes of linear codes. IEEE Trans. Inform. Theory, 52(1):206–212, 2006.