Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A B C Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

14 Numerical sets
 14.1 Definitions and basic operations
 14.2 Notable elements of numerical sets
 14.3 Associated sets to numerical semigroups
 14.4 Integer partitions associated to numerical sets

14 Numerical sets

A numerical set is a subset of the non-negative integers containing 0 and with finite complement in the non-negative integers. Numerical semigroups and normalized ideals of numerical semigroups (ideals whose minimal elements are zero) are particular cases of numerical sets.

14.1 Definitions and basic operations

We describe in this section the basic functions to create and compute notable elements of numerical sets.

14.1-1 NumericalSetBySmallElements
‣ NumericalSetBySmallElements( L )( function )

L is a list of non-negative integers containing 0. The output is the numerical set \(\textit{L}\cup (\max(\textit{L})+\mathbb{N})\).

gap> s:=NumericalSetBySmallElements([0,1,2,3,5,6,9,10,12]);
<Numerical set>
gap> Print(s);
{0,...,3,5,6,9,10,12,->}

14.1-2 NumericalSetByGaps
‣ NumericalSetByGaps( L )( function )

L is a list of positive integers containing 0. The output is the numerical set \(\mathbb{N}\setminus \textit{L}\).

gap> s:=NumericalSetByGaps([1,3,5]);
<Numerical set>
gap> Gaps(s);
[ 1, 3, 5 ]
gap> SmallElements(s);
[ 0, 2, 4, 6 ]

14.1-3 AsNumericalSet
‣ AsNumericalSet( S )( operation )
‣ AsNumericalSet( I )( operation )

S is a numerical semigroup; I is a normalized ideal of a numerical semigroup (that is an ideal whose minimal element is zero). The output is S (or I) considered as a numerical set.

gap> s:=NumericalSemigroup(4,5);;
gap> Print(AsNumericalSet(s));
{0,4,5,8,9,10,12,->}
gap> i:=[0,1]+s;;
gap> Print(AsNumericalSet(i));
{0,1,4,5,6,8,->}

14.1-4 AsNumericalSemigroup
‣ AsNumericalSemigroup( S )( operation )

S is a numerical set. The output is S considered as a numerical semigroup provided that \(\textit{S}+\textit{S} = \textit{S}\) (otherwise, it raises an error).

gap> s:=NumericalSemigroup(4,5);;
gap> Print(AsNumericalSet(s));
{0,4,5,8,9,10,12,->}
gap> i:=[0,1]+s;;
gap> Print(AsNumericalSet(i));
{0,1,4,5,6,8,->}

14.1-5 AsIdealOfNumericalSemigroup
‣ AsIdealOfNumericalSemigroup( R, S )( operation )

R is a numerical set and S is a numerical semigroup. The output is R considered as an ideal of S provided that \(\textit{R}+\textit{S} = \textit{R}\) (otherwise, it raises an error).

gap> s:=NumericalSemigroup(3,7,5);;
gap> r:=NumericalSetBySmallElements([0,2]);;
gap> SmallElements(AsIdealOfNumericalSemigroup(r,s))=SmallElements(r);
true

14.1-6 IsNumericalSet
‣ IsNumericalSet( Obj )( function )

Tests if the object Obj is a numerical set.

gap> s:=NumericalSetBySmallElements([0,1,3]);
<Numerical set>
gap> IsNumericalSet(s);
true

14.1-7 Difference
‣ Difference( S, R )( operation )

S and R can be numerical sets, numerical semigroups or lists of integers. The output is \(\textit{S}\setminus\textit{R}\). In some cases, the output is a numerical set.

gap> s:=NumericalSemigroup(4,5);;
gap> t:=Difference(s,[5..10]);
<Numerical set>
gap> SmallElements(s);
[ 0, 4, 5, 8, 9, 10, 12 ]
gap> SmallElements(t);
[ 0, 4, 12 ]
gap> Difference([0..Conductor(s)],s)=Gaps(s);
true

14.1-8 \[ \]
\[ \]( ns, r )( operation )

ns is an a numerical set and r is a positive integer. It returns the r-th element of ns.

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> s[1];
0
gap> s[3];
5
gap> s[7];
11

14.1-9 \{ \}
‣ \{ \}( Ins, ls )( operation )

