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

Quelle  random.xml   Sprache: XML

 
<?xml version="1.0" encoding="UTF-8"?>
<Appendix><Heading>"Random" functions</Heading>

Here we describe some functions which allow to create
several "random" objects. We make use of the function <C>RandomList</C>.

<Section><Heading>Random functions for numerical semigroups</Heading>

<ManSection>
            <Func Name="RandomNumericalSemigroup" Arg="n,a[,b]"></Func>
            <Description>
                Returns a ``random" numerical semigroup with no more than n generators in [1..a] (or in [a..b], if b is present).
                <Example><![CDATA[
gap> RandomNumericalSemigroup(3,9);
<Numerical semigroup with 3 generators>
gap> RandomNumericalSemigroup(3,9,55);
<Numerical semigroup with 3 generators>
]]></Example>
            </Description>
        </ManSection>


        <ManSection>
            <Func Name="RandomListForNS" Arg="n,a,b"></Func>
            <Description>
Returns a set of length not greater than <A>n</A> of random integers in <A>[a..b]</A>
whose GCD is 1.
It is used to create "random" numerical semigroups.
                <Example><![CDATA[
gap> RandomListForNS(13,1,79);
[ 22, 26, 29, 31, 34, 46, 53, 61, 62, 73, 76 ]
]]></Example>
            </Description>
        </ManSection>



        <ManSection>
            <Func Name="RandomModularNumericalSemigroup" Arg="k[,m]"></Func>
            <Description>
                Returns a ``random" modular numerical semigroup S(a,b) with a \le k (see />) and multiplicity at least m, were m is the second argument, which may not be present..
                <Example><![CDATA[
gap> RandomModularNumericalSemigroup(9);
<Modular numerical semigroup satisfying 5x mod 6 <= x >
gap> RandomModularNumericalSemigroup(10,25);
<Modular numerical semigroup satisfying 4x mod 157 <= x >
]]></Example>
            </Description>
        </ManSection>


        <ManSection>
            <Func Name="RandomProportionallyModularNumericalSemigroup" Arg="k[,m]"></Func>
            <Description>
                Returns a ``random" proportionally modular numerical semigroup S(a,b,c) with a \le k (see ) and multiplicity at least m, were m is the second argument, which may not be present.
                <Example><![CDATA[
gap> RandomProportionallyModularNumericalSemigroup(9);
<Proportionally modular numerical semigroup satisfying 2x mod 3 <= 2x >
gap> RandomProportionallyModularNumericalSemigroup(10,25);
<Proportionally modular numerical semigroup satisfying 6x mod 681 <= 2x >
]]></Example>
            </Description>
        </ManSection>

        <ManSection>
            <Func Name="RandomListRepresentingSubAdditiveFunction" Arg="m, a"></Func>
            <Description>
                Produces a ``random" list representing a subadditive function (see ) which is periodic
with period <A>m</A> (or less). When possible, the images are in <A>[a..20*a]</A>.
(Otherwise, the list of possible images is enlarged.)


                <Example><![CDATA[
gap> RandomListRepresentingSubAdditiveFunction(7,9);
[ 173, 114, 67, 0 ]
gap> RepresentsPeriodicSubAdditiveFunction(last);
true
]]></Example>
            </Description>
        </ManSection>

        <ManSection>
            <Func Name="NumericalSemigroupWithRandomElementsAndFrobenius" Arg="n,mult,frob"></Func>
            <Description>
Produces a "random" semigroup containing (at least) <A>n</A> elements greater than or equal to <A>mult</A> and less than <A>frob</A>, chosen at random. The semigroup returned has multiplicity chosen at random but no smaller than <A>mult</A> and having Frobenius number chosen at random but not greater than <A>frob</A>. Returns <M>fail</M> if <A>frob</A> is greater than <A>mult</A>.
                <Example><![CDATA[
gap> ns := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,50);
<Numerical semigroup with 17 generators>
gap> MinimalGeneratingSystem(ns);
[ 12, 13, 19, 27, 47 ]
gap> SmallElements(ns);
[ 0, 12, 13, 19, 24, 25, 26, 27, 31, 32, 36, 37, 38, 39, 40, 43 ]
gap> ns2 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,9); 
#I  The third argument must not be smaller than the second
fail
gap> ns3 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,10);
<Proportionally modular numerical semigroup satisfying 20x mod 200 <= 10x >
gap> MinimalGeneratingSystem(ns3);                                    
[ 10 .. 19 ]
gap> SmallElements(ns3);                                              
[ 0, 10 ]
]]></Example>
            </Description>
        </ManSection>
 
 <ManSection>
            <Func Name="RandomNumericalSemigroupWithGenus" Arg="g"></Func>
            <Description>
