Constructing the set of all numerical semigroups containing a given numerical semigroup In order to construct the set of numerical semigroups containing a fixed numerical semigroup S, one first constructs its unitary extensions, that is to say, the sets S\cup\{g\} that are numerical semigroups with g a positive integer. This is achieved by constructing the special gaps of the semigroup, and then adding each of them to the numerical semigroup. Then we repeat the process for each of these new numerical semigroups until we reach {\mathbb N} .

These procedures are described in . s is a numerical semigroup. The output is the set of numerical semigroups containing it.
gap> s := NumericalSemigroup(3,5,7);; gap> OverSemigroups(s); [ <The numerical semigroup N>, <Numerical semigroup with 2 generators>, <Numerical semigroup with 3 generators>, <Numerical semigroup with 3 generators> ] gap> List(last,s->MinimalGenerators(s)); [ [ 1 ], [ 2, 3 ], [ 3 .. 5 ], [ 3, 5, 7 ] ] gap> OverSemigroupsNumericalSemigroup(s) = OverSemigroups(s); true
Constructing the set of numerical semigroup with given Frobenius number Finding the set of all numerical semigroups with a given Frobenius number is not accomplished via over semigroups. In order to achieve this, we use fundamental gaps. If the multiplicity is fixed, then the construction relies on the calculation of irreducible numerical semigroups with that Frobenius number and multiplicity. f is an integer. The output is the set of numerical semigroups with Frobenius number f. The algorithm implemented is given in .
gap> Length(NumericalSemigroupsWithFrobeniusNumberFG(15)); 200
f and m are integers. The output is the set of numerical semigroups with Frobenius number f and multiplicity m. The algorithm implemented is given in .
gap> Length(NumericalSemigroupsWithFrobeniusNumberAndMultiplicity(15,6)); 28
f is an integer. As happens with the function , the output is the set of numerical semigroups with Frobenius number f. It makes use of to compute the semigroups with the Frobenius number given for all the possible multiplicities.
gap> Length(NumericalSemigroupsWithFrobeniusNumber(15)); 200
Constructing the set of numerical semigroups with genus g Given a numerical semigroup of genus g (that is, with exactly g gaps), removing minimal generators, one obtains numerical semigroups of genus g+1. In order to avoid repetitions, we only remove minimal generators greater than the Frobenius number of the numerical semigroup (this is accomplished with the local function sons).

These procedures are described in and . g is a nonnegative integer. The output is the set of numerical semigroups with genus g. If the user just wants to use some numerical semigroup with a given genus pseudo-randomly choosen, he is probably looking for the function .
gap> NumericalSemigroupsWithGenus(5); [ <Numerical semigroup with 6 generators>, <Numerical semigroup with 5 generators>, <Numerical semigroup with 5 generators>, <Numerical semigroup with 5 generators>, <Numerical semigroup with 5 generators>, <Numerical semigroup with 4 generators>, <Numerical semigroup with 4 generators>, <Numerical semigroup with 4 generators>, <Numerical semigroup with 4 generators>, <Numerical semigroup with 3 generators>, <Numerical semigroup with 3 generators>, <Numerical semigroup with 2 generators> ] gap> List(last,MinimalGenerators); [ [ 6 .. 11 ], [ 5, 7, 8, 9, 11 ], [ 5, 6, 8, 9 ], [ 5, 6, 7, 9 ], [ 5, 6, 7, 8 ], [ 4, 6, 7 ], [ 4, 7, 9, 10 ], [ 4, 6, 9, 11 ], [ 4, 5, 11 ], [ 3, 8, 10 ], [ 3, 7, 11 ], [ 2, 11 ] ]
Constructing the set of numerical semigroups with a given set of pseudo-Frobenius numbers Refer to .