ns is a numerical set and ls is a list of positive integers. It returns the list [ns[r] : r in ls].

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> s{[1..10]};
[ 0, 2, 5, 6, 9, 10, 11, 12, 13, 14 ]
gap> SmallElements(s);
[ 0, 2, 5, 6, 9 ]

14.1-10 Position
‣ Position( ns, r[, f] )( operation )

ns is an a numerical set, r is an object, and f is an index; it works exactly as Position for lists considering ns as an infinite list of integers.

gap> s:=NumericalSetBySmallElements([0,3,5]);;
gap> Position(s,-3);
fail
gap> Position(s,0);
1
gap> Position(s,0,1);
fail

14.1-11 Positions
‣ Positions( ns, r )( operation )

ns is an a numerical set and r is an object; it works exactly as Positions for lists considering ns as an infinite list of integers.

gap> s:=NumericalSetBySmallElements([0,3,5]);;
gap> Positions(s,2);
[  ]
gap> Positions(s,3);
[ 2 ]

14.1-12 Union
‣ Union( R, S )( operation )

R, S are numerical sets (one of them can be a numerical semigroup).

One of the arguments can also be a list of non-negative integers.

The output is the union of both arguments, and it is a numerical set.

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSetBySmallElements([0,6]);;
gap> SmallElements(Union(s,t));
[ 0, 2, 5 ]
gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSemigroup(4,7);;
gap> SmallElements(Union(s,t));
[ 0, 2, 4 ]
gap> t:=Union(s,[2,5]);;
gap> SmallElements(t);
[ 0, 2, 4, 5, 6, 8 ]

14.1-13 Intersection
‣ Intersection( R, S )( operation )

R, S are numerical sets (one of them can be a numerical semigroup). The output is the intersection of both numerical sets.

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSemigroup(5,7);;
gap> SmallElements(Intersection(s,t));
[ 0, 5, 10, 12, 14, 15, 17, 19, 20, 21, 22, 24 ]
gap> t:=NumericalSetBySmallElements([0,6]);;
gap> SmallElements(Intersection(s,t));
[ 0, 6, 9 ]

14.1-14 +
‣ +( R, S )( operation )

R, S are numerical sets (one of them can be a numerical semigroup). The output is the sum of both numerical sets.

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSetBySmallElements([0,7]);;
gap> SmallElements(s+t);
[ 0, 2, 5 ]
gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSemigroup(5,7);;
gap> SmallElements(s+t);
[ 0, 2, 5, 6, 7, 9 ]

14.1-15 *
‣ *( n, S )( operation )

S is a numerical set and n is a positive integer. The output is the sum of S n times.

gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSetBySmallElements([0,7]);;
gap> SmallElements(s+t);
[ 0, 2, 5 ]
gap> s:=NumericalSetBySmallElements([0,2,5,6,9]);;
gap> t:=NumericalSemigroup(5,7);;
gap> SmallElements(s+t);
[ 0, 2, 5, 6, 7, 9 ]

14.2 Notable elements of numerical sets

14.2-1 SmallElements
‣ SmallElements( S )( attribute )

S is numerical set. The output is the set of small elements of S.

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> SmallElements(s);
[ 0, 2, 4, 6 ]

14.2-2 Multiplicity
‣ Multiplicity( S )( attribute )

S is numerical set. The output is least positive integer in S.

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> Multiplicity(s);
2

14.2-3 Gaps
‣ Gaps( S )( attribute )

S is numerical set. The output is the set of gaps of S.

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> Gaps(s);
[ 1, 3, 5 ]

14.2-4 Genus
‣ Genus( S )( attribute )

S is numerical set. The output is the number of gaps of S.

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> Genus(s);
3

14.2-5 Conductor
‣ Conductor( S )( attribute )

S is numerical set. The output is the largest element in SmallElements(S).

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> Conductor(s);
6

14.2-6 FrobeniusNumber
‣ FrobeniusNumber( S )( attribute )

S is a numerical set. The output is the largest integer not belonging to S.

gap> s:=NumericalSetByGaps([1,3,5]);;
gap> FrobeniusNumber(s);
5

14.2-7 DualNumericalSet
‣ DualNumericalSet( S )( operation )

S is a numerical set or a numerical semigroup. The output is the dual of S. If \(\textit{S}\) has gaps \({g_1,g_2,\dots,g_n=f}\) and conductor \(c\), then its dual has small elements \({0,f-g_{n-1},\dots,f-g_1, c}\).