Produces a pseudo-random numerical semigroup with genus <A>g</A>.
                <Example><![CDATA[
gap> RandomNumericalSemigroupWithGenus(7);Gaps(last);
<Numerical semigroup with 7 generators>
[ 1, 2, 3, 4, 5, 6, 9 ]
]]></Example>
            </Description>
        </ManSection>

</Section>

<Section><Heading>Random functions for affine semigroups</Heading>

 <ManSection>
            <Func Name="RandomAffineSemigroupWithGenusAndDimension" Arg="g,d"></Func>
            <Description>
Produces a pseudo-random affine semigroup with genus <A>g</A> and dimension <A>d</A>.
                <Example><![CDATA[
gap> RandomAffineSemigroupWithGenusAndDimension(10,3);Gaps(last);
<Affine semigroup in 3 dimensional space, with 66 generators>
[ [ 0, 1, 0 ], [ 0, 2, 0 ], [ 0, 3, 0 ], [ 0, 4, 0 ], [ 0, 5, 0 ], 
  [ 0, 7, 0 ], [ 1, 0, 0 ], [ 1, 1, 0 ], [ 2, 0, 0 ], [ 3, 0, 0 ] ]
]]></Example>
            </Description>
        </ManSection>
 
 <ManSection>
            <Func Name="RandomAffineSemigroup" Arg="n,d,m"></Func>
            <Description>
Returns an affine semigroup generated by a <A>n</A>*<A>d</A> matrix where <A>d</A> (the dimension) is randomly choosen from [1..<A>d</A>] and <A>n</A> (the number of generators) is randomly choosen from [1..<A>n</A>]. The entries of the matrix are randomly choosen from [0..<A>m</A>] (when the third argument is not present, m is taken as <A>n</A>*<A>d</A>)
                <Example><![CDATA[
gap> RandomAffineSemigroup(5,5);Generators(last);
<Affine semigroup in 5 dimensional space, with 4 generators>
[ [ 4, 10, 10, 8, 20 ], [ 9, 12, 16, 3, 16 ], [ 14, 19, 14, 3, 20 ], 
  [ 16, 6, 0, 7, 13 ] ]
gap> RandomAffineSemigroup(5,5,3);Generators(last);
<Affine semigroup in 4 dimensional space, with 5 generators>
[ [ 0, 2, 1, 3 ], [ 1, 3, 3, 2 ], [ 2, 3, 3, 2 ], [ 3, 1, 2, 1 ], 
  [ 3, 3, 1, 0 ] ]
]]></Example>
            </Description>
        </ManSection>

 <ManSection>
            <Func Name="RandomFullAffineSemigroup" Arg="n,d,m"></Func>
            <Description>
 Returns a full affine semigroup either given by equations or inequalities (when no string is given, one is choosen at random). The matrix is an <A>n</A>*<A>d</A> matrix where <A>d</A> (the dimension) is randomly choosen from [1..<A>d</A>] and <A>n</A> is randomly choosen from [1..<A>n</A>]. When it is given by equations, the moduli are choosen at random. The entries of the matrix (and moduli) are randomly choosen from [0..<A>m</A>] (when the third integer is not present, m is taken as <A>n</A>*<A>d</A>)                <Example><![CDATA[
gap> RandomFullAffineSemigroup(5,5,3);Generators(last);
<Affine semigroup>
#I  Using contejeanDevieAlgorithm for Hilbert Basis. Please, consider using
NormalizInterface, 4ti2Interface or 4ti2gap.
[ [ 0, 0, 0, 0, 1 ], [ 0, 0, 0, 1, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 1, 0, 0, 0 ], 
  [ 1, 0, 0, 0, 0 ] ]
]]></Example>
            </Description>
        </ManSection>
 
</Section>


<Section><Heading>Random functions for good semigroups</Heading>

<ManSection>
      <Func Arg="m, cond" Name="RandomGoodSemigroupWithFixedMultiplicity"></Func>
      <Description>
        This function produces a "random" semigroup with multiplicity <A>m</A> and with conductor bounded by <A>cond</A> 

        <Example><![CDATA[
gap> S:=RandomGoodSemigroupWithFixedMultiplicity([6,7],[30,30]);
<Good semigroup>
gap> SmallElements(S);
[ [ 0, 0 ], [ 6, 7 ], [ 9, 8 ], [ 9, 10 ], [ 9, 11 ], [ 9, 14 ], [ 9, 15 ],
  [ 9, 16 ], [ 10, 8 ], [ 11, 10 ], [ 11, 11 ], [ 12, 10 ], [ 12, 14 ],
  [ 13, 10 ], [ 13, 15 ], [ 13, 16 ], [ 15, 10 ], [ 15, 15 ], [ 15, 16 ],
  [ 16, 10 ], [ 16, 15 ], [ 17, 10 ], [ 17, 16 ] ]
  
]]></Example>
      </Description>
    </ManSection>

</Section>
</Appendix>

100%


¤ Dauer der Verarbeitung: 0.12 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.