Algorithms for Generalized Numerical Semigroups
Carmelo Cisto, Manuel Delgado, Pedro A. Garc\'ia-S\'anchez

TL;DR
This paper introduces algorithms for analyzing generalized numerical semigroups in higher dimensions, enabling the computation of their structure, gaps, generators, and enumeration based on genus, advancing understanding of their combinatorial properties.
Contribution
It presents new algorithms for identifying, analyzing, and enumerating generalized numerical semigroups in multiple dimensions, including a novel method to count all such semigroups with a given genus.
Findings
Successfully computed the number of generalized numerical semigroups for various dimensions and genus.
Developed algorithms to determine if a set generates a generalized numerical semigroup.
Enabled enumeration of semigroups with prescribed genus, surpassing previous computational limits.
Abstract
We provide algorithms for performing computations in generalized numerical semigroups, that is, submonoids of with finite complement in . These semigroups are affine semigroups, which in particular implies that they are finitely generated. For a given finite set of elements in we show how to deduce if the monoid spanned by this set is a generalized numerical semigroup and, if so, we calculate its set of gaps. Also, given a finite set of elements in we can determine if it is the set of gaps of a generalized numerical semigroup and, if so, compute the minimal generators of this monoid. We provide a new algorithm to compute the set of all generalized numerical semigroups with a prescribed genus (the cardinality of their sets of gaps). It was used to compute the number of such semigroups, and its implementation allowed us to…
| 0 | 1 | |||
| 1 | 2 | 2 | ||
| 2 | 7 | 3 | 0,4285714286 | 3,5 |
| 3 | 23 | 9 | 0,3913043478 | 3,2857142857 |
| 4 | 71 | 30 | 0,4225352113 | 3,0869565217 |
| 5 | 210 | 94 | 0,4476190476 | 2,9577464789 |
| 6 | 638 | 281 | 0,4404388715 | 3,0380952381 |
| 7 | 1894 | 848 | 0,4477296727 | 2,9686520376 |
| 8 | 5570 | 2532 | 0,4545780969 | 2,9408658923 |
| 9 | 16220 | 7464 | 0,4601726264 | 2,9120287253 |
| 10 | 46898 | 21790 | 0,4646253572 | 2,8913686806 |
| 11 | 134856 | 63118 | 0,4680399834 | 2,8755170796 |
| 12 | 386354 | 181754 | 0,4704338508 | 2,8649374147 |
| 13 | 1102980 | 521210 | 0,4725470997 | 2,8548429678 |
| 14 | 3137592 | 1489334 | 0,4746742088 | 2,8446499483 |
| 15 | 8892740 | 4240572 | 0,4768577514 | 2,8342563342 |
| 16 | 25114649 | 12030332 | 0,4790165294 | 2,8241744389 |
| 17 | 70686370 | 34007389 | 0,4811024954 | 2,8145473982 |
| 18 | 198319427 | 95801019 | 0,4830642184 | 2,8056247194 |
| 19 | 554813870 | 269005797 | 0,4848577362 | 2,797577012 |
| 20 | 1548231268 | 753133297 | 0,4864475434 | 2,7905417505 |
| 21 | 4310814033 | 2103045138 | 0,4878533664 | 2,7843476114 |
| 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 15 | 26 | 40 | 57 | 77 | 100 | 126 | 155 |
| 3 | 67 | 146 | 270 | 449 | 693 | 1012 | 1416 | 1915 |
| 4 | 292 | 811 | 1810 | 3512 | 6181 | 10122 | 15681 | 23245 |
| 5 | 1215 | 4320 | 11686 | 26538 | 53361 | 98096 | 168336 | 273522 |
| 6 | 5075 | 22885 | 74685 | 197960 | 453922 | 935426 | 1775943 | 3159590 |
| 7 | 20936 | 119968 | 472430 | 1461084 | 3818501 | 8815672 | 18505065 | 36024450 |
| 8 | 85842 | 625609 | 2973105 | 10725499 | 31932733 | 82542263 | 191448588 | 407552845 |
| 9 | 349731 | 3247314 | 18643540 | 78488473 | 266223972 | 770328304 | 1973498062 | 4591979390 |
| 10 | 1418323 | 16800886 | ||||||
| 11 | 5731710 | 86739337 | ||||||
| 12 | 23100916 | 447283982 | ||||||
| 13 | 92882954 | 2304942650 | ||||||
| 14 | 372648740 |
| 1 | 1 | 1 | 2 | 0,5 |
| 2 | 2 | 4 | 7 | 0,5714285714 |
| 3 | 4 | 16 | 23 | 0,6956521739 |
| 4 | 7 | 49 | 71 | 0,6901408451 |
| 5 | 12 | 144 | 210 | 0,6857142857 |
| 6 | 23 | 529 | 638 | 0,829153605 |
| 7 | 39 | 1521 | 1894 | 0,803062302 |
| 8 | 67 | 4489 | 5570 | 0,8059245961 |
| 9 | 118 | 13924 | 16220 | 0,8584463625 |
| 10 | 204 | 41616 | 46898 | 0,8873725958 |
| 11 | 343 | 117649 | 134856 | 0,872404639 |
| 12 | 592 | 350464 | 386354 | 0,9071059184 |
| 13 | 1001 | 1002001 | 1102980 | 0,9084489293 |
| 14 | 1693 | 2866249 | 3137592 | 0,9135187112 |
| 15 | 2857 | 8162449 | 8892740 | 0,9178778419 |
| 16 | 4806 | 23097636 | 25114649 | 0,9196877886 |
| 17 | 8045 | 64722025 | 70686370 | 0,9156224177 |
| 18 | 13467 | 181360089 | 198319427 | 0,9144847368 |
| 19 | 22464 | 504631296 | 554813870 | 0,9095506138 |
| 20 | 37396 | 1398460816 | 1548231268 | 0,9032635142 |
| 21 | 62194 | 3868093636 | 4310814033 | 0,8973000474 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Algorithms for Generalized Numerical Semigroups
Carmelo Cisto
Universitá di Messina, Dipartimento di Matematica e Informatica, Viale Ferdinando Stagno D’Alcontres 31, 98166 Messina, Italy
,
Manuel Delgado
CMUP, Departamento de Matemática, Faculdade de Ciências, Universidade do Porto, Rua do Campo Alegre 687, 4169-007 Porto, Portugal
and
Pedro A. García-Sánchez
Departamento de Álgebra, Facultad de Ciencias, Campus Fuentenueva s/n, 18071 Granada, España
Abstract.
We provide algorithms for performing computations in generalized numerical semigroups, that is, submonoids of with finite complement in . These semigroups are affine semigroups, which in particular implies that they are finitely generated. For a given finite set of elements in we show how to deduce if the monoid spanned by this set is a generalized numerical semigroup and, if so, we calculate its set of gaps. Also, given a finite set of elements in we can determine if it is the set of gaps of a generalized numerical semigroup and, if so, compute the minimal generators of this monoid. We provide a new algorithm to compute the set of all generalized numerical semigroups with a prescribed genus (the cardinality of their sets of gaps). Its implementation allowed us to compute (for various dimensions) the number of numerical semigroups for genus that had not been attained before.
Key words and phrases:
Generalized numerical semigroup, gaps, minimal generators, genus
1991 Mathematics Subject Classification:
20M14, 05A15, 11D07,20-04
All the authors acknowledge partial support by the project MTM2017-84890-P, which is funded by Ministerio de Economía y Competitividad and Fondo Europeo de Desarrollo Regional FEDER. The second and third authors acknowledge partial support by CMUP (UID/MAT/00144/2013 and UID/MAT/00144/2019), which is funded by FCT (Portugal) with national (MEC) and European structural funds through the programs FEDER, under the partnership agreement PT2020. The second author acknowledges a sabbatical grant from the FCT: SFRH/BSAB/142918/2018.
1. Introduction
Let be a positive integer. A generalized numerical semigroup is a submonoid of with finite complement in , where by we mean the set of non negative integers. Submonoids of have been studied by many authors, and in particular those that are finitely generated, which are known in the literature as affine semigroups.
Generalized numerical semigroups were studied in [9] as a straightforward generalization of the well known concept of numerical semigroup, that is, a submonoid of with finite complement in . If is a submonoid of with finite complement in , then the elements in are the gaps of , and the genus of is . In [9], a procedure to compute the set of generalized numerical semigroups in with genus is presented; the cardinality of this set is denoted by . Also it is shown that for fixed genus , the map is a polynomial of degree . Other asymptotic properties are presented and several interesting conjectures are raised. In [12], the number is computed for several (low) values, and the concept of generalized numerical semigroup is extended to affine semigroups having finite complement in their associated spanning cones. In [6] (finite) sets generating generalized numerical semigroups are characterized, and a procedure to compute the set of gaps is presented.
The aim of this manuscript is to present procedures to determine if a given set of elements in generates a generalized numerical semigroup and, if so, compute the set of gaps of the resulting monoid. Dually, we present a procedure to determine if a finite set of points in represents the set of gaps of an affine semigroup, and then we give a method for constructing the minimal generating set of this affine semigroup. We use then these procedures to produce the set of generalized numerical semigroups with given genus. Careful implementations of the mentioned procedures have been made in order to make them usable in practice. A section is devoted to these implementations and the new data obtained from them.
The GAP [10] package numericalsgps [8] offers tools to deal with numerical and affine semigroups. The possibility of having fast methods to pass from generators to gaps and vice versa allows to describe an affine semigroup by its set of gaps (in the case this set is finite). Membership in a generalized numerical semigroup for which the gaps are known is then trivial, in contrast to membership for an affine semigroup for which only a set of generators is known. Also given an affine semigroup defined by a set of generators one may wonder if it is a generalized numerical semigroup, and thus compute its gaps. Benefiting of the features of the computer algebra system GAP, one can, once computed, add the set of gaps as an attribute of the semigroup (which in particular makes, from that moment on, the membership problem trivial during the GAP session). This opens the possibility of defining new methods for affine semigroups once their gaps are known. In particular, this provides ways to compute special gaps and pseudo-Frobenius elements (the later terminology was used in [11]). The implementations of these methods is available in [8], in particular in the files affine.* and afine-def.*. The documentation produced for these functions can be consulted in the GAP help system or in the manual of the package.
The paper is structured as follows. In Section 2, we summarize the main definitions and properties concerning generalized numerical semigroups that will be used in the algorithms presented in this manuscript. Sections 3, 4 and 5 are devoted to describe three algorithms, one to compute the set of all generalized numerical semigroups of given genus, another to calculate the set of gaps from a minimal generating set of a generalized numerical semigroup, and a procedure to compute the minimal set of generators of a generalized numerical semigroup, once its gaps are known. In Section 6, we provide a new and alternative way to produce all generalized numerical semigroups of given genus, different from that of Section 3. Then we have two sections with a rather experimental flavor. First we comment on the implementations of the algorithms; while in the last we gather some computational results obtained.
2. Basics on Generalized numerical semigroups
It is known that every submonoid of admits a unique minimal set of generators , that is, every element in is a linear combination of elements in with coefficients in (), and no proper subset of has this property. It is easy to see that, if is a monoid, the unique minimal set of generators is , where . This set is not always finite, and submonoids for which is finite are called affine semigroups.
We recall that a numerical semigroup is a submonoid of such that is a finite set. The elements of are called the gaps of (in some places they are known as holes) and the largest integer not in is the Frobenius number of , denoted by . The number is the genus of .
It is well known that the minimal set of generators of every numerical semigroup is finite. The elements of are sometimes known as the atoms (irreducibles, primitive elements) of or simply minimal generators. Moreover, the fact that is finite is equivalent to impose that the greatest common divisor of its minimal generating set is one. For an introduction to numerical semigroups please refer to [14], and also to [2], where it is explained where the names used above come from.
Among affine semigroups, we are interested in generalized numerical semigroups, which are submonoids in , with , and finite complement in (see [9] and [6]). The notions of gaps and genus can be then stated for generalized numerical semigroups as for numerical semigroups.
The most important differences between numerical semigroups and generalized numerical semigroups consist in the identification of a Frobenius element and those generators larger than this element: has a natural total order while has only a natural partial order (that is induced by the total order in ). The notions of Frobenius element and generators greater than the Frobenius element provide a way to build the semigroup tree of all numerical semigroups up to a given genus (see [4]). The corresponding notions for generalized numerical semigroups are given in [9] by introducing particular total orders in , called relaxed monomial orders.
Definition 1**.**
A total order, , on the elements of is called a relaxed monomial order if it satisfies:
- i)
if and if , then for all ;
- ii)
if and , then .
Example 2**.**
Among the relaxed monomial orders there are the well known monomial orders as defined, for instance, in [7, Section2]. A classical example is the following. Let , we define if and only if the first nonzero coordinate of , starting from the left, is positive. The relation is called lexicographic order and it is a relaxed monomial order.
Not all relaxed monomial orders are monomial orders. Take, for instance, to be an order on induced by a monomial order. We define if
- •
or if
- •
and . The order is a relaxed monomial order that is not a monomial order. For instance, in we have . However, , that is, is not a monomial order.
Following the proof of Corollary 6 in [7, Section 2.4], we can easily see that a relaxed monomial order in is a well-ordering. So it is possible to state the following general definition.
Definition 3**.**
Let be a submonoid of and a relaxed monomial order. We define the smallest element of with respect to , and it is called multiplicity of with respect to .
For what concerns the notions of Frobenius element and generators greater than the Frobenius element we follow [9]. It is worth to mention that the same definition of Frobenius element is stated for every submnoids of in [11], with the difference that the existence of a Frobenius element is not always guaranteed. In particular, the fact that is a generalized numerical semigroup is a sufficient condition for the existence of a Frobenius element. A different definition, also inspired in the numerical semigroup setting, is that of Frobenius vector, as presented in [1].
Definition 4**.**
Let be a generalized numerical semigroup. Given a relaxed monomial order in , we define:
- (1)
to be the greatest element in with respect to , called Frobenius element of with respect to (we write for convenience); 2. (2)
to be the set of minimal generators greater than with respect to .
Given a relaxed monomial order in , it is possible to arrange the set of all generalized numerical semigroups in as a rooted tree , with root in (in the same way as for numerical semigroups, see [4]). In particular, we can write an algorithm that provides all generalized numerical semigroups in of a given genus . The following result, easy to prove and stated in a more general setting, is useful in this context.
Proposition 5**.**
Let be an affine semigroup, and let . Then is an affine semigroup and it is generated by .
Remark 6**.**
The system of generators described in Proposition 5 does not have to be a minimal generating system.
Example 7**.**
Let . Then . Let be the lexicographic order. So , and . Let . By Proposition 5, is a set generating for . However, , whence is not an atom of .
Observe that from the definition of relaxed monomial order, for a given submonoid and a given relaxed monomial order , the multiplicity of with respect to is a minimal generator of . Due to its relevance in this work, we state this fact as a lemma.
Lemma 8**.**
Let be a submonoid of , and let be relaxed monomial order on . Then .
As a consequence we get the following result.
Corollary 9**.**
Let be a submonoid of , and let be a relaxed monomial order in . Then is a submonoid of .
If is a numerical semigroup, and we remove one of its minimal generators, then we obtain another numerical semigroup, and the genus increases by one. We can go the other way around by adding gaps to . The only gaps that make a numerical semigroup are those that are pseudo-Frobenius numbers of () fulfilling that . These gaps are known as special gaps, and can be used to construct the set of oversemigroups of a numerical semigroup [15]. If the generator we remove from is greater than its Frobenius number, then this generator becomes trivially the Frobenius number of . Also the Frobenius number of is a special gap of (unless ). Thus adjoining to produces a numerical semigroup. An analogue for generalized numerical semigroups is given in the following result, that suggests the idea for a simple procedure to generate all generalized numerical semigroups in of given genus .
Proposition 10**.**
[9, Proposition 4.1]* Let be a generalized numerical semigroup, a relaxed monomial order in and a minimal generator.*
- •
The set is a generalized numerical semigroup, moreover .
- •
The set is a generalized numerical semigroup. Furthermore if , then .
In particular, every generalized numerical semigroups of genus is obtained from a generalized numerical semigroup of genus , by removing an element of .
Interesting combinatorial properties involving the number of generalized numerical semigroups in of a given genus are provided in [9]. If , we denote by the -vector space spanned by the elements of .
Let , with and positive. We will use the following notation.
- •
is the set of all generalized numerical semigroups with genus in ; is the cardinality of .
- •
; denotes the cardinality of .
Theorem 11**.**
[9, Proposition 5.3]** Let , and define
[TABLE]
Then is a polynomial in with degree , and for all .
3. A first algorithm generating all generalized numerical semigroups of a given genus
Now we can present a first algorithm that computes the number of all generalized numerical semigroup in of a given genus , as explained in [9]. The main idea is the following: starting from the trivial generalized numerical semigroup of genus [math], whose set of generators is the standard basis of the vector space , denoted by , we produce all generalized numerical semigroups of genus from the ones of genus , for from up to . Fixed a relaxed monomial order , for every generalized numerical semigroup of genus , if , we produce the generalized numerical semigroups , all of them with genus . In this way all generalized numerical semigroups of genus are produced. If we consider the directed graph whose set of vertices is the set of all generalized numerical semigroups, and whose edges are the pairs (we say that is is a son of ) with a generalized numerical semigroup, . Remark that, in , the generalized numerical semigroups are produced without redundancy, that is, every generalized numerical semigroup is the son of a unique generalized numerical semigroup. In fact, if is the son of both and , then . By using Proposition 10, we have the following result.
Theorem 12**.**
Let be a relaxed monomial order. Then the graph is a rooted tree whose root is . Moreover, if is a generalized numerical semigroup, then the sons of are with , and there is a unique path in joining and .
Recall that we denote by the set of generalized numerical semigroups in of genus , and . From the above discussion, the computation of may be done by computing of the sets , for all . So to obtain we do not need actually to compute every semigroups in .
Corollary 13**.**
Let and be a relaxed monomial order. Then
[TABLE]
Algorithm 1 consists of pseudocode for the procedure discussed above for computing . We have labeled some lines of the pseudocode in order to explain them further.
- •
Line 1 contains the initial step of the algorithm, that is, the root of . It starts from the trivial generalized numerical semigroup , which is finitely generated by the standard-basis vectors and whose set of gaps is empty. Moreover, it is the unique generalized numerical semigroup of genus 0, so .
- •
Line 1: is the set of all generalized numerical semigroups in of genus ; we represent each one of these semigroups by a finite system of generators .
- •
Line 1: is not in general the minimal system of generators for ; a refinement is needed to find and to continue the process.
- •
Lines 1 and successive: if , then is computed and the algorithm ends. One can compute also the set , it suffices to run another extra for-loop step. If , all generalized numerical semigroups of genus are produced from the generalized numerical semigroups of genus , by Proposition 10.
- •
Line 1: a finite system of generators for can be obtained from Proposition 5.
Remark 14**.**
In Line 3 it is required to compute the set of minimal generators of a generalized numerical semigroup , once a finite set of generators of is known. This can be performed in different ways. For instance, we can try to decide when an element is linear combination of elements in with non negative integers coefficients. This passes through determining the existence of nonnegative integer solutions of a linear system of Diophantine equations. Also, we can observe that if and only if for every generator . This can be performed recursively, or in the case we know the gaps of , this test is straightforward. The caveat of this latter approach is memory usage, since we would need to store the set of gaps for all semigroups computed.
The previous algorithm produces the rooted tree , where the root is and the elements of depth are all generalized numerical semigroups of genus . Different relaxed monomial orders will produce different rooted trees, as the Frobenius elements and the generators greater than them depend on the chosen monomial order. However, with every relaxed monomial order, the sons of all generalized numerical semigroups of genus are going to be all generalized numerical semigroups of genus , generated without redundancy. Thus these trees all have at level the set of all generalized numerical semigroups with genus .
4. An algorithm to compute minimal generators of a generalized numerical semigroup from its set of gaps
Let be a generalized numerical semigroup and let be a relaxed monomial order. We suppose that the set of gaps is known and we want to find the set of minimal generators of . If , then we know that is generated by , the standard basis vectors of . If is a proper subset of , our procedure is based on the following result, that can be found in a more general setting in [13, Corollary 9].
Corollary 15**.**
Let be a generalized numerical semigroup of genus and let be a relaxed monomial order in . Suppose that . Then
- •
* is a minimal generator of ,*
- •
for every , is a generalized numerical semigroup, and
- •
, for every .
Proof.
It follows easily from Proposition 10, since . ∎
As above, we have labeled some lines in the pseudo code in order to explain how it works.
- •
Line 1: we arrange the elements of with respect to .
- •
Line 2: at this point is a finite set of generators of (Proposition 5); a refiniement into a minimal generating set is performed in the next steps.
- •
Line 3: the elements in are already minimal generators of , so we only have to decice which element in are minimal generators. Observe that is a minimal generator of a semigroup if and only if for every generator of , and in this case we have the advantage of knowing the gap set of the semigroup computed.
Observe that while Algorithm 1 covers all the branches of the tree with respect to (up to depth ), Algorithm 2 walks through the unique branch linking with , in the case is actually a generalized numerical semigroup such that . Moreover, Algorithm 2 can verify if a given finite set has the property that is a generalized numerical semigroup.
Another way to test if a given set is the set of gaps of a submonoid in is provided by the next result. For we define
[TABLE]
where denotes the usual partial order in .
Proposition 16**.**
Let . Then is a monoid if and only if for every , for all .
Proof.
Necessity. Suppose there exists such that for some . Then with ; a contradiction.
Sufficiency. Suppose that is not a monoid. Then there exists such that with . In particular, and , contradicting the hypothesis. ∎
Observe that is a finite set for each . So if is a finite set, the condition in the previous proposition is easy to test. In particular, it is also possible to obtain a procedure to test if a given finite set is the set of gaps of a generalized numerical semigroup, without using Algorithm 2.
5. An algorithm to compute the set of gaps of a generalized numerical semigroup from a generating set
Let be a generalized numerical semigroup and suppose that a finite set of (not necessarily minimal) generators is known. A possible way to compute is via the following characterization that appears in [6].
Theorem 17**.**
[6, Theorem 2.8]** Let and let be the monoid generated by a set . Then is a generalized numerical semigroup if and only if the set fulfills the following conditions.
- (1)
*For all , there exist , , such that , and . In particular, if is the intersection of with the *th coordinate, then is a numerical semigroup. 2. (2)
For every , with , there exist such that and for some .
Furthermore, if we define as
[TABLE]
where for all , then .
A brief description of main parts of the algorithm follows.
- •
Line 1: we check if the first condition of Theorem 17 holds; if not, does not generate a generalized numerical semigroup.
- •
Line 2: we check if the second condition of Theorem 17 is satisfied, and if this is not the case, does not generate a generalized numerical semigroup.
- •
Line 3: we compute all coordinates of the vector referred in Theorem 17 such that .
- •
Line 4: observe that is a finite set, so we have to look for the gaps of the semigroup among a finite number of elements.
6. An alternative procedure to compute all generalized numerical semigroups of given genus
The algorithm described in Section 3 allows to obtain all generalized numerical semigroups in up to genus , and in particular, to compute , the cardinality of . Observe that with that procedure, in order to compute one has to compute all for all , that is, the whole semigroup tree up to level .
In this section we define a rooted tree that contains all generalized numerical semigroups in of fixed genus , so that we are able to compute the set without considering all generalized numerical semigroups of genus less than . Such rooted tree is inspired by the ordinarization tranform for numerical semigroups, introduced in [5].
Proposition 18**.**
Let be a relaxed monomial order in and . Suppose that the set is finite. Then the set is a generalized numerical semigroup.
Proof.
By hypothesis, is finite. Moreover if then and , so since is a relaxed monomial order. ∎
Definition 19**.**
Let be a relaxed monomial order. A monoid satisfying the hypothesis of the above proposition is an ordinary generalized numerical semigroup with respect to .
Let be the list of the first elements in , ordered by . We denote the ordinary generalized numerical semigroup in of genus with respect to by
[TABLE]
Observe that the previous definition of ordinary generalized numerical semigroup depends strongly on the relaxed monomial order defined: different relaxed monomial orders define different ordinary generalized numerical semigroup of given genus. While for numerical semigroups, once is fixed, there exists a unique ordinary numerical semigroup of genus , for generalized numerical semigroups (following the above definition) the uniqueness of the ordinary generalized numerical semigroup of genus can only be guaranteed by fixing also a relaxed monomial order .
If is a generalized numerical semigroup, we can define the set of special gaps of as
[TABLE]
Observe that and do not depend on the fixed relaxed monomial order. The following result, which is the analogue to [14, Proposition 4.33] for generalized numerical semigroups, characterizes the elements in . It highlights the duality between the concepts of minimal generator and special gap. The proof is straightforward and we will omit it.
Proposition 20**.**
Let be a generalized numerical semigroup and let . Then is a generalized numerical semigroup if and only if .
The following result will help us to construct a generalized numerical semigroup from another by removing the multiplicity and adding the Frobenius element, and thus keeping the genus untouched.
Lemma 21**.**
Let be a generalized numerical semigroup, let be a relaxed monomial order and suppose that is not ordinary with respect to . If , then
- •
* is a generalized numerical semigroup,*
- •
, , and
- •
.
Proof.
From the definition of relaxed monomial order, . Hence is a generalized numerical semigroup in light of Proposition 20. Since is not ordinary, we have that . In fact, if is not ordinary, there exist and such that , and in particular . It follows that . Thus, by Corollary 9, is a generalized numerical semigroup.
Also, as is a generalized numerical semigroup, we have and, by Proposition 20, . Moreover, is a minimal generator of and . ∎
Definition 22**.**
Recall that is the set of all generalized numerical semigroups in of genus . We define the ordinarization transform with respect to , as follows:
[TABLE]
Note that this map is well defined by Lemma 21.
Lemma 23**.**
Let be a generalized numerical semigroup and a relaxed monomial order in . If there exist with and , then .
Proof.
If , then we have , and so in light of Lemma 21, it suffices to prove that and . Since , we deduce for every , and consequently . Furthermore, since , we get , whence . ∎
Let , be a relaxed monomial order in , and be the set of pairs of the form . We denote the directed graph by .
Theorem 24**.**
Let . The graph is a rooted tree with root . Moreover, if , then the sons of are the semigroups of the form with , , and .
Proof.
Let , we define the following sequence:
- •
,
- •
T_{i+1}=\left\{\begin{array}[]{ll}\mathcal{O}_{\preceq}(T_{i})&\mbox{if }T_{i}\neq R_{g,d}(\preceq),\\ R_{g,d}(\preceq)&\mbox{otherwise,}\end{array}\right.
in particular for all . This sequence stabilizes at a certain point, since the multiplicity must be among the first elements of (ordered by ), and at each step the multiplicity increases. Let be the first integer such that . So the edges provide the unique path from to the ordinary numerical semigroup of genus (with respect to ).
By Lemma 23, every pair is an edge of for every choice of and as in the statement, that is is a son of . Conversely let be an edge of . From the definition we have so . In particular and from Lemma 21 we have with , and . This fact ensures that all descendants in of a generalized numerical semigroup are of the described form. ∎
Corollary 25**.**
Let . Then is a leaf in if and only if for all either or .
Theorem 24 allow us to write another algorithm to produce all generalized numerical semigroups in of genus ; the previous corollary gives us the stop condition.
Let us give a few comments regarding the labeled lines of Algorithm 4.
- •
Line 1: the algorithm stops when all computed semigroups are leaves of ; we gather in the semigroups for which we have to do computations at each step.
- •
Line 2: for each semigroup of the current step we have to compute its sons, and for this we need all semigroups with and smaller than with respect to .
- •
Line 3: for each semigroup computed in the previous line we compute for all . These are the sons of all semigroup in , that we collect in .
- •
Line 4: in the next step we have to repeat the same procedure considering the semigroups in .
Example 26**.**
Let be the lexicographic order in . Consider the semigroup , we compute its sons in .
Following the pseudocode we start with .
In line 1 we have so . So, following line 2 of the pseudocode, we consider:
- •
, with ,
- •
, with
This means that we obtain . So the sons of , obtained with the procedure in line 3, are the following:
- •
,
- •
,
- •
,
- •
,
- •
,
- •
,
- •
,
- •
.
In particular and .
At this point (that is line 4) and we start again the procedure considering all semigroups in . If we continue, we obtain all generalized numerical semigroup of genus .
Observe that for the set is empty, so they are leaves in and in this second step we have to consider the procedures in line 2 and line 3 only for the semigroups and .
The sons of are:
- •
,
- •
,
- •
,
- •
,
- •
.
The sons of are:
- •
.
In particular, in line 3 of the second step we obtain . Now the third step starts.
The semigroups are leaves in , so for the successive computations we have to consider .
The sons of are:
- •
,
- •
,
- •
.
The sons of are:
- •
,
- •
,
- •
,
- •
.
The only son of is:
- •
.
At the end of third step we have . For each one of these semigroups and the set is empty, so the procedure ends. So we have obtained exactly 23 different generalized numerical semigroups. We can see a representation of the graph in Figure 1.
By Theorem 24 it is possible to produce all generalized numerical semigroups of genus in starting from . This procedure works as in the previous example, and it avoids considering all generalized numerical semigroup of genus less then , as happens in the algorithm given in Section 3.
7. Some remarks concerning implementations
The relaxed monomial order GAP used by default is the lexicographic order. Our current implementations are not yet prepared to give the user the possibility of choosing another order.
There was an important speedup in a preliminary implementation of Algorithm 3 after observing that the cartesian product of elements of the numerical semigoups in the axes consists of elements of the generalized numerical semigroup. Thus one may exclude this set from the set of possible gaps. Note one can use the relatively efficient function that the numericalsgps package provides for computing the set of small elements of a numerical semigroup.
We implemented Algorithm 4 in a recursive way. It explores the tree in a depth first manner. Note that an exploration in a breadth first manner soon causes memory problems since at least the semigroups of previous genus have to be stored, even when one is just concerned with counting. By doing this in a depth first manner there is only a small amount of information that needs to be stored (unless we go very deep in the tree), the disadvantage being that one has to decide in advance the genus one wants to attend. One somehow overcomes this by making some previsions on the time that will be spent based on the time taken for computations of lower genus. Furthermore, our implementation includes the computation of the coefficients needed for the polynomial referred in Theorem 11. In particular we considered the following GAP code:
recursiveAffineSons:= function(s,N,L)
**local** H, gens, ml, smallgaps, smallPFs, SmSG, sons, t, E, i;
H:=**Gaps**(s);
gens:=**Generators**(s);
ml:=**Minimum**(gens); *#multiplicity*
smallgaps:=**Filtered**(H,j->j<ml);
smallPFs:=**Filtered**(smallgaps,g->**not** **ForAny**(gens,n -> n+g **in** H));
SmSG:=**Filtered**(smallPFs,g->**not**(2*g **in** H));
*#special gaps smaller than the multiplicity*
**if** **not**(**IsEmpty**(SmSG)) **then**
sons:=affineSons(s,SmSG);
**for** t **in** sons **do**
E:=recursiveAffineSons(t,N,L);
N:=E[1];
L:=E[2];
**od**;
**fi**;
N:=N+1;
i:=**Rank**(H);
L[i]:=L[i]+1;
**return** [N,L];
end;
We used the previous recursive procedure as a local function, initializing (while is the lexicographic order), N to zero and L to be the zero list with entries. In fact, the code works in such a way that at the end of all recursion steps the variable N will contain the number of all generalized numerical semigroups with given genus, and the th element of the list L will contain the number of generalized numerical semigroups whose set of gaps generates a vector space of dimension . These variables are updated for the first time when the current semigroup has no sons and successively each time going up in the recursion. The local function affineSons computes the sons of the current semigroup. This function requires as input also the set of special gaps smaller than the multiplicity of the current semigroup, in order to avoid to compute many times the set SmSG.
Algorithm 4 can be used also to compute the number of numerical semigroups of given genus. The present implementation in the package numericalsgps of the function NumericalSemigroupsWithGenus designed for this uses the “standard tree” and it is faster than the implementation we have for our algorithm. This is maybe due to the choice of a more appropriate encoding, which in the case of the package is presently based on Apéry sets. Even if it can be introduced also for affine semigroups (see [11]), the Apéry set is in general an infinite set for generalized numerical semigroups, while it is finite for numerical semigroups. For this and other reasons, in what concerns the aim of Algorithm 4, at this moment we do not know if it is not possible to work with Apéry sets (or something related to it) in generalized numerical semigroups in the same way as for numerical semigroup.
In order to have sufficient examples to test our implementations at the time this work was being prepared we implemented a method to generate a pseudo-random generalized numerical semigroup of a genus given: from a semigroup of genus one obtains one of genus by removing one minimal generator at random (obtained using the GAP function RandomList).
8. Some computational results
Let, as above, be the number of all generalized numerical semigroups in of genus . If , it has been proved that the sequence has a Fibonacci-like behaviour (see [16]), that is, where is the golden ratio, as conjectured by M. Bras-Amóros in [3]. That conjecture was justified by the computation of the values for up to . A natural question is whether the sequence with has a particular behaviour. In order to shed some light on it we did several computations, presented in the tables in this section.
Remark 27**.**
The values presented in Table 1 for are new. The others coincide with those presented in [12, Table 3], except for , which seems to be wrong in that paper. Our suspicion is based on the fact that that the number in the second column of the table in their paper, which corresponds to the number in the forth column of Table 1, is smaller than expected, from the regularity exhibited by the sequence of values in that column.
We compute some values of in order to build the polynomial of Theorem 11. Some polynomials are given in [9], exactly:
- •
- •
- •
Other values of have been computed, in particular:
[TABLE]
In [3] one can see the following known values:
[TABLE]
so the following polynomials can be expressed :
- •
,
- •
,
- •
,
- •
,
- •
,
- •
.
Remark 28**.**
The values of Table 2 up to dimension 9 have been effectively computed. Of course, they coincide with the values given by the polynomials mentioned above, in the cases this value exists. As a consequence of our computations we observe that we are able to compute the number of generalized numerical semigroups with genus up to 9 for any dimension (using the polynomial given by Theorem 11). The last column of the table contains the values for dimension 10.
All the values presented are new, except for those of dimension 3, up to genus 13. These already appear in [12, Table 3], and our computations confirm them.
We end the paper by doing some comparisons between and , for not greater than . Recall that, up to the values appear for the first time in this work, while the values of for the same values of are well known. The comparisons are registered in Table 3.
Note that for all the ’s in the table we have that . Also, note that the ratio is increasing from to and starts then to be decreasing until reaching . What happens next is not known, since has not been computed for .
It is easy to check using the data presented in Table 2 that having decreasing ratios is no longer true when is bigger than . In fact for , one quickly has , by letting grow. Moreover the ratio seems to grow quickly, as grows.
Let us return to the case . Some questions arise:
- (1)
Is it true for every ? 2. (2)
Does exist, and is nonzero?
If the second question has a positive answer, one has that , where is the golden ratio, as can easily be shown.
If the first question has a positive answer and the ratio is decreases from a certain value on (as our experiments suggest), then it is true also that with .
The numerical data collected is for the moment not sufficient to give us too much confidence on our observations or to state any nice conjecture (especially for the case ), as happened with Bras-Amorós when she realized that the sequence of the number of numerical semigroups counted by genus had a Fibonacci-like behaviour. Since the algorithms and the implementations have still space to be improved, obtaining more numerical data may be seen as an active goal.
Acknowledgements
The first and second authors want to thank the amazing hospitality found in the Instituto de Matemáticas de la Universidad de Granada (IEMath-GR). Most of the results in this paper where obtained during their stay there.
The authors also thank the Centro de Servicios de Informática y Redes de Comunicaciones (CSIRC), Universidad de Granada, for providing the computing time, specially Rafael Arco Arredondo for installing this package and the extra software needed in alhambra.ugr.es, and Santiago Melchor Ferrer for helping in job submission to the cluster.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] A. Assi, P.A. García-Sánchez, and I. Ojeda. Frobenius vectors, hilbert series and gluings of affine semigroups. Journal of Commutative Algebra , 7(3):317–335, 2015.
- 2[2] Abdallah Assi and Pedro A. García-Sánchez. Numerical semigroups and applications , volume 1 of RSME Springer Series . Springer, 2016.
- 3[3] Maria Bras-Amorós. Fibonacci-like behavior of the number of numerical semigroups of a given genus. Semigroup Forum , 76(2):379–384, 2008.
- 4[4] Maria Bras-Amorós. Bounds on the number of numerical semigroups of a given genus. Journal of Pure and Applied Algebra , 213(6):997–1001, 2009.
- 5[5] Maria Bras-Amorós. The ordinarization transform of a numerical semigroup and semigroups with a large number of intervals. Journal of Pure and Applied Algebra , 216(11):2507–2518, 2012.
- 6[6] Carmelo Cisto, Gioia Failla, and Rosanna Utano. On the generators of a generalized numerical semigroup. Analele Univ. “Ovidius” , 27(1):49–59, 2019.
- 7[7] David Cox, John Little, and Donal O’shea. Ideals, varieties, and algorithms , volume 3. Springer, 2007.
- 8[8] M. Delgado, P. A. Garcia-Sanchez, and J. Morais. Numerical Sgps, a package for numerical semigroups, Version 1.1.11. https://gap-packages.github.io/numericalsgps , Mar 2019. Refereed GAP package.
