Goto Chapter: Top 1 2 3 4 5 6 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

6 Usage of IntPic in connection with the numericalsgps package
 6.1 Tikz code for drawing numerical semigroups
 6.2 Drawing sets of numerical semigroups

6 Usage of IntPic in connection with the numericalsgps package

This chapter describes functions to be used in connection with the numericalsgps package. We found it particularly useful to gain intuition that led to the obtention of the results stated in [DGR16].

6.1 Tikz code for drawing numerical semigroups

6.1-1 Tikz code for drawing numerical semigroups
‣ TikzCodeForNumericalSemigroup( arg )( function )

The arguments (at most 4) are:

  1. a numerical semigroup

  2. (optional) a list whose elements are either

  3. a record whose fields are

  4. (optional) a positive integer -- if it is bigger than the conductor or biggest minimal generator, it indicates the number of cells - 1 to be drawn and these are drawn in a single line; otherwise, it indicates the maximum number of cells per line.

gap> ns := NumericalSemigroup(5,7);;                                               
gap> tkz := TikzCodeForNumericalSemigroup(ns,["ns_table"],rec(negatives:=false));
#I  In order to highlight some element, please use a list with one or more of the 
options given as strings: pseudo_frobenius, min_generators, frobenius_number, 
conductor, special_gaps, fundamental_gaps, small_elements

"%tikz\n\\begin{tikzpicture}[every node/.style={draw,scale=1pt,\nminimum width\
=20pt,inner sep=3pt,\nline width=0pt,draw=black}]\n\\matrix[row sep=2pt,column\
 sep=2pt]\n{\\node[]{24};&\n\\node[]{25};&\n\\node[]{26};&\n\\node[]{27};&\n\\\
node[]{28};\\\\\n\\node[]{19};&\n\\node[]{20};&\n\\node[]{21};&\n\\node[]{22};\
&\n\\node[]{23};\\\\\n\\node[]{14};&\n\\node[]{15};&\n\\node[]{16};&\n\\node[]\
{17};&\n\\node[]{18};\\\\\n\\node[]{9};&\n\\node[]{10};&\n\\node[]{11};&\n\\no\
de[]{12};&\n\\node[]{13};\\\\\n\\node[]{4};&\n\\node[]{5};&\n\\node[]{6};&\n\\\
node[]{7};&\n\\node[]{8};\\\\\n&\n\\node[]{0};&\n\\node[]{1};&\n\\node[]{2};&\
\n\\node[]{3};\\\\\n};\n\\end{tikzpicture}\n"
gap> tkz := TikzCodeForNumericalSemigroup(ns,["small_elements"],
> rec(ns_table := true,negatives:=false));;





gap> ns1 := NumericalSemigroup(3,5);;
gap> TikzCodeForNumericalSemigroup(ns1,[[3,4],"pseudo_frobenius"],20);
"%tikz\n\\begin{tikzpicture}[every node/.style={draw,scale=1pt,\nminimum width\
=20pt,inner sep=3pt,\nline width=0pt,draw=black}]\n\\matrix[row sep=2pt,column\
 sep=2pt]\n{\\node[]{0};&\n\\node[]{1};&\n\\node[]{2};&\n\\node[fill=red]{3};&\
\n\\node[fill=red]{4};&\n\\node[]{5};&\n\\node[]{6};&\n\\node[fill=green]{7};&\
\n\\node[]{8};&\n\\node[]{9};&\n\\node[]{10};&\n\\node[]{11};&\n\\node[]{12};&\
\n\\node[]{13};&\n\\node[]{14};&\n\\node[]{15};&\n\\node[]{16};&\n\\node[]{17}\
;&\n\\node[]{18};&\n\\node[]{19};&\n\\node[]{20};\\\\\n};\n\\end{tikzpicture}\
\n"
gap> IP_Splash(TikzCodeForNumericalSemigroup(NumericalSemigroup(7,13,19,23),
> [[3,4],"small_elements","fundamental_gaps"],20),rec(viewer := "evince"));    



gap> ns := NumericalSemigroup(7,11,38,41);;
gap> highlights := ["conductor", "min_generators", "small_elements"];;
gap> options := rec(ns_table:=true,colors:=["blue", "red!70", "-red", "black!40"]);;
gap> tkz := TikzCodeForNumericalSemigroup(ns,highlights,options);;
gap> IP_Splash(tkz);
gap> tkz := TikzCodeForNumericalSemigroup(ns,highlights,rec(ns_table:=true));;
gap> IP_Splash(tkz);





