The number of numerical semigroups with given genus

by P.A. García-Sánchez, D. Marín-Aragón, and A.M. Robles-Pérez

A numerical semigroup is a submonoid of the set of nonnegative integers with respect to addition, with the special property that only finitely many positive integers do not belong to the semigroup. These integers not in the numerical semigroup are called gaps, and their cardinality, the genus of the numerical semigroup.

The number of numerical semigroups with a given genus seems to grow as the genus grows. It was conjectured (and later solved) that this sequence grows as the Fibonacci series.

GAP offers a package for working with numerical semigroups (NumericalSgps), and a package for displaying data in a jupyter notebook is under development: francy. FranyMonoids takes profit of them both. In order to use it in GAP we load it with LoadPackage.

This notebook has been developed by Manuel Martins for the francy package, and has been copied from

In [ ]:
In [ ]:
In [ ]:

FrancyMonoids loads both NumericalSgps and francy, so for instance we may have a look at the first 15 elements of our sequence.

In [ ]:
List([1..15], g->Length(NumericalSemigroupsWithGenus(g)));

The maximum genus for which we know the number of numerical semigroups with this genus is 70. Just the set of numerical semigroups with genus less than or equal to 57 is worth 14TB of memory. In this repository you will find the sequence up to 70.

Even though it has been shown that the number of numerical semigroups with given genus grows like the Fibonacci sequence, we still do not know if there are more numerical semigroups with genus $g+1$ than numerical semigroups with genus $g$. This is true asymptotically, and for genus less than 71.

The tree of numerical semigroups

For a given numerical semigroup $S$, if $n$ is such that it cannot be written as a sum of two nonzero elements of $S$, then $S\setminus\{n\}$ is a numerical semigroup with genus the genus of $S$ plus one. The elemens $n$ with this condition are known as atoms, irreducibles or minimal generators of $S$, and it is easy to show that there are finitely many of them. Also if $S$ is a numerical semigroup and $F$ is the largest integer not in $S$ (known as the Frobenius number of $S$), then $S\cup\{F\}$ is again a numerical semigroup with genus equal to the genus of $S$ minus one. One can easily see that we can arrange the set of all numerical semigroup with genus up to $g$ in a tree rooted in $\mathbb{N}$ and where each level $i$ contains all numerical semigroups with genus $i$. In order to construct the next level one removes minimal generators greater than the Frobenius number (in this way we do not get repetitions). The way this tree is constructed gives different algorithms to compute all numerical semigroups with a given genus.

Let us have a look at the tree of numerical semigroups with genus up to 6. We start with $\mathbb{N}$, whose unique minimal generator is $1$ and Frobenius number -1. After removing it, we obtain $\{0,2,3,\to\}$ with minimal generators $2$ and $3$, and Frobenius number 1. Then we can remover either $2$ or $3$, and keep repeating this process until we reach genus $6$.

Francy gives the possibility of drawing d3js interactive trees. Methods to construct trees and draw them using GAP are provided in francy.

In [ ]:

Dark blue dots in levels over the last level are leafs, that is, numerical semigroups with no irreducibles greater than the Frobenius number. Non-leaves are "collapsable": by clicking on them the subtree rooted in that node collapses to the node. Also zoom and draging is possible.

It would be nice to control how many leaves do we have in a certain level, and how many numerical semigroups with more than one descendant.

Fixing the multiplicity

The multiplicity of a numerical semigroup is the least positive integer in the semigroup. A simplification of the above problem would be to see if for a given multiplicity $m$ the number of numerical semigroups with genus $g$ and multiplicity $m$ grow as $g$ grows.

Let us have a look at how the tree restricted to multiplicity three looks like.

First, we must change MinimalGenerators in the above example to compute those generators that are not the multiplicity, and then replace $\mathbb{N}$ (the numerical semigroup generated by 1) by $\{0\}\cup(3+\mathbb{N})$, which has minimal generators $3$, $4$ and $5$.

In [ ]:
gens:=s->Difference(MinimalGenerators(s), [Multiplicity(s)]);
In [ ]:
In [ ]:

Let us go a bit further.

In [ ]:

And a couple of steps beyond.

In [ ]:

It looks like a pattern arises. And indeed is the case. There are several places where numerical semigroups with multiplicity 3 and genus $g$ has been counted, but this drawing suggests that one can even which of these are leaves, and those having just one son or two sons (there will be no more than two sons, since multiplicity three implies that at most we have three minimal generators, and we cannot remove the smallest one, the multiplicity).

If you want to know more, please have a look at this preprint. You will find there references and results for multiplicity up to five. This is a quite easy problem to state, and it has produced a nice bunch of beautiful papers.

An introduction to numerical semigroups can be found here and some applications in this monograph.