Lattice paths with given number of turns and semimodules over numerical semigroups

Let Γ=〈α,β〉 be a numerical semigroup. In this article we consider several relations between the so-called Γ-semimodules and lattice paths from (0,α) to (β,0): we investigate isomorphism classes of Γ-semimodules as well as certain subsets of the set of gaps of Γ, and finally syzygies of Γ-semimodules. In particular we compute the number of Γ-semimodules which are isomorphic with their k-th syzygy for some k.


Introduction
In our paper [4] we considered Hilbert series of graded modules over the polynomial ring R = F[X, Y ] with deg(X) and deg(Y ) being coprime. The central result was an arithmetic criterion for such a series to be the Hilbert series of some finitely generated R-module of positive depth. This criterion is formulated in terms of the numerical semigroup generated by deg(X) and deg (Y ). For the reader's convenience we recall some basic vocabulary of this theory here.
Communicated by Fernando Torres.
The first author was partially supported by the Spanish Government Ministerio de Educación y Ciencia, grant MTM2007-64704 and Ministerio de Economía y Competitividad, grant MTM2012-36917-C03-03, in cooperation with the European Union in the framework of the founds "FEDER".
Let Γ be a sub-semigroup of N such that the greatest common divisor of all its elements is equal to 1. Then the set N \ Γ has only finitely many elements, which are called the gaps of Γ . Such a semigroup is said to be numerical. The crucial notion in [4] was that of a fundamental couple: Let α, β > 0 be coprime integers and let G denote the set of gaps of α, β . An (α, β)-fundamental couple [I, J ] consists of two integer sequences I = {i k } m k=0 and J = {j k } m k=0 , such that (0) i 0 = 0.
One of the problems considered in this article is the counting of sets of integers like those appearing in the first position of a fundamental couple. We coin a name for these sets: The next two sections deal with objects related to Γ -lean sets: we begin with isomorphism classes of Γ -semimodules. In Sect. 3 we consider certain lattice paths; from this section on, Γ is restricted to being generated by two elements. In the last sections we turn our attention to the second position of a fundamental couple: we identify the sequences J appearing there with so-called syzygies of Γ -semimodules and investigate their relation with lattice paths. The process of taking syzygies can be iterated-our final result allows the number of semimodules whose k-th syzygy is isomorphic with for some k to be computed.

Generators of Γ -semimodules
Let Γ be a numerical semigroup. A Γ -semimodule is a non-empty subset of N such that + Γ ⊆ . A system of generators of is a subset E of with It is called minimal if no proper subset of E generates . Note that, since \ Γ is finite, every Γ -semimodule is finitely generated.

Lemma 2.1 Every Γ -semimodule has a unique minimal system of generators.
Proof We inductively construct a sequence of elements of starting with x 1 = min such that any system of generators has to contain this sequence. If x 1 , . . . , x n are already constructed but do not generate we set x n+1 = min \ n i=1 (x i + Γ ). After finitely many steps we arrive at a system of generators {x 1 , . . . , x r }, and by construction it is clear that this system is minimal and that any system of generators must contain {x 1 , . . . , x r }. Lemma 2.2 Let x 1 , . . . , x r be the minimal system of generators of a Γ -semimodule. Then |x i − x j | is a gap of Γ for all i = j . Conversely, any subset {x 1 , . . . , x r } of N with this property minimally generates a Γ -semimodule.
Proof We may assume x j > x i for j > i. Then, by minimality, Two Γ -semimodules , are called isomorphic if there is an integer n such that x → x + n is a bijection from to . For every Γ -semimodule there is a unique Γ -semimodule ∼ = containing 0; such a Γ -semimodule is called normalized.
The semimodule • := {x − min | x ∈ } is called the normalization of . It is the unique semimodule isomorphic to and containing 0.

Corollary 2.3
The minimal system of generators of a normalized Γ -semimodule is Γ -lean, and conversely, every Γ -lean set minimally generates a normalized Γ -semimodule. Hence there is a bijection between the set of isomorphism classes of Γ -semimodules and the set of Γ -lean sets.

Lattice paths and α, β -lean sets
From now on we only consider numerical semigroups with two generators α < β. In this case there is a connection between Γ -lean sets and certain lattice paths which allows a formula for the number of α, β -lean sets to be deduced. (2) Any integer n > 0 has a unique presentation n = pαβ − aα − bβ with integers p > 0, 0 ≤ a < β and 0 ≤ b < α.

