Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/intpic/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 30.7.2024 mit Größe 12 kB image not shown  

Quelle  routines_for_NS.xml   Sprache: XML

 
<?xml version="1.0" encoding="UTF-8"?>

<Chapter Label="routines">
  <Heading>
    Usage of <Package>IntPic</Package> in connection with the <Package>numericalsgps</Package> package
  </Heading>
This chapter describes functions to be used in connection with the <Package>numericalsgps</Package> package.
We found it particularly useful to gain intuition that led to the obtention of the results stated in <Cite Key="DGSRP15"></Cite>. 

<Section>
    <Heading>Tikz code for drawing numerical semigroups</Heading>
<ManSection>
      <Heading>Tikz code for drawing numerical semigroups</Heading>
      <Func Name="TikzCodeForNumericalSemigroup" Arg="arg"/>
      <Description>
        The arguments (at most 4) are: <Enum>
        <Item>a numerical semigroup</Item>
        <Item>(optional) a list whose elements are either<List>
           <Item>lists of integers <Emph>or</Emph> </Item>
           <Item>one of the strings "pseudo_frobenius""min_generators""frobenius_number""conductor""special_gaps""fundamental_gaps""small_elements" (the default: used when no list is present) <Emph>or</Emph> </Item>
    <Item> the string "ns_table" (the drawing obtained is a table whose top row corresponds to the threshold interval; as a side effect, if it is turned to "true", negative integers are not printed); alternatively, the option can be given in the usual way: <C>rec(ns_table := true)</C></Item>
          </List>
        </Item>
        <Item>a record whose fields are<List>
           <Item>func -- a function name</Item>
           <Item>(optional) argument -- an argument (that may be a function name also)</Item>
          </List>
        </Item>
        <Item>(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.</Item>
        </Enum>
      </Description>
    </ManSection>
    <Example><![CDATA[
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"
]]></Example>
    <Example><![CDATA[
gap> tkz := TikzCodeForNumericalSemigroup(ns,["small_elements"],
> rec(ns_table := true,negatives:=false));;]]></Example>
    <Alt Only="LaTeX">
      The following images are obtained from the tikz code above.
      
        \includegraphics[width=0.45\textwidth]{../images/ip_5-7-white.pdf}
 \hfill
        \includegraphics[width=0.45\textwidth]{../images/ip_5-7-smalls.pdf}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/ip_5-7-white.jpg"></center><br>
        <br><center><img src="../images/ip_5-7-smalls.jpg"></center><br>
      </Alt>
    <Example><![CDATA[
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"
]]></Example>
    <Example><![CDATA[
gap> IP_Splash(TikzCodeForNumericalSemigroup(NumericalSemigroup(7,13,19,23),
> [[3,4],"small_elements","fundamental_gaps"],20),rec(viewer := "evince"));    
]]></Example>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.99\textwidth]{../images/ip_splash_tikz_NS.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/ip_splash_tikz_NS.jpg"></center><br>
      </Alt>
    <Example><![CDATA[
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);
]]></Example>
      <Alt Only="LaTeX">
        \includegraphics[width=0.45\textwidth]{../images/ip_splash_tikz_NS_table.pdf}
 \hfill
        \includegraphics[width=0.45\textwidth]{../images/ip_splash_tikz_NS_table_default.pdf}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/ip_splash_tikz_NS_table.jpg"></center><br>
        <br><center><img src="../images/ip_splash_tikz_NS_table_default.jpg"></center><br>
      </Alt>
<ManSection>
      <Heading>Drawing a numerical semigroup</Heading>
      <Func Name="DrawNumericalSemigroup" Arg="ns"/>
      <Description>
      This function abbreviates the production of tikz code to display the numerical semigroup <C>ns</C> 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.
       </Description>
    </ManSection>
    <Example><![CDATA[
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);;
 ]]></Example>    
      <Alt Only="LaTeX">
        \includegraphics[width=0.95\textwidth]{../images/drawNS-small-depth.pdf}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/drawNS-small-depth.jpg"></center><br>
      </Alt>
</Section>
  <!-- ###################################################### -->
  <Section>
    <Heading>Drawing sets of numerical semigroups</Heading>
<ManSection>
      <Heading>Set of numerical semigroups</Heading>
      <Func Name="SetOfNumericalSemigroups" Arg="arg"/>
      <Description>
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.<P/>
        The argument is a record of options: <Enum>
        <Item>set -- a record whose possible fields are genus or frobenius</Item>
        <Item>(optional) filter -- a record whose possible fields are genus, type and/or multiplicity and/or frobenius and/or embedding_dimension</Item>
        <Item>(optional) order -- ("genus""type""multiplicity""frobenius""embedding_dimension")</Item> 
        </Enum>
      </Description>
    </ManSection>
    <Example><![CDATA[
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 ] ]
]]></Example>
  <!-- ###################################################### -->
<ManSection>
      <Heading>Draw a set of numerical semigroups</Heading>
      <Func Name="DrawSetOfNumericalSemigroups" Arg="arg"/>
      <Description>
Produces a single image from the images of a set of numerical semigroups.<P/>
        The arguments (at most 3) are: <Enum>
        <Item>a list of numerical semigroups (given as a list or each given as argument)</Item>
        <Item>(optional) an integer that (when present) determines the length of each line</Item>
        <Item>(optional) a record whose fields are<List>
           <Item>(optional) splash -- which (when present) consists of a record of options for the Viz Splash function</Item>
           <Item>(optional) highlights: a list to be passed to the function that produces the tikz code for each individual semigroup (whose aim is to say which elements are to be highlighted)</Item>
          </List>
        </Item>
        </Enum>
      </Description>
    </ManSection>
    <Example><![CDATA[
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"]));                   
]]></Example>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.99\textwidth]{../images/set_3_5.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/set_3_5.jpg"></center><br>
      </Alt>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.99\textwidth]{../images/set_3_5_and_5_7_11.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/set_3_5_and_5_7_11.jpg"></center><br>
      </Alt>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.99\textwidth]{../images/set_3_5_and_5_7_11_v2.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/set_3_5_and_5_7_11_v2.jpg"></center><br>
      </Alt>
    <Example><![CDATA[
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")]));
]]></Example>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.99\textwidth]{../images/draw_set_pseudo.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/draw_set_pseudo.jpg"></center><br>
      </Alt>
The following example helps in the understanding of the colors present in the first line of previous figure.
    <Example><![CDATA[
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 ] ]
]]></Example>
</Section>
</Chapter>

100%


¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.