Greedy weights for matroids

We introduce greedy weights of matroids, inspired by those for linear codes. We show that a Wei duality holds for two of these types of greedy weights for matroids. Moreover we show that in the cases where the matroids involved are associated to linear codes, our definitions coincide with those for codes. Thus our Wei duality is a generalization of that for linear codes given by Schaathun. In the last part of the paper we show how some important chains of cycles of the matroids appearing, correspond to chains of component maps of minimal resolutions of the independence complex of the corresponding matroids. We also relate properties of these resolutions to chainedness and greedy weights of the matroids, and in many cases codes, that appear.


Introduction
For a linear code C over a finite field F q an important way to characterize the code is to decribe its parameters, the word length n, the dimension k, and the minimum distance d. A refinement of the minimum distance is the ordered set of the generalized Hammimg weights  [4][5][6][7][18][19][20]) became interested not only in the individual subcodes of each dimension that where optimal with respect to (small) support size, but also in chains of codes that where somehow optimal, in a similar way. This gave rise to various definitions of greedy weights, which we will recall in Sect. 2.1. These weights are similar to, but in general different from, the generalized Hamming weights d i . The topic has attracted new interest in recent years [1,13].
In [9] we described how the d i are determined by certain properties of the matroid coming from any parity check matrix of the linear code. In the present paper we will describe how also the various greedy weights are determined by the matroids associated to the code. Since this description can be done for any finite matroid , we will define and describe greedy weights for finite matroids in general, and show that they coincide with those of linear codes when the matroids come from such codes. We will show a form of Wei duality relating certain weights of a matroid and its dual, inspired by a corresponding result for linear codes [19] or for (demi-)matroids [2,12].
The spirit of the paper is the following: there is a poset of cycles of the matroid coming from any parity check matrix of the code, where a cycle is an inclusion minimal set among those subsets of E = {1, . . . , n} having a fixed nullity for the rank function in question. This is dual to (the upside down version of) the poset of flats of the matroid coming from any generator matrix of the code. We will show that the greedy weights correspond to optimal ways to traverse the nodes of this poset through maximal chains of it. We define a lexicographical and a rev-lexicographical order on these chains in order to make it precise in what sense they are optimal.
In the last part we relate our results to a more concrete way to traverse maximal chains via non-zero component maps in a minimal resolution of a certain Stanley-Reisner ring, where the components in each fixed step corresponds to the nodes of a corresponding fixed rank of the poset of cycles. This paper is organized as follows. In Sect. 2 we will give some necessary definitions relating to codes and matroids. In Sect. 3 we will describe the greedy weights for matroids, relate to those of codes, and show our form of Wei duality, which is inspired by the corresponding Wei duality for codes, proven in [19]. In Sect. 4 we discuss the connection between resolutions of the Stanley-Reisner ring associated to the matroid or the code, and the greedy weights. We also discuss the notion of chained codes and chained matroids.
The main results are Theorems 2, 3 and 4.
Similarly, if T ⊂ C, then its support and weight are

Supp(c) and wt(T ) = |Supp(T )|.
In [3] and [1] one describes and treats greedy weights of linear codes C over finite fields. First we recall the definitions of the generalized Hamming weights introduced by Wei [22]: A subcode D ⊂ C computes d r if it is of dimension r and weight d r . Then, following the terminology of [18] or [20], we have the (bottom-up) greedy weights of a code: Definition 3 Let C be a [n, k]-linear code. A (bottom-up) greedy 1-subcode is a subcode of dimension 1 of minimal weight. For r ≥ 2, a (bottom-up) greedy r -subcode is a subcode of dimension r containing a (bottom-up) greedy (r − 1)-subcode, and such that no other such subcode has lower weight.

Definition 4
Let C be a [n, k]-linear code. For 1 ≤ r ≤ k, the r th (bottom-up) greedy weight e r of C is the weight of any (bottom-up) greedy r -subcode.
Also introduced by Schaathun [18, Definition 6] are the top down greedy weights: a top-down greedy r -subcode is a subcode of dimension r contained in a topdown greedy (r + 1)-subcode, and such that no other such subcode has lower weight.