gap> s:=NumericalSetBySmallElements([0,4,8,10]);;
gap> SmallElements(DualNumericalSet(s));
[ 0, 2, 3, 4, 6, 7, 8, 10 ]
gap> s:=NumericalSemigroup(4,5);;
gap> s=DualNumericalSet(s);
true

14.3 Associated sets to numerical semigroups

14.3-1 AtomMonoid
‣ AtomMonoid( S )( operation )

S is a numerical set. The output is the atom monoid of S, which is a numerical semigroup defined as the set of all integers n such that n + S is a subset of S (see [AM02]).

gap> ns:=NumericalSetBySmallElements([0,3,5,7]);;
gap> SmallElements(AtomMonoid(ns));
[ 0, 5, 7 ]

14.3-2 AssociatedNumericalSets
‣ AssociatedNumericalSets( S )( operation )

S is a numerical semigroup. The output is the list of associated numerical sets of S (all numerical sets such that its atom monoid is S). The algorithm is baser on Algorithm 5.1 in [CKL+23] and was implemented by Araitz Unanue Bidal.

gap> s:=NumericalSemigroup(17,20,27,19);;
gap> as:=AssociatedNumericalSets(s);;
gap> ForAll(as,ns->IsAssociatedNumericalSetOfNumericalSemigroup(ns,s));
true
gap> ForAll(as,ns->AtomMonoid(ns)=s);
true

14.3-3 IsAssociatedNumericalSetOfNumericalSemigroup
‣ IsAssociatedNumericalSetOfNumericalSemigroup( R, S )( operation )

R is a numerical set and S is a numerical semigroup. Determines if R is an ideal of S and if R-R=S (see [KKM+25] ). Equivalently, it checks if the atom monoid of R is equal to S.

gap> s:=NumericalSemigroup(3,5);;
gap> t:=NumericalSetBySmallElements([0,4]);;
gap> IsAssociatedNumericalSetOfNumericalSemigroup(t,s);
false
gap> r:=NumericalSetBySmallElements([0,3,5,6,8]);;
gap> IsAssociatedNumericalSetOfNumericalSemigroup(r,s);
true

14.4 Integer partitions associated to numerical sets

14.4-1 IntegerPartition
‣ IntegerPartition( S )( operation )

S is a numerical set or a numerical semigroup. The output is the integer partition associated to S, which is the one associated to its Young diagram. The algorithm used is the one explained in [{Ye\}25].

gap> s:=NumericalSetBySmallElements([0,4,6,7,9,10,12]);;
gap> IntegerPartition(s);
[ 6, 4, 2, 1, 1, 1 ]
gap> s:=NumericalSemigroup(5,7,9,11,13);;
gap> IntegerPartition(s);
[ 3, 2, 1, 1, 1, 1 ]

14.4-2 FerrersDiagram
‣ FerrersDiagram( S )( operation )

S is a numerical set or a numerical semigroup. The output is the integer partition associated to S. It also displays the Ferrers diagram associated to this partition.

gap> s:=NumericalSetByIntegerPartition([4,2,1]);;
gap> FerrersDiagram(s);
····
··
·
[ 4, 2, 1 ]
gap> s:=NumericalSemigroup(3,5,7);;
gap> FerrersDiagram(s);
··
·
·

14.4-3 NumericalSetByIntegerPartition
‣ NumericalSetByIntegerPartition( L )( function )

L is a list that is either empty or of non-increasing positive integers, and represents an integer partition. The output is numerical set associated to L. The algorithm used is the one described in [{Ye\}25].

gap> SmallElements(NumericalSetByIntegerPartition([]));
[ 0 ]
gap> IntegerPartition(NumericalSetByIntegerPartition([6,3,1]))=[6,3,1];
true

14.4-4 HookLengths
‣ HookLengths( S )( operation )

S is a numerical set or a numerical semigroup. The output is the list of hook lengths associated to the integer partition associated to S. The algorithm used is the one explained in [{Ye\}25].

