Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 0c1f9463f03451b5503f0c33beb88a98 > files > 2483

gap-system-4.4.12-5mdv2010.0.x86_64.rpm

  
  B Random functions
  
  Here  we  describe  some  functions  which  allow to create several "random"
  objects.
  
  
  B.1 Random functions
  
  B.1-1 RandomNumericalSemigroup
  
  > RandomNumericalSemigroup( n, m ) _________________________________function
  
  Returns  a  ``random"  numerical semigroup with no more than n generators in
  [1..m].
  
  ---------------------------  Example  ----------------------------
    gap> RandomNumericalSemigroup(3,9);
    <Numerical semigroup with 3 generators>
  ------------------------------------------------------------------
  
  B.1-2 RandomListForNS
  
  > RandomListForNS( n, m ) __________________________________________function
  
  Returns  a  set  of  length  not greater than n of random integers in [1..m]
  whose GCD is 1. It is used to create "random" numerical semigroups.
  
  ---------------------------  Example  ----------------------------
    gap> RandomListForNS(13,79);
    [ 22, 26, 29, 31, 34, 46, 53, 61, 62, 73, 76 ]
  ------------------------------------------------------------------
  
  B.1-3 RandomModularNumericalSemigroup
  
  > RandomModularNumericalSemigroup( k ) _____________________________function
  
  Returns a ``random" modular numerical semigroup.
  
  ---------------------------  Example  ----------------------------
    gap> RandomModularNumericalSemigroup(9);
    <Modular numerical semigroup satisfying 5x mod 6 <= x >
  ------------------------------------------------------------------
  
  B.1-4 RandomProportionallyModularNumericalSemigroup
  
  > RandomProportionallyModularNumericalSemigroup( k ) _______________function
  
  Returns a ``random" proportionally modular numerical semigroup (see 1.).
  
  ---------------------------  Example  ----------------------------
    gap> RandomProportionallyModularNumericalSemigroup(9);
    <Proportionally modular numerical semigroup satisfying 2x mod 3 <= 2x >
  ------------------------------------------------------------------
  
  B.1-5 RandomListRepresentingSubAdditiveFunction
  
  > RandomListRepresentingSubAdditiveFunction( m, a ) ________________function
  
  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.)
  
  ---------------------------  Example  ----------------------------
    gap> RandomListRepresentingSubAdditiveFunction(7,9);
    [ 173, 114, 67, 0 ]
    gap> RepresentsPeriodicSubAdditiveFunction(last);
    true
  ------------------------------------------------------------------