Generalized Weights of Codes over Rings
and Invariants of Monomial Ideals
Abstract
We develop an algebraic theory of supports for -linear codes of fixed length, where is a finite commutative unitary ring. A support naturally induces a notion of generalized weights and allows one to associate a monomial ideal to a code. Our main result states that, under suitable assumptions, the generalized weights of a code can be obtained from the graded Betti numbers of its associated monomial ideal. In the case of -linear codes endowed with the Hamming metric, the ideal coincides with the Stanley-Reisner ideal of the matroid associated to the code via its parity-check matrix. In this special setting, we recover the known result that the generalized weights of an -linear code can be obtained from the graded Betti numbers of the ideal of the matroid associated to the code. We also study subcodes and codewords of minimal support in a code, proving that a large class of -linear codes is generated by its codewords of minimal support.
Introduction
In the past seventy years, much effort has been devoted to the study of algebraic and combinatorial objects associated to linear error-correcting codes. Of particular interest is the matroid associated to a linear code via its parity-check matrix, whose circuits are the minimal Hamming supports of the codewords. Many central results in classical coding theory, including the celebrated MacWilliams identities, their generalizations, and the duality between puncturing and shortening can be elegantly obtained via this correspondence; see e.g. [2, 3, 4, 11] and the references therein.
The matroid associated to a linear code via its parity check matrix retains a wealth of information about the structure of the code, including its length, dimension, minimum distance, weight distribution, and generalized weights. Moreover, the weight enumerator is determined by the Tutte polynomial of the matroid, see [8]. In addition, in [10] it is shown that the code’s generalized weights are determined by the graded Betti numbers of the Stanley-Reisner ideal of the matroid. The approach of [10] heavily relies on matroid theory and on the properties of the Hamming support.
In this paper, we depart from the classical theory of linear codes over a finite field and consider instead -linear codes , where is a finite commutative unitary ring. We start by proposing a general definition of support as a function that enjoys a few natural properties. This naturally extends the notion of Hamming support traditionally studied in coding theory [12, page 177]. We give several examples of supports and operations to construct new supports from old. We define the support of a code as the join of the supports of its elements.
We then define the generalized weights of a code via the supports of its subcodes. Moreover, we identify a class of supports under which the algebra of the module is compatible with the combinatorics of the poset with the product order. We call these supports modular and establish some of their structural properties. As one might expect, the Hamming support is an example of a modular support.
Most of the paper is devoted the study of codes endowed with modular supports. We characterize their minimal codewords and prove that, if is a principal ideal ring, then their generalized weights are attained by subcodes that are minimally generated by codewords of minimal support in . We also provide evidence in various examples that our results do not extend to support functions that are not modular.
The centerpiece of this paper is a result connecting the theory of modular supports with invariants of monomial ideals. We associate a monomial ideal to a code via the supports of its codewords. Under this correspondence, inclusion of supports translates into divisibility among monomials. In Theorem 4.4 we prove that, under suitable assumptions, the generalized weights of an -linear code endowed with a modular support are determined by the graded Betti numbers of the associated monomial ideal. This generalizes a result of [10], with a stand-alone proof that does not rely on matroid theory.
We conclude the paper with a series of observations on the Hamming support. We review known results in the light of our contribution, such as the fact that every -linear code is generated by its codewords of minimal support. We also show that the same is true for those of maximal support, provided that is sufficiently large (and false in general for binary codes).
Outline.
In Section 1 we define -linear codes and review some algebra results about finite commutative rings and finite local rings. In Section 2 we define (modular) supports and generalized weights, establishing their main properties. Codewords and subcodes of minimal supports are studied in Section 3. In Section 4 we associate a monomial ideal to a code. Moreover, we prove that the generalized weights of the code are determined by the graded Betti numbers of the corresponding ideal. We study the Hamming support in Section 5.
Acknowledgements.
We are grateful to Maria Evelina Rossi for suggesting Example 1.12.
1 Codes and minimal systems of generators
In this section we introduce codes over finite commutative rings and describe some properties of their systems of generators.
Notation 1.1.
Throughout the paper and denote positive integers and is a finite commutative ring. All rings in this paper are unitary with . We denote by the set of natural numbers. For we let .
A classical theorem in commutative algebra states that every finite commutative ring is isomorphic to a finite product of finite local rings. We forget the isomorphism and write
(1.1) |
where are finite local rings. For , let be the maximal ideal of and let be the Jacobson radical of . Recall that the Jacobson radical of a commutative ring is the intersection of all maximal ideals of , equivalently
It is easy to check that in our situation
If is a finite principal ideal ring, then each is a finite chain ring. For , let . Then , where . In particular, if is a product of finite fields, then for and . If , then and is the only maximal ideal of .
We denote by a local ring with maximal ideal . If is a finite local ring, then is a finite field.
In this paper we consider codes of fixed length over the alphabet . All of our codes are assumed to be linear over .
Definition 1.2.
An -linear code, or simply a code, is an -submodule . The elements of are called codewords. A subcode of is an -submodule .
Denote by the element of which corresponds to , where the one appears in the th component. From the decomposition in (1.1) one has
In the sequel, for we denote by the standard projection on the th coordinate.
Let be a code. For any , with , one has
Hence, up to isomorphism, can be uniquely written as
(1.2) |
where for all . We often consider codes . Recall that
Then
Since is an -module annihilated by , it is an -module. Hence, if is a local ring, then is a vector space over .
For a code, we also consider the socle
The socle of is a the largest subcode of which is annihilated by . In particular, if is a local ring, then is an -vector space.
A minimal system of generators of a code is a subset of whose elements generate and which is minimal with respect to inclusion. Notice that any system of generators of a code contains a minimal system of generators of .
Definition 1.3.
We denote by the least cardinality of a system of generators of a code , with by convention. For a code as in (1.2), let
Example 1.4.
Let , with a finite local ring for . Then
Clearly for every code . If is a finite local ring, all minimal systems of generators of a code have the same cardinality . This is a consequence of the next lemma, which summarizes some well-known properties of systems of generators of modules over local rings; see e.g. [13, Theorem 2.3].
Theorem 1.5.
Let be a local ring and let be an -module. The elements are a minimal system of generators of if and only if the equivalence classes are an -basis of the vector space . In particular, every minimal system of generators of has cardinality .
Over an arbitrary , however, not all minimal system of generators of a code have the same cardinality.
Example 1.6.
Let and . Then . Moreover, and . Hence and is a minimal system of generators of of cardinality .
Notation 1.7.
Let be a code and let
In particular, is the set of codes which have a minimal system of generators of cardinality .
One can show that is the largest cardinality of a minimal system of generators of .
Theorem 1.8.
If , then there exist minimal generators of with the property that
is a minimal system of generators of with . Moreover
and any minimal system of generators of of cardinality has the same form as .
Proof.
Let be a minimal system of generators of . Let . Observe that for all and and for all . This proves that the set generates . Moreover, the set generates for any .
Fix . If do not form a minimal system of generators of , suppose up to reindexing that do, for some . For , write for some . Let for , for . Then are a minimal system of generators of with the property that are a minimal system of generators of and . Notice that only the th coordinate of was affected by this operation, hence for all if . Performing this operation for all produces a minimal system of generators of with the property that the set is a minimal system of generators of . Moreover, for , is a minimal system of generators of . Since , for each there must be at least a such that . This proves that .
To prove the last part of the statement, let Since has a minimal system of generators , by the first part of the statement is a minimal system of generators of of . Therefore, for each there is exactly one with . Moreover, is a minimal system of generators of for , hence it has cardinality by Theorem 1.5. It follows that . ∎
We conclude the section with a few elementary properties of .
Proposition 1.9.
Let be a finite commutative ring and let be codes. Then
and equality holds if and only if .
Proof.
Notice that one may have with . Some examples of this arise for instance from the fact that, over a principal ideal ring (PIR in the sequel), the value of does not change when replacing with its socle. We will use this fact repeatedly throughout the paper.
Proposition 1.10.
Let be a finite PIR and let be a code. Then
Proof.
We may assume without loss of generality that is a finite chain ring. Indeed, if the result is true for finite chain rings, then write as a product of finite chain rings and , where is a code for . We have
where the last equality follows from
In order to prove that for and a finite chain ring, observe that is principal and
(1.3) |
where the first and last equalities follow from Theorem 1.5. The short exact sequence
induces an isomorphism , which proves the central equality in (1.3). ∎
The statement of Proposition 1.10 also holds when and is a product of finite Gorenstein local rings.
Example 1.11.
Write and suppose that each is a finite Gorenstein local ring. Suppose first that , i.e. is a Gorenstein local ring with maximal ideal . We have the following isomorphisms of -vector spaces
where the central isomorphism follows from the definition of a Gorenstein local ring. Then by Theorem 1.5.
For general , one has
Moreover, , hence
It follows from the previous case () that
for all
The argument of Example 1.11 also shows that, if the equality in Proposition 1.10 holds for , for a finite local ring, then must be Gorenstein. However, Proposition 1.10 is not true in general over finite Gorenstein local rings. The next example illustrating this was suggested to us by Maria Evelina Rossi.
Example 1.12.
Let . Then is a finite local ring with maximal ideal . Let . Then , but .
2 Supports and generalized weights
In this section we develop an algebraic theory of supports over a finite commutative ring . We propose a general definition of support as a map , which naturally induces a notion of generalized weights for codes . This extends the notion of generalized Hamming weights for codes that are linear over a finite field . We establish some properties of support functions and generalized weights. We also define a family of supports, the modular supports, whose associated generalized weights will be studied in the next sections.
Notation 2.1.
In the sequel, is an integer. For write if for all . Then is a (poset) lattice. The meet of is the element given by for all . The join of , denoted by , is for all . For , we let .
Definition 2.2.
A support on is a function with the following properties.
-
(P1)
if and only if .
-
(P2)
for all and .
-
(P3)
for all .
A support function satisfies the following additional properties.
Lemma 2.3.
Let be a support. The following hold.
-
(P4)
If and is a unit, then .
-
(P5)
If and satisfy and , then .
-
(P6)
If and satisfy , then .
Proof.
A support naturally induces a weight function .
Definition 2.4.
The weight of is . The minimum weight and maximum weight of a code are, respectively,
Notice that the function has indeed the properties of a weight, since for all , if and only if , and for all . In addition, the weight satisfies for all and and for invertible and .
We give some examples of support functions. Many others can be obtained by applying Proposition 2.7 to these examples.
Example 2.5.
-
(1)
The function defined by , , , and is a support.
-
(2)
Let a be finite ring and let be a chain of ideals of . For , let . Extend coordinatewise to . It can be checked that is a support, called the chain support on , see [15, Example 26].
-
(3)
Let be a finite chain ring. The chain support associated to the full chain of ideals of is the chain ring support on .
-
(4)
If is a finite field, the chain ring support coincides with the Hamming support , given by if and if . See [12] for a general reference on Hamming-metric codes.
-
(5)
In his master thesis [5], written under the direction of J. Rosenthal and V. Weger, N. Gassner introduces the -adic weight and distance on , where is prime and . The -adic weight on induces the same partition as the weight associated to the chain ring support of .
Not all the supports studied in the coding theory literature are supports according to Definition 2.2.
Example 2.6.
In the next proposition we list some simple operations that allow one to construct new supports from known ones. The proof is straightforward and left to the reader.
Proposition 2.7.
-
(1)
Let be a function and let be a permutation of the coordinates. Then is a support if and only if is a support.
-
(2)
Let be functions, . Let and . Let
Then is a support if and only if are supports.
-
(3)
Let , , be a function. Let , , and define
Then is a support if and only if is.
-
(4)
Let , . For , let
Then is a support if and only if is.
-
(5)
Let , , be a support and let . Assume that there are no and such that , where appears in the th entry. Then
is a support.
-
(6)
Let be a function, . For , let
Then is a support if and only if is.
-
(7)
Let be a support and let be an injective -linear map. Then is a support.
-
(8)
Let be supports, . Then is a support.
Similarly to the situation of linear codes endowed with the Hamming support, a support function over a finite commutative ring induces a notion of support of a code. In turn, this allows us to define generalized weights for -linear codes.
Definition 2.8.
The support of a code is
Notice that the support of a code is determined by the supports of the vectors in any system of generators. More precisely, let . Since, by Definition 2.2,
for any , we have
(2.1) |
Moreover, if , then by definition .
Example 2.9.
Definition 2.10.
For , the -th generalized weight of is the integer
We also set
It follows from Theorem 1.8 that for we have . Hence is well-defined.
Remark 2.11.
For one has
Indeed, let and let . Then there exists a such that and .
In the next lemma we collect a few easy consequences of Definition 2.10.
Lemma 2.12.
Let be codes. The following hold.
-
(1)
.
-
(2)
for .
-
(3)
for .
-
(4)
for .
Proof.
By Property (P2) one has for any . Hence (1) follows, thanks to Remark 2.11. Part (2) holds since every subcode of is also a subcode of . Part (3) follows from observing that is the minimum of the function for ranging over the set and passing from to we minimize over a subset. In order to prove (4), let and . Then by Theorem 1.8. Therefore, if for some , then and . Since every belongs to , then . Therefore
We now show how the structure of supports relate to the decomposition of in (1.1).
Proposition 2.13.
Let be a support. Then for any we have
where is as support defined via for all .
Proof.
It is easy to check that is well-defined and is a support for all . One has , hence . Furthermore,
It follows that , as desired. ∎
Remark 2.14.
When is a finite chain ring, support functions on have a simple description. To see this, let be a generator of the maximal ideal of and let . Let be supports. Then if and only if for . Indeed, every element of is of the form where is a unit and , and . Therefore, a support corresponds to a set of vectors with the property that . The correspondence is determined by setting for all . In particular, any support on induces the same partition as a chain support.
2.1 Modular Supports
In this subsection we define and study a class of supports whose structure is closely related to the -module structure of , and that we therefore call modular. This paper is primarily devoted to the study of generalized weights associated to modular supports.
Definition 2.15.
A support is modular if it satisfies the following:
-
(P)
If and satisfy , then there exists such that .
Remark 2.16.
By repeatedly applying Property (P), one obtains the following equivalent property: If and satisfy , then there exists such that .
As for supports, one can easily produce new modular supports from known ones.
Proposition 2.17.
Let be a support. Following the notation and numbering of Proposition 2.7, we have:
-
(1)
is modular if and only if is modular;
-
(2)
are modular if and only if is modular;
-
(3)
is modular if and only if is modular;
-
(4)
is modular if and only if is modular;
-
(5)
if is modular, then is modular;
-
(6)
is modular if and only if is modular;
-
(7)
if is modular, then is modular;
-
(8)
if are modular, then is modular.
Several, but not all, of the supports that we have encountered so far are modular.
Example 2.18.
The Hamming support is an example of modular support.
Example 2.19.
Example 2.20.
The supports of Remark 2.14 are modular if and only if for all distinct and .
We now give more examples of supports which are not modular.
Example 2.21.
Let and let be defined by
Then is a support which is not modular.
Example 2.22.
The chain support on associated with the chain is not modular. Indeed, and , but there is no with .
The next result shows that every modular support over a finite commutative ring decomposes as a product of modular supports over finite local rings.
Theorem 2.23.
Let be a finite commutative ring and let be a modular support. Up to a permutation of the coordinates of we have where for and are integers with . Moreover, is a modular support for all .
Proof.
For , write with . By Proposition 2.13 we have
where is a support defined via , . We claim that for each there is at most one such that for some . Indeed, assume towards a contradiction that there exist and such that . Without loss of generality we may assume that . By Property (P) there exists such that
where the equality follows from Proposition 2.13. This a contradiction, establishing the claim.
We have shown that for each there exists at most one for which is not the zero function. In other words, the supports of the images of the functions are disjoint. Up to permuting the coordinates of , one may assume that is supported on the first coordinates, on the next ,…, and on the last . Therefore one may regard each as a function which takes values in . Then and each is a modular support by Proposition 2.7(2) and Proposition 2.17(2). ∎
By combining Remark 2.14 with Theorem 2.23, support functions on a principal ideal ring can be easily characterized as follows.
Corollary 2.24.
Let be a finite principal ideal ring and let be a modular support. By the Zariski-Samuel Theorem, where are finite chain rings. For each , let be a generator of the maximal ideal of and let . Then there exist such that and , where for . Let for and . Then for , , .
Conversely, any set of vectors such that for and defines a support on via for , and invertible. Moreover, if for , , and , then is modular.
The following is a reformulation of Property (P) for elements of .
Corollary 2.25.
Assume that is modular. If and satisfy and , then there exists a unit with .
Proof.
By Theorem 2.23 we may assume without loss of generality that is a finite local ring. Indeed, let be such that is not identically zero and suppose that for some invertible, then is invertible and satisfies .
Assume now that is a finite local ring. If , then by Property (P) there is such that . If , then , hence , contradicting the assumption in the statement. Therefore is invertible. Similarly, if , then there exists invertible such that . ∎
3 Codewords and subcodes of minimal support
In this section we study the codewords and subcodes of minimal support of an -linear code endowed with a modular support. In particular, we establish some properties of the systems of generators of subcodes of minimal support. This allows us to derive properties of the generalized weights, such as monotonicity and a generalization of the Singleton bound.
In the sequel, we follow the notation of the previous sections and let be a modular support. The minimal codewords of a code play a central role in our work. They are defined as follows.
Definition 3.1.
Let be a code. We say that is minimal in if its support is minimal among the supports of the elements of . We denote by the set of minimal codewords of .
Remark 3.2.
By definition, has no minimal codewords, i.e., .
We start by observing that a modular support that takes values in allows us to associate a matroid to a code . More precisely, the minimal ones among the supports of the codewords of are the circuits of a matroid. This generalizes the well-known fact that one may associate to a linear block-code the matroid represented by its parity-check matrix, whose circuits correspond to the minimal supports of the nonzero codewords of with respect to the Hamming weight.
Theorem 3.3.
Let be a finite commutative ring and let be a modular support. Let be a code. Then the elements of the set
are the circuits of a matroid.
Proof.
If a support takes values in , then the support of a vector can be naturally identified with a subset of . In order to show that is the set of circuits of a matroid, we check the circuit axioms as stated in [14, page 9].
Properties (C1) and (C2) are immediate to verify. To see that Property (C3) holds, suppose that , that , and that . By repeatedly applying Property (P) and up to exchanging the role of and , one sees that there exists with . We claim that . Indeed, if then we would have . Since is minimal by assumption and , it must be that , a contradiction.
Since , we have . Fix with , . We have
(3.1) |
Moreover, . This establishes Property (C3). ∎
We start our study of the minimal codewords by showing that the minimal codewords of a code coincide with those of its socle. We also show that the minimal codewords are determined by their support, up to multiplication by a unit.
Theorem 3.4.
Let be a code and assume that is modular. The following hold.
-
(1)
The set of minimal codewords of is
-
(2)
In particular,
-
(3)
If are minimal codewords with , then for some invertible .
Proof.
-
(1)
By Theorem 2.23, up to a permutation of the coordinates of , decomposes as a product , where each is a modular support. Let and with . Then , hence . In particular, for all , hence for all . Therefore, and . This proves the equality in the statement.
Suppose now that is a finite local ring and . If is such that , then . Since is modular, there exists such that , hence by the minimality of . Hence . This shows that , hence . Therefore, , which proves the second inclusion.
The inclusion follows from the fact that .
-
(2)
This follows from part (1), since implies
where the equality follows from part (1). Conversely, if , then there exists such that . Since by part (1), then and .
-
(3)
Since is modular, there exists such that . By the minimality of , , hence . Exchanging the roles of and one sees that there exists such that . Therefore, , so . By part (1), for some and . Since , then , hence is invertible. Let . Then and is invertible. ∎
Theorem 3.4 implies that a code generated by its minimal codewords must be a subcode of . In the next theorem we prove that every subcode of is generated by its minimal codewords.
Theorem 3.5.
Let be a code and assume that is modular. Then has a minimal system of generators consisting of codewords that are minimal in . Moreover, every minimal system of generators of consisting of minimal codewords has the same cardinality . In particular, has a minimal system of generators consisting of minimal codewords if and only if . If this is the case, then every such minimal system of generators has cardinality .
Proof.
By Theorem 3.4(2) we have . Let . Since every system of generators of contains a minimal one, in order to show that has a minimal system of generators consisting of minimal codewords, it suffices to show that the elements of generate .
Let and suppose by contradiction that is a codeword of minimal support among those in the set . Since , then there is a such that . Let such that . By Theorem 3.4(1), for some and . By Property (P) there exists such that . Since
(3.2) |
then . Indeed, implies that . Hence, if , then , contradictiong equation (3.2). Let . Then is invertible and
Then , hence by the minimality of among the supports of elements of we have that . Since is invertible, this implies that , which contradicts the assumption that .
In order to prove that every minimal system of generators of consisting of minimal codewords has cardinality , write . By Theorem 3.4(1), every minimal codeword of satisfies for some . Therefore, each minimal system of generators of consisting of minimal codewords is the union for of minimal systems of generators of . Since is a finite local ring, the cardinality of any minimal system of generators of is by Theorem 1.5. Therefore, the cardinality of a minimal system of generators of consisting of minimal codewords is . ∎
We stress that not every minimal system of generators of a code consists of minimal codewords.
Example 3.6.
The element is not an element of minimal support in . However, are elements of minimal support that generate . Here , , and .
The following property of minimal codewords will be needed in the next proposition.
Lemma 3.7.
Let be a modular support on . Let be a code and let with . Then there exists with and .
Proof.
Write . By Theorem 2.23, we may assume without loss of generality that is a finite local ring. Indeed, if and for some , then has and . If and , then , therefore
and . Moreover, as .
We now prove that modularity allows us to produce minimal system of generators of submodules of , whose supports have a shape which is reminiscent of the rows of a matrix in reduced row-echelon form.
Proposition 3.8.
Let and let . If is modular, then has a minimal system of generators such that for all there exists with and for all .
Proof.
Any system of generators with the required property is minimal, since for all
We prove that has such a system of generators by induction on . The statement is trivial if . Hence assume and fix a minimal system of generators of . Up to permuting the entries in the supports, we may assume without loss of generality that . By Corollary 2.25 there exist with for all . Let for and observe that is generated by . Moreover, for all by Lemma 2.3(P6). We apply the induction hypothesis to the code , obtaining a system of generators of such that for all there exists with and for . By Corollary 2.25 we find with for . Finally, let and set . By parts (P5) and (P6) of Lemma 2.3 we have and for . In addition, is a system of generators of , since is. ∎
The proposition also implies that the codomain of a modular support cannot be too small.
Corollary 3.9.
If is modular, then . In particular, if is a PIR or , then .
Proof.
Understanding the subcodes of generated by minimal codewords allows us to prove that the generalized of weights of are attained by subcodes of . In particular, and its socle have the same generalized weights.
Proposition 3.10.
Let be a PIR. Suppose that is modular and let be a code. Let and , , be such that . Then for some and In particular,
Proof.
In particular, this allows us to determine the last generalized weight of .
Corollary 3.11.
Let be a code and be a modular support. Assume that either or is a PIR. Then
Proof.
We claim that and . This is clear if , since . If is a PIR, the claim follows from Proposition 1.10 and Proposition 3.10.
By Proposition 1.9, for every and the only subcode with is . Therefore
For a given code, we can produce subcodes that attain its generalized weights and that are minimally generated by a set of minimal codewords, whose supports have the same reduced shape as in Proposition 3.8. This technical result plays a crucial role in the proof of Theorem 4.4.
Theorem 3.12.
Let be a code and let be a modular support. Assume that either or is a PIR. Then, for all , there exists a subcode such that:
-
1.
,
-
2.
has a minimal system of generators such that for all . Moreover
Proof.
If , then let such that , , and . If is a PIR, then by Proposition 3.10 there exist and such that and . In both cases, by Proposition 3.8, has a minimal system of generators with the following property: For all there exists with and for . By Lemma 3.7, for all there exists with and . In particular, for . Let . Notice that , since for all . Moreover,
Therefore . ∎
Notation 3.13.
Let be a code and let . We let
Theorem 3.12 shows that for all there exists such that . In particular, we have shown the following.
Corollary 3.14.
Let be a code and let be a modular support. Assume that either or is a PIR. The following quantities are equal to the -th generalized weight , for any :
-
1.
,
-
2.
,
-
3.
,
-
4.
Proof.
Equality between and 1. holds by definition. Equality between and 4. follows directly from Theorem 3.12. Equality between and 3. then follows from the chain of inclusions
Similarly, equality between and 2. follows from the chain of inclusions
Remark 3.15.
We can now prove that the generalized weights form a strictly increasing sequence. This extends a classical result by Wei [17].
Theorem 3.16.
Let be a code and let be a modular support. Assume that either or is a PIR. Then
Proof.
By Corollary 3.14 and Theorem 3.4(1) we may assume without loss of generality that . Let and let be such that . We may assume that has a minimal system of generators as in Proposition 3.8 with . Then . We have and , hence . In particular,
The two equalities in the statement follow from Lemma 2.12(1) and Corollary 3.11. ∎
As an application of Theorem 3.16, we extend the generalized Singleton bound [17, Corollary 1] to every code over a PIR and some codes over finite commutative rings.
Corollary 3.17.
Let be a code and let be a modular support. Assume that either or is a PIR. Then
for all . In particular,
Proof.
The next corollary proves that, for modular supports, any subcode of with has a minimal system of generators consisting of elements, and no minimal system of generators of larger cardinality. This result allows us to restrict to such subcodes when studying the generalized weights of .
Corollary 3.18.
Let be a code and let be a modular support. Assume that either or is a PIR. Let and , , be such that . Then .
Proof.
In the next theorem, we establish some additional properties of the subcodes of that realize the generalized weights of .
Theorem 3.19.
Let be a code and let be a modular support. Assume that either or is a PIR. Let and be such that . The following hold.
-
(1)
If satisfies , then . In particular, .
-
(2)
.
In particular, if , then .
Proof.
-
(1)
If , then also . If is a PIR, then has by Proposition 3.10. In both cases, it suffices to prove the thesis under the assumption that .
If , consider . We have
where the equalities follows from Corollary 3.18 and the first inequality follows from Proposition 1.9. The second inequality follows from observing that, if and , then
Since and , then
Therefore . Since , then , contradicting Theorem 3.16. It follows that , as desired.
In order to prove that , it suffices to prove that . Let , then there is a such that , where the second inequality follows from . By the first part of the proof, . Therefore and .
- (2)
The next result relates the generalized weights of with those of its factors.
Corollary 3.20.
Let be a code and let be a modular support. Assume that either or is a PIR. Then
for all .
Proof.
By Theorem 2.23, up to a permutation of the coordinates of we can write , where is a modular support for and . Fix and such that and . For , let be such that . Let . Then has , proving that
4 Codes, Supports, and Monomial Ideals
In this section, we prove that the generalized weights of an -linear code endowed with a modular support are determined by the graded Betti numbers of a monomial ideal associated to the code. We follow the notation of the previous sections.
Notation 4.1.
In the sequel we work in the multivariate polynomial ring , where is an arbitrary field. A monomial of is a polynomial of the form , where . In particular, we assume that monomials are monic. A monomial ideal is an ideal which has a system of generators consisting of monomials.
We fix a modular support on . The support can be used to associate a monomial ideal to a subcode of as follows.
Definition 4.2.
For any , let
For , let
Notice that not every monomial corresponds to the support of a codeword . However, every monomial is of the form for some and some monomial .
Proposition 4.3.
Let be a code. Then
and is a minimal system of generators of .
The next theorem is the main result of this paper. We prove that the graded Betti numbers of the monomial ideal associated to a code determine its generalized weights.
Theorem 4.4.
Let be a modular support and let be a code. Assume that either or is a PIR. Let be the monomial ideal associated to and let . Then is the projective dimension of and is the minimum shift (i.e., the minimum degree of a nonzero element) in the -th free module in a minimal free resolution of . In particular, the graded Betti numbers of determine and the generalized weights of .
Proof.
Let where are a minimal system of monomial generators of . By Theorem 3.4(3) if and only if for . By Theorem 3.5, has a minimal system of generators consisting of minimal codewords, hence by Proposition 1.10. For each let such that . For any let
A graded free resolution of is given by the Taylor complex [9, Section 7.1]
where
with basis and
The Taylor resolution is in general not minimal: A cancellation occurs between the modules and if and only if for some and . Notice that if and only if , that is, if and only if .
Let
(4.1) |
be a minimal free resolution obtained from the Taylor resolution after making all the possible cancellations. In particular, is the projective dimension of .
For with , let
Notice that, if for some , then cancels with while passing from the Taylor resolution to resolution (4.1). Therefore, the direct summands appearing in (4.1) come from subcodes . Since for , then .
For , let be the smallest shift appearing in the -th module of a minimal graded free resolution of , i.e. is the smallest degree of a nonzero element of . In particular, is the smallest degree of a minimal generator of , hence
We claim that for all . Fix a value of and choose with such that . Then . Since , then
(4.2) |
by Theorem 3.14.
To prove the reverse inequality of (4.2), we start by observing that
by Theorem 3.14 and Theorem 3.4(3). Hence is one of the shifts appearing in the -th free module of the Taylor resolution of . In order to complete the proof, it suffices to prove the following
Claim A.
contains at least one direct summand .
To prove the claim, suppose that we have made all the possible cancellations until the -st step of the resolution. Therefore we have a free resolution of the form
By Theorem 3.12 and Corollary 3.18, contains a direct summand . Consider now the possible cancellations between and . The map
(4.3) |
is surjective and corresponds to a choice of generators of the -st syzygy module of . A cancellation between and comes from an element in the kernel of which has an invertible entry, hence it corresponds to eliminating a non-minimal generator of . Claim A amounts to showing that, among all direct summands of , there is at least one which does not cancel with a direct summand of . If they all cancel, however, has no elements in degree . However this is not possible, since the map in (4.3) is surjective and no component of is the zero map, hence the image of contains a nonzero element of degree . In particular, for some and . ∎
Since minimal free resolutions of monomial ideals are easy to compute, Theorem 4.4 gives a way to efficiently compute the generalized weights of a code, if one knows the supports of its minimal codewords. Notice however that the problem of computing the supports of the minimal codewords (or just the minimum distance) of a code is NP-hard, even for the special case of binary linear codes endowed with the Hamming distance, see [16].
We conclude the section with some examples.
Example 4.5.
Let and consider the support defined as follows:
It can be checked that is modular. We extend componentwise to a function and compose it with the -linear map defined by the invertible matrix
In other words, we define by for all . Then is modular by Proposition 2.17(7). Let . Then has the following six minimal codewords and supports:
In particular, the ideal associated to is
Notice that the generators of form a regular sequence, therefore a minimal free resolution of is given by the Koszul complex. In other words, there is no cancellation in the Taylor complex
Therefore one has , , , , and . Looking at the maps in the minimal free resolutions, one sees that
In the next example, we show that all the cancellations discussed in the proof of Theorem 4.4 can actually occur.
Example 4.6.
Let be the Hamming weight and let be the even weight code, i.e., the code consisting of all vectors of even weight. The minimal codewords of are all vectors of weight of , therefore the associated ideal is the ideal generated by all squarefree monomials of degree in variables. A minimal free resolution of is well-known and has the form
The Taylor complex associated to is as follows
We use the notation of the proof of Theorem 4.4 when referring to the free modules in the resolutions above. By comparing the two free resolutions, one sees that the modules , and in the Taylor complex completely cancel. Moreover, the free summand of , corresponding to the minimal shift in its homological degree, cancels, as well as the direct summand . Finally, the direct summands and of cancel.
It is easy to find examples of functions that are not supports according to Definition 2.2, and for which the result of Theorem 4.4 does not hold.
Example 4.7.
Notice that Theorem 4.4 does not hold in general for supports that are not modular, even for linear codes over fields.
Example 4.8.
Let with the support defined in Example 2.21. The associated monomial ideal is , whose minimal free resolution is
We have , while the projective dimension of is . In particular, the second free module in a minimal free resolution of is and it does not determine .
5 The Hamming Support
In this section we let and make some observations on the Hamming support , see Example 2.5. For , we identify with a subset of .
Several authors study the matroid associated with the parity-check matrix of a code , see e.g. [2, 10]. The code , the matroid , and the corresponding Stanley-Reisner ideal relate as follows:
-
(1)
Let . Then if and only if there is no with .
-
(2)
The squarefree monomials in are exactly those of the form , where .
-
(3)
The circuits of are the supports of the minimal codewords of .
-
(4)
The minimal monomial generators of are in one-to-one correspondence with the circuits of the matroid .
Therefore,
(5.1) |
The resolutions of the ideals associated to various classes of codes (most notably, MDS codes, one/two weight codes, Reed-Muller codes) have been studied in [7, 6].
The main result of [10] is Theorem 2, which shows that the generalized Hamming weights of a code are determined by the graded Betti numbers of . Our Theorem 4.4 generalizes [10, Theorem 2] with a different and stand-alone proof strategy that does not rely on any matroid theory results.
A known fact about codes endowed with the Hamming metric is that they are generated by their minimal codewords [1, Lemma 2.1.4]. This is a special case of Theorem 3.5 in this paper.
Corollary 5.1.
Every code is generated by its minimal codewords.
It is natural to ask whether a code is also generated by its codewords of maximal support. The answer to this question is negative in general, as the following simple example shows.
Example 5.2.
Let . The only codeword of maximal support is and .
Although codes are in general not generated by their maximal codewords, for sufficiently large most codes are.
Proposition 5.3.
Let . The proportion of codes in , within the -dimensional ones, generated by their maximal codewords is at least
and the above fraction approaches 1 as .
Proof.
We obtain the result follows from lower bounding the number of -dimensional codes with , where is the set of vectors in of weight . To obtain such a lower bound, denote by the set of -dimensional codes in and consider the sum
We have
We write as a disjoint union , where is the set of codes with and the set of codes with . We then have
(5.2) | |||||
On the other hand, we can rewrite as
(5.3) |
Combining (5.2) with (5.3), and using the definition of -binomial coefficient, we obtain
which is the desired estimate, since . ∎
References
- [1] A. Ashikhmin and A. Barg, Minimal vectors in linear codes, IEEE Transactions on Information Theory 44 (1998), no. 5, 2010–2017.
- [2] A. Barg, The matroid of supports of a linear code, Applicable Algebra in Engineering, Communication and Computing 8 (1997), no. 2, 165–172.
- [3] T. Britz, Higher support matroids, Discrete Mathematics 307 (2007), no. 17-18, 2300–2308.
- [4] , Code enumerators and Tutte polynomials, IEEE Transactions on Information Theory 56 (2010), no. 9, 4350–4358.
- [5] N. Gassner, Weight-induced distance functions on -codes, Master Thesis (University of Zurich), 2020, Supervisors: J. Rosenthal and V. Weger.
- [6] S. R. Ghorpade and R. Ludhani, On the purity of resolutions of Stanley-Reisner rings associated to Reed-Muller codes, arXiv preprint, 2102.00308 (2021).
- [7] S. R. Ghorpade and P. Singh, Pure resolutions, linear codes, and Betti numbers, Journal of Pure and Applied Algebra 224 (2020), no. 10, 106385.
- [8] C. Greene, Weight enumeration and the geometry of linear codes, Studies in Applied Mathematics 55 (1976), no. 2, 119–128.
- [9] J. Herzog and T. Hibi, Monomial Ideals, Springer, 2011.
- [10] T. Johnsen and H. Verdure, Hamming weights and Betti numbers of Stanley-Reisner rings associated to matroids, Applicable Algebra in Engineering, Communication and Computing 24 (2013), no. 1, 73–93.
- [11] R. Jurrius and R. Pellikaan, Codes, arrangements and matroids, Algebraic Geometry Modeling in Information Theory, World Scientific, 2013, pp. 219–325.
- [12] J. MacWilliams and N. Sloane, The Theory of Error-Correcting Codes, North-Holland Mathematical Library, 1977.
- [13] H. Matsumura, Commutative Ring Theory, Cambridge University Press, 1989.
- [14] J. G Oxley, Matroid Theory, Oxford University Press, 2006.
- [15] Alberto Ravagnani, Duality of codes supported on regular lattices, with an application to enumerative combinatorics, Designs, Codes and Cryptography 86 (2018), no. 9, 2035–2063.
- [16] A. Vardy, The intractability of computing the minimum distance of a code, IEEE Transactions on Information Theory 43 (1997), no. 6, 1757–1766.
- [17] V. K. Wei, Generalized Hamming weights for linear codes, IEEE Transactions on Information Theory 37 (1991), no. 5, 1412–1418.