  
  [1XB [33X[0;0Y"Random" functions[133X[101X
  
  [33X[0;0YHere  we  describe  some  functions  which  allow to create several "random"
  objects. We make use of the function [10XRandomList[110X.[133X
  
  
  [1XB.1 [33X[0;0YRandom functions for numerical semigroups[133X[101X
  
  [1XB.1-1 RandomNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XRandomNumericalSemigroup[102X( [3Xn[103X, [3Xa[103X[, [3Xb[103X] ) [32X function[133X
  
  [33X[0;0YReturns  a  ``random"  numerical semigroup with no more than [3Xn[103X generators in
  [1..[3Xa[103X] (or in [[3Xa[103X..[3Xb[103X], if [3Xb[103X is present).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomNumericalSemigroup(3,9);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XRandomNumericalSemigroup(3,9,55);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
  [4X[32X[104X
  
  [1XB.1-2 RandomListForNS[101X
  
  [33X[1;0Y[29X[2XRandomListForNS[102X( [3Xn[103X, [3Xa[103X, [3Xb[103X ) [32X function[133X
  
  [33X[0;0YReturns  a  set  of  length  not greater than [3Xn[103X of random integers in [3X[a..b][103X
  whose GCD is 1. It is used to create "random" numerical semigroups.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomListForNS(13,1,79);[127X[104X
    [4X[28X[ 22, 26, 29, 31, 34, 46, 53, 61, 62, 73, 76 ][128X[104X
  [4X[32X[104X
  
  [1XB.1-3 RandomModularNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XRandomModularNumericalSemigroup[102X( [3Xk[103X[, [3Xm[103X] ) [32X function[133X
  
  [33X[0;0YReturns  a ``random" modular numerical semigroup [22XS(a,b)[122X with [22Xa le k[122X (see [14X1.[114X)
  and multiplicity at least [22Xm[122X, were [22Xm[122X is the second argument, which may not be
  present..[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomModularNumericalSemigroup(9);[127X[104X
    [4X[28X<Modular numerical semigroup satisfying 5x mod 6 <= x >[128X[104X
    [4X[25Xgap>[125X [27XRandomModularNumericalSemigroup(10,25);[127X[104X
    [4X[28X<Modular numerical semigroup satisfying 4x mod 157 <= x >[128X[104X
  [4X[32X[104X
  
  [1XB.1-4 RandomProportionallyModularNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XRandomProportionallyModularNumericalSemigroup[102X( [3Xk[103X[, [3Xm[103X] ) [32X function[133X
  
  [33X[0;0YReturns a ``random" proportionally modular numerical semigroup [22XS(a,b,c)[122X with
  [22Xa  le k[122X (see [14X1.[114X) and multiplicity at least [22Xm[122X, were [22Xm[122X is the second argument,
  which may not be present.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomProportionallyModularNumericalSemigroup(9);[127X[104X
    [4X[28X<Proportionally modular numerical semigroup satisfying 2x mod 3 <= 2x >[128X[104X
    [4X[25Xgap>[125X [27XRandomProportionallyModularNumericalSemigroup(10,25);[127X[104X
    [4X[28X<Proportionally modular numerical semigroup satisfying 6x mod 681 <= 2x >[128X[104X
  [4X[32X[104X
  
  [1XB.1-5 RandomListRepresentingSubAdditiveFunction[101X
  
  [33X[1;0Y[29X[2XRandomListRepresentingSubAdditiveFunction[102X( [3Xm[103X, [3Xa[103X ) [32X function[133X
  
  [33X[0;0YProduces a ``random" list representing a subadditive function (see [14X1.[114X) which
  is  periodic  with  period  [3Xm[103X  (or  less).  When possible, the images are in
  [3X[a..20*a][103X. (Otherwise, the list of possible images is enlarged.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomListRepresentingSubAdditiveFunction(7,9);[127X[104X
    [4X[28X[ 173, 114, 67, 0 ][128X[104X
    [4X[25Xgap>[125X [27XRepresentsPeriodicSubAdditiveFunction(last);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1XB.1-6 NumericalSemigroupWithRandomElementsAndFrobenius[101X
  
  [33X[1;0Y[29X[2XNumericalSemigroupWithRandomElementsAndFrobenius[102X( [3Xn[103X, [3Xmult[103X, [3Xfrob[103X ) [32X function[133X
  
  [33X[0;0YProduces  a "random" semigroup containing (at least) [3Xn[103X elements greater than
  or  equal  to  [3Xmult[103X  and  less  than  [3Xfrob[103X,  chosen at random. The semigroup
  returned  has  multiplicity  chosen  at  random but no smaller than [3Xmult[103X and
  having  Frobenius number chosen at random but not greater than [3Xfrob[103X. Returns
  [22Xfail[122X if [3Xfrob[103X is greater than [3Xmult[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xns := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,50);[127X[104X
    [4X[28X<Numerical semigroup with 17 generators>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(ns);[127X[104X
    [4X[28X[ 12, 13, 19, 27, 47 ][128X[104X
    [4X[25Xgap>[125X [27XSmallElements(ns);[127X[104X
    [4X[28X[ 0, 12, 13, 19, 24, 25, 26, 27, 31, 32, 36, 37, 38, 39, 40, 43 ][128X[104X
    [4X[25Xgap>[125X [27Xns2 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,9); [127X[104X
    [4X[28X#I  The third argument must not be smaller than the second[128X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27Xns3 := NumericalSemigroupWithRandomElementsAndFrobenius(5,10,10);[127X[104X
    [4X[28X<Proportionally modular numerical semigroup satisfying 20x mod 200 <= 10x >[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(ns3);                                    [127X[104X
    [4X[28X[ 10 .. 19 ][128X[104X
    [4X[25Xgap>[125X [27XSmallElements(ns3);                                              [127X[104X
    [4X[28X[ 0, 10 ][128X[104X
  [4X[32X[104X
  
  [1XB.1-7 RandomNumericalSemigroupWithGenus[101X
  
  [33X[1;0Y[29X[2XRandomNumericalSemigroupWithGenus[102X( [3Xg[103X ) [32X function[133X
  
  [33X[0;0YProduces a pseudo-random numerical semigroup with genus [3Xg[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomNumericalSemigroupWithGenus(7);Gaps(last);[127X[104X
    [4X[28X<Numerical semigroup with 7 generators>[128X[104X
    [4X[28X[ 1, 2, 3, 4, 5, 6, 9 ][128X[104X
  [4X[32X[104X
  
  
  [1XB.2 [33X[0;0YRandom functions for affine semigroups[133X[101X
  
  [1XB.2-1 RandomAffineSemigroupWithGenusAndDimension[101X
  
  [33X[1;0Y[29X[2XRandomAffineSemigroupWithGenusAndDimension[102X( [3Xg[103X, [3Xd[103X ) [32X function[133X
  
  [33X[0;0YProduces a pseudo-random affine semigroup with genus [3Xg[103X and dimension [3Xd[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomAffineSemigroupWithGenusAndDimension(10,3);Gaps(last);[127X[104X
    [4X[28X<Affine semigroup in 3 dimensional space, with 66 generators>[128X[104X
    [4X[28X[ [ 0, 1, 0 ], [ 0, 2, 0 ], [ 0, 3, 0 ], [ 0, 4, 0 ], [ 0, 5, 0 ], [128X[104X
    [4X[28X  [ 0, 7, 0 ], [ 1, 0, 0 ], [ 1, 1, 0 ], [ 2, 0, 0 ], [ 3, 0, 0 ] ][128X[104X
  [4X[32X[104X
  
  [1XB.2-2 RandomAffineSemigroup[101X
  
  [33X[1;0Y[29X[2XRandomAffineSemigroup[102X( [3Xn[103X, [3Xd[103X, [3Xm[103X ) [32X function[133X
  
  [33X[0;0YReturns  an  affine  semigroup  generated  by  a  [3Xn[103X*[3Xd[103X  matrix  where  [3Xd[103X (the
  dimension)  is randomly choosen from [1..[3Xd[103X] and [3Xn[103X (the number of generators)
  is  randomly  choosen  from  [1..[3Xn[103X].  The entries of the matrix are randomly
  choosen  from  [0..[3Xm[103X] (when the third argument is not present, m is taken as
  [3Xn[103X*[3Xd[103X)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomAffineSemigroup(5,5);Generators(last);[127X[104X
    [4X[28X<Affine semigroup in 5 dimensional space, with 4 generators>[128X[104X
    [4X[28X[ [ 4, 10, 10, 8, 20 ], [ 9, 12, 16, 3, 16 ], [ 14, 19, 14, 3, 20 ], [128X[104X
    [4X[28X  [ 16, 6, 0, 7, 13 ] ][128X[104X
    [4X[25Xgap>[125X [27XRandomAffineSemigroup(5,5,3);Generators(last);[127X[104X
    [4X[28X<Affine semigroup in 4 dimensional space, with 5 generators>[128X[104X
    [4X[28X[ [ 0, 2, 1, 3 ], [ 1, 3, 3, 2 ], [ 2, 3, 3, 2 ], [ 3, 1, 2, 1 ], [128X[104X
    [4X[28X  [ 3, 3, 1, 0 ] ][128X[104X
  [4X[32X[104X
  
  [1XB.2-3 RandomFullAffineSemigroup[101X
  
  [33X[1;0Y[29X[2XRandomFullAffineSemigroup[102X( [3Xn[103X, [3Xd[103X, [3Xm[103X ) [32X function[133X
  
  [33X[0;0YReturns  a  full  affine semigroup either given by equations or inequalities
  (when  no  string  is given, one is choosen at random). The matrix is an [3Xn[103X*[3Xd[103X
  matrix  where  [3Xd[103X  (the  dimension)  is randomly choosen from [1..[3Xd[103X] and [3Xn[103X is
  randomly  choosen from [1..[3Xn[103X]. When it is given by equations, the moduli are
  choosen  at  random.  The  entries  of  the matrix (and moduli) are randomly
  choosen  from  [0..[3Xm[103X]  (when the third integer is not present, m is taken as
  [3Xn[103X*[3Xd[103X)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XRandomFullAffineSemigroup(5,5,3);Generators(last);[127X[104X
    [4X[28X<Affine semigroup>[128X[104X
    [4X[28X#I  Using contejeanDevieAlgorithm for Hilbert Basis. Please, consider using[128X[104X
    [4X[28XNormalizInterface, 4ti2Interface or 4ti2gap.[128X[104X
    [4X[28X[ [ 0, 0, 0, 0, 1 ], [ 0, 0, 0, 1, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 1, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 1, 0, 0, 0, 0 ] ][128X[104X
  [4X[32X[104X
  
  
  [1XB.3 [33X[0;0YRandom functions for good semigroups[133X[101X
  
  [1XB.3-1 RandomGoodSemigroupWithFixedMultiplicity[101X
  
  [33X[1;0Y[29X[2XRandomGoodSemigroupWithFixedMultiplicity[102X( [3Xm[103X, [3Xcond[103X ) [32X function[133X
  
  [33X[0;0YThis  function  produces  a  "random" semigroup with multiplicity [3Xm[103X and with
  conductor bounded by [3Xcond[103X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=RandomGoodSemigroupWithFixedMultiplicity([6,7],[30,30]);[127X[104X
    [4X[28X<Good semigroup>[128X[104X
    [4X[25Xgap>[125X [27XSmallElements(S);[127X[104X
    [4X[28X[ [ 0, 0 ], [ 6, 7 ], [ 9, 8 ], [ 9, 10 ], [ 9, 11 ], [ 9, 14 ], [ 9, 15 ],[128X[104X
    [4X[28X  [ 9, 16 ], [ 10, 8 ], [ 11, 10 ], [ 11, 11 ], [ 12, 10 ], [ 12, 14 ],[128X[104X
    [4X[28X  [ 13, 10 ], [ 13, 15 ], [ 13, 16 ], [ 15, 10 ], [ 15, 15 ], [ 15, 16 ],[128X[104X
    [4X[28X  [ 16, 10 ], [ 16, 15 ], [ 17, 10 ], [ 17, 16 ] ][128X[104X
    [4X[28X  [128X[104X
  [4X[32X[104X
  
