# randomMonomialIdeal -- random monomial ideal with given degree generators

## Synopsis

• Usage:
I = randomMonomialIdeal(L,S)
• Inputs:
• L, a list, or sequence of non-negative integers
• S, a ring, Polynomial ring
• Outputs:
• I, an ideal, monomial ideal with generators of specified degrees

## Description

Choose a random ideal whose generators have the degrees specified by the list or sequence L.

 i1 : kk=ZZ/101 o1 = kk o1 : QuotientRing i2 : S=kk[a..e] o2 = S o2 : PolynomialRing i3 : L={3,5,7} o3 = {3, 5, 7} o3 : List i4 : randomMonomialIdeal(L, S) 2 3 6 o4 = ideal (a*b , a*c*d , c e) o4 : Ideal of S i5 : randomMonomialIdeal(5:2, S) 2 o5 = ideal (a*c, a*d, a*b, c*e, c ) o5 : Ideal of S

## Caveat

The ideal is constructed degree by degree, starting from the lowest degree specified. If there are not enough monomials of the next specified degree that are not already in the ideal, the function prints a warning and returns an ideal containing all the generators of that degree.