Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Apache/docs/manual/ssl/   (Apache Software Stiftung Version 2.4.65©)  Datei vom 7.0.2025 mit Größe 21 kB image not shown  

Quelle  chapB.html   Sprache: unbekannt

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (NumericalSgps) - Appendix B: "Random" functions</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chapB"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chap11.html">11</a>  <a href="chap12.html">12</a>  <a href="chap13.html">13</a>  <a href="chap14.html">14</a>  <a href="chapA.html">A</a>  <a href="chapB.html">B</a>  <a href="chapC.html">C</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chapA.html">[Previous Chapter]</a>    <a href="chapC.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chapB_mj.html">[MathJax on]</a></p>
<p><a id="X86746B487B54A2D6" name="X86746B487B54A2D6"></a></p>
<div class="ChapSects"><a href="chapB.html#X86746B487B54A2D6">B <span class="Heading">"Random" functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapB.html#X7F3FF11486C5CA4B">B.1 <span class="Heading">Random functions for numerical semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X7CC477867B00AD13">B.1-1 RandomNumericalSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X79E73F8787741190">B.1-2 RandomListForNS</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X82E22E9B843DF70F">B.1-3 RandomModularNumericalSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X8598F10A7CD4A135">B.1-4 RandomProportionallyModularNumericalSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X8665F6B08036AFFB">B.1-5 RandomListRepresentingSubAdditiveFunction</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X7B459C8C825194E4">B.1-6 NumericalSemigroupWithRandomElementsAndFrobenius</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X78A2A0107CCBBB79">B.1-7 RandomNumericalSemigroupWithGenus</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapB.html#X7D86D133840F6860">B.2 <span class="Heading">Random functions for affine semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X7FBFEE457E823E15">B.2-1 RandomAffineSemigroupWithGenusAndDimension</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X82569F0079599515">B.2-2 RandomAffineSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X7F7BB53A7DF77ED5">B.2-3 RandomFullAffineSemigroup</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapB.html#X7DB89F2078A6095F">B.3 <span class="Heading">Random functions for good semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB.html#X7F582A997B4B05EE">B.3-1 RandomGoodSemigroupWithFixedMultiplicity</a></span>
</div></div>
</div>

<h3>B <span class="Heading">"Random" functions</span></h3>

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

<p><a id="X7F3FF11486C5CA4B" name="X7F3FF11486C5CA4B"></a></p>

<h4>B.1 <span class="Heading">Random functions for numerical semigroups</span></h4>

<p><a id="X7CC477867B00AD13" name="X7CC477867B00AD13"></a></p>

<h5>B.1-1 RandomNumericalSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomNumericalSemigroup</code>( <var class="Arg">n</var>, <var class="Arg">a</var>[, <var class="Arg">b</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a ``random" numerical semigroup with no more than n generators in [1..a] (or in [a..b], if b is present).




<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomNumericalSemigroup(3,9);</span>
<Numerical semigroup with 3 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomNumericalSemigroup(3,9,55);</span>
<Numerical semigroup with 3 generators>
</pre></div>

<p><a id="X79E73F8787741190" name="X79E73F8787741190"></a></p>

<h5>B.1-2 RandomListForNS</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomListForNS</code>( <var class="Arg">n</var>, <var class="Arg">a</var>, <var class="Arg">b</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a set of length not greater than <var class="Arg">n</var> of random integers in <var class="Arg">[a..b]</var> whose GCD is 1. It is used to create "random" numerical semigroups.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomListForNS(13,1,79);</span>
[ 22, 26, 29, 31, 34, 46, 53, 61, 62, 73, 76 ]
</pre></div>

<p><a id="X82E22E9B843DF70F" name="X82E22E9B843DF70F"></a></p>

<h5>B.1-3 RandomModularNumericalSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomModularNumericalSemigroup</code>( <var class="Arg">k</var>[, <var class="Arg">m</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a ``random" modular numerical semigroup S(a,b) with a ≤ k (see 1.) and multiplicity at least m, were m is the second argument, which may not be present..




<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomModularNumericalSemigroup(9);</span>
<Modular numerical semigroup satisfying 5x mod 6 <= x >
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomModularNumericalSemigroup(10,25);</span>
<Modular numerical semigroup satisfying 4x mod 157 <= x >
</pre></div>

<p><a id="X8598F10A7CD4A135" name="X8598F10A7CD4A135"></a></p>

<h5>B.1-4 RandomProportionallyModularNumericalSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomProportionallyModularNumericalSemigroup</code>( <var class="Arg">k</var>[, <var class="Arg">m</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a ``random" proportionally modular numerical semigroup S(a,b,c) with a ≤ k (see 1.) and multiplicity at least m, were m is the second argument, which may not be present.




<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomProportionallyModularNumericalSemigroup(9);</span>
<Proportionally modular numerical semigroup satisfying 2x mod 3 <= 2x >
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomProportionallyModularNumericalSemigroup(10,25);</span>
<Proportionally modular numerical semigroup satisfying 6x mod 681 <= 2x >
</pre></div>

<p><a id="X8665F6B08036AFFB" name="X8665F6B08036AFFB"></a></p>

<h5>B.1-5 RandomListRepresentingSubAdditiveFunction</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomListRepresentingSubAdditiveFunction</code>( <var class="Arg">m</var>, <var class="Arg">a</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Produces a ``random" list representing a subadditive function (see 1.) which is periodic with period m (or less). When possible, the images are in [a..20*a]. (Otherwise, the list of possible images is enlarged.)




<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomListRepresentingSubAdditiveFunction(7,9);</span>
[ 173, 114, 67, 0 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RepresentsPeriodicSubAdditiveFunction(last);</span>
true
</pre></div>

<p><a id="X7B459C8C825194E4" name="X7B459C8C825194E4"></a></p>

<h5>B.1-6 NumericalSemigroupWithRandomElementsAndFrobenius</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NumericalSemigroupWithRandomElementsAndFrobenius</code>( <var class="Arg">n</var>, <var class="Arg">mult</var>, <var class="Arg">frob</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Produces a "random" semigroup containing (at least) <var class="Arg">n</var> elements greater than or equal to <var class="Arg">mult</var> and less than <var class="Arg">frob</var>, chosen at random. The semigroup returned has multiplicity chosen at random but no smaller than <var class="Arg">mult</var> and having Frobenius number chosen at random but not greater than <var class="Arg">frob</var>. Returns <span class="SimpleMath">fail</span> if <var class="Arg">frob</var> is greater than <var class="Arg">mult</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ns := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,50);</span>
<Numerical semigroup with 17 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSystem(ns);</span>
[ 12, 13, 19, 27, 47 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallElements(ns);</span>
[ 0, 12, 13, 19, 24, 25, 26, 27, 31, 32, 36, 37, 38, 39, 40, 43 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ns2 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,9); </span>
#I  The third argument must not be smaller than the second
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">ns3 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,10);</span>
<Proportionally modular numerical semigroup satisfying 20x mod 200 <= 10x >
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSystem(ns3);                                    </span>
[ 10 .. 19 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallElements(ns3);                                              </span>
[ 0, 10 ]
</pre></div>

<p><a id="X78A2A0107CCBBB79" name="X78A2A0107CCBBB79"></a></p>

<h5>B.1-7 RandomNumericalSemigroupWithGenus</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomNumericalSemigroupWithGenus</code>( <var class="Arg">g</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Produces a pseudo-random numerical semigroup with genus <var class="Arg">g</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomNumericalSemigroupWithGenus(7);Gaps(last);</span>
<Numerical semigroup with 7 generators>
[ 1, 2, 3, 4, 5, 6, 9 ]
</pre></div>

<p><a id="X7D86D133840F6860" name="X7D86D133840F6860"></a></p>

<h4>B.2 <span class="Heading">Random functions for affine semigroups</span></h4>

<p><a id="X7FBFEE457E823E15" name="X7FBFEE457E823E15"></a></p>

<h5>B.2-1 RandomAffineSemigroupWithGenusAndDimension</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomAffineSemigroupWithGenusAndDimension</code>( <var class="Arg">g</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Produces a pseudo-random affine semigroup with genus <var class="Arg">g</var> and dimension <var class="Arg">d</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomAffineSemigroupWithGenusAndDimension(10,3);Gaps(last);</span>
<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 ] ]
</pre></div>

<p><a id="X82569F0079599515" name="X82569F0079599515"></a></p>

<h5>B.2-2 RandomAffineSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomAffineSemigroup</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">m</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns an affine semigroup generated by a <var class="Arg">n</var>*<var class="Arg">d</var> matrix where <var class="Arg">d</var> (the dimension) is randomly choosen from [1..<var class="Arg">d</var>] and <var class="Arg">n</var> (the number of generators) is randomly choosen from [1..<var class="Arg">n</var>]. The entries of the matrix are randomly choosen from [0..<var class="Arg">m</var>] (when the third argument is not present, m is taken as <var class="Arg">n</var>*<var class="Arg">d</var>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomAffineSemigroup(5,5);Generators(last);</span>
<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 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomAffineSemigroup(5,5,3);Generators(last);</span>
<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 ] ]
</pre></div>

<p><a id="X7F7BB53A7DF77ED5" name="X7F7BB53A7DF77ED5"></a></p>

<h5>B.2-3 RandomFullAffineSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomFullAffineSemigroup</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">m</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>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 <var class="Arg">n</var>*<var class="Arg">d</var> matrix where <var class="Arg">d</var> (the dimension) is randomly choosen from [1..<var class="Arg">d</var>] and <var class="Arg">n</var> is randomly choosen from [1..<var class="Arg">n</var>]. When it is given by equations, the moduli are choosen at random. The entries of the matrix (and moduli) are randomly choosen from [0..<var class="Arg">m</var>] (when the third integer is not present, m is taken as <var class="Arg">n</var>*<var class="Arg">d</var>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomFullAffineSemigroup(5,5,3);Generators(last);</span>
<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 ] ]
</pre></div>

<p><a id="X7DB89F2078A6095F" name="X7DB89F2078A6095F"></a></p>

<h4>B.3 <span class="Heading">Random functions for good semigroups</span></h4>

<p><a id="X7F582A997B4B05EE" name="X7F582A997B4B05EE"></a></p>

<h5>B.3-1 RandomGoodSemigroupWithFixedMultiplicity</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomGoodSemigroupWithFixedMultiplicity</code>( <var class="Arg">m</var>, <var class="Arg">cond</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function produces a "random" semigroup with multiplicity <var class="Arg">m</var> and with conductor bounded by <var class="Arg">cond</var></p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=RandomGoodSemigroupWithFixedMultiplicity([6,7],[30,30]);</span>
<Good semigroup>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallElements(S);</span>
[ [ 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 ] ]
  
</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chapA.html">[Previous Chapter]</a>    <a href="chapC.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chap11.html">11</a>  <a href="chap12.html">12</a>  <a href="chap13.html">13</a>  <a href="chap14.html">14</a>  <a href="chapA.html">A</a>  <a href="chapB.html">B</a>  <a href="chapC.html">C</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

100%


[ zur Elbe Produktseite wechseln0.33Quellennavigators  Analyse erneut starten  ]