Corollary 3.3 Let
Therefore, an α, β -lean set yields a lattice path with steps downwards and to the right from (0, α) to (β, 0) not crossing the diagonal, where the points identified with the gaps mark the turns from x-direction to y-direction. In the sequel, those turns will be called ES-turns for short.
(Note that in the first component I = {i k } m k=0 of a fundamental couple, the numbering of elements is that of Corollary 3.3 reversed, see [4, Corollary 3.21 a)]. Hence, in the path associated to I , the ES-turns are numbered from right to left. One could avoid this inversion by considering paths from (β, 0) to (α, 0) or by using a different orientation of the diagram, but we prefer our version for typographical reasons.) Conversely, for every lattice path from (0, α) to (β, 0) not crossing the diagonal, the points of the ES-turns can be identified with the gaps in an α, β -lean set: Lemma 3.4 Let α, β be coprime positive integers. Then there is a bijection between the set of α, β -lean sets and the set of lattice paths from (0, α) to (β, 0) not crossing the diagonal.
Therefore, the counting of α, β -lean sets is equivalent to the counting of such lattice paths. The latter was considered by Bizley in [2]. The main idea used there even allows us to count the paths with a certain number of ES-turns.
The number of all lattice paths with r ES-turns from (0, α) to (β, 0) is easily computed: The r turning points have x-coordinates in the range {1, . . . , β − 1} and also y-coordinates in the range {1, . . . , α − 1}. Since the sequence of coordinates has to be increasing resp. decreasing, there are β−1 r α−1 r lattice paths. We have to determine how many of these paths stay below the diagonal. To this end, we use the concept of a cyclic permutation of a path.
A lattice path with r ES-turns can also be described by a 2 × (r + 1)-matrix where the i-th column contains the numbers of steps downwards and to the right the path takes between the (i − 1)-th and the i-th turning point (where the 0-th and (r + 1)-th points are to be understood as (0, α) resp. (β, 0)). For the path in the example above we get the matrix 2 1 1 1 1 2 1 3 .
A cyclic permutation of the path is a path belonging to the matrix with cyclically permuted columns. The permuted matrix 1 1 2 1 1 3 1 2 yields the path One can also imagine a cyclic permutation in a different way. We extend the path with turning points thus amending a second copy of the original path. The cyclic permutations are the paths from P i to Q i with turning points P i+1 , . . . , P r , (β, 0), Q 1 , . . . , Q i−1 : A lattice path with r turning points admits r + 1 cyclic permutations. As we will show now, there is always exactly one permutation staying below the diagonal. Again we consider the doubled path as described above. Let g 0 denote the line through P 0 := (0, α) and Q 0 := (β, 0) and g i the line through P i and Q i for i = 1, . . . , r. Note that all these lines are parallel and that, since α and β are coprime, there is no turning point between P i and Q i lying on g i . Hence there is one line g j , j ∈ {0, . . . , r}, namely the one with the greatest distance from the origin, such that the path stays below this line.
Since the line g i yields the diagonal of the i-th cyclic permutation of the original path, indeed exactly one of the permuted paths stays below the diagonal; hence we have proven: Proposition 3.5 Let α and β be two coprime positive integers.
1. For every lattice path from (0, α) to (β, 0) there is exactly one cyclic permutation staying below the diagonal. 2. The number of α, β -lean sets with r gaps equals the number of lattice paths with r ES-turns from (0, α) to (β, 0) staying below the diagonal, and this number is given by In combination with Corollary 2.3 and Lemma 3.4 this result yields the following theorem: Theorem 3.6 Let α, β, r ∈ N with gcd(α, β) = 1. Then the following numbers 1. The number of isomorphism classes of α, β -semimodules minimally generated by r + 1 elements. 2. The number of α, β -lean sets with r gaps. 3. The number of lattice paths with r ES-turns from (0, α) to (β, 0) staying below the diagonal. equal is the number of gaps of the numerical semigroup α, β .

Syzygies of α, β -semimodules and lattice paths
We Therefore, in terms of the lattice path belonging to I , the gaps j 1 , . . . , j n−1 correspond to the inner SE-turning points. By extension of the labeling beyond the axis, we can even identify j 0 and j n with the remaining SE-turns. For illustration see again the example of the previous section: Next we explain the meaning of J in terms of α, β -semimodules: Every α, βsemimodule yields another α, β -semimodule Syz( ).

Definition 4.2
Let I be an α, β -lean set, and let be the α, β -semimodule generated by I . The syzygy of is the α, β -semimodule The semimodule Syz( ) consists of those elements in which admit more than one presentation of the form i + x with i ∈ I, x ∈ α, β . The name syzygy may be justified by considering an analogue of in the setting of commutative algebra: The connection between fundamental couples and syzygies is described in the following theorem:

Theorem 4.3 Let [I, J ] be an α, β -fundamental couple and let be the α, βsemimodule generated by the elements of I . Then
Proof By the definition of a fundamental couple, we have j k = i k + rα = i k+1 + sβ with some r, s ∈ N, hence the inclusion ⊇ is clear. In order to show the other inclusion, we consider (i k + α, β ) ∩ (i m + α, β ). For every γ m ∈ α, β , we have i m + γ m ∈ i k + α, β if and only if i m − i k + γ m ∈ α, β . As mentioned in the previous section, i k and i m can be written in the form by Lemma 3.2 we may assume a k > a m and b k < b m . Since This means Moreover, Lemma 4.1 implies and on the other hand