6.1-2 Drawing a numerical semigroup
‣ DrawNumericalSemigroup( ns )( function )

This function abbreviates the production of tikz code to display the numerical semigroup ns using some predefined options and elements to highlight (based on the ones of the above example). It also displays the image produced. Note that the production and displaying of the image depends on the function IP_Splash (which can be slow and depends on an appropriate configuration of the system). The output is the tikz code produced.

gap> m := 31;;
gap> small_gens := [m,m+1,m+2,m+3];;
gap> other_gens := List([1..Int(m/7)], k -> 7*k+m);;
gap> ns := NumericalSemigroup(Union(small_gens,other_gens));;
gap> DrawNumericalSemigroup(ns);;
 



6.2 Drawing sets of numerical semigroups

6.2-1 Set of numerical semigroups
‣ SetOfNumericalSemigroups( arg )( function )

This function is used to produce lists of numerical semigroups with a fixed genus or Frobenius number. They are filtered and ordered according to some criteria.

The argument is a record of options:

  1. set -- a record whose possible fields are genus or frobenius

  2. (optional) filter -- a record whose possible fields are genus, type and/or multiplicity and/or frobenius and/or embedding_dimension

  3. (optional) order -- ("genus", "type", "multiplicity", "frobenius", "embedding_dimension")

gap> ls := SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2),
order:="multiplicity"));;
gap> List(ls,MinimalGenerators);
[ [ 3, 8, 13 ], [ 3, 10, 11 ], [ 4, 7, 9 ], [ 5, 6, 7 ], [ 5, 6, 8 ], 
  [ 6, 7, 8, 9, 11 ] ]
gap> ls := SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2),
order:="frobenius"));;
gap> List(ls,MinimalGenerators);
[ [ 3, 10, 11 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 3, 8, 13 ], [ 4, 7, 9 ], 
  [ 6, 7, 8, 9, 11 ] ]

6.2-2 Draw a set of numerical semigroups
‣ DrawSetOfNumericalSemigroups( arg )( function )

Produces a single image from the images of a set of numerical semigroups.

The arguments (at most 3) are:

  1. a list of numerical semigroups (given as a list or each given as argument)

  2. (optional) an integer that (when present) determines the length of each line

  3. (optional) a record whose fields are

gap> ns1 := NumericalSemigroup(3,5);;
gap> ns2 := NumericalSemigroup(5,7,11);;
gap> DrawSetOfNumericalSemigroups(ns1,rec(splash:=                          
> rec(viewer := "evince"),highlights := 
> ["pseudo_frobenius","small_elements","min_generators"]));
gap> DrawSetOfNumericalSemigroups(ns1,ns2,rec(splash:= 
> rec(viewer := "evince"),highlights := 
> ["pseudo_frobenius","small_elements","min_generators"]));
gap> DrawSetOfNumericalSemigroups([ns1,ns2],rec(splash:=      
> rec(viewer := "evince"),highlights :=                    
> ["small_elements","min_generators"]));                   







gap> frob := 15;;
gap> tipo := 2;;
gap> set := SetOfNumericalSemigroups(rec(set := rec(frobenius := frob),
> filter := rec(type:= tipo),order := "embedding_dimension"));;
gap> DrawSetOfNumericalSemigroups(set,rec(splash:= rec(viewer := "evince"),
> highlights := ["small_elements","min_generators",
> rec(func:= "ForcedIntegersForPseudoFrobenius", 
> argument := "PseudoFrobeniusOfNumericalSemigroup")]));



The following example helps in the understanding of the colors present in the first line of previous figure.

gap> ns := NumericalSemigroup(4,9,19);;
gap> SmallElements(ns);
[ 0, 4, 8, 9, 12, 13, 16 ]
gap> MinimalGeneratingSystem(ns);
[ 4, 9, 19 ]
gap> ForcedIntegersForPseudoFrobenius(PseudoFrobeniusOfNumericalSemigroup(ns));
[ [ 1, 2, 3, 5, 6, 7, 14, 15 ], [ 0, 8, 9, 12, 13, 16 ] ]
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 Bib Ind

generated by GAPDoc2HTML