Definition 6
Let C be a [n, k]-linear code. For 1 ≤ r ≤ k, the r th top-down greedy weight e r of C is the weight of any top-down greedy r -subcode.

Remark 3
Let F be the set of towers of subcodes D 1 ⊂ · · · ⊂ D k of C satisfying dim D i = i. Alternative definitions for the bottom-up and top-down greedy weights would be where lex and revlex are the lexicographic and reverse lexicographic orders respectively.
There is also another definition, used e.g by [1], essentially introduced in [7]: Definition 7 Let C be a [n, k]-linear code. A CEZ greedy 1-subcode is a subcode of dimension 1 of minimal weight. For r ≥ 2, a CEZ greedy r -subcode is a subcode of dimension r containing a subcode that computes d r −1 , and such that no other such subcode has lower weight.
Definition 8 Let C be a [n, k]-linear code. For 1 ≤ r ≤ k, the r th CEZ greedy weight g r of C is the weight of any CEZ greedy r -subcode.

Matroids
A matroid is a combinatorial object that capture the essence of independence. Codewords of linear codes being dependence relations between the column vectors of any parity check matrix of the code, it is natural to look at the matroid associated to a linear code. In [9], we describe how important characteristics of the code can be given a matroidal interpretation. It turns out that matroid theory has important applications in, among other, graph theory, network theory, combinatorial optimization, topology, … There are many equivalent definitions of a matroid. We refer to [17] for a deeper study of the theory of matroids.

Definition 9
A matroid is a pair M = (E, r ) where E is a finite set and r : 2 E → N is a function, called the rank function, satisfying The rank of the matroid is r (M) = r (E).
It is a well known fact the rank function of a matroid is unit rank increase, that is, if X ⊂ E and x ∈ E, then r (X ) ≤ r (X ∪ {x}) ≤ r (X ) + 1.

Definition 10
The nullity function of the matroid (E, r ) is the function defined on 2 E by: for X ⊂ E, The nullity function of a matroid is also unit rank increase. Moreover, it satisfies (R 1 ), (R 2 ) as well as

Definition 11
Let M = (E, r ) be a matroid. Then its dual matroid is the matroid M = (E, r ) where r is defined by Some subsets of the ground set of a matroid will be of special interest in this paper: A circuit is a inclusion minimal dependent set. We denote by I and C the sets of independent sets and circuits respectively.
and by N i the inclusion minimal elements of N i . It is clear that A cycle is an element of N i for some i. Cycles can also be described as unions of circuits, and the nullity of the cycle is equal to the maximal number of non-redundant circuits in the cycle [9].
If C is a [n, k]-linear code given by a (n − k) × n parity check matrix H , then we can associate to it a matroid M C = (E, r ), where E = {1, . . . , n} and if X ⊂ E, then where H X is the column submatrix of H indexed by X . It can be shown that this matroid is independent of the choice of the parity check matrix of the code, and we may thus call it the matroid of C.

Resolutions
If M = (E, r ) is a matroid, then (E, I) is naturally a simplicial complex (that is, I = ∅ and is closed under taking subsets). Let K be a field. We can associate to M a monomial ideal where X σ is the monomial product of all X e for e ∈ σ . This ideal is called the Stanley-Reisner ideal of M and the quotient S M = S/I M the Stanley-Reisner ring associated to M. We refer to [8] for the study of such objects. As described in [9] the Stanley-Reisner ring has minimal N and N n -graded free resolutions In particular the numbers β i, j and β i,α are independent of the minimal free resolution, (and for a matroid also of the field K) and are called respectively the N-graded and N n -graded Betti numbers of the matroid. Note also that if α / ∈ {0, 1} n , then β i,σ = 0 [15, Corollary 1.40]. We have We also note that β 0,0 = 1.

Remark 5
The fact that β i,X = 0 if and only X ∈ N i is a consequence of the considerations on [21, p. 59], where one also relates these Betti numbers to Möbius numbers of related lattices of cycles.

