# randomElementsFromIdeal -- Chooses random elements of given degrees in a given ideal.

## Synopsis

• Usage:
I = randomElementsFromIdeal(L,I)
• Inputs:
• L, a list, of integers
• I, an ideal, that should be homogeneous
• Outputs:
• I, an ideal, generated by (at most) n homogeneous polynomials that are random linear combination of the generators of I, with degrees specified by the list L

## Description

 i1 : kk=ZZ/101 o1 = kk o1 : QuotientRing i2 : S=kk[a..c] o2 = S o2 : PolynomialRing i3 : L={3,3,4,6} o3 = {3, 3, 4, 6} o3 : List i4 : I = ideal(a^3,b^3, c^3) 3 3 3 o4 = ideal (a , b , c ) o4 : Ideal of S i5 : J=randomElementsFromIdeal(L,I) 3 3 3 3 3 3 4 5 6 o5 = ideal (b - 45c , a - 26c , a*c + 38b*c + 34c , b*c - 32c ) o5 : Ideal of S