Orbits
Let [I, J ] be a fundamental couple and let y 0 y 1 . . . y n x 0 x 1 . . . x n be the matrix describing the path for the semimodule generated by I . We consider a second lattice path from (0, b n ) (the point associated to j n ) to (β, b n − α) with ESturns in the SE-turning points of the first path (those points representing j n−1 , . . . , j 0 ). The matrix for this path is given by It is easily seen that-up to a cyclic permutation of columns-this matrix also describes the path belonging to the normalization • J of J : In terms of lattice paths, normalizing J means translation of the path such that the ES-turn belonging to min J is moved to (0, α) and the part of the path left of this point will be appended behind the former end point.
The procedure of building a syzygy can be iterated; we set From the matrix description of the path for Syz( ), it is clear that Syz (n+1) ( ) ∼ = . Now we consider under which conditions even lower syzygies of are isomorphic with .
We want to count the number of -orbits of α, β -semimodules with n generators. To this end, we investigate the structure of a semimodule with Syz ( ) ( ) ∼ = ; we may restrict our attention to the case of dividing n, since the length of an orbit can be viewed as the order of an element in the cyclic group of order n. Let y 0 y 1 . . . y n−1 x 0 x 1 . . . x n−1 be the matrix for the path belonging to . Then, as mentioned above, this matrix and the matrix have to be equal up to a cyclic permutation of columns. This means that there exists a k ∈ {1, . . . , n − 1} such that we may assume that k is minimal with this property. Since By induction, we get x j = x rk+j for j ∈ {0, . . . , k − 1}, r ≥ 0. Hence the bottom row of the matrix is of the form On the other hand, we can find a minimal m ∈ {2, . . . , n} such that and with the same reasoning as above, the top row of the matrix is of the form the numbers m and k divide α resp. β, so in particular they are coprime. By assumption, is the least positive integer p such that the matrices y 0 y 1 . . .
contain the same columns. This is the case if and only if there are r, s ∈ N with p + sm = rk. This implies that p has to be contained in the ideal generated by k and m. Hence, by minimality of , we get = gcd(k, m), and so we may write k =k and m =m . From kk = n = mm we getkk =mm = n ; by gcd(k,m) = 1 this impliesk = m andm = k , and since k | β and m | α we get k = gcd(β, n ) and m = gcd(α, n ), in particular n | αβ. By now we have shown the following proposition: Proposition 5.2 Let be an α, β -semimodule with n generators. If is an element of an -orbit, then | n and n | αβ. The corresponding matrix is of the form where k = · gcd(α, n ) and m = · gcd(β, n ).
In fact, the structure described in the previous proposition is shared by all α, βsemimodules with n generators and Syz ( ) ( ) ∼ = -not only by elements of -orbits:  Since these blocks cannot be split into smaller ones, the corresponding semimodule cannot be part of a d-orbit with d < .
Lemma 5.3 allows α, β -semimodules with Syz ( ) ( ) ∼ = and n generators to be counted. Using the same notation as in the deduction of Proposition 5.2, we find the following: By (1) the steps in the y-block sum up to α m , therefore the partial sums r j =0 y j for r = 0, . . . , m − 2 (these are the y-coordinates of the first m − 1 ESturns in the corresponding path) have to be chosen in the range 1, . . . , α m − 1. Hence there are α, β -semimodules with Syz ( ) ( ) ∼ = generated by n elements.
In particular, we get a formula for the number of α, β -fixed points: 1. In the case of n = , the number provided by Theorem 5.5 agrees with that of all α, β -semimodules with n generators (cf. Theorem 3.6), in accordance with the fact that Syz (n) ( ) ∼ = for all these semimodules. 2. For n = α, the formula (4) yields 1 α β−1 α−1 , which equals L α,β (α − 1). Hence all α, β -semimodules with maximal number of generators are fixed points-in this case there are only entries "1" in the top row of the matrix. Note that in the case of α and β being prime numbers there are no other fixed points.
One has to keep in mind that formula (3) does not only count the elements with n generators in the -orbits, but all semimodules with n generators such that Syz ( ) ( ) ∼ = , including those with Syz (d) ( ) ∼ = and d < , in particular the fixed points. However, it is possible to compute the number of -orbits using the inclusion-exclusion principle, see the next and closing example.
Since Concluding the discussion of this example we determine the single fixed point. By Proposition 5.2, the rows of the corresponding matrix have to consist of three blocks [y 0 , y 1 , y 2 , y 3 ] resp. four blocks [x 0 , x 1 , x 2 ]. Since the entries in those blocks sum up to 15 3 = 5 resp. 16 4 = 4, both blocks have to contain entries "1" and a single entry "2" i.e. up to cyclic permutation the matrix of the fixed point looks like 1 1 1 2 1 1 1 2 1 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 .