Greedy weights for matroids
We will now give definitions for greedy weights for matroids, and later show that greedy weights for linear codes and their associated matroids coincide. First, recall the definition for generalized Hamming weights for matroids, given in [12]:

Definition 14
Let M be a matroid on n elements of rank n − k. Let be the set Let be the set Then the (bottom-up) greedy weights (e 1 , . . . , e k ) of M are the . . , e k ) (resp. (ẽ 1 , . . . ,ẽ k )), we say that σ i computes e i (resp.ẽ i ).
We say that σ ∈ N i computes g i if it satisfies the conditions in the definition. Its weights are As a consequence of the unique rank increase of the nullity function, both the bottom up and the top down greedy weights are strictly increasing sequences. The CEZ greedy weights g i are not necessary monotonous, as the following example shows.  10,11,19,23),  12,11,19,23).

Example 3 Consider the following graph:
Its associated matroid, that is, the matroid whose circuits correspond to cycles of the graph, is a matroid on the set of its 25 edges, and rank 21. The generalized Hamming weights of the matroid are 12,18,25).
The weight d 2 corresponds to the minimum support of the union of two different cycles (the right part of the graph), while the weight e 2 corresponds to the minimum cardinality of the support of the union of two different cycles, where one of the cycles is a cycle of minimal length (the left part of the graph, since the only cycle of minimal length is the hexagon on the left part). See also [14] for the computation of generalized Hamming weights of (signed) graphs.
In Definitions 14 and 15, we could actually have asked the subsets to be in N i , not just N i , as the following proposition shows: Proposition 1 Let M be a matroid of rank n − k on a set of cardinality n. Let be the set Then we have the following: and for all 2 ≤ i ≤ k, Proof The first and third assertions rely on the same observation. We will thus only treat the first assertion. It is clear that We will show that σ i ∈ N i for all i. If not, let i be the smallest index for which this is not true. By definition of N 1 and the lexicographic order, i > 1. Since σ i / ∈ N i , this means that there exists τ σ i such that n(τ ) = i. Obviously, σ i−1 ⊂ τ otherwise, replacing σ i by τ in the sequence S, we would get a chain of sets that would contradict the minimality of e(S) for the lex ordering. Thus, we can find x ∈ σ i−1 − τ . Without loss of generality, we can suppose that τ = σ i − {x}. Consider then ρ = σ i−1 − {x}. By minimality of σ i−1 in the set of subsets with nullity i − 1, and by the unique rank increase property of n, n(ρ) = i − 2. Then, by (N 3 ): which is absurd. Thus, all elements in S are in N i , and the first assertion is proved. The second assertion is easier to prove since we don't have any bottom constraints. Again, it is clear that Assume that there exists an index i such that σ i / ∈ N i . Let τ i σ i such that τ i ∈ N i , and take recursively for j < i any τ j ⊂ τ j+1 such that n(τ j ) = j. This can always be done by the unique rank increase property of n. Then the sequence S = (τ 1 , . . . , τ i , σ i+1 , . . . , σ k Proof In the proof above, we showed that any subset that computes a greedy-weight is a cycle. This is then a direct consequence of Theorem 1.

Wei duality of greedy weights
If M is a matroid, then it is proved in [12] that the weight hierarchy of the matroid and its dual satisfy Wei duality, that is where d i denotes the ith generalized Hamming weight of M. This result is a generalization of duality for linear codes proved by Wei [22]. In his doctoral thesis [19], Schaathun proves a Wei duality for greedy weights for linear codes, namely that In this section, we will prove that his result extends to matroids. As opposed to [12], our proof is constructive, in the sense that we exhibit an element in (M) that computes the greedy weights of the dual matroid. Before doing so, if S = (σ 1 , . . . , σ k ) ∈ , we define δ(S) in the following (not unique) way: consider a maximal chain ∅ ρ 1 · · · ρ n = E that contains all the E − σ i for 1 ≤ i ≤ k. Obviously, we have |ρ i | = i for every 1 ≤ i ≤ n. Then δ(S) is the chain τ 1 · · · τ n−k obtained by removing all the subsets of cardinality n − |σ i | + 1. Even if this is not uniquely defined, the set δ(S) = {|τ 1 |, . . . , |τ n−k |} is, since we have In particular, we have, with a slight abuse of notation, δδS = e(S) = {|σ 1 |, . . . , |σ k |}.

