# findWeightVector -- returns a weight vector

## Synopsis

• Usage:
(w, h) = findWeightVector (M, L)
• Inputs:
• M, an ideal, M should be a monomial ideal
• L, a list, a list of lists of standard monomials
• Outputs:
• w, a list, w is a weight vector that places the specified generators of M greater than the corresponding standard monomials, if possible. If not possible, null is returned instead of (w,h)
• h, a list, h is a list of values for w dotted with the difference of the exponent of the each standard monomial for each generator and the corresponding generator, in the order they are listed in L

## Description

In the first entry, this command returns a weight vector associated to a monomial order that places the generators of a monomial ideal $M$ ahead of standard monomials of the same degree. The second entry is a list of values for the weight vector dotted with the difference of the exponent of each standard monomial for each generator and the corresponding generator.

 i1 : R = ZZ/32003[a,b,c, d]; i2 : M = ideal (a^2, a*b, b^2); o2 : Ideal of R i3 : L = smallerMonomials M; i4 : findWeightVector(M,L) o4 = ({2, 2, 1, 1}, {1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, ------------------------------------------------------------------------ 2, 2}) o4 : Sequence

Note that the first generator listed for $M$ is $a^2$, and the first corresponding standard monomial is $a*c$. The difference of these two monomials exponent vectors is $(1,0,-1,0)$. This vector dotted with the weight vector $(2,2,1,1)$ gives the value $1$, which is the first value in the second list.

Note that the desired term ordering, and hence weight vector, may not exist. In this case, null is returned.

 i5 : M = ideal"ab" o5 = ideal(a*b) o5 : Ideal of R i6 : L1 = standardMonomials M 2 2 2 2 o6 = {{a , b , a*c, b*c, c , a*d, b*d, c*d, d }} o6 : List i7 : findWeightVector(M,L1)

This command is used in the groebnerFamily routine.

## See also

• groebnerStratum -- compute the ideal where a given is a Groebner basis
• groebnerFamily -- computes families of ideals with a specified initial ideal

## Ways to use findWeightVector :

• "findWeightVector(Ideal,List)"

## For the programmer

The object findWeightVector is .