The Weight Spectrum of the Affine Grassmann Code CA(3,6)
Prasant Singh, Rohit Yadav
Abstract
In this article, we consider the affine Grassmann code CA(3,6), obtained from the affine open cell A9 of the Grassmannian G3,6. We exploit the representation of codewords as linear combinations of minors of all sizes of a generic 3×3 matrix and classify them according to the largest size of a minor occurring with a nonzero coefficient. Using this classification, we determine all possible Hamming weights of codewords of CA(3,6) and, for each weight, compute the number of codewords attaining that weight. Consequently, we obtain the complete weight spectrum of the affine Grassmann code CA(3,6).
Let Fq be the finite field with q elements, where q is a prime power. Using the language of projective systems [TVN07], one can associate linear codes with subsets of Fq-rational points of algebraic varieties. Affine Grassmann codes constitute one such class of codes. These codes are obtained by considering the projective system associated with the set of Fq-rational points of an affine open cell defined by the nonvanishing of the last Plücker coordinate of the Grassmannian.
Let ℓ and ℓ′ be positive integers such that ℓ≤ℓ′. Set m=ℓ+ℓ′ and δ=ℓℓ′. Let Aδ denote the set of all ℓ×ℓ′ matrices over the field Fq. Geometrically, Aδ can be realized
*Email: psinghprasant@gmail.com
Department of Mathematics, Indian Institute of Technology, Jammu, India-181221.
†Email: rohityadavau1998@gmail.com
Department of Mathematics, Indian Institute of Technology, Jammu, India-181221.
as the set of Fq-rational points of an affine open cell of the Grassmannian Gℓ,m, defined by the nonvanishing of a last Plücker coordinate. Thus, Aδ can be realized as a subset of the Grassmannian Gℓ,m and a code can be obtained by puncturing the Grassmann code C(ℓ,m) introduced by Nogin [Nog96] on the set Gℓ,m∖Aδ. The code obtained from the affine open cell Aδ of the Grassmannian Gℓ,m of all ℓ-planes of V=Fqm is called the affine Grassmann code and is denoted by CA(ℓ,m). The systematic study of the affine Grassmann code CA(ℓ,m) was formally initiated by Beelen, Ghorpade, and Høholdt [BGH10]. In this article, they proved that the affine Grassmann code CA(ℓ,m) is an [n,k,d]q code with
n=qδ,k=(ℓm),andd=qδ−ℓ2i=0∏ℓ−1(qℓ−qi).(1.1)
Further, they also characterized the minimum weight codewords of CA(ℓ,m) and showed that this code has a very large automorphism group. In a subsequent work, Beelen, Ghorpade, and Høholdt [BGH12] studied the dual affine Grassmann codes. To be precise, they gave an explicit description of the dual affine Grassmann code CA(ℓ,m)⊥ as an evaluation code and proved that CA(ℓ,m)⊥ is an [n,n−k,d⊥]q code, where n and k are given by equation (1.1) and d⊥ is given by
d⊥={3,4,ifq≥3,ifq=2.(1.2)
Several interesting properties of affine Grassmann codes have been studied over the last two decades. For example, Ghorpade and Kaipa [GK13] explicitly determined the automorphism groups of CA(ℓ,m). Datta and Ghorpade [DG15] determined a few initial and terminal higher weights of CA(ℓ,m) in the case when ℓ<ℓ′. Beelen and Pinero [BP16] investigated the structure of the dual affine Grassmann code and showed that the supports of the minimum weight codewords of CA(ℓ,m)⊥ satisfy certain nice geometric properties and enumerated the number of minimum weight codewords of these codes. More recently, building on the work of Beelen and Singh [BS21] on majority-logic decoding for Grassmann codes, the authors, in collaboration with Piñero [PGSY26], proposed a majority-voting decoder for affine Grassmann codes CA(ℓ,m) over nonbinary fields. They showed that the proposed algorithm can asymptotically correct up to ⌊d/2ℓ+1⌋ errors.
Determining the weight spectrum of any class of code is one of the most challenging problems in the field of coding theory. For example, Nogin [Nog96, Nog97] determined the weight spectrum of Grassmann codes C(2,m) and C(3,6). Later, Kaipa and Pillai [KP13] determined the weight spectrum of the Grassmann code C(3,7). In general, the problem of computing the weight spectrum of Grassmann code C(ℓ,m) corresponds to giving a classification of forms in ⋀m−ℓFqm, which is a difficult problem to solve, and therefore, the weight spectrum of all other nontrivial Grassmann codes is not known. Piñero and Singh [PS19] identified the affine Grassmannian A2(m−2) with the complement of the Schubert divisor Ωα(2,m) in the Grassmannian G2,m, where α=(m−2,m). They established a projection from the Grassmann code C(2,m) onto the affine Grassmann code CA(2,m) and showed that every codeword of C(2,m) can be uniquely decomposed into a Schubert-code component and an affine Grassmann-code component. Using this correspondence and the classification of skew-symmetric matrices, they derived the weights of codewords of CA(2,m) and consequently determined its weight spectrum. Beyond the case ℓ=2, the weight spectrum of CA(ℓ,m) remains unknown, including for the codes CA(3,6) and CA(3,7), even though the weight spectra of the corresponding Grassmann codes C(3,6) and C(3,7) have been known for several decades.
In this article, we consider the problem of determining the weight spectrum of the affine Grassmann code CA(3,6). The approach used to determine the weight spectrum of the Grassmann code C(3,6) does not directly extend to the affine setting. In particular, the natural group action on CA(3,6) leads to a considerably richer orbit structure, making a direct orbit-based analysis more difficult. We instead exploit the realization of codewords of CA(3,6) as linear combinations of minors of a 3×3 matrix. We classify the codewords according to the largest size of a minor occurring with a nonzero coefficient in such an expression and analyze the resulting cases separately. This enables us to determine all possible Hamming weights of codewords of CA(3,6) and, for each such weight, the number of codewords attaining it. Consequently, we obtain the complete weight enumerator of the affine Grassmann code CA(3,6). In an appendix, we also provide a streamlined computation of the weight spectrum of CA(2,m), improving upon the computation given in [PS19].
2 Preliminaries
This section lays the groundwork for computing the weight spectrum of the affine Grassmann code CA(3,6). Let Fq be the finite field with q elements, where q is a prime power. Fix positive integers ℓ,ℓ′ with ℓ≤ℓ′, and set m=ℓ+ℓ′ and δ=ℓℓ′. Recall that the Grassmannian Gℓ,m, consisting of all ℓ-dimensional subspaces of an m-dimensional vector space over Fq, admits a decomposition into affine cells indexed by Plücker coordinates. Fixing a Plücker coordinate and considering the open subset on which it is nonzero gives an affine chart whose set of Fq-rational points is naturally identified with Aδ(Fq). Thus, Aδ(Fq) may be viewed as the set of Fq-rational points of a distinguished affine open subset of Gℓ,m; see [BGH10, Section VII] for further details.
The projective system defining the Grassmann code is obtained from the Fq-rational points of Gℓ,m under the Plücker embedding. Restricting this projective system to the affine open subset described above yields the projective system associated with the Plücker images of the points of Aδ(Fq), which defines the affine Grassmann code. For completeness, and to fix the notation used throughout this article, we briefly recall the resulting evaluation construction.
Let F(ℓ,m) be the Fq-linear space generated by all minors of the generic ℓ×ℓ′ matrix
X=(Xij), in the δ variables Xij. By convention, the 0×0 minor of X is the constant function 1. It is well known that F(ℓ,m) is a (ℓm)-dimensional subspace of the polynomial ring Fq[X] in the δ indeterminates Xij, where 1≤i≤ℓ and 1≤j≤ℓ′. Fix an enumeration P1,P2,…,Pqδ of Aδ(Fq) and consider the evaluation map
It was shown in [BGH10] that Ev is Fq-linear and injective. Consequently, its image is a linear code over Fq of length qδ and dimension (ℓm). This code is called the affine Grassmann code and is denoted by CA(ℓ,m). The length n, dimension k, and minimum distance d of CA(ℓ,m) were determined by Beelen, Ghorpade, and Høholdt in [BGH10] and are given by (1.1).
For a detailed study of the dual affine Grassmann code, we refer the reader to [BGH12,BP16]. Although the complete automorphism group of CA(ℓ,m) was determined by Ghorpade and Kaipa [GK13], we will use a subgroup of Aut(CA(ℓ,m)) described by Beelen, Ghorpade, and Høholdt in [BGH10]. For completeness, we briefly describe this subgroup.
Let B∈GLℓ(Fq), A∈GLℓ′(Fq), and U∈Aδ(Fq). Consider the affine transformation
ψU,A,B:Aδ(Fq)P⟶Aδ(Fq),⟼BPA−1+U.
This is a bijection of Aδ(Fq). Hence, for the fixed enumeration Aδ(Fq)={P1,…,Pqδ}, there is a unique permutation σ of 1,…,qδ such that
We denote this permutation by σU,A,B. For c=(c1,…,cqδ)∈CA(ℓ,m), we shall also write σU,A,B(c) for the n-tuple
(cσ(1),…,cσ(qδ)).
The following result shows that these permutations preserve the code CA(ℓ,m).
Lemma 2.1. [BGH12, Lemma 7] Let B∈GLℓ(Fq), A∈GLℓ′(Fq), and U∈Aδ(Fq). Then σU,A,B∈Aut(CA(ℓ,m)).
In particular, the group of permutations
{σU,A,B∣U∈Aδ(Fq),A∈GLℓ′(Fq),B∈GLℓ(Fq)}
acts transitively on the coordinates of CA(ℓ,m). This transitivity will be useful in the proof of the main result in the next section, as it allows us to replace a codeword by another codeword of the same weight with a more convenient form.
We conclude this section with four counting lemmas that will be used repeatedly in the next section. These are elementary results, but we have not found suitable references for them; we therefore include their proofs for completeness. The first two concern the number of solutions of quadratic equations over Fq, the third counts monic quadratic polynomials according to their number of roots, and the fourth counts matrices with prescribed determinant. As earlier, let m≥1.
Lemma 2.2. Let H:Fqm×Fqm→Fq be the map defined by H(u,v)=∑i=1muivi. For t∈Fq let NH(t)=∣{(u,v)∈Fq2m:H(u,v)=t}∣. Then
NH(t)={q2m−1+qm−qm−1,q2m−1−qm−1,t=0,t=0.
Proof. For convenience, write Nm(t)=NH(t). First let m=1, so H=uv. Now uv=0 if and only if u=0 or v=0, and these two cases overlap only at (0,0). Hence N1(0)=2q−1. For t=0 we must have u=0, and then v=u−1t is determined, so N1(t)=q−1. Both values agree with the stated formula at m=1.
Now let m≥2 and write H=H′+umvm, where H′ is the same form on the first 2(m−1) variables. We split the solutions of H=t by the value s of H′. This gives
Nm(t)=s∈Fq∑Nm−1(s)N1(t−s).
Separate the term s=t from the rest, and use ∑sNm−1(s)=q2m−2. Then
The same recursion holds for both t=0 and t=0. Substituting the formula for Nm−1 into it gives back the stated formula for Nm in both cases. The lemma now follows by induction on m. □
Lemma 2.3. Let n=2m+r with m,r≥1, and let f=H(y)+ℓ(z)+c, where y∈Fq2m, H is as in Lemma 2.2, z∈Fqr, ℓ is a linear form on Fqr, and c∈Fq. Let
Z(f)={(y,z)∈Fq2m×Fqr:f(y,z)=0}
be the set of zeros of f. Then
(1) If ℓ≡0, then ∣Z(f)∣=qrNH(−c).
(2) If ℓ≡0, then ∣Z(f)∣=qn−1 for every c∈Fq.
Proof. Split Z(f) by the value t=H(y). This gives ∣Z(f)∣=∑tNH(t)⋅#{z:ℓ(z)=−t−c}.
Suppose ℓ≡0. Then the inner count is qr when t=−c and 0 otherwise. This proves (1).
Suppose ℓ≡0. Then the kernel of ℓ has index q in Fqr, so ℓ takes every value exactly qr−1 times. Hence ∣Z(f)∣=qr−1∑tNH(t)=qr−1q2m=qn−1. This proves (2).
The next lemma is again a counting lemma that counts the number of quadratic monic polynomials over Fq with 0, 1 and 2 roots. The lemma is standard, but we have not found a precise reference, and hence we include a proof as well.
Proof. Let ψ((r,s))=(−(r+s),rs), a map from Fq2 to itself. If (b,d)=ψ((r,s)), then
t2+bt+d=(t−r)(t−s).
We first show that ψ is injective. Suppose ψ((r,s))=ψ((r′,s′)). Then
(t−r)(t−s)=(t−r′)(t−s′).
Evaluating at t=r gives r=r′ or r=s′. In the first case, cancelling the common factor t−r gives s=s′. In the second case, s′=r, and cancelling the common factor t−r gives s=r′. Thus, in either case, (r,s)=(r′,s′).
Next, t2+bt+d has a root r∈Fq if and only if (b,d)=ψ((r,s)) for some s∈Fq. Indeed, dividing t2+bt+d by t−r gives such an s. Thus, ψ is a bijection between the pairs (r,s)∈Fq2 and the pairs (b,d) for which t2+bt+d has at least one root in Fq.
There are q pairs with r=s, and these correspond to polynomials with exactly one distinct root. Hence N1=q. There are q(q−1)/2 unordered pairs with r=s, and each such pair gives a polynomial with two distinct roots. Hence N2=q(q−1)/2. Finally,
Proof. The case c=0 is clear. Now let c=0 and fix B0 with detB0=c. The map S↦SB0 sends SLn(Fq) into {A:detA=c}, and A↦AB0−1 is its inverse. So the two sets have the same size. This common size is ∣GLn(Fq)∣/(q−1), because det:GLn(Fq)→Fq× is a surjective homomorphism with kernel SLn(Fq). □
This completes the preliminaries. We are now ready to compute the weights of the codewords of CA(3,6).
3 Weight Spectrum of CA(3,6)
In this section, we compute the weight spectrum of the affine Grassmann code CA(3,6). Recall that CA(3,6) is the image of the evaluation map defined in (2.1). Since this evaluation map is injective, every codeword c∈CA(3,6) is of the form c=cf for a unique f∈F(3,6), where F(3,6) is the linear span of all minors, including the 0×0 minor, of the generic matrix X=(Xij). Here, cf=Ev(f) denotes the codeword obtained by evaluating f at the points of M3(Fq)=A9(Fq). The dimension and minimum distance of CA(3,6) are given by (1.1). For f∈F(3,6), we define the Hamming weight of the codeword cf=Ev(f) by
wt(f):=wt(cf)=∣{A∈M3(Fq):f(A)=0}∣.
The vector space F(3,6) is naturally graded as
F(3,6)=V0⊕V1⊕V2⊕V3,
where Vi denotes the vector space spanned by all i×i minors of X, for 0≤i≤3. In particular, V0=Fq, V1 is spanned by the nine entries Xij, V2 by the nine 2×2 minors, and V3 by detX. We identify V1 and V2 with M3(Fq) as follows. A linear form ℓ(X)=∑i,jαijXij is identified with its coefficient matrix (αij)∈M3(Fq). For V2, we use the adjugate of X, namely, the transpose of its cofactor matrix: adj(X)ij=(−1)i+jMji(X), where Mji(X) denotes the 2×2 minor of X obtained by deleting row j and column i. We will use the standard identities
Xadj(X)=adj(X)X=(detX)I3,
and, for invertible U, adj(U)=det(U)U−1, as well as adj(ZW)=adj(W)adj(Z).
The nine entries of adj(X) are, up to sign, the nine 2×2 minors of X and therefore form a basis of V2. Hence every element of V2 can be written uniquely as
q2C(X):=1≤i,j≤3∑Cijadj(X)ij(3.1)
for a unique matrix C∈M3(Fq), which we call its coefficient matrix. Now, for 3×3 matrices, if we define ⟨C,X⟩:=tr(CtN), then
q2C(X)=⟨C,adjX⟩.(3.2)
For example, the quadratic parts of Propositions 3.5, 3.6, and 3.7 have coefficient matrices E11, E22+E33, and I3, of ranks 1, 2, and 3, respectively, where Eij denotes a matrix unit.
Throughout, when referring to the rank of an element of V1 or V2, we mean the rank of its coefficient matrix in the above sense. For an element of V2, this should not be confused with its rank as a quadratic form. For example,
q2E11(X)=X22X33−X23X32
has a coefficient matrix of rank 1, whereas, viewed as a quadratic form in the nine variables Xij, it is a hyperbolic quadratic form of rank 4. The next lemma is just a view of the determinant.
Lemma 3.1. Let A∈M3(Fq) have rows r1,r2,r3. Then
detA=r3⋅(r1×r2),
where, for r1=(a11,a12,a13), r2=(a21,a22,a23), we define
Proof. The proof follows simply from the Laplace expansion of A along the third row. ☐
Lemma 3.2. Let (r1,r2)∈Fq3×Fq3. The following holds.
(1) ∣{(r1,r2):r1×r2=0}∣=q6−(q3−1)(q3−q).
(2) For a fixed nonzero w∈Fq we have ∣{(r1,r2):r1×r2=w}∣=q(q2−1). This value is the same for every nonzero w.
Proof. (1) Note that r1×r2=0 if and only if r1,r2 are linearly dependent. There are (q3−1)(q3−q) independent pairs, so there are q6−(q3−1)(q3−q) dependent pairs.
(2) Fix a nonzero w∈Fq and define w⊥={v∈Fq3:v⋅w=0}. If r1×r2=w then both r1, r2∈w⊥. This follows simply because ri⋅(r1×r2)=det[ri;r1;r2]=0 for i=1,2. Thus, the map v↦v⋅w is a nonzero linear map from Fq3 to Fq, and hence the kernel w⊥ has dimension 2.
Now, pick a basis w1,w2 of w⊥; since w1, w2 are linearly independent, w1×w2=0. Also, as wi⋅(w1×w2)=0 for i=1,2, we get that w1×w2 lies in (w⊥)⊥. Further, (w⊥)⊥=Fqw as the dot product on Fq3 is nondegenerate and hence w1×w2=λw for some λ=0.
If r1=x1w1+x2w2 and r2=y1w1+y2w2 then r1×r2=(x1y2−x2y1)λw. Thus, we have r1×r2=w if and only if x1y2−x2y1=λ−1. By Lemma 2.5 with n=2, the number of such (x1,x2,y1,y2) is ∣GL2(Fq)∣/(q−1)=q(q2−1). This does not depend on w. □
We will now determine the weight of codewords cf∈CA(3,6) such that f∈V0⊕V1⊕V2, that is, when the function det(X) is missing from the presentation of f as a linear combination of minors of X.
Lemma 3.3. If C,C′∈M3(Fq) are two matrices with rank(C)=rank(C′). Then there exist A,B∈GL3(Fq) and a nonzero β∈Fq satisfying
q2C′(X)=βq2C(AXB).
Consequently, as (α0,ℓ) ranges over V0⊕V1, the weights wt(q2C+ℓ+α0) and wt(q2C′+ℓ+α0) take the same values the same number of times.
Proof. We first determine how the substitution X↦AXB acts on the coefficient matrix. Note that adj(AXB)=adj(B)adj(X)adj(A). For arbitrary P,Q∈M3(Fq), we have
We next determine the matrices that can occur as C′′ in (3.3). For U∈GL3(Fq), we have adj(U)=det(U)U−1, and hence adj(U) is invertible with
det(adj(U))=det(U)2,
which is a square in Fq×. Conversely, let V∈GL3(Fq) be a matrix whose determinant is a square in the field. If we write det(V)=d2 for some nonzero d∈Fq and set W=Vt, then we have det(W)=d2. Now, take U=dW−1. Then
det(U)=d3det(W)−1=d
and consequently
adj(U)=det(U)U−1=d(d−1W)=W.
Thus adj(U)t=V. It follows that, as A and B range over GL3(Fq), the matrices adj(A)t and adj(B)t range precisely over the invertible matrices with square determinant. In particular, C′′ and C have the same rank.
It therefore remains to show that, for matrices C,C′∈M3(Fq) of the same rank, there exist β∈Fq× and P,Q∈GL3(Fq), both having square determinant, such that C′=βPCQ. Indeed, since
βq2C′′(X)=q2βC′′(X),
such a representation of C′ will give the required relation
q2C′(X)=βq2C(AXB).
Let r be the common rank of C and C′, and let Er=diag(1,…,1,0,…,0), where the first r diagonal entries are 1. By the standard rank-equivalence theorem, there exist P0,Q0,P1,Q1∈GL3(Fq) such that
C=P0ErQ0,C′=P1ErQ1,
Suppose first that r<3. Since the third row and third column of Er are zero, the factors Pi,Qi can be multiplied on the appropriate side by diag(1,1,λ) without changing PiErQi. Thus, we may assume
detPi=detQi=1(i=0,1).
Consequently,
C′=(P1P0−1)C(Q0−1Q1),
where both factors have determinant 1. Hence we may take β=1.
If r = 3, then C and C′ are invertible. Put
a=detCdetC′,β=a,P=a−1C′C−1,Q=I3.
Then C′=βPCQ, while detP=a−2 is a square and detQ=1. Thus P and Q have square determinants.
For the linear part, when det X is present, the corresponding statement is simpler. If ℓ has coefficient matrix L, then ℓ(AXB) has coefficient matrix AtLBt. No adjugate is involved here, and GL3(Fq)×GL3(Fq) acts transitively on the matrices of each fixed rank. We return to this in Lemma 3.15. Now, we are ready to compute the weight spectrum of the affine Grassmann code CA(3,6). We divide the computation into three parts, depending on the maximal degree of the codeword c∈CA(3,6), thought of as a function of the graded vector space F(3,6).
3.1 Hamming Weights of Linear and Quadratic Functions
In this subsection, we consider the case when f∈V0⊕V1⊕V2. Since the zero codeword is the only codeword of Hamming weight 0, we consider only nonzero codewords. We begin with the simplest case, namely f∈V0⊕V1. The following proposition determines the weight distribution of codewords cf∈CA(3,6) arising from nonzero f∈V0⊕V1.
Proposition 3.4. Let f=∑1≤i,j≤3αijXij+α0∈F(3,6) be a nonzero function. Then the following holds.
(1) If αij=0 for all i,j and α0=0, then wt(f)=q9. There are q−1 such f.
(2) If some αij=0, then wt(f)=q9−q8. There are q10−q such f.
Proof. If f is a nonzero function with αij=0 for all i,j, then f=α0 is a nonzero constant function and hence wt(f)=q9. This proves case (1). On the other hand, if αi,j=0 for some i,j, then f is an affine linear map from Fq9 to Fq. Thus, the zero set of f is an affine hyperplane in Fq9 and hence is of size q8. Thus, wt(f)=q9−q8. Clearly, the number of such functions is q10−q. This proves (2). □
Since the case f∈V0⊕V1 has now been dealt with, we turn to the case
f∈(V0⊕V1⊕V2)∖(V0⊕V1),
that is, f has degree 2 with respect to the grading of F(3,6). We consider such functions by distinguishing several cases according to their quadratic parts. The following proposition deals with the case in which the quadratic part of f is a scalar multiple of a single 2×2 minor of X.
Proposition 3.5. Let f=X22X33−X23X32+∑1≤i,j≤3αijXij+α0∈F(3,6). Set
Here H is a hyperbolic quadratic form in four variables. Since the change of variables is a bijection, it preserves the number of zeros and hence the Hamming weight. We may therefore apply Lemma 2.3 with m=2 and r=5.
If g=0, then ∣Z(f)∣=q8, giving
wt(f)=q9−q8=q8(q−1).
If g=0 and k=0, then ∣Z(f)∣=q5(q3+q2−q), and
wt(f)=q9−q5(q3+q2−q)=q6(q−1)(q2−1).
Finally, if g=0 and k=0, then ∣Z(f)∣=q5(q3−q), and therefore
wt(f)=q9−q5(q3−q)=q6(q3−q2+1).
To complete the proof, now it only remains to count the codewords in each case. If g=0, its five coefficients are not all zero, giving q5−1 choices, while the remaining five coefficients are arbitrary. Hence the number of such codewords is
(q5−1)q5=q10−q5.
If g=0, its five coefficients vanish, leaving α22,α23,α32,α33 arbitrary. Thus there are q4 choices for these four coefficients. For each such choice, exactly one value of α0 gives k=0. Consequently, there are q4 codewords with k=0 and
q4(q−1)=q5−q4
codewords with k=0.
The number of rank-one 3×3 matrices over Fq is (q3−1)(q2+q+1). By the identification of V2 with M3(Fq), each of them gives a copy of the family in Proposition 3.5 with the same weight distribution.
Proposition 3.6. Let f∈V0⊕V1⊕V2 be the function of the form
and let k:=α0−α11α22+α12α21+α13α31. Then the weight distribution of q10 codewords of this form is given by the following table.
Condition
Weight
Number of codewords
α23=0 or α32=0 or α22=α33
q8(q−1)
q10−q7
α23=α32=0, α22=α33, k = 0
q5(q3−1)(q−1)
q6
α23=α32=0, α22=α33, k =0
q5(q4−q3+1)
q6(q−1)
Proof. If we set s:=X22+X33, then the change of variables (X22,X33)⟼(s,X33) is a linear bijection, with inverse X22=s−X33. Under this change of variables, we have
X11X22+X11X33=X11s.
Hence, the quadratic part of f becomes X11s−X12X21−X13X31, which is a sum of three hyperbolic pairs in the six variables
X11,s,X12,X21,X13,X31.
The terms involving X22 and X33 in the linear part transform as
α22X22+α33X33=α22s+(α33−α22)X33.
Thus the linear part splits into a component involving the above six variables,
and a component involving the remaining three variables,
ℓ:=(α33−α22)X33+α23X23+α32X32.
Completing the square in each of the three hyperbolic pairs, as in Proposition 3.5, transforms f into H6+ℓ+k, where H6 is a hyperbolic form of rank 6 and
k=α0−α11α22+α12α21+α13α31.
Moreover,
ℓ=0⟺α23=α32=0andα22=α33.
We now apply Lemma 2.3 with m=3 and r=3. If ℓ=0, then ∣Z(f)∣=q8, and hence
wt(f)=q9−q8=q8(q−1).
If ℓ=0 and k=0, then ∣Z(f)∣=q3(q5+q3−q2), and therefore
wt(f)=q9−q3(q5+q3−q2)=q5(q3−1)(q−1).
Finally, if ℓ=0 and k=0, then ∣Z(f)∣=q3(q5−q2), so
wt(f)=q9−q3(q5−q2)=q5(q4−q3+1).
It remains to count the codewords in each of these cases. The condition ℓ=0 is equivalent to
α23=α32=0,α22=α33.
Thus, the six parameters α11,α12,α13,α21,α31,α22(=α33) are free, giving q6 choices. Hence ℓ=0 occurs for q10−q6=q6(q4−1) choices of the coefficients. For each fixed choice of the six parameters satisfying ℓ=0, the quantity
k=α0−α11α22+α12α21+α13α31
is an affine linear function of α0 with coefficient 1. Therefore, exactly one of the q possible values of α0 gives k=0, while the remaining q−1 values give k=0. Thus there are q6 codewords with ℓ=0 and k=0, and q6(q−1) codewords with ℓ=0 and k=0. This gives the weight distribution as stated in the table.
Proposition 3.7. Let f∈V0⊕V1⊕V2 be the function of the form
Suppose first that a2=α21 or a3=α31. Then at least one of X21 and X31 occurs with a nonzero coefficient in Sa(f). Consequently,
∣Z(Sa(f))∣=q5.
There are q3−q choices of a satisfying this condition. It remains to consider the case
a2=α21,a3=α31.
Writing a1=t, where t∈Fq is arbitrary, the function Sa(f) reduces to a function ht in the four variables X22,X23,X32,X33, and
∣Z(Sa(f))∣=q2∣Z(ht)∣.
Completing the square as before, we can write ht=H+kt, where H is a hyperbolic form of rank 4 and kt=−(t2+bt+d), with b and d as defined in the statement. By Lemma 2.2,
∣Z(ht)∣={q3+q2−q,q3−q,ift2+bt+d=0,otherwise.
If Nf denotes the number of roots of t2+bt+d in Fq, then
Thus, the three possible values Nf=0,1,2 give the three weights stated in the proposition.
It remains to determine the number of codewords corresponding to each value of Nf. Fix (α21,α22,α23,α31). For these fixed values, the map
(α11,α12,α13,α32,α33,α0)⟼(b,d)
is an Fq-linear surjection from Fq6 onto Fq2. Hence, each fiber has size q4. Since the four fixed parameters range independently over Fq, the map from the full set of q10 coefficient tuples to Fq2 has fibers of size q8. By Lemma 2.4, there are Ni pairs (b,d)∈Fq2 for which t2+bt+d has exactly i distinct roots in Fq. Consequently, the number of codewords with Nf=i is
q8Ni,i=0,1,2.
Using the values of N0,N1,N2 from Lemma 2.4 gives the weight distribution as listed in the table.
3.2 Hamming Weights of Functions With Cubic Part
Now, we consider the case f∈F(3,6)∖(V0⊕V1⊕V2). Before taking a general function from this set, we are going to consider functions of the form
f=βdetX+1≤i,j≤3∑αijXij+α0,β=0.
Since multiplication by a nonzero scalar does not change the Hamming weight, we may assume, without loss of generality, that β=1. Thus, we may consider
f=detX+ℓ+α0,
where ℓ=∑1≤i,j≤3αijXij∈V1. We denote the matrices at which the function f is evaluated by A=(aij)∈M3(Fq), and denote the rows of A by r1,r2,r3∈Fq3.
Consider the subgroup of GL3(Fq)×GL3(Fq) consisting of all pairs (P,Q) satisfying detP=detQ. Under the transformation
X⟼PXQ−1,
the determinant is preserved. This group also acts on the coefficient matrix of the linear part ℓ. By the usual rank classification of matrices under left and right multiplication, the coefficient matrix can, up to this action, be reduced to one of the four diagonal matrices
0,E11,E11+E22,I3,
according to whether its rank is 0, 1, 2, or 3. Consequently, it suffices to consider the four cases
ℓ=0,ℓ=X11,ℓ=X11+X22,ℓ=X11+X22+X33.
Now we determine the weight of the function f=det(X)+ℓ+α0 depending on the four possibilities of ℓ and of α0 being zero or nonzero.
Proposition 3.8. In the case ℓ=0, the Hamming weight of f=det(X)+α0 is given by
Proof. The case α0=0 is trivial. In the case when α0=0, the Hamming weight wt(f) simply counts A∈M3(Fq) such that det(A)=−α0. Using Lemma 2.5 we get that wt(f)=q9−∣SL3(Fq)∣.
For S⊆{1,2} we define ℓS(A)=∑i∈Saii. Thus,
ℓ∅=0,ℓ{1}=a11andℓ{1,2}=a11+a22.
Note that ℓS depends only on the rows r1 and r2, and never on r3. The next lemma will be useful in counting the weight of f=det(X)+ℓ+α0 in cases when ℓ=0.
Proof. By Lemma 3.2 (1), the pairs (r1,r2) with r1×r2=0 are exactly the pairs for which r1 and r2 are linearly dependent. Thus either r1=0 and r2 is arbitrary, or r1=0 and r2=λr1 for a unique λ∈Fq. Throughout, write r1=(a11,a12,a13).
First let S={1}, so that ℓS(r1,r2)=a11 depends only on r1. If r1=0, then a11=0, so the condition ℓS(r1,r2)=−α0 holds only when α0=0, and in that case all q3 choices of r2 occur. If r1=0, the condition a11=−α0 depends only on r1, and once such an r1 has been chosen it holds for all q choices of r2=λr1. There are q2−1 such r1 when α0=0 and q2 such r1 when α0=0. Hence this case contributes q(q2−1)=q3−q when α0=0 and q3 when α0=0. Adding the two cases gives
ν{1}(0)=q3+(q3−q)=2q3−q,ν{1}(α0)=q3(α0=0).
Now let S={1,2}, so that ℓS(r1,r2)=a11+a22. If r1=0, then a11=0 and we need the second coordinate a22 of r2 to equal −α0, while the other two coordinates of r2 are free. This gives q2 choices of r2, for every α0∈Fq. If r1=0 and r2=λr1, then a22=λa12, and hence the condition becomes a11+λa12=−α0. We distinguish two subcases.
• If a12=0, then exactly one value of λ works, for every choice of a11,a13 and every α0. There are q(q−1)q=q2(q−1) such r1, and hence q2(q−1) pairs.
• If a12=0, the condition becomes a11=−α0, which is independent of λ, so all q values of λ work. If α0=0, then a11=−α0=0, so r1=0 holds automatically and a13 is free; this gives q choices of r1 and therefore q⋅q=q2 pairs. If α0=0, then a11=a12=0, so r1=0 forces a13=0; this gives q−1 choices of r1 and therefore q(q−1)=q2−q pairs.
Adding the three contributions, we get, for α0=0,
ν{1,2}(α0)=q2+q2(q−1)+q2=q3+q2,
and, for α0=0,
ν{1,2}(0)=q2+q2(q−1)+(q2−q)=q3+q2−q.
In the next proposition, we consider the case when f=det(X)+ℓ+α0, where ℓ=X11, and determine the Hamming weight of the code.
Proposition 3.10. If f=det(X)+X11+α0, then the Hamming weight of the function f is given by
In particular, the weight is the same for all q-1 nonzero values of α0.
Proof. By Lemma 3.1, we have f(A)=0 if and only if r3⋅(r1×r2)=−a11−α0. Fix (r1,r2), and let c=r1×r2. If c=0, then exactly q2 values of r3 satisfy the equation r3⋅c=−a11−α0. On the other hand, if c=0, then either (i) all q3 choices of r3 satisfy the equation r3⋅c=−a11−α0, provided a11+α0=0; or (ii) none of the choices of r3 satisfies r3⋅c=−a11−α0. Using Lemma 3.2 (1) and Lemma 3.9, we obtain
∣{f=0}∣=q2(q3−1)(q3−q)+q3ν{1}(α0).
Now substituting the value of ν1(α0) from Lemma 3.9, we get
Now, using Lemma 3.9 and substituting the value of ν{1,2}(α0), we obtain
wt(f)={q9−q8+q4−q3,q9−q8−q3,α0=0,α0=0.
This proves the proposition.
In the next proposition, we consider the final case, i.e., when f=det(X)+ℓ+α0, where ℓ=X11+X22+X33 and α0∈Fq, and determine its Hamming weight. Note that ℓ is tr(X).
Proposition 3.12. If f=det(X)+X11+X22+X33, then the Hamming weight of the function f is given by
wt(f)={q9−q8−q4−q3,q9−q8−q3,qodd,qeven.
Further, for α0=0, let Nf∈0,1,2 be the number of roots in Fq of the polynomial t2+α0t−1. Then
wt(f+α0)=q9−q8+(1−Nf)q4−q3.
Proof. Let c=r1×r2 and let e3=(0,0,1). Then
detA+trA+α0=r3⋅(c+e3)+(a11+a22+α0).
Thus, f(A)=0 if and only if r3⋅c′=−(a11+a22)−α0, where c′=c+e3. As before, if c′=0, then q2 values of r3 satisfy this. If c′=0, that is, if c=−e3, then either all q3 possibilities of r3 satisfy this or none of them do, according to whether a11+a22=−α0. By putting ν(α0)=∣(r1,r2):r1×r2=−e3, a11+a22=−α0∣ and using Lemma 3.2 (2), we obtain
We now need to calculate the value of ν(α0). Take w=−e3 in the proof of Lemma 3.2(2). Here w⊥=v∈Fq3:v3=0, and with w1=e1, w2=e2 we get e1×e2=e3=−w, so λ=−1. Hence the pairs with r1×r2=−e3 correspond to r1=(x1,x2,0) and r2=(y1,y2,0) with x1y2−x2y1=−1. Here a11=x1 and a22=y2, so the extra condition is y2=−x1−α0. Substituting these values gives x2y1=1−x12−x1α0=:K(x1). For fixed x1, the number of pairs (x2,y1) with x2y1=K(x1) is q−1 if K(x1)=0, and 2q−1 if K(x1)=0. The second case happens exactly when x1 is a root of t2+α0t−1, and there are Nf such roots. Hence
ν(α0)=Nf(2q−1)+(q−Nf)(q−1)=q(Nf+q−1).
Combining, we get ∣{A∈M3(Fq):f(A)=0}∣=q8+q3−q4+q4Nf,
and hence
wt(f)=q9−q8+(1−Nf)q4−q3.
Finally, take α0=0. If q is odd, then t2−1=0 has the two roots ±1, so Nf=2. If q is even, then squaring is injective on Fq, so t=1 is the only root and Nf=1. Substituting Nf=2 or Nf=1 into the formula above gives the two cases stated.
3.3 Automorphisms and Stabilizers
The group G:=GL3(Fq)×GL3(Fq)×Fq3×3 acts on F(3,6) via
(A,B−1,U)⋅f(X)=f(AXB+U).
This action is induced by the automorphisms σU,A,B of Lemma 2.1, so every element of G preserves the weight of a codeword. The element (A,B−1,U) lies in the stabilizer Stab(f) if and only if f(AXB+U)=f(X). The map X↦AXB is a bijection, so we may substitute X↦A−1XB−1. This shows that the preceding identity is equivalent to
f(X+U)=f(A−1XB−1).(3.4)
Now, we compute Stab(f) for f=detX+ℓ(X)+α0, where ℓ=ℓS is the partial trace function of the set S, i.e., ℓS:=∑i∈SXii for S∈{∅,{1},{1,2},{1,2,3}}.
Lemma 3.13. Let f=detX+ℓ(X)+α0. If (A,B−1,U)∈Stab(f), then U=0.
Proof. We first expand det(X+U). Let X=[X1,X2,X3] and U=[U1,U2,U3], where Xi and Ui are columns of X and U respectively. Now,
The first and last terms are detX and detU, respectively. We now identify the three terms containing exactly one column of U. Recall that the jth column of adj(X) consists of the cofactors associated with the jth column of X. Hence the standard cofactor formula gives
Similarly, the three terms containing exactly two columns of U can be viewed as the terms obtained by replacing one column of U by the corresponding column of X. Applying the same cofactor formula, now to U, gives
Now tr(adj(X)U)=∑i,kadj(X)ikUki is quadratic in X, because every entry of adj(X) is a 2×2 minor of X up to sign, whereas tr(adj(U)X) is linear in X. Thus, f(X+U) equals detX plus this quadratic term, plus a linear term, plus a constant. On the other hand,
f(A−1XB−1)=γdetX+ℓ(A−1XB−1)+α0, where γ=det(A−1)det(B−1), and this has no quadratic term. We may compare the two sides of (3.4) as polynomials. In particular, their quadratic parts must agree, which gives ∑i,kukiadj(X)ik=0. The nine entries of adj(X) form a basis of V2, so they are linearly independent. This implies Uki=0 for every i,k, and hence U=0. □
By Lemma 3.13, every element of Stab(f) has U = 0. Thus, (3.4) becomes
Comparing the degrees on both sides, we get detAdetB=1, while the remaining terms give ℓ(A−1XB−1)=ℓ(X). In particular, Stab(detX+ℓ+α0)=Stab(detX+ℓ) for every α0∈Fq. Thus, it is enough to compute Stab(detX+ℓS) once for each S. The same stabilizer size then applies to every shift by α0∈Fq.
Write P=A−1 and Q=B−1, and put ES:=diag(11∈S,12∈S,13∈S). A short computation shows that ℓS(PXQ)=ℓS(X) for all X if and only if QESP=ES. Hence
we compute the precise Stab in different cases of S. First, let S=∅. Then ES=0, so the condition QESP=ES is automatic and hence
Stab(det(X))={(P,Q):detPdetQ=1}.
By Lemma 2.5 this set has size ∣GL3(Fq)∣2/(q−1).
Let S={1}. In this case, ES=e1e1T, and QESP=ES gives (Qe1)(e1TP)=e1e1T. This is an equality of rank-one matrices, and it holds if and only if Qe1=λe1 and e1TP=λ−1e1T for some λ=0. Write P and Q with this shape and expand detP and detQ along the first row and the first column. This gives detP=λ−1DP and detQ=λDQ, where DP and DQ are the determinants of the remaining 2×2 blocks. The free entries in the first column of P, and in the first row of Q, contribute a factor q2 each. The condition detPdetQ=1 becomes DPDQ=1. By Lemma 2.5 with n=2, the number of pairs of 2×2 matrices with DPDQ=1 is (q−1)∣SL2(Fq)∣2. Multiplying by q2⋅q2 and by the q−1 choices of λ gives q6(q−1)2(q2−1)2.
Now, let S={1,2}, so that ES=(I2000). Write P=(P11P21P12P22) and Q=(Q11Q21Q12Q22) in 2+1 block form such that P11,Q11 are 2×2 and P22,Q22 are scalars. Multiplying out in blocks,
The first equation says that Q11 and P11 are inverse to each other, so both lie in GL2(Fq) and P11=Q11−1. Since Q11 is invertible, the second equation gives P12=0, and since P11 is invertible, the third gives Q21=0. Hence
P=(Q11−1P210P22),Q=(Q110Q12Q22),
where Q11∈GL2(Fq), P21 and Q12 are arbitrary, and P22,Q22 are scalars. Conversely, every such pair satisfies QESP=ES. Here detPdetQ=P22Q22, so the condition detPdetQ=1 leaves q−1 choices of the pair (P22,Q22). Altogether we get ∣GL2(Fq)∣⋅q2⋅q2⋅(q−1)=q5(q−1)2(q2−1).
Let S={1,2,3}. Then ES=I3, so QESP=ES, i.e., Q=P−1. In that case, detPdetQ=1 holds automatically. Hence Stab is in bijection with GL3(Fq) via P↦(P,P−1).
3.4 The Complete Weight Distribution
We now combine the results above into one theorem. It covers every one of the q20=∣F(3,6)∣ codewords. Let ρr be the number of matrices of rank r in M3(Fq). Then it is well known that
The next lemma shows that the weight of f=detX+ℓ+α0 depends only on the rank of the coefficient matrix of the linear form ℓ, and on whether α0 is zero. This allows us to use one representative for each rank, as we already did for the propositions with no cubic term. Recall that, as fixed above, the rank of an element of V1 or of V2 always means the rank of its coefficient matrix.
Lemma 3.15. If ℓ,ℓ~∈V1 have coefficient matrices of the same rank, then
wt(detX+ℓ+α0)=wt(detX+ℓ~+α0)
for every nonzero α0∈Fq. Moreover, this common value does not depend on the value of α0.
Proof. For A,B∈GL3(Fq), we define γ(A,B)=det(A−1)det(B−1), so that the substitution X↦A−1XB−1 carries detX to γ(A,B)detX. Let L and L~ be the coefficient matrices of ℓ and ℓ~, respectively, and let r be their common rank. Since the coefficient matrix of ℓ(AXB) is AtLBt, the group GL3(Fq)×GL3(Fq) acts on these coefficient matrices in the usual way, and the action is transitive on the matrices of rank r.
Let r<3, and let ℓS be the diagonal representative of rank r, i.e., S is a proper subset of 1,2,3 and ℓS=∑i∈SXii. Pick some j∈/S. For a given nonzero e∈Fq, let A=I and B−1=I+(e−1)Ejj. This substitution only rescales column j of X, but that column does not appear in the expression ℓS. Therefore, ℓS(A−1XB−1)=ℓS(X), while γ(A,B)=e, and by varying e, we may recover every element of Fq×.
Now, let ℓ and ℓ~ have common rank r<3. By transitivity, fix A0,B0 with ℓ(A0−1XB0−1)=ℓS(X), and put γ0=γ(A0,B0). Also fix A2,B2 with ℓS(A2−1XB2−1)=ℓ~(X), and put γ2=γ(A2,B2). By the construction above, choose A1,B1 that fix ℓS and satisfy γ(A1,B1)=(γ0γ2)−1. Composing the three substitutions gives A,B with ℓ(A−1XB−1)=ℓ~(X) and γ(A,B)=1. Hence (detX+ℓ+α0)(A−1XB−1)=detX+ℓ~(X)+α0, and therefore wt(detX+ℓ+α0)=wt(detX+ℓ~+α0).
It only remains to show now that wt(f) does not depend on the nonzero choice of α0. Fix ℓ=ℓS of rank r<3, let c∈Fq×, and take A1,B1 that fix ℓS with γ(A1,B1)=c. Put g=detX+ℓS+α0. Then g(A1−1XB1−1)=c(detX+ℓS(X)/c+α0/c), so
wt(detX+ℓS+α0)=wt(detX+ℓS/c+α0/c).
Now ℓS/c has coefficient matrix LS/c, of the same rank as LS. So the part just proved, applied with the constant α0/c fixed, gives wt(detX+ℓS/c+α0/c)=wt(detX+ℓS+α0/c). Hence wt(detX+ℓS+α0)=wt(detX+ℓS+α0/c) for every c∈Fq×. As c ranges over Fq×, so does α0/c, and therefore the weight is the same for every nonzero α0. This proves the lemma for r<3, and the case r=3 is already covered by Proposition 3.12. □
In other words, the number of elements of the form detX+q2C+ℓ+α0 having weight W is q9 times the number of elements of the form detX+ℓ~+α~0 having weight W.
Proof. From the proof of Lemma 3.13,
det(X+U)=detX+tr(adj(X)U)+tr(adj(U)X)+detU.
Also adj(X+U)=adj(X)+P(X,U)+adj(U), where, for {j1,j2}={1,2,3}∖{j} ( j1<j2) and {i1,i2}={1,2,3}∖{i} ( i1<i2),
where ℓ~(X)=tr(adj(U)X)+⟨C,P(X,U)⟩+ℓ(X), and α~0=detU+q2C(U)+ℓ(U)+α0.
The map U↦tr(adj(X)U) is a linear isomorphism from M3(Fq) onto V2. Thus, there is a unique U with tr(adj(X)U)=−q2C(X), and for this U the bracketed term (tr(adj(X)U)+q2C(X)) vanishes. Hence f(X+U)=detX+ℓ~(X)+α~0. Since X↦X+U is a bijection, wt(f)=wt(detX+ℓ~+α~0).
Fix U (and hence C). Then the transformation (ℓ,α0)↦(ℓ~,α~0) becomes an affine bijection on V1×Fq. Thus, for each of the q9 possible choices of U and each prescribed (ℓ~,α~0), there is a unique pre-image pair (ℓ,α0). Adding up over all U yields the claimed multiplicative factor q9.
Lemma 3.17. For α0∈Fq×, let Nf(α0) be the number of roots of polynomial t2+α0t−1 in Fq, and let μi=∣{α0∈Fq×:Nf(α0)=i}∣. Then
Proof. As in Lemma 2.4, a nonzero root r of t2+α0t−1 pairs with the other root s=−1/r. Here α0=−(r−1/r) depends only on this pair. The involution r↦−1/r on Fq× has a fixed point exactly when r2=−1.
If q is even, then −1=1, and hence the fixed-point equation r2=−1 becomes r2=1. Since Fq has characteristic 2, the map r↦r2 is the Frobenius automorphism of Fq and is therefore injective. Consequently, r2=1 has the unique solution r=1. The corresponding pair under the involution r↦−1/r is {1,−1}={1}, and for this fixed point we have
α0=−(r−1/r)=−(1−1)=0.
Thus, the only fixed point of the involution corresponds to α0=0, which is excluded. Therefore, among the q−1 elements of Fq×, the remaining q−2 elements occur in distinct pairs
{r,−1/r}.
Each such pair determines one nonzero value of α0, and that value has exactly two roots. Hence
μ2=2q−2,μ1=0.
Since there are q−1 nonzero values of α0 in total,
μ0=(q−1)−μ1−μ2=q−1−2q−2=2q.
Let q be odd. Then r=1 gives the pair {1,−1}, since 1=−1, and this gives α0=0, which is again excluded. Thus, this pair does not contribute to any μi for α0∈Fq×. The fixed points of the involution r↦−1/r are precisely the solutions of r2=−1. This equation has 0 or 2 solutions, according to whether ε=−1 or ε=1. Hence, the number of fixed points is 1+ε. For each fixed point r, the two roots of t2+α0t−1 coincide, since the two roots are r and −1/r=r. Moreover,
α0=−(r−1/r)=−2r=0,
because q is odd and r=0. Thus, each fixed point gives a nonzero α0 for which the polynomial has exactly one root. Consequently, μ1=1+ε. The remaining q−1−(1+ε)−2=q−4−ε elements of Fq× pair up under the involution r↦−1/r. Each such pair corresponds to a nonzero α0 for which the polynomial has two distinct roots. Therefore, μ2=2q−4−ε.
Hence μ0=(q−1)−μ1−μ2=2q−ε. This completes the proof.
Theorem 3.18. Every element of F(3,6) belongs to exactly one of the types listed in Table 1. The Hamming weight and the number of codewords of each type are given in the table.
Proof. First, if f∈V2⊕V1⊕V0 then f=q2C+ℓ+α0 with C∈M3(Fq) of rank r. Fix a rank-r representative and let (ℓ,α0) range over V1×Fq. By Lemma 3.3 this gives the weight distribution of Propositions 3.4–3.7. Summing over the ρr matrices of rank r gives the stated numbers. The total is (ρ0+ρ1+ρ2+ρ3)q10=q19 codewords.
Now suppose that f∈F(3,6)∖(V2⊕V1⊕V0), so that det(X) appears in f with a nonzero coefficient β. Since multiplication by a nonzero scalar does not change the Hamming weight, we may assume that the coefficient of det(X) is 1. For counting codewords, however, we must multiply the resulting numbers by q−1, corresponding to the possible choices of β∈Fq×.
By Lemma 3.16, for each pair (ℓ~,α~0) there are q9 codewords of the same weight. By Lemma 3.15, this weight depends only on rank(ℓ~) and on whether α~0 is zero or nonzero. When rank(ℓ~)=3 and α~0=0, the weights split further according to Nf. The corresponding weights are those computed in Propositions 3.8–3.12.
For each rank r, there are q9ρr codewords corresponding to α~0=0 and q9ρr(q−1) codewords corresponding to α~0=0. For r=3, the latter are further divided into q9ρ3μi codewords with Nf=i, by Lemma 3.17. Finally, multiplying these numbers by q−1 to account for the possible nonzero values of β gives the stated rows with β=0. Their total number is (q−1)q19.
Together with the q19 codewords for which β=0, this gives q19+(q−1)q19=q20, as required, since ∣F(3,6)∣=q20.
Remark 3.19. The weight spectrum of CA(ℓ,m) for general ℓ and m is still open, and Theorem 3.18 settles the first case with ℓ≥3. The general problem is hard for three reasons. On the Grassmann side, the weight of a codeword is constant on the orbits of the general linear group acting on alternating ℓ-forms, so the spectrum reduces to a classification of such forms; but this classification is known only for ℓ=2, where the rank is a complete invariant, and for ℓ=3 in small dimension. Next, the affine cell has a smaller symmetry group, so its orbits are strictly finer, and the spectrum of an affine Grassmann code does not follow from that of the corresponding Grassmann code even when the latter is known. This is illustrated sharply by the present case: Nogin [Nog97] showed that the Grassmann code C(3,6) has only 5 distinct weights, whereas Theorem 3.18 shows that the affine Grassmann code CA(3,6) has 16. Finally, Theorem 3.18 shows that for ℓ=3 the weight is no longer a function of a single rank, since the arithmetic of Fq enters through the number of roots of a quadratic polynomial; so no answer for general ℓ can be phrased in terms of rank data alone. Our approach avoids the classification problem altogether, and two of its steps are not special to 3×3 matrices. The translation of Lemma 3.16 uses only the adjugate identity, and specializing one row of the generic matrix carries a codeword of CA(ℓ,m) to a codeword of CA(ℓ−1,m−2). This suggests an induction on ℓ, in which the present article and [PS19] provide the first two steps, and for which CA(3,m) with general m is the natural next target.
Table 1: Complete weight distribution of CA(3,6), listing each of the 16 distinct Hamming weights together with the number of codewords of that weight and the type(s) of representative polynomial giving rise to it. Here C is the coefficient matrix of the quadratic part, ℓ the linear part, ρr is as above, and μi as in Lemma 3.17, which depends on the residue class modulo 4.
Prasant Singh would like to thank the UGC, Government of India, for the INCP2 grant. This work was initiated during his visit to UiT-The Arctic University of Norway. He gratefully acknowledges UiT for the hospitality extended to him during his visit. He would also like to thank Sudhir Ghorpade for his valuable inputs and stimulating discussions on this problem.
References
[BGH10] Peter Beelen, Sudhir R. Ghorpade, and Tom Høholdt, Affine Grassmann codes, IEEE Trans. Inform. Theory 56 (2010), no. 7, 3166–3176. MR2798982 ↑2, 3, 4
[BGH12] ______, Duals of affine Grassmann codes and their relatives, IEEE Trans. Inform. Theory 58 (2012), no. 6, 3843–3855. MR2924405 ↑2, 4
[BP16] Peter Beelen and Fernando Piñero, The structure of dual Grassmann codes, Des. Codes Cryptogr. 79 (2016), no. 3, 451–470. MR3489752 ↑2, 4
[BS21] Peter Beelen and Prasant Singh, Point-line incidence on Grassmannians and majority logic decoding of Grassmann codes, Finite Fields Appl. 73 (2021), Paper No. 101843, 24. MR4241603 ↑2
[DG15] Mrinmoy Datta and Sudhir R. Ghorpade, Higher weights of affine Grassmann codes and their duals, Algorithmic arithmetic, geometry, and coding theory, 2015, pp. 79–91. MR3364443 ↑2
[GK13] Sudhir R. Ghorpade and Krishna V. Kaipa, Automorphism groups of Grassmann codes, Finite Fields Appl. 23 (2013), 80–102. MR3061086 ↑2, 4
[KP13] Krishna V. Kaipa and Harish K. Pillai, Weight spectrum of codes associated with the Grassmannian G(3, 7), IEEE Trans. Inform. Theory 59 (2013), no. 2, 986–993. MR3015710 ↑2
[Nog96] D. Yu. Nogin, Codes associated to Grassmannians, Arithmetic, geometry and coding theory (Luminy, 1993), 1996, pp. 145–154. MR1394931 ↑2
[Nog97] ______, The spectrum of codes associated with the Grassmannian variety G(3, 6), Problemy Peredachi Informatssii 33 (1997), no. 2, 26–36. MR1663924 ↑2, 26
[PGSY26] Fernando Piñero González, Prasant Singh, and Rohit Yadav, Majority logic decoding of affine Grassmann codes over nonbinary fields, Des. Codes Cryptogr. 94 (2026), no. 8, Paper No. 174. MR5107461 ↑2
[PS19] Fernando Piñero and Prasant Singh, The weight spectrum of certain affine Grassmann codes, Des. Codes Cryptogr. 87 (2019), no. 4, 817–830. MR3923598 ↑2, 3, 26
[TVN07] Michael Tsfasman, Serge Vlădut, and Dmitry Nogin, Algebraic geometric codes: basic notions, Mathematical Surveys and Monographs, vol. 139, American Mathematical Society, Providence, RI, 2007. MR2339649 ↑1