Lemma 1 Let
Proof Using the notation from the definition of δ(S), we have for every i the chain From the duality formula for the rank functions and nullity functions, we get that, since n(σ t ) = t, Since n is unit rank increase, this means that all n(ρ j+t ) are distinct, except for 2 of them, and that they span the set {k +i +1−|σ i+1 |, . . . , k +i −|σ i |}. We show now that n(ρ j ) = n(ρ j+1 ). Since both set differ by just 1 element, we have either n(ρ j ) = n(ρ j+1 ) or n(ρ j ) = n(ρ j+1 )− 1. Suppose the latter occurs. Then, (the first strict inclusion coming from the fact that n(σ i ) = n(σ i+1 ) − 1 = n(E − ρ j+1 ) − 1), the tower and the k-tuple formed by the cardinalities of the elements of the tower is strictly lower for the lex order than (e 1 , . . . , e k ) which is absurd.
We then obtain the following analogue of [19,Theorem 10.2], where one showed Wei duality for greedy weights of linear codes: which is absurd.

Greedy weights of codes and matroids
In for example [1,[3][4][5][6][7][18][19][20] one describes and treats greedy weights of linear codes C over finite fields in various ways. In this part, we will show that the greedy weights for codes and their associated matroids coincide. We start with some lemmas: Then dim C(X ) = n(X ) = n(Supp(C(X ))).

Proof
The first equality is an easy consequence from the fact that C(X ) = ker G E−X , and a rewriting of the rank-nullity theorem using the relation between the rank of the matroid and its dual. Moreover, the dimension of the relations between the columns of H indexed Supp(C(X )) is n(X ), that is, n(Supp(C(X ))) = n(X ).
For the converse, let D 1 ⊂ · · · ⊂ D k be subcodes of C with dim D i = i and wt(D i ) = e i (C).
and since D i ⊂ C(σ i ), we always have We claim that there is equality. If not, let i be minimal such that n(σ i ) > i. Then, there exists τ with n(τ ) = i such that σ i−1 τ σ i (take σ 0 = ∅ in the case i = 1), and let D i = C(τ ). Clearly and dim D i = n(τ ) = i. This would give rise to a tower of subcodes The proofs for top-down and CEZ greedy weights are done in a similar way.
Theorem 3 is a generalization of Wei duality for linear codes as presented in [19]. From [17,Theorem 2.2.8], the matroid associated to the dual of linear code is precisely the dual of the matroid of the linear code in question

Greedy weights and resolutions of Stanley-Reisner rings
Let M be a matroid of rank n − k over a finite set E of cardinality n (for example the matroid associated to a [n, k]-linear code). As seen in Corollary 1, the sets that compute the different greedy weights are to be found in the sets that have non-zero Betti numbers. Together with the main result from [9], this suggests that all information about various kinds of greedy weights might be encoded in minimal free resolutions of the associated Stanley-Reisner ring. This is what we will look into in the first part of this section. In the second part, we will look into the concept of chained codes and matroids.

Greedy weights from strands
In the rest of this section, if M is a matroid on the finite set E of cardinality n, then S denotes the polynomial ring K[e, e ∈ E]. This ring is naturally N n and N graded.
Similarly, in the N-graded context, let g : and p, q ∈ N. Then In both cases, the leftmost map is the inclusion map, while the rightmost map is the natural projection.
We are now able to define the strands of a resolution.

Definition 17
Let M be a matroid of rank n − k on a finite set of cardinality n. If is a N-graded resolution, and if h = (h 1 , . . . , h k ) ∈ N k , the h-strand of the resolution is the sequence The strand of the resolution is the h-strand with h = (d 1 . . . , d k ). If is a N n -graded resolution, and if σ = (σ 1 , . . . , σ k ) ∈ (N n ) k , the σ -strand of the resolution is the sequence We have already mentioned that β i,σ = 0 ⇒ σ ∈ {0, 1} n . In the sequel, we will therefore identify elements of {0, 1} n with subsets of E = {1, . . . , n}. The main theorem of this section, will be a consequence of the following lemma.

Lemma 4 Let M be a matroid of rank n − k on a set E of cardinality n. Let
be any minimal N n graded resolution of its Stanley-Reisner ring. Let ρ, μ be two subsets of E. Then φ l,ρ,μ = 0 ⇔ ρ ∈ N l−1 , μ ∈ N l and ρ ⊂ μ.
Proof Any minimal resolution differs from the Taylor resolution (see [8,Section 7.1] by adding trivial resolutions of the form where * are the maps in the Taylor resolution. In any minimal free resolution, we have so we might assume that ρ ∈ N l−1 and μ ∈ N l , otherwise φ l,ρ,μ = 0. In particular, this means that ρ = μ.
In a first step, we prove that One way is obvious. For the other way, let y ∈ μ\ρ. Since μ is a cycle, there exists τ ∈ C with y ∈ τ ⊂ μ. Then we have the equality coming from the fact that n(ρ ∩ τ ) = 0 since ρ ∩ τ τ is strictly included in a circuit and has thus nullity 0. Since n(μ) = l and μ is minimal, we have equality Now, if ρ ∪ τ = μ and ρ ∈ N l−1 , by [9, Proposition 1], we can write ρ = l−1 i=1 σ i for some distinct circuits σ i , and by construction of the differential of the Taylor complex, l,ρ,μ = 0.
Conversely, if l,ρ,μ = 0, then again by construction of the differential of the Taylor complex, μ is the union of l circuits, and we obtain ρ by taking the union of all these circuits but 1.
We then have:

Theorem 4 Let M be a matroid of rank n − k on a set of cardinality n. Let
be N and N n -graded resolutions respectively. Then 1. e 1 = g 1 = d e = min{ j, β 1, j = 0} andẽ k = min{ j, β k, j = 0}.

Chained codes and matroids
Definition 18 Let C be a linear code of dimension k. It is called chained if there is a chain Proof This is obvious from the definitions.
This can be generalized to matroids:

Definition 19
A matroid of rank n − k on a set of cardinality n is chained if there exists a chain Proof This follows from the definitions.
Moreover, we have the following:

Proposition 4 A linear code is chained if and only if its associated matroid is chained.
Proof This is a direct consequence of Theorem 3. 3.
We will end this article with commenting on the connection between chainedness of a code or matroid, and properties of minimal resolutions of their Stanley-Reisner rings.

Definition 20
Let M be a matroid of rank n − k on a set of cardinality n. It has a pure resolution if the N-graded resolution satisfies: Furthermore, we say that the pure resolution is linear if A linear code has pure resolution (resp. linear resolution) if its associated matroid has.

Proposition 5 Linear codes and matroids with pure resolutions are chained.
Proof This follows from the fact that β i,X = 0 ⇔ X ∈ N i and the definitions.
MDS codes and uniform matroids have linear resolutions, and as such are chained. On the other hand, we have some codes that do not have linear resolutions, but pure resolutions. Examples of such codes are Reed-Müller of the first order and constant weight codes [10, Theroem 2.1]. These codes are thus also chained. In the case of constant weight codes, we have in addition that any chain of subcodes of dimension i actually compute e i = d i . In general, chained codes do not need to have pure resolutions. For example, non-binary Veronese codes studied in [11] are such codes. These codes are defined through the Veronese embedding P 2 → P 5 . Elements of N i correspond to complements of geometrical configurations, and it follows easily from [11,Theorem 21] that the code is chained but does not have pure resolution. The set of codes/matroids with pure/linear resolutions is not closed under taking duals. However, we have: Proposition 6 A matroid (resp. linear code) is chained if and only if its dual (resp. orthogonal complement) is chained.
Proof This follows from Wei duality for greedy weights and Hamming weights.
Funding Open Access funding provided by UiT The Arctic University of Norway.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.