next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
MonomialAlgebras :: randomMonomialAlgebra

randomMonomialAlgebra -- Generate random monoimal algebra.

Synopsis

Description

Generate a random monomial algebra such that the semigroup generated by the degrees is in ℕd of full dimension with coordinate sum a and codimension c.

Note that the random number generator can be controlled by the command setRandomSeed. Alternatively you can also use the option SetSeed.

The option Num can be used to return a list of semigroups.

The option Simplicial can be used to return a simplicial semigroup such that the standard vectors a*ei are among the Hilbert basis.

i1 : randomMonomialAlgebra(5,3,7)

      ZZ
o1 = ---[x , x , x , x , x , x , x , x , x , x ]
     101  0   1   2   3   4   5   6   7   8   9

o1 : MonomialAlgebra generated by {{1, 3, 1}, {0, 1, 4}, {2, 1, 2}, {0, 4, 1}, {2, 2, 1}, {3, 2, 0}, {3, 1, 1}, {5, 0, 0}, {2, 3, 0}, {0, 3, 2}}
i2 : setRandomSeed()
i3 : randomMonomialAlgebra(5,3,7)

      ZZ
o3 = ---[x , x , x , x , x , x , x , x , x , x ]
     101  0   1   2   3   4   5   6   7   8   9

o3 : MonomialAlgebra generated by {{5, 0, 0}, {1, 3, 1}, {1, 4, 0}, {0, 2, 3}, {3, 0, 2}, {0, 1, 4}, {0, 5, 0}, {4, 1, 0}, {2, 0, 3}, {4, 0, 1}}
i4 : setRandomSeed()
i5 : randomMonomialAlgebra(5,3,7)

      ZZ
o5 = ---[x , x , x , x , x , x , x , x , x , x ]
     101  0   1   2   3   4   5   6   7   8   9

o5 : MonomialAlgebra generated by {{5, 0, 0}, {1, 3, 1}, {1, 4, 0}, {0, 2, 3}, {3, 0, 2}, {0, 1, 4}, {0, 5, 0}, {4, 1, 0}, {2, 0, 3}, {4, 0, 1}}
i6 : setRandomSeed()
i7 : randomMonomialAlgebra(5,3,7,Num=>2)

       ZZ                                           ZZ
o7 = {---[x , x , x , x , x , x , x , x , x , x ], ---[x , x , x , x , x ,
      101  0   1   2   3   4   5   6   7   8   9   101  0   1   2   3   4 
     ------------------------------------------------------------------------
     x , x , x , x , x ]}
      5   6   7   8   9

o7 : List
i8 : setRandomSeed()
i9 : randomMonomialAlgebra(5,3,7,Simplicial=>true)

      ZZ
o9 = ---[x , x , x , x , x , x , x , x , x , x ]
     101  0   1   2   3   4   5   6   7   8   9

o9 : MonomialAlgebra generated by {{5, 0, 0}, {0, 5, 0}, {0, 0, 5}, {0, 1, 4}, {4, 0, 1}, {1, 1, 3}, {1, 3, 1}, {2, 3, 0}, {2, 0, 3}, {1, 4, 0}}

Ways to use randomMonomialAlgebra :