gap> s:=NumericalSetBySmallElements([0, 5, 7, 9]);;
gap> HookLengths(s);
[ [ 8, 3, 1 ], [ 6, 1 ], [ 4 ], [ 3 ], [ 2 ], [ 1 ] ]
gap> s:=NumericalSemigroup(5,6,11,13,14);;
gap> HookLengths(s);
[ [ 9, 4, 3 ], [ 8, 3, 2 ], [ 7, 2, 1 ], [ 4 ], [ 3 ], [ 2 ], [ 1 ] ]

14.4-5 BondedSum
‣ BondedSum( S, T )( operation )

The arguments are numerical sets or numerical semigroups. The output is the bonded sum of them as explained in [{Ye\}25]. If the small elements of S are \(\{0=s_0,s_1,\dots,s_n\}\) and the small elements of T are \(\{0=t_0,t_1,\dots,t_m\}\), then the small elements of the bonded sum of S and T are \(\{0=s_0,s_1,\dots,s_{n-1},s_n-1,t_1+s_n-1,t_2+s_n-1,\dots, t_m+s_n-1\}\).

In terms of the Young diagrams associated to the arguments, the resulting numerical set is the one corresponding to the Young diagram obtained by placing the diagram of the second above and on the right of the second, so that the first row of the first is followed by the last row of the second.

gap> s:=NumericalSetBySmallElements([0,2,4]);;
gap> t:=NumericalSetBySmallElements([0,2]);;
gap> SmallElements(BondedSum(s,t));
[ 0, 2, 3, 5 ]
gap> s:=NumericalSetByIntegerPartition([4,2,1]);;
gap> t:=NumericalSetByIntegerPartition([4,3,1]);;
gap> IntegerPartition(BondedSum(s,t));
[ 8, 7, 5, 2, 1 ]
gap> s:=NumericalSemigroup(2,5);;
gap> t:=NumericalSetBySmallElements([0,2]);;
gap> SmallElements(BondedSum(s,t));
[ 0, 2, 3, 5 ]

14.4-6 CojointSum
‣ CojointSum( S, T )( operation )

The arguments are numerical sets or numerical semigroups. The output is the cojoint sum of them as defined in [{Ye\}25]. If the small elements of S are \(\{0=s_0,s_1,\dots,s_n\}\) and the small elements of T are \(\{0=t_0,t_1,\dots,t_m\}\), then the small elements of the bonded sum of S and T are \(\{0=s_0,s_1,\dots,s_{n-1},t_1+s_n-1,t_2+s_n-1,\dots, t_m+s_n-1\}\).

In terms of the Young diagrams associated to the arguments, the resulting numerical set is the one corresponding to the Young diagram obtained by placing the diagram of the second above and on the right of the second, so that the last column of the first is below by the first column of the second.

gap> s:=NumericalSetByIntegerPartition([4,2,1]);;
gap> t:=NumericalSetByIntegerPartition([4,3,1]);;
gap> IntegerPartition(CojointSum(s,t));
[ 7, 6, 4, 4, 2, 1 ]
gap> s:=NumericalSemigroup(2,5);;
gap> t:=NumericalSetBySmallElements([0,2]);;
gap> SmallElements(CojointSum(s,t));
[ 0, 2, 5 ]

14.4-7 EndToEndSum
‣ EndToEndSum( S, T )( operation )

The arguments are numerical sets or numerical semigroups. The output is the end to end sum of them as described in [{Ye\}25]. If the small elements of S are \(\{0=s_0,s_1,\dots,s_n\}\) and the small elements of T are \(\{0=t_0,t_1,\dots,t_m\}\), then the small elements of the bonded sum of S and T are \(\{0=s_0,s_1,\dots,s_n,t_1+s_n,t_2+s_n,\dots, t_m+s_n\}\).

In terms of the Young diagrams associated to the arguments, the resulting numerical set is the one corresponding to the Young diagram obtained by placing the diagram of the second above and on the right of the second (in diagonal).

gap> s:=NumericalSetByIntegerPartition([4,2,1]);;
gap> t:=NumericalSetByIntegerPartition([4,3,1]);;
gap> IntegerPartition(EndToEndSum(s,t));
[ 8, 7, 5, 4, 2, 1 ]
gap> s:=NumericalSemigroup(2,3);;
gap> t:=NumericalSemigroup(3,4,5);;
gap> SmallElements(EndToEndSum(s,t));
[ 0, 2, 5 ]
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A B C Bib Ind

generated by GAPDoc2HTML