Shortest self-orthogonal and LCD embeddings of linear codes over Fq+uFq
Junmin An ∗, Jon-Lark Kim †
Abstract
This paper determines the exact lengths of shortest self-orthogonal and LCD embeddings of linear codes over Fq+uFq. By decomposing Gram matrices over Fq+uFq into pairs of symmetric matrices over the finite field Fq, the embedding problems are reduced to the congruence classification of symmetric and alternate matrices over finite fields. Complete formulas for the shortest self-orthogonal embedding length are obtained, with two distinct cases arising in both even and odd characteristic. We also show that every self-orthogonal code over Fq+uFq with nonzero free rank can be viewed as a shortest self-orthogonal embedding of another code. We use Witt theory to construct all shortest self-orthogonal embeddings. A complete characterization of shortest LCD embeddings is also established in terms of invertible and arbitrary matrices of prescribed sizes appended to a generator matrix. Examples of self-orthogonal and LCD embeddings with the largest minimum distance for the code considered are also presented, some of whose Gray images are optimal codes over Fq.
Keywords: self-orthogonal code, LCD code, embedding of codes, codes over rings
1 Introduction
Following the observations in [15, 19] that several good nonlinear binary codes are closely related to linear codes over Z4 via the Gray map, codes over Z4 have been studied extensively. As the ring F2+uF2 shares some properties of Z4 and the finite field F4, codes over this ring and, more generally, over Fq+uFq have also played an important role in the study of codes over rings. Codes over Fq+uFq were first studied in [6] with an application to modular lattices. In particular, self-dual codes over Fq+uFq have been extensively studied [8, 13, 14, 16, 20] with classical results for self-dual codes over finite fields including invariant theory, weight enumerators, and mass formulas being generalized to codes over Fq+uFq. Similarly, well-known families of classical codes, such as cyclic codes [1, 8, 28], constacyclic codes [9, 10, 11, 12], and duadic codes [25] have also been generalized to Fq+uFq.
Recently, embedding methods have been studied as an approach to constructing new codes with good minimum distances. These methods construct a new code by appending columns to a generator matrix of a given code. A central problem in the study of embedding methods is to determine the minimum number of columns that must be appended so that the resulting code has a certain property, such as being self-orthogonal or LCD, or having a specified hull
*junmin0518@sogang.ac.kr, Department of Mathematics and Institute for Mathematical and Data Sciences, Sogang University, Seoul, Korea
†jlkim@sogang.ac.kr, Department of Mathematics and Institute for Mathematical and Data Sciences, Sogang University, Seoul, Korea dimension. Kim et al. [23] first investigated this problem. They provided an algorithm to obtain binary self-orthogonal codes by adding the minimum number of columns to a generator matrix of a linear code with dimension three and four. This result was extended to dimension five and six by Kim and Choi [22]. An et al. [4] completely determined the minimum number of columns required to embed a given binary linear code into a self-orthogonal code for all cases. In [3], the embedding approach was extended to LCD codes. Wang and Luo [29] further extended these results by completely determining the minimum number of columns required to embed a given linear code over an arbitrary finite field into a code with a prescribed hull dimension. Most recently, An et al. [5] extended the embedding approach to codes over Z4. To this end, they also investigated shortest doubly even self-orthogonal embeddings of binary linear codes. The aim of this paper is to extend the embedding methods to linear codes over the ring R=Fq+uFq.
In this paper, we study the exact length of a shortest self-orthogonal embedding and a shortest LCD embedding of linear codes over R=Fq+uFq. Every matrix A over R can be uniquely decomposed into A=A0+uA1 for some matrices A0 and A1 over the finite field Fq. In particular, the Gram matrix associated with a generator matrix of a linear code over R decomposes into two symmetric matrices over Fq. This allows us to solve the shortest self-orthogonal and LCD embedding length problems using the congruence theory of symmetric and alternate matrices over finite fields. Consequently, we determine the exact length of a shortest self-orthogonal embedding for linear codes over Fq+uFq in all cases. In particular, we show that every self-orthogonal code over Fq+uFq whose free rank is not zero is a shortest self-orthogonal embedding of other codes with smaller lengths. Furthermore, using the Witt theory over finite fields, we provide a construction method for obtaining all shortest self-orthogonal embeddings. For each of the cases where q is even or odd, the length of a shortest self-orthogonal embedding splits into two cases. We provide an example for each of these four cases. Applying the construction method described above, we enumerate all shortest self-orthogonal embeddings in each example and exhibit one having the largest minimum distance among them. In some of these examples, the Gray images of the resulting shortest self-orthogonal embeddings are optimal codes over Fq. For shortest LCD embeddings, we show that all such embeddings of a given code can be obtained by appending an arbitrary invertible matrix and an arbitrary matrix of prescribed sizes to its generator matrix. As in the self-orthogonal case, we apply this characterization to enumerate all shortest LCD embeddings and provide an example of finding one having the largest minimum distance among them.
This paper is organized as follows. In Section 2, we provide preliminaries on the ring R=Fq+uFq and codes over R. We also briefly review the Witt theory over finite fields. In Section 3, we present our results on shortest self-orthogonal embeddings of linear codes over R with even characteristic. By dividing the codes into two cases, we classify the exact length of the shortest self-orthogonal embeddings for each case. In Section 4, we establish the corresponding results for linear codes over R of odd characteristic, where the codes are likewise divided into two cases and the exact length of a shortest self-orthogonal embedding is determined in each case. In Section 5, we develop a method for constructing all possible shortest self-orthogonal embeddings. In Section 6, we present our results on shortest LCD embeddings. In Section 7, we provide examples illustrating each case of shortest self-orthogonal and shortest LCD embeddings. We conclude our paper in Section 8.
2 Preliminaries
We refer the reader to [21, 26] for a detailed background on coding theory.
Let Fq be a finite field of order q where q is a prime power. The ring R=Fq+uFq is defined as
R=Fq+uFq=Fq[u]/(u2).
The ring R is a commutative local ring with maximal ideal (u). Thus, a square matrix A over R is invertible if and only if A modulo (u) is invertible over R/(u)≅Fq.
A code C of length n over R is a subset of Rn and its elements are called codewords. If C is an R-submodule of Rn, then we call C a linear code over R. Throughout this paper, a code over R is always assumed to be linear unless otherwise stated. A linear code C of length n over R contains a set of k1+k2 codewords c1,…,ck1∈Rn∖(uR)n and ck1+1,…,ck1+k2∈(uR)n such that every codeword in C has a unique representation of the form
i=1∑k1aici+j=k1+1∑k1+k2bjcj
for some ai∈R and bj∈Fq. A generator matrix G for C is a matrix whose rows are ci for 1≤i≤k1+k2. Here C is said to be of type {k1,k2}. We call k1 the (free) rank of C. If k2=0, then C is called a free code. For a code C over R, we denote a generator matrix for C by G(C). Conversely, for a matrix A over R, we denote the code generated by the rows of A by CA.
Two codes C1 and C2 over R are said to be (permutation) equivalent if there is a permutation of columns σ such that σC1=C2. Up to equivalence, every code of type {k1,k2} over R has a generator matrix of the form
(Ik1OAuIk2B1+uB2uD)
where A, B1, B2 and D are matrices over Fq. Such a matrix is called the standard generator matrix of C.
For a code C of length n over R, the dual C⊥ of C is defined as
C⊥={x∈Rn∣x⋅c=0forallc∈C}
where ⋅ is the standard dot product. If the type of C is {k1,k2}, then the type of C⊥ is {n−k1−k2,k2}. If C⊆C⊥, then C is called a self-orthogonal code. Moreover, if C=C⊥, then it is called a self-dual code. The hull of C is defined as
Hull(C)=C∩C⊥.
If C=Hull(C), then C is self-orthogonal. A code C is called an LCD (linear complementary dual) code if Hull(C)={0}. Let G be a generator matrix of a code C over R. It is easy to check that C is self-orthogonal if and only if GGT=O. Bhowmick et al. [7] showed that any LCD code over a finite commutative local Frobenius ring, and hence any LCD code over R, is free. They also showed that a free code over R is LCD if and only if GGT is invertible.
The (Hamming) weight of a vector u∈Rn is the number of nonzero coordinates in u, and is denoted by wt(u). For two vectors u and v in Rn, the (Hamming) distance between u and v is defined as
d(u,v)=wt(u−v).
The minimum (Hamming) distance of a code C over R is the minimum of the distances between any two distinct codewords in C.
The Fq-linear map ϕ:R→Fq2 defined as
ϕ(a+ub)=(b,a+b)
for a,b∈Fq is called the Gray map. It extends componentwise to a map on Rn as
ϕ(x1,…,xn)=(ϕ(x1),…,ϕ(xn)).
If q is even, then Gray map preserves orthogonality, that is, it maps a self-orthogonal code over R into a self-orthogonal code over Fq.
For a code C over R, the residue code of C, denoted by Res(C), is a code over Fq defined as
Res(C)=C(modu).
Let C be a code over R with generator matrix G. A self-orthogonal embedding C~ of C is a self-orthogonal code over R generated by
G~=[G∣B]
for some matrix B over R. A shortest self-orthogonal embedding of C is a self-orthogonal embedding of C whose length is smallest among all self-orthogonal embeddings of C. We denote the length of a shortest self-orthogonal embedding of C by ns(C).
Similarly, an LCD embedding C^ of C is an LCD code over R generated by
G^=[G∣D]
for some matrix D over R. A shortest LCD embedding of C is an LCD embedding of C whose length is smallest among them. The length of a shortest LCD embedding of C is denoted by nℓ(C).
For shortest self-orthogonal and shortest LCD embeddings of linear codes over finite fields, we refer the reader to [3, 4, 29].
Next, we briefly review symmetric bilinear forms and some basic notions from Witt theory that will be used throughout this paper.
Let V be a finite-dimensional vector space over a finite field Fq, and B:V×V→Fq be a symmetric bilinear form on V. The radical of (V,B) is defined as
Rad(B)={u∈V∣B(u,v)=0forallv∈V}.
If Rad(B)={0}, that is, if B is non-degenerate on V, we call (V,B) non-singular. A subspace W of V is called non-singular if the restriction BW×W is non-degenerate. If V is non-singular and W is a non-singular subspace of V, then
V=W⊥W⊥
where W⊥={u∈V∣B(u,v)=0 for all v∈W}. For two vector spaces V1, V2 equipped with symmetric bilinear forms B1 and B2, respectively, let φ:V1→V2 be a linear isomorphism. If
B2(φ(u),φ(v))=B1(u,v)
for every u,v∈V1, then φ is called an isometry.
Every symmetric matrix A∈Mn(Fq) determines a symmetric bilinear form BA on Fqn by
BA(u,v)=uAvT.
Here, we define the radical of A as Rad(A)=Rad(BA). In this case,
Rad(A)=kerA={x∈Fqn∣xA=0}.
Therefore, (Fqn,BA) is non-singular if and only if A is invertible. Throughout this paper, we identify a symmetric matrix A with its corresponding symmetric bilinear form BA whenever no confusion arises.
A bilinear form B on V is called alternate if B(u,u)=0 for every u∈V. Otherwise, it is called non-alternate. If (V,B) is non-singular and B is alternate, then we call (V,B) a symplectic space. A basis e1,f1,…,et, ft of a symplectic space is called a symplectic basis if
B(ei,ej)=B(fi,fj)=0andB(ei,fj)=δij.
A matrix A is called alternate if AT=−A and the diagonal elements of A are all zero. It is easy to check that if A is alternate, then BA is also alternate. Let F be a field of characteristic two. Then alternate matrices over F are precisely the symmetric matrices with zero diagonal. The following two theorems provide a classification of symmetric matrices over Fq.
For an even integer m, define
Jm=diagm/2copies(0110),⋯,(0110).
Theorem 2.1. [2] Let A be a symmetric matrix of rank r over Fq where q is even. If A is alternate, then r is even and A is congruent to Jr⊕O. Otherwise, if A is non-alternate, then A is congruent to Ir⊕O.
Theorem 2.2. [18] Let A be an invertible symmetric matrix of rank r over Fq where q is odd. Then A is congruent to Ir if detA∈(Fq×)2 and is congruent to Ir−1⊕[z] for some z∈Fq×∖(Fq×)2 if detA∈Fq×∖(Fq×)2.
We briefly introduce some notions related to Witt theory. For more details, we refer the reader to [24].
Let v be a nonzero vector in a vector space V with symmetric bilinear form B. Then v is called an isotropic vector if B(v,v)=0, and is called an anisotropic vector otherwise. (V,B) is said to be isotropic if it contains an isotropic vector, and is said to be anisotropic otherwise. If all nonzero vectors of (V,B) are isotropic, then it is said to be totally isotropic. A totally isotropic subspace W of V is called a maximal totally isotropic subspace if there is no totally isotropic subspace of V that properly contains W.
Theorem 2.3. [24] Let F be a field such that charF=2 and let V be a non-singular vector space over F equipped with a symmetric bilinear form B. Let (U,B∣U) be a totally isotropic subspace of dimension d with basis u1,…,ud. Then there exists a totally isotropic subspace (W,B∣W) of the same dimension with basis v1,…,vd such that
B(ui,vj)=δij
where δij is the Kronecker delta.
Theorem 2.4 (Witt's Extension Theorem [27]). Let V be a vector space over a finite field F with symmetric bilinear form B on V. Let B be non-singular, non-alternate, and let U1 and U2 be subspaces of V. Let φ:(U1,B∣U1)→(U2,B∣U2) be an isometry. If char(F)=2, then φ extends to an isometry of V. Otherwise, if char(F)=2, then φ extends to an isometry of V if and only if the following holds:
h∈U1 if and only if h∈U2, where h=∑iei for an orthonormal basis {ei}i of V.
If h∈U1, then φ(h)=h.
Let V be a two-dimensional vector space over a field F with char F=2, and B be a symmetric bilinear form on V. If (V,B) is non-singular and isotropic, then it is called the hyperbolic plane. The orthogonal sum of hyperbolic planes is called hyperbolic.
Theorem 2.5 (Witt's Decomposition Theorem). Let V be a vector space over a field F with odd characteristic and B be a symmetric bilinear form on V. Then V splits into an orthogonal sum
(Vt,B∣Vt)⊥(Vh,B∣Vh)⊥(Va,B∣Va)(1)
where Vt is totally isotropic, Vh is hyperbolic and Va is anisotropic.
If Vh is the orthogonal sum of w hyperbolic planes in the decomposition of Equation 1, then w is called the Witt index of (V,B).
Theorem 2.6. Let F be a field such that charF=2 and let V be a non-singular vector space over F equipped with a symmetric bilinear form B. Then the Witt index w of V equals the dimension of any maximal totally isotropic subspace of V.
3 Shortest self-orthogonal embeddings of linear codes over R with even characteristic
In this section, we assume that R=Fq+uFq where q=2s for some s≥1 otherwise state.
Proposition 3.1. Let C be a code of length n over R=Fq+uFq, where q is even, and suppose that C is not self-orthogonal. Then ns(C)≤2n.
Proof. For a generator matrix G of C, define G′=[G∣G]. Since
G′(G′)T=GGT+GGT=O,
G′ generates a self-orthogonal embedding of C.
This Proposition tells us that any linear code over R which is not self-orthogonal has a self-orthogonal embedding.
For a k×k symmetric matrix A over a ring R (not necessarily char R = 2 here), define ν(A) by
For a linear code C of length n over R, let G be a generator matrix of C. Then ν(GGT) is the minimal number of columns required to embed C into a self-orthogonal code, i.e.,
ns(C)−n=ν(GGT).
Also, Proposition 3.1 show that ν(GGT) is always finite.
We note that Propositions 3.2 and 3.3 below do not require the assumption that char R = 2.
Proposition 3.2. Let A and A′ be congruent matrices over a ring R. Then ν(A)=ν(A′).
Proof. Let A be a k×k symmetric matrix over R such that ν(A)=m<∞. Then, there is a matrix B∈Mk×m(R) such that A+BBT=O. Let U be an invertible matrix over R such that A′=UAUT and let B′=UB. Then we have
A′+B′(B′)T=UAUT+B′(B′)T=UAUT+UBBTUT=U(A+BBT)UT=O.
It follows that ν(A′)≤ν(A). Conversely, since U is invertible, we have A=U−1A′(U−1)T. By applying the same argument to A′ and U−1, we obtain ν(A)≤ν(A′). Therefore, if one of ν(A) and ν(A′) is finite, then so is the other, and the two inequalities above imply
ν(A)=ν(A′).
If neither is finite, then both are equal to ∞.
Proposition 3.3. Let M be a k×k symmetric matrix over a ring R such that
M=(AOOB)
for some A∈Mk1(R) and B∈Mk2(R) where k1+k2=k. Then ν(M)≤ν(A)+ν(B).
Proof. If either ν(A) or ν(B) is infinite, then it is trivial. Suppose that both ν(A) and ν(B) are finite. Take X∈Mk1×ν(A)(R) and Y∈Mk2×ν(B)(R) such that A+XXT=O and B+YYT=O, respectively. Then we have
M+(XOOY)(XOOY)T=M−M=O.
Therefore, ν(M)≤ν(A)+ν(B).
Lemma 3.4. Let R=Fq+uFq with q even. For an integer m1≥0 and an even integer m2≥0,
ν(Im1⊕uJm2)=m1+m2
where Im1 is the m1×m1 identity matrix over R.
Proof. We first show that ν(Im1⊕uJm2)≤m1+m2. Note that
(0uu0)=(1u10)(1u10)T.
Let
A=Im1⊕diagm2/2copies(1u10),…,(1u10).
Since Im1⊕uJm2=AAT, it follows that ν(Im1⊕uJm2)≤m1+m2.
Next, we show that ν(Im1⊕uJm2)≥m1+m2. Let ν(Im1⊕uJm2)=m and n=m1+m2. Then there exists B∈Mn×m(R) such that
Im1⊕uJm2=BBT.
Let CB be a code generated by the rows of B with type {a,b}. Then a+b≤m. Define a map φ:Rm→Rn as
φ(x)=xBT
for x∈Rm. Then we have
φ(CB)=⟨BBT⟩=⟨Im1⊕uJm2⟩=Rm1⊕(uR)m2.
Since the minimum number of generators of the image of an R-linear map is less than or equal to that of its domain, we have
m1+m2≤a+b≤m=ν(Im1⊕uJm2).
Thus, we conclude that ν(Im1⊕uJm2)=m1+m2.
Lemma 3.5. Let R=Fq+uFq with q even. For even integers m1>0 and m2≥0,
ν(Jm1⊕uJm2)={m1+m2,m1+1,ifm2>0,ifm2=0.
Proof. We first show that
ν(Jm1⊕uJm2)≤{m1+m2,m1+1,ifm2>0,ifm2=0.
Let m2=0 and t=m1/2. Consider the even weight code Em1+1 over {0,1}⊆Fq of length m1+1. Since m1+1 is an odd integer, Em1+1 does not contain the all-one vector 1. Thus,
Hull(Em1+1)=Em1+1∩⟨1⟩={0}.
It follows that the standard inner product on Em1+1 is a nondegenerate alternate bilinear form. Let e1, f1,…,es, fs be the symplectic basis of Em1+1 where s=m1/2. Let A be the matrix whose rows are e1, f1,…,es, fs in order. Viewing A as a matrix over R, we have AAT=Jm1. Thus, ν(Jm1)≤m1+1.
Assume that m2>0. Define
B=Au110T01
where 1 is the all-one vector of length m1+1, and view A as a matrix over R. Then
Since B′(B′)T=Jm1⊕uJm2, we have ν(Jm1⊕uJm2)≤m1+m2.
Next, we show that
ν(Jm1⊕uJm2)≥{m1+m2,m1+1,ifm2>0,ifm2=0.
Let ν(Jm1⊕uJm2)=m, and P∈Mn×m(R) be a matrix such that
Jm1⊕uJm2=PPT
where n=m1+m2. Let CP be a code generated by the rows of P with type {a,b}. Define a map φ:Rm→Rn as
φ(x)=xPT
for x∈Rm. Then,
φ(CP)=⟨PPT⟩=⟨Jm1⊕uJm2⟩=Rm1⊕(uR)m2.
Since the minimal number of generators for the image of an R-linear map is bounded above by that of its domain, we have
m1+m2≤a+b≤m=ν(Jm1⊕uJm2).
Thus, ν(Jm1⊕uJm2)=m1+m2 if m2>0.
Let m2=0. Then we have
m1≤ν(Jm1)≤m1+1.
Suppose that there is a matrix Q∈Mm1×m1(R) such that Jm1=QQT. Since Jm1 is invertible, Q is also invertible. By reducing modulo u, we obtain an invertible matrix Q such that Jm1=QQT. Since the diagonal entries of Jm1 are zero, every row of Q is in
H={x∈Fqm1∣j∑xj=0}
whose dimension is given as dimH=m1−1. Thus Q cannot generate Fqm1, which is a contradiction since Q is invertible. Hence ν(Jm1)=m1+1.
Theorem 3.6. Let C be a code of length n over R=Fq+uFq with q even. Let G be a generator matrix of C. Write GGT=A0+uA1 for some matrices A0,A1 over Fq. Let r=rankFq(A0), and let ρ=rankFq(NA1NT), where the rows of N form a basis of Rad(A0). If
(i) Res(C) is not self-orthogonal,
(ii) for any x∈Res(C), x⋅x=0, and
(iii) ρ=0,
then
ns(C)=n+r+1.
Otherwise,
ns(C)=n+r+ρ.
Proof. Here, we view A0, A1, Ir and Jr as matrices over Fq as all entries of those matrices are in Fq. By Theorem 2.1, there exists an invertible matrix P over Fq such that
PA0PT=S⊕O
where S=Ir if A0 has a nonzero diagonal entry, and S=Jr if not. Since replacing GGT by PGGTPT does not change ν(GGT) by Proposition 3.2, we may assume that A0=S⊕O. Let m denote the number of rows of G, and let
A1=(XYTYZ)
where X∈Mr×r(Fq), Y∈Mr×(m−r)(Fq) and Z∈M(m−r)×(m−r)(Fq). Note that for x=x1+ux2∈R, we have x2=(x1+ux2)2=x12. Thus, all diagonal entries of A1 are zero. In particular, the diagonal entries of X are all zero.
Let V be a vector space of symmetric zero diagonal r×r matrices. Define a map
φ:Mr×r(Fq)→V
as
φ(A)=AS+SAT
for A∈Mr×r(Fq). Since S is symmetric, for any A∈Mr×r(Fq), φ(A) is also symmetric. Moreover, since
Since the map A→AS is a vector space isomorphism on Mr×r(Fq), the kernel ker φ has the same dimension as the space of symmetric r×r matrices, whose dimension is known as
2r(r+1).
Therefore,
dim(Imφ)=r2−2r(r+1)=2r(r−1)=dimV.
Thus, φ is surjective. Then, there exists a matrix Q1∈Mr×r(Fq) such that
Q1S+SQ1T=X.
Also, since S is invertible, there is a matrix Q2∈M(m−r)×r(Fq) such that Y=SQ2T. Define U=I+uQ where
Q=(Q1Q2Q3Q4)
for some Q3∈Mr×(m−r)(Fq) and Q4∈M(m−r)×(m−r)(Fq). Now, we view U as a matrix over R. Then we have
Note that the last m−r rows of P form a basis of Rad(A0). Choose N to be the matrix whose rows are precisely these last m−r rows of P. Then NA1NT is the lower right (m−r)×(m−r) submatrix of PA1PT, which is Z. Let N′ be a matrix whose rows form another basis of Rad(A0). Then there is an invertible matrix T∈GLm−r(Fq) such that N′=TN. Then we have
Note that Z is a symmetric zero diagonal matrix, that is, an alternate matrix. Since rankZ=ρ, Z is congruent to Jρ⊕O. Therefore, GGT is congruent to S⊕uJρ⊕O, and by Proposition 3.2, ν(GGT)=ν(S⊕uJρ).
Suppose that Res(C) is not self-orthogonal, but x⋅x=0 for all x∈Res(C). Then A0=O and has zero diagonal. Thus,
ν(GGT)=ν(Jr⊕uJρ)={r+ρ,r+1,ifρ>0,ifρ=0
by Lemma 3.5. Otherwise,
ν(GGT)=ν(Ir⊕uJρ)=r+ρ
by Lemma 3.4. This completes the proof.
4 Shortest self-orthogonal embeddings of linear codes over R with odd characteristic
Throughout this section, we denote R=Fq+uFq for some q=ps, s≥1 where p is an odd prime.
For a linear code C over R with generator matrix G,
pcopies[G∣⋯∣G].
generates a self-orthogonal embedding of C. Therefore, ν(GGT)<∞ also when R has odd characteristic.
For m≥0, define a matrix Km over Fq as
Km=(OImImO).
Let A be any m×m symmetric matrix over Fq. Take
X=[Im∣21A].
Then we have
XKmXT=21A+21AT=A.
Thus, any symmetric matrix A over Fq can be represented as A=XKmXT for some matrix X over Fq and for some m≥1. We define μ(A) as
μ(A)=min{m≥0∣A=XKmXTforsomematrixXoverFq}.
It is straightforward that μ(A)=μ(A⊕O) for any symmetric matrix A over Fq.
Remark 1. Let A and A′ be two congruent symmetric matrices over Fq with q odd. Let A′=PAPT for some invertible matrix P over Fq. If μ(A)=m, then there is a matrix X over Fq such that A=XKmXT. Then we have
A′=PAPT=P(XKmXT)PT=(PX)Km(PX)T.
Thus, μ(A′)≤m=μ(A). Similarly, we have μ(A)≤μ(A′), i.e. μ(A)=μ(A′).
Lemma 4.1. Let A be an invertible symmetric k×k matrix over R such that all entries of A are in Fq with q odd. Then we have
ν(A)={k,k+1,det(−A)∈(Fq×)2,det(−A)∈/(Fq×)2.
Proof. Suppose that ν(A)=m. Then there is a k×m matrix B=B0+uB1 over R such that A+BBT=O. By reducing modulo u, we have A+B0B0T=O over Fq. Conversely, if there is a matrix B′ over Fq such that A+B′(B′)T=O, then by viewing B′ as a matrix over R, we have A+B′(B′)T=O over R. This implies that ν(A)=ν(A). Thus, we regard A as a matrix over Fq.
Note that ν(A)≥k since A is invertible. We first show that ν(A)=k if and only if det(−A)∈(Fq×)2. If m=k, then B0 must be an invertible matrix. Thus,
det(−A)=det(B0)2∈(Fq×)2.
Conversely, let det(−A)∈(Fq×)2. Then by Theorem 2.2, −A is congruent to I. Hence, there is an invertible k×k matrix P such that −A=PPT. Then we have
A+PPT=O,
i.e., ν(A)=k.
Second, we show that if det(−A)∈/(Fq×)2, then ν(A)≤k+1. Choose a∈Fq× such that a⋅det(−A)∈(Fq×)2. Then we have
det((−A)⊕[a])∈(Fq×)2.
Thus (−A)⊕[a] is congruent to Ik+1 and there is P∈GLk+1(Fq) such that
(−A)⊕[a]=PPT.
Let B0 be the matrix consisting of the first k rows of P. Then we have −A=B0B0T, which implies that ν(A)≤k+1. This completes the proof.
Lemma 4.2. Let A be an r×r invertible symmetric matrix over Fq and B be an s×s symmetric matrix over Fq with q odd. Then, by viewing A and B as matrices over R,
ν(A⊕uB)=ν(A⊕Km)
where m=μ(−B).
Proof. We first show that
ν(A⊕uB)≤ν(A⊕Km).
Let ν(A⊕Km)=t. Then there is an (r+2m)×t matrix D over Fq such that
A⊕Km+DDT=O.
Write the rows of D as d1,…,dr,e1,…,em,f1,…,fm. Then we have
for every i,j. Since m=μ(−B), there exist s×m matrices B0,B1 over Fq such that
−B=([B0∣B1])Km([B0∣B1])T=B1B0T+B0B1T.
Define
gi=k=1∑m(B0)ikekandhi=−k=1∑m(B1)ikfk
for 1≤i≤s. Then we have
gihjT+higjT=(B0B1T)ij+(B1B0T)ij=−Bij.
Let D0 be the (r+s)×t matrix over Fq with rows d1,…,dr,g1,…,gs and D1 be the (r+s)×t matrix over Fq with rows 0,…,0,h1,…,hs. Then we have
D0D0T=−A⊕O
and
D0D1T+D1D0T=O⊕(−B).
Therefore,
A⊕uB+(D0+uD1)(D0+uD1)T=O.
It follows that ν(A⊕uB)≤t.
Next, we show that
ν(A⊕Km)≤ν(A⊕uB).
Let ν(A⊕uB)=t′. Then, there is an (r+s)×t′ matrix E=E0+uE1 where all entries of both E0 and E1 are in Fq such that
A⊕uB+EET=A⊕uB+E0E0T+u(E0E1T+E1E0T)=O.(2)
Write the rows of E0 as e1,…,er, f1,…,fs and the rows of E1 as g1,…,gr, h1,…,hs. By reducing Equation 2 modulo u, we have
eiejT=−Aij,eifjT=0andfifjT=0
for every i,j. Let U=span(e1,…,er). It is straightforward that U is non-singular, and fi∈U⊥ for every i. By Equation 2, we have
fihjT+hifjT=−Bij(3)
for every i,j. Since U is non-singular, we have Fqt′=U⊕U⊥. Since fi∈U⊥ for every i, replacing each hi by its U⊥-component does not change Equation 3. Thus, we may assume that hi∈U⊥ for every i.
Let V=span(f1,…,fs) and w be the Witt index of U⊥. Then V is a totally isotropic subspace of U⊥. Let V′ be a maximal totally isotropic subspace of U⊥ which contains V. Let α1,…,αw be a basis of V′. Then there is a w-dimensional totally isotropic subspace W of U⊥ with basis β1,…,βw such that
αiαjT=βiβjT=0,αiβjT=δij
by Theorem 2.3. Since V′⊕W is a non-singular subspace of U⊥, we have
U⊥=(V′⊕W)⊥(V′⊕W)⊥
where (V′⊕W)⊥ is the orthogonal complement of (V′⊕W) in U⊥. Write
where gi∈(V′⊕W)⊥. Note that figjT=0 for every i,j. Then we have
−Bij=fihjT+hifjT=(GHT)ij+(HGT)ij.
It follows that
−B=GHT+HGT=[G∣H]Kw[G∣H]T,
which implies that m≤w. Let E′ be a matrix over Fq with rows
e1,…,er,α1,…,αm,−β1,…,−βm.
Then we have
A⊕Km+E′(E′)T=A⊕Km+(−A⊕−Km)=O.
It follows that ν(A⊕Km)≤t′. This completes the proof.
Theorem 4.3. Let C be a code of length n over R=Fq+uFq with q odd. Let G be a generator matrix of C. Write GGT=A0+uA1 for some matrices A0,A1 over Fq. Let r=rankFq(A0), and let P be an invertible matrix over Fq such that
PA0PT=S⊕O
where S=Ir or S=Ir−1⊕[z] for some z∈Fq×∖(Fq×)2. Write
PA1PT=(XYTYZ)
where X is a r×r symmetric matrix over Fq. Let m=μ(−Z). Then
Proof. First, we note that m is independent to the choice of P by Remark 1. Since replacing GGT by PGGTPT does not change ν(GGT) by Proposition 3.2, we may assume that A0=S⊕O. Let k denote the number of rows of G. Let
Q1=−2XS−1andQ2=−YTS−1.
Define a k×k matrix Q over Fq as
Q=(Q1Q2Q3Q4)
for some matrices Q3 and Q4. Let U=I+uQ. Then we have
5 Construction of shortest self-orthogonal embeddings of linear codes over R
The following theorem shows that every self-orthogonal code over R with nonzero free rank can be viewed as a shortest self-orthogonal embedding of another code.
Theorem 5.1. Let C be a self-orthogonal code of length n over R=Fq+uFq for some prime power q. Let C is of type {k1,k2} where k1>0. For every integer n0 satisfying n−k1≤n0<n, there is a code C0 over R with length n0 whose shortest self-orthogonal embedding is C.
Proof. Let G be the standard generator matrix of C given as
G=(Ik1OAuIk2B1+uB2uD)
where A, B1, B2 and D are matrices over Fq. Let t=n−n0, and choose t columns in the first identity block of G. After coordinate permutation, we write
G=[G0∣B]
where B consists of these t columns. Let C0 be the code generated by G0. Define an R-linear map π:C→C0 as the puncturing of these t coordinates. For c∈C, let π(c)=0, that is, c=(0,c0) for some c0∈Rt. Since the columns of B are distinct standard basis vectors, we have BTB=I, and it follows that
c0=c0BTB=(cGT)B=0.
This implies that π is an isomorphism, and C0 is a code of type {k1,k2}.
We first show that G0 is a generator matrix of C0. Define two maps ΦG:Rk1×Fqk2→C and ΦG0:Rk1×Fqk2→C0, respectively as follows:
ΦG(x,y)=(x,y)GandΦG0(x,y)=(x,y)G0.
Clearly, ΦG is a bijection, and ΦG0=π∘ΦG is also a bijection. Moreover, the last k2 rows of G0 lie in (uR)n0, while its first k1 rows cannot lie in (uR)n0, since otherwise multiplying it by u would yield zero, contradicting the injectivity of ΦG0. Therefore, G0 is a generator matrix of C0, and it follows that C is a self-orthogonal embedding of C0.
Next, we prove the shortestness. Note that
O=GGT=G0G0T+BBT.
Thus rankFq(G0G0T)=rankFq(−BBT)=t. Suppose that [G0∣X] generates a self-orthogonal code. Then we have
Thus, C is a shortest self-orthogonal embedding of C0.
Remark 2. In Theorem 5.1, we assumed that the free rank k1 of a code C satisfies k1>0. If k1=0, then this means that any element of a generator matrix of C is a multiple of u. Then every punctured code of C is also self-orthogonal since a code of free rank zero is self-orthogonal. Consequently, any self-orthogonal code of free rank zero can be obtained as a self-orthogonal embedding of another self-orthogonal code of free rank zero, but not the shortest one. Therefore, we do not consider this case in detail.
Let C be a linear code over R=Fq+uFq with generator matrix G. In Theorem 3.6, for even q, we constructed a congruence between GGT and a matrix of the form S⊕uJρ⊕O, where S is either I or J. In Lemma 3.4 and Lemma 3.5, we explicitly constructed a matrix B having the minimum possible number of columns such that
S⊕uJρ+BBT=O.
In Theorem 4.3, for odd q, we also constructed a congruence between GGT and a matrix of the form S⊕uZ, where Z is as defined in Theorem 4.3. In Lemma 4.1 and Lemma 4.2, we explicitly constructed a matrix B with the minimum number of columns such that
S⊕uZ+BBT=O.
Consequently, these constructions yield an explicit construction of a shortest self-orthogonal embedding of C. In this section, we present an algorithm for obtaining all other shortest self-orthogonal embeddings of C from this particular one.
Let C be a linear code over R=Fq+uFq with generator matrix G. Let GGT=A0+uA1 where A0 and A1 are matrices over Fq. Let B be a k×m matrix over R where k is the number of rows of G and m=ν(GGT), and let B=X+uY where X and Y are matrices over Fq. We assume that m>0. Then the matrix [G∣B] generates a shortest self-orthogonal embedding of C if and only if
O=[G∣B][G∣B]T=(A0+XXT)+u(A1+XYT+YXT).
Therefore, finding a shortest self-orthogonal embedding of C is equivalent to finding a solution (X,Y) to the following system:
XXT=−A0andXYT+YXT=−A1.
For a matrix X∈Mk×m(Fq), let φX:Mk×m(Fq)→Symk(Fq) be the linear map given as
φX(Y)=XYT+YXT.
We define
χm,G={X∈Mk×m(Fq)∣XXT=−A0,andφX−1(−A1)=∅}.
Throughout this section, we fix the code C and retain the notation introduced in Section 3 and Section 4.
Proposition 5.2. For a matrix A∈Mk×m(Fq) for some prime power q, let NA be a matrix whose rows form a basis of ker A. Let M be a k×k symmetric matrix over Fq, and when q is even, assume further that M is alternate. Then there is a matrix B such that φA(B)=M if and only if NAMNAT=O.
Proof. Assume that such a matrix B exists. Then we obtain
NAMNAT=NA(φA(B))NAT=NA(ABT+BAT)NAT=O.
Conversely, assume that NAMNAT=O. Let rank(A)=a, and let U∈GLk(Fq) be a matrix whose last k−a rows form a basis of ker A. Then we have
UMUT=(M1M2TM2O)
for some matrices M1 and M2. Choose T∈Ma(Fq) such that T+TT=M1. Choose a matrix V∈GLm(Fq) such that
Lemma 5.3. Let C be a code over R=Fq+uFq for some prime power q with generator matrix G. Write GGT=A0+uA1 for some matrices A0, A1 over Fq. Let N be a matrix whose rows form a basis of Rad(A0), and let N~=NA1NT. For X∈χm,G, the rank of X is given as
Choose a matrix Y such that φX(Y)=−A1. Let X′=NX and Y′=NY. This gives
−N~=−NA1NT=N(XYT+YXT)NT=(X′(Y′)T+Y′(X′)T)
We first consider the case that q is odd. Let X0 be the matrix whose columns form a basis of the column space of X′ whose dimension is ℓX. Then we can represent X′ as X′=X0E for some matrix E with row rank ℓX. Define Y0=Y′ET. Then we have
−N~=X0Y0T+Y0X0T=[X0∣Y0](KℓX)[X0∣Y0]T,
which implies that μ(−N~)≤ℓX. Since
ℓX≤⌊2m−rank(A0)⌋≤μ(−N~)
by Theorem 4.3, it follows that ℓX=μ(−N~).
Next, suppose that q is even. Then we have
rank(N~)≤rank(X′(Y′)T)+rank(Y′(X′)T)≤2ℓX.
Note that 2ℓX≤m−rank(A0), which is equal to rank(N~) or 1 by Theorem 3.6. If it is equal to 1, then rank(N~) must be zero. Therefore, in either case, we have
ℓX=2rank(N~).
18
☐
Suppose that q is even. In Theorem 3.6, we showed that ns(C)=n+r+1 for a code C of length n over Fq+uFq if the following three conditions hold:
(i) Res(C) is not self-orthogonal,
(ii) for any x∈Res(C), x⋅x=0, and
(iii) ρ=0,
where r and ρ are as defined in Theorem 3.6. We refer to a code satisfying these three conditions as a code of Case I. Otherwise, we refer to it as a code of Case II.
Lemma 5.4. Let C be a code over R=Fq+uFq with q even, and let G be a generator matrix of C. Let 1m be the all-one vector of length m for some m>0. If C is of Case I, then 1m∈/⟨X⟩ for every X∈χm,G. Otherwise, 1m∈⟨X⟩ for every X∈χm,G.
Proof. Let CX=⟨X⟩. By Lemma 5.3, we have
dimCX=rank(A0)+2rank(N~)
where N~=NA1NT and N is a matrix whose rows form a basis of W=Rad(A0). Note that
dimHull(CX)=dimCX−rank(A0)=2rank(N~).
Assume that C is of Case II. Since dimCX⊥=m−dimCX=2rank(N~) and Hull(CX)⊆CX⊥, we have Hull(CX)=CX⊥. For any u∈Hull(CX), we have
(u⋅1m)2=u⋅u=0,
which implies that u⋅1m=0. Therefore, 1m∈Hull(CX)⊥=CX.
Conversely, assume that C is of Case I. Then A0=O is alternate, rank(N~)=0 and m=rank(A0)+1. Then, by Lemma 5.3, dimCX=rank(A0) and Hull(CX)={0}. Since A0 is alternate, for any u=u0X∈CX for some u0∈Fqk, we have
(u⋅1m)2=u⋅u=−u0A0u0T=0,
which implies that u⋅1m=0. Thus, 1m∈CX⊥. Since Hull(CX)={0}, 1m cannot be in CX. This completes the proof.
Let N be the matrix whose rows form a basis of kerPX∗Q=KP. By the definition of ΓX, we have NA1NT=O. Then, by Proposition 5.2, there is a matrix Y such that φPX∗Q(Y)=−A1. Therefore, PX∗Q∈χm,G.
Next, we consider the opposite direction. Take any X∈χm,G. Since rank(X)=rank(X∗) by Lemma 5.3, we have dimkerX=dimkerX∗. Let V be a complement of Rad(A0) in Fqk. Then Fqk=V⊥Rad(A0) and the restriction of A0 to V is nondegenerate. Since kerX,kerX∗⊆Rad(A0) have the same dimension, there is an invertible matrix P∈GLk(Fq) such that
This gives PA0PT=A0. Therefore P∈ΓX, and the map ξ:⟨PX∗⟩→⟨X⟩ defined as
ξ(uPX∗)=uX
is an isometry. Next, we divide the proof into three cases.
First, let q be odd. By Theorem 2.4, ξ extends to an isometry ξ~ on Fqm. Note that there is an orthogonal matrix Q∈Om(Fq) such that ξ~(z)=zQ for every z∈Fqm. Then for any a∈Fqk, we have
aPX∗Q=ξ~(aPX∗)=ξ(aPX∗)=aX,
which gives PX∗Q=X.
Second, let q be even and C be a code of Case I. By Lemma 5.4, all-one vector 1m is contained in neither ⟨PX∗⟩ nor ⟨X⟩. Again, by Theorem 2.4, ξ extends to an isometry ξ~ on Fqm, which implies that PX∗Q=X.
Finally, let q be even and C be a code of Case II. By Lemma 5.4, all-one vector 1m is contained in both ⟨X∗⟩ and ⟨X⟩. Choose c,c∗∈Fqk such that cX=c∗X∗=1m. Then for any a∈Fqk, we have
This gives c−c∗∈Rad(A0). Choose a basis of Fqk=V⊕Rad(A0) such that A0=A0′⊕O for some matrix A0′. Then, we can write c=(c0,z) and c∗=(c0,z∗) for some c0∈V and z,z∗∈Rad(A0). Note that every matrix
P′=(IOBD)
for some invertible matrix D satisfies P′A0(P′)T=A0. If c0=0, then choose D satisfying (kerX)D=kerX∗ and choose B such that c0B=z∗−zD. Otherwise, if c0=0, then take B=O and choose D satisfying (kerX)D=kerX∗ and zD=z∗. Then, in both cases, P′∈ΓX and we have
cP′−c∗=(c0,c0B+zD)−(c0,z∗)=0.
Define an isometry ξ′:⟨P′X∗⟩→⟨X⟩ as ξ′(uP′X∗)=uX for every u∈Fqk. Then we have
ξ′(1m)=ξ′((c∗(P′)−1)P′X∗)=c∗(P′)−1X=cX=1m.
Again, by Theorem 2.4, ξ′ extends to an isometry ξ~′ on Fqm, which implies that P′X∗Q=X. Moreover, an argument similar to that used in (5) shows that P′∈ΓX. This completes the proof.
Remark 3. For P∈ΓX, note that kerPX∗=(kerX∗)P−1 as shown in Theorem 5.5. Let NPX∗ be the matrix whose rows form a basis of kerPX∗. Since (kerPX∗)P=kerX∗, the rows of NPX∗P form a basis of kerX∗. Thus, by choosing a suitable basis of kerX∗, we have
NPX∗P=NX∗
where NX∗ is the matrix whose rows form a basis of ker X∗. Then by the definition of ΓX and by Proposition 5.2, we have
Therefore, by Proposition 5.2, there is a matrix S such that
φPX∗(S)=PA1PT−A1.
For each P∈ΓX, we fix one such matrix and denote it by SP.
Theorem 5.6. Let C be a code over Fq+uFq where q is a prime power. Let G be a generator matrix of C. Suppose that the matrix
G~=[G∣B∗]
generates a shortest self-orthogonal embedding C~ of C, where B∗=X∗+uY∗ for some X∗,Y∗ over Fq. Then, a code C′ is a shortest self-orthogonal embedding of C if and only if it has a generator matrix
G′=[G∣(PX∗+u(PY∗+SP+PH))Q]
where P∈ΓX, H∈kerφX∗ and Q∈Om(Fq).
Proof. Let X′=PX∗ and Y′=PY∗+SP+PH for P∈ΓX, H∈kerφX∗ and Q∈Om(Fq). Then we have
Since the right multiplication by Q∈Om(Fq) preserves these calculations,
G′=[G∣(PX∗+u(PY∗+SP+PH))Q]
generates a shortest self-orthogonal embedding of C.
Conversely, let G′′=[G∣B′′] where B′′=X+uY generates a shortest self-orthogonal embedding of C. By Theorem 5.5, there are P∈ΓX and Q∈Om(Fq) such that X=PX∗Q. Put
Theorem 6.1. Let C be a code of length n over R=Fq+uFq for some prime power q with generator matrix G. Write GGT=A0+uA1 for some matrices A0,A1 over Fq. Let r=rankFq(A0), and let k be the number of rows of G. Then
nℓ(C)=n+k−r.
Proof. We first show that nℓ(C)≥n+k−r. Let nℓ(C)−n=m. Then there is a k×m matrix B=B0+uB1 over R with B0,B1∈Mk×m(Fq) such that GGT+BBT is invertible over R. Note that
(GGT+BBT)=A0+B0B0T
is also invertible over Fq. Then we have
k=rankFq(A0+B0B0T)≤r+rankFq(B0)≤r+m,
which implies
m≥k−r.
Next, we show that nℓ(C)≤n+k−r. Since rankFq(A0)=r, we have
dimRad(A0)=k−r.
Let ur+1,…,uk be a basis of Rad(A0), and extend it to a basis u1,…,uk of Fqk. Let P∈GLk(Fq) be a matrix whose rows are u1,…,uk. Then we have
PA0PT=S⊕O
for some r×r symmetric matrix S over Fq. Suppose that S is not invertible. Then there is a nonzero vector x=(x1,…,xr)∈Fqr such that xS=0. Then we have
0=(x,0,…,0)(S⊕O)=(x,0,…,0)PA0PT.
It follows that (x,0,…,0)P∈Rad(A0). Note that
(x,0,…,0)P∈span(u1,…,ur).
Since (x,0,…,0)P∈span(u1,…,ur)∩Rad(A0), and is nonzero, this is a contradiction. Therefore, S must be invertible.
Thus, A0+DDT is invertible over Fq, and by viewing D as a matrix over R, it follows that GGT+DDT is invertible over R. Hence, we have m≤k−r. This completes the proof.
To prove the characterization of all shortest LCD embeddings in Theorem 6.3, we use the following lemma to calculate the determinant of matrices.
Lemma 6.2 ([30]). Let A, B, C, and D be matrices of sizes n×n, n×m, m×n, and m×m, respectively, over a field F. If det(A)=0, then the determinant det(M) of the matrix
M=[ACBD]
is given by det(M)=det(A)⋅det(D−CA−1B).
Theorem 6.3. Let C be a code over R=Fq+uFq for some prime power q with generator matrix G. Let GGT=A0+uA1 for some A0,A1∈Mk(Fq). Let ℓ=dimRad(A0). Let U be a k×k invertible matrix over Fq whose first ℓ rows form a basis of Rad(A0). Then C~ is a shortest LCD embedding of C if and only if it has a generator matrix
G~=[G∣B]
where
B=U−1(DE)
for D∈GLℓ(R) and some matrix E.
Proof. Note that UA0U
T = O ⊕ S for some invertible matrix S. Let D be an ℓ × ℓ invertible
matrix over R and E be any matrix of corresponding size. Then we have
UG˜G˜TUT = U(GGT + BBT )UT =
D D
T
D E
T
E D
T
E E
T
S
!
.
By Lemma 6.2,
det
G˜G˜T
= det
UG˜G˜TUT
/ det(U)
2
= det
D D
T
det
E E
T
S − (E D
T
)(D D
T
)
−1
(D E
T
)
/ det(U)
2
= det
D D
T
det(S)/ det(U)
2
̸= 0.
Thus, G˜ generates a shortest LCD embedding of C.
Conversely, suppose that G′ = [G | B′
] generates a shortest LCD embedding of C. Let
UB′ =
D′
E′
where the number of rows of D′
is ℓ. Suppose that D′
is not invertible. Choose a nonzero vector
u ∈ F
ℓ
q
such that uD′ = 0. Let u
′ = (u, 0) ∈ F
k
q
. Then
u
′UG′(G′)
TUT = (u, 0)
D′ D′
T
D′ E′
T
E′ D′
T
E′ E′
T
S
!
= O.
Thus, u
′ ∈ ker
UG′(G′)
TUT
which is a contradiction since UG′(G′)
TUT is invertible. Thus
D′ must be an invertible matrix. This completes the proof.
7 Some examples
In this section we provide examples of self-orthogonal and LCD embeddings of codes over R.
Throughout this section, we use the same notation as in Sections 3 to 6.
Examples 7.1 and 7.2 present shortest self-orthogonal embeddings of codes over rings of even
characteristic corresponding to Cases 1 and 2, respectively. Examples 7.3 and 7.4 present shortest
self-orthogonal embeddings over rings of odd characteristic for the cases where (−1)r+m det(S)
is a square and a nonsquare, respectively. Finally, Example 7.5 provides an example of a shortest
LCD embedding. Since the Gray map preserves orthogonality over R = Fq +uFq when q is even,
we consider the Gray images of the codes only in Examples 7.1, 7.2 and 7.5. The optimality of
these codes can be confirmed by [17].
Furthermore, using MAGMA, we enumerate all shortest self-orthogonal and shortest LCD
embeddings of the codes considered in these examples by applying Theorems 5.6 and 6.3, respectively, and provide those having the largest minimum distance.
Example 7.1. Let C be a code of length n = 20 over R = F2 + uF2 with generator matrix
G =
1 0 1 0 1 1 + u 1 0 1 0 0 1 1 + u u u 1 + u 1 + u 0 1 1
1 + u 1 1 0 1 0 0 1 1 1 0 u 1 + u u 0 1 + u 1 0 u 0
0 1 + u 0 1 0 1 0 0 1 0 1 + u u u 1 1 + u u 1 0 1 + u 1
0 0 u 0 1 1 + u 1 1 0 0 1 1 + u 0 1 u 1 + u 1 + u 1 + u 1 1 + u
1 1 1 1 1 1 + u 1 0 1 0 u 1 0 1 + u 1 0 1 1 1 u
1 0 0 0 0 0 1 1 1 0 0 0 u u 1 + u 1 + u 1 + u 1 + u 1 + u 1 + u
0 0 0 0 0 u 0 0 0 u 0 0 0 u 0 0 u 0 u u
u 0 0 0 0 0 0 u 0 0 u u 0 0 0 u 0 0 u 0
.
24
The code C is of type {6,2} with minimum distance 6. Let ϕ:R20→F240 be the Gray map. Then ϕ(C) is a [40,14,12] code over F2.
Let GGT=A0+uA1 for A0,A1∈M8×8(F2). Then A0 is given as
Let Aˉ0 be the matrix obtained by reducing the top-left 6×6 submatrix of A0 modulo u. Since Aˉ0 is nonzero and all its diagonal entries are zero, Res(C) is an even code that is not self-orthogonal.
Since the bottom-right 2×2 submatrix of UGGTUT is the zero matrix, we have ρ=0. So, the code C is a code of Case I and by Theorem 3.6, the length of a shortest self-orthogonal embedding of C is given as
ns(C)=n+rankFq(A0)+1=20+6+1=27.
Following the construction given in the proof of Lemma 3.5, choose the matrix B~ as
The minimum distance of C~ is 10, and we have checked that this is the largest minimum distance among all shortest self-orthogonal embeddings of C. Moreover, ϕ maps C~ into a [54, 14, 20] code over F2 which is an optimal self-orthogonal code.
Example 7.2. Let C be a code of length n = 22 over R=F2+uF2 with generator matrix
Let Aˉ0 be the matrix obtained by reducing the top-left 6×6 submatrix of A0 modulo u. Since Aˉ0 has a nonzero diagonal entry, Res(C) is not an even code.
Since the bottom-right 3×3 submatrix of UGGTUT is the zero matrix, we have ρ=0. So, by Theorem 3.6, the length of a shortest self-orthogonal embedding of C is given as
ns(C)=n+rankFq(A0)+ρ=22+5+0=27.
Choose the matrix B~ as
B~=[I5O3×5].
Since I5⊕uO3+B~B~T=O, the code generated by
[G∣U−1B~]
generates a shortest self-orthogonal embedding C′ of C, and its minimum distance is 8. Also, ϕ(C′) is a [54, 14, 16] code over F2.
The minimum distance of C~ is 10, and we have checked that this is the largest minimum distance among all shortest self-orthogonal embeddings of C. Moreover, ϕ maps C~ into a [54, 14, 20] code over F2 which is an optimal self-orthogonal code. In particular, the shortest self-orthogonal embeddings attaining the largest possible minimum distance for the codes in Examples 7.1 and 7.2 coincide.
Example 7.3. Let C be a code of length n = 23 over R=F3+uF3 with generator matrix
generates a shortest self-orthogonal embedding of C, and its minimum distance is 9. We have checked that this is the largest minimum distance among all shortest self-orthogonal embeddings of C.
Example 7.4. Let C be a code of length n = 22 over R=F3+uF3 with generator matrix
The minimum distance of C~ is 10, and we have checked that this is the largest minimum distance among all shortest self-orthogonal embeddings of C.
Example 7.5. Let C be a code of length n = 8 over R=F2+uF2 with generator matrix
G=10001000111+u1+uu11+uu1+u001+uu11u.
The code C is of type {3,0} with minimum distance 3. Let ϕ:R8→F216 be the Gray map. Then ϕ(C) is a [16,6,6] code over F2.
Let GGT=A0+uA1 for A0,A1∈M3×3(F2). Then
A0=101000101.
Thus, the length of a shortest LCD embedding of C is given as
nℓ(C)=n+k−rankFq(A0)=8+3−1=10
by Theorem 6.1.
Take a matrix U as
U=010100011.
Then the first two rows of U form a basis of Rad(A0). Let
D=[u1+u1+u1+u]∈GL2(R)andE=[1+uu].
Define
B=U−1[DE]=0u1+u11+uu.
By Theorem 6.3, the code C~ generated by [G∣B] is a shortest LCD embedding of C, and its minimum distance is 4. We have checked that this is the largest minimum distance among all shortest LCD embeddings of C. Furthermore, ϕ maps C~ into a [20,6,8] code over F2 which is an optimal LCD code.
8 Conclusion
In this paper, we determined the exact lengths of shortest self-orthogonal and LCD embeddings of linear codes over R=Fq+uFq. For shortest self-orthogonal embeddings, we obtained complete results covering two cases in each of even and odd characteristic and developed a method for constructing all shortest embeddings. We illustrated the four cases with examples, enumerated all shortest self-orthogonal embeddings in each example, and identified one with the largest minimum distance. Moreover, in some of these examples, the Gray images of the selected embeddings are optimal codes over Fq. We also characterized all shortest LCD embeddings by showing that they can be obtained by appending an arbitrary invertible matrix together with an arbitrary matrix of prescribed sizes to a generator matrix of the given code. We applied this characterization to enumerate all shortest LCD embeddings in an example and identify one having the largest minimum distance.
The embeddings considered in this paper may change the type of the original code. Therefore, a natural direction for future research is to investigate shortest embedding problems over rings under the additional requirement that the type of the original code be preserved.
Acknowledgement
This research (J.-L. Kim) was supported in part by the BK21 FOUR (Fostering Outstanding Universities for Research) funded by the Ministry of Education (MOE, Korea), National Research Foundation of Korea (NRF) under Grant No. 4120240415042, National Research Foundation of Korea under Grant No. RS-2024-NR121331, and by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science and ICT under Grant No. RS-2025-24534992 and Global - Learning & Academic research institution for Master's-PhD students, and Postdocs(LAMP) Program of the National Research Foundation of Korea(NRF) grant funded by the Ministry of Education(No. RS-2024-00441954).
References
[1] T. Abualrub and I. Siap, Cyclic codes over the rings Z2+uZ2 and Z2+uZ2+u2Z2, Des. Codes Cryptogr., 42 : 273–287, 2007.
[2] A. A. Albert, Symmetric and alternate matrices in an arbitrary field, I, Trans. Amer. Math. Soc., 43(3): 386–436, 1938.
[3] J. An, J.-H. Hong, J.-L. Kim and H. Lim, Shortest LCD embeddings of binary, ternary and quaternary linear codes, Adv. Math. Commun., 25: 192–202, 2026.
[4] J. An, N. Kaplan, J.-L. Kim, J. Luo and G. Wang, Shortest self-orthogonal embeddings of binary linear codes, arXiv:2511.05440, 2025.
[5] J. An, J.-L. Kim and S. Ling, Embedding linear codes over Z4 into self-orthogonal codes, arXiv:2606.08964, 2026.
[6] C. Bachoc, Applications of Coding Theory to the Construction of Modular Lattices, J. Combin. Theory Ser. A, 78(1): 92–119, 1997.
[7] S. Bhowmick, A. Fotue-Tabue, E. Martínez-Moro, R. Bandi and S. Bagchi, Do non-free LCD codes over finite commutative Frobenius rings exist? Des. Codes Cryptogr., 88: 825–840, 2020.
[8] A. Bonnecaze and P. Udaya, Cyclic codes and self-dual codes over F2+uF2, IEEE Trans. Inform. Theory, 45(4): 1250–1255, 1999.
[9] H. Q. Dinh, Constacyclic codes of length 2s over Galois extension rings of F2+uF2, IEEE Trans. Inform. Theory, 55(4): 1730–1740, 2009.
[10] H. Q. Dinh, Constacyclic codes of length ps over Fpm+uFpm, J. Algebra, 324(5): 940–950, 2010.
[11] H. Q. Dinh, B. T. Nguyen, A. K. Singh and S. Sriboonchitta, Hamming and symbol-pair distances of repeated-root constacyclic codes of prime power lengths over Fpm+uFpm, IEEE Commun. Lett., 22(12): 2400–2403, 2018.
[12] H. Q. Dinh, B. T. Nguyen, A. K. Singh and W. Yamaka, MDS constacyclic codes and MDS symbol-pair constacyclic codes, IEEE Access, 9: 137970–137990, 2021.
[13] S. T. Dougherty, P. Gaborit, M. Harada, A. Munemasa and P. Solé, Type IV self-dual codes over rings, IEEE Trans. Inform. Theory, 45(7): 2345–2360, 1999.
[14] S. T. Dougherty, P. Gaborit, M. Harada and P. Solé, Type II codes over F2+uF2, IEEE Trans. Inform. Theory, 45(1): 32–45, 1999.
[15] G. D. Forney Jr, N. J. A. Sloane and M. D. Trott, The Nordstrom-Robinson code is the binary image of the octacode, Coding and Quantization: DIMACS/IEEE workshop, Amer. Math. Soc., 1992.
[16] P. Gaborit, Mass formulas for self-dual codes over Z4 and Fq+uFq rings, IEEE Trans. Inform. Theory, 42(4): 1222–1228, 1996.
[17] M. Grassl, Bounds on the minimum distance of linear codes and quantum codes. Online available at https://www.codetables.de. Accessed on 2026-08-26.
[18] J. Grout, The minimum rank problem over finite fields, Electron. J. Linear Algebra, 20: 673–698, 2010.
[19] A. R. Hammons Jr, P. V. Kumar, A. R. Calderbank, N. J. A. Sloane and P. Sôle, The Z4-linearity of Kerdock, Preparata, Goethals and related codes, IEEE Trans. Inform. Theory, 40(2): 301–319, 1994.
[20] W. C. Huffman, On the decomposition of self-dual codes over F2+uF2 with an automorphism of odd prime order, Finite Fields Appl. 13(3): 681–712, 2007.
[21] W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes, Cambridge University Press, Cambridge, 2003.
[22] J.-L. Kim and W.-H. Choi, Self-orthogonality matrix and Reed-Muller codes, IEEE Trans. Inform. Theory, 68(11): 7159–7164, 2022.
[23] J.-L. Kim, Y.-H. Kim and N. Lee, Embedding linear codes into self-orthogonal codes and their optimal minimum distances, IEEE Trans. Inform. Theory, 67(6): 3701–3707, 2021.
[24] T. Y. Lam, Introduction to Quadratic Forms over Fields, American Mathematical Society, Providence, RI, 2005.
[25] S. Ling and P. Solé, Duadic codes over F2+uF2, Appl. Algebra Engrg. Comm. Comput., 12: 365–379, 2001.
[26] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes. North-Holland, London, 1977.
[27] V. Pless, On Witt's Theorem for nonalternating symmetric bilinear forms over a field of characteristic 2, Proc. Amer. Math. Soc., 15: 979–983, 1964.
[28] P. Udaya and A. Bonnecaze, Decoding of cyclic codes over F2+uF2, IEEE Trans. Inform. Theory, 45(6): 2148–2157, 1999.
[29] J. Wang and J. Luo, Shortest Embeddings of Linear Codes with Arbitrary Hull Dimension, arXiv:2604.08843, 2026.
[30] F. Zhang. The Schur complement and its applications. Springer Science Business Media, New York, 2005.