randomMonomialIdeals creates N random monomial ideals, with each monomial generator having degree d, 1≤d≤D, in n variables. If p is a real number, it generates each of these ideals according to the Erdos-Renyi-type model (see https://arxiv.org/abs/1701.07130): from the list of all monomials of degree 1,…,D in n variables, it selects each one, independently, with probability p.
i1 : n=2; D=3; p=0.2; N=10; |
i5 : randomMonomialIdeals(n,D,p,N) 2 3 3 o5 = {monomialIdeal x , monomialIdeal x , monomialIdeal (x , x ), 2 1 1 2 ------------------------------------------------------------------------ 3 monomialIdeal(x x ), monomialIdeal (x x , x ), monomialIdeal (), 1 2 1 2 2 ------------------------------------------------------------------------ 3 2 monomialIdeal (x , x x ), monomialIdeal (x , x ), monomialIdeal x , 1 1 2 1 2 2 ------------------------------------------------------------------------ 2 2 monomialIdeal (x , x x )} 1 1 2 o5 : List |
i6 : randomMonomialIdeals(5,3,0.4,4) 2 2 2 2 o6 = {monomialIdeal (x , x x , x , x , x ), monomialIdeal (x , x , x x , 1 1 2 3 4 5 2 3 1 4 ------------------------------------------------------------------------ 2 3 2 3 x x , x x , x x , x x , x ), monomialIdeal (x , x , x , x x , x , x x , 2 4 2 5 4 5 1 5 5 1 2 3 3 4 4 3 5 ------------------------------------------------------------------------ 3 2 2 x x , x ), monomialIdeal (x , x , x x , x x , x , x )} 4 5 5 1 2 1 3 2 3 4 5 o6 : List |
Note that this model does not generate the monomial 1:
i7 : randomMonomialIdeals(3,2,1.0,1) o7 = {monomialIdeal (x , x , x )} 1 2 3 o7 : List |
If M is an integer, then randomMonomialIdeals creates N random monomial ideals of size at most M: randomly select M monomials from the list of all monomials of degree 1,…,D in n variables, then generate the ideal from this set.
i8 : n=8; D=4; M=7; N=3; |
i12 : randomMonomialIdeals(n,D,M,N) 2 2 2 2 2 3 o12 = {monomialIdeal (x x , x x , x x , x x x , x x ), monomialIdeal 1 3 1 5 3 6 1 2 7 5 8 ----------------------------------------------------------------------- 2 2 2 2 (x x x x , x x x , x x , x x , x x x , x x x , x x x x ), monomialIdeal 1 2 4 5 2 4 6 1 6 3 7 4 5 7 2 3 8 3 4 6 8 ----------------------------------------------------------------------- 3 2 2 3 2 2 (x x , x x x , x x x , x x , x x x , x )} 4 5 1 2 6 2 5 6 1 8 5 7 8 8 o12 : List |
Note that each generating set of each ideal has at most M = 7 monomials. If one monomial divides another monomial that was generated, it will not be in the generating set.
The input of type List controls the number of monomials in the generating set of each degree for the graded ER model. Specifically, this input is either a list of real numbers between 0 and 1, inclusive, whose i-th entry is the probability of including a monomial of degree i in the monomial set, or it is a list of nonnegative integers whose i-th entry is the number of monomials of each degree to include in the monomial set. Consider the following two examples: If p=p1,…,pD is a list of real numbers of length D, then randomMonomialSet generates the set utilizing the graded Erdos-Renyi-type model: select each monomial of degree 1≤d≤D, independently, with probability pd.
i13 : randomMonomialIdeals(2,3,{0.0, 1.0, 1.0},1) 2 2 o13 = {monomialIdeal (x , x x , x )} 1 1 2 2 o13 : List |
Note that the degree-1 monomials were not generated, since the first probability vector entry, p1, is 0.
If M=M1,…,MD is a list of integers of length D, then randomMonomialIdeals creates a list of MonomialIdeal, where at most Md monomials are of degree d.
i14 : randomMonomialIdeals(3,3,{1,1,1},1) o14 = {monomialIdeal x } 2 o14 : List |
Observe that there are at most one degree-1, one degree-2, and one degree-3 monomials generating each ideal.
If Strategy=>"ER", the default setting for the graded fixed number of generators version of the method, each set of monomials used to generate a MonomialIdeal in our list is not necessarily minimal. Else if Strategy=> "Minimal" then each monomial ideal in the list is generated by minimal sets of Md monomials, or maximum number possible, of total degree d, starting from the smallest degree.
i15 : randomMonomialIdeals(3,3,{1,1,1},1, Strategy=>"Minimal") 2 3 o15 = {monomialIdeal (x , x , x )} 1 2 3 o15 : List |
Observe that there are at most one degree-1, one degree-2, and one degree-3 monomials generating each ideal. Also observe that Strategy=>"Minimal" generally gives more generators than the default Strategy=>"ER".
Since the method returns a list of MonomialIdeals, only the minimal generating set will be displayed. In contrast, randomMonomialSet will display the full (not necessarily minimal) generating set produced by the model.