These procedures are described in , and are used to find the set of numerical semigroups with a prescribed set of pseudo-Frobenius numbers. PF is a list of positive integers (given as a list or individual elements). The output is: in case there exists a numerical semigroup S such that PF(S)=PF: a list [forced\_gaps,forced\_elts] such that: forced\_gaps is contained in {\mathbb N} - S for any numerical semigroup S such that PF(S)=\{g\_1,\ldots,g\_n\} forced_elts is contained in S for any numerical semigroup S such that PF(S)=\{g\_1,\ldots,g\_n\} "fail" in case it is found some condition that fails.
gap> pf := [ 58, 64, 75 ]; [ 58, 64, 75 ] gap> ForcedIntegersForPseudoFrobenius(pf); [ [ 1, 2, 3, 4, 5, 6, 7, 8, 11, 15, 16, 17, 25, 29, 32, 58, 64, 75 ], [ 0, 59, 60, 67, 68, 69, 70, 71, 72, 73, 74, 76 ] ]
Is just a quicker version of

fg is a list of integers that we require to be gaps of the semigroup; fe is a list of integers that we require to be elements of the semigroup; PF is a list of positive integers. The output is: in case there exists a numerical semigroup S such that PF(S)=PF: a list [forced\_gaps,forced\_elts] such that: forced\_gaps is contained in {\mathbb N} - S for any numerical semigroup S such that PF(S)=\{g\_1,\ldots,g\_n\} forced_elts is contained in S for any numerical semigroup S such that PF(S)=\{g\_1,\ldots,g\_n\} "fail" in case it is found some condition that fails.
gap> pf := [ 15, 20, 27, 35 ];; gap> fint := ForcedIntegersForPseudoFrobenius(pf); [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 20, 27, 35 ], [ 0, 19, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36 ] ] gap> free := Difference([1..Maximum(pf)],Union(fint)); [ 11, 13, 14, 17, 18, 21, 22, 24 ] gap> SimpleForcedIntegersForPseudoFrobenius(fint[1],Union(fint[2],[free[1]]),pf); [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 20, 24, 27, 35 ], [ 0, 11, 19, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36 ] ]
PF is a list of positive integers (given as a list or individual elements). The output is: a list of numerical semigroups S such that PF(S)=PF. When Length(PF)=1, it makes use of the function

gap> pf := [ 58, 64, 75 ]; [ 58, 64, 75 ] gap> Length(NumericalSemigroupsWithPseudoFrobeniusNumbers(pf)); 561 gap> pf := [11,19,22];; gap> NumericalSemigroupsWithPseudoFrobeniusNumbers(pf); [ <Numerical semigroup>, <Numerical semigroup>, <Numerical semigroup>, <Numerical semigroup>, <Numerical semigroup> ] gap> List(last,MinimalGenerators); [ [ 7, 9, 17, 20 ], [ 7, 10, 13, 16, 18 ], [ 9, 12, 14, 15, 16, 17, 20 ], [ 10, 13, 14, 15, 16, 17, 18, 21 ], [ 12, 13, 14, 15, 16, 17, 18, 20, 21, 23 ] ] gap> Set(last2,PseudoFrobeniusOfNumericalSemigroup); [ [ 11, 19, 22 ] ] g
PF is a list of positive integers (given as a list or individual elements). Alternatively, a record with fields "pseudo_frobenius" and "max_attempts" may be given. The output is: A numerical semigroup S such that PF(S)=PF. Returns fail if it concludes that it does not exist and suggests to use NumericalSemigroupsWithPseudoFrobeniusNumbers if it is not able to conclude...

When Length(PF)=1 or Length(PF)=2 and 2*PF[1] = PF[2], it makes use of the function .

gap> pf := [ 83, 169, 173, 214, 259 ];; gap> ANumericalSemigroupWithPseudoFrobeniusNumbers(pf); <Numerical semigroup> gap> gen := MinimalGeneratingSystem(last); [ 38, 57, 64, 72, 79, 98, 99, 106, 118, 120, 124, 132, 134, 146, 147, 154, 165, 168, 179 ] gap> ns := NumericalSemigroup(gen); <Numerical semigroup with 19 generators> gap> PseudoFrobeniusOfNumericalSemigroup(ns); [ 83, 169, 173, 214, 259 ]