Macaulay2 » Documentation
Packages » RandomIdeals :: randomSquareFreeMonomialIdeal
next | previous | forward | backward | up | index | toc

# randomSquareFreeMonomialIdeal -- random square-free monomial ideal with given degree generators

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

## Description

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

    i1 : setRandomSeed(currentTime())
     -- setting random seed to 1770553367

    o1 = 1770553367

    i2 : kk=ZZ/101

    o2 = kk

    o2 : QuotientRing

    i3 : S=kk[a..e]

    o3 = S

    o3 : PolynomialRing

    i4 : L={3,5,7}

    o4 = {3, 5, 7}

    o4 : List

    i5 : randomSquareFreeMonomialIdeal(L, S)
    low degree gens generated everything

    o5 = ideal(b*c*d)

    o5 : Ideal of S

    i6 : randomSquareFreeMonomialIdeal(5:2, S)

    o6 = ideal (a*e, a*c, b*e, c*d, b*c)

    o6 : 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.

## See also

- randomMonomial -- Choose a random monomial of given degree in a given ring
- randomMonomialIdeal -- random monomial ideal with given degree generators

## Ways to use randomSquareFreeMonomialIdeal:

- `randomSquareFreeMonomialIdeal(List,Ring)`
- `randomSquareFreeMonomialIdeal(Sequence,Ring)`

## For the programmer

The object randomSquareFreeMonomialIdeal is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/RandomIdeals.m2:879:0.