Message Boards Message Boards

0
|
3555 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Lexicographic order of weighted variables?

Can someone elaborate on the meaning of this:

An explicit weight matrix w defines an ordering given by "Lexicographic" ordering of the w.Subscript[v, i], where the Subscript[v, i] are the exponent vectors.

It's the only documentation I have found on controlling variable order within lexicographic order. It's in the options documentation for MonomialList[]. The following example in the documentation illustrates the meaning.

In[2]:= MonomialList[x^2 y^2 + x^3, {x, y}, {{1, 1}, {1, 0}}]
Out[2]= {x^2 y^2, x^3}
POSTED BY: Jay Gourley
4 Replies

Yes, I get it now. Thanks.

POSTED BY: Jay Gourley

I cannot help with the general issue other than to suggest that you use a weight matrix rather than an explicit Lexicographic order.

Here are some computations to show where the values I claimed arise.

In[412]:= wmat = {{1, 1}, {1, 0}};
evectors = 
 GroebnerBasis`DistributedTermsList[x^2 y^2 + x^3, {x, y}][[1, All, 1]]

(* Out[413]= {{3, 0}, {2, 2}} *)

Obviously I do not expect people to know about that DistributedTermsList function, I'm just using it to show that the exponent vectors I claimed can be made to appear.

Now to get the weighted exponents, we dot the weight matrix with the exponent vectors.

In[414]:= Map[wmat . # &, evectors]

    (* Out[414]= {{3, 3}, {4, 2}} *)

Okay, so how does this get used? The ordering function is lexicographically based, not on the exponent vectors, but on these new (weighted) vectors. Proceed left to right to compare any pair of vectors. In this case 3<4, so the comparison ends and the vector {4,2} is declared lexicographically the larger. Hence the corresponding exponent vector, {2,2}, is the larger with respect to this particular term order.

By the way, one controls the ordering between variables simply by specifying it. If you use {x,y} as your variable list, then x>y. If you use {y,x} then y>x.

I hope this helps a bit.

POSTED BY: Daniel Lichtblau

In your example the weight matrix is w={{1, 1}, {1, 0}}. The monomials to be ordered are x^2 y^2 and x^3. The corresponding exponent vectors, with respect to variables {x,y} in that order, are e1={2,2} and e2={3,0}. So the vectors to compare are w.e1 = {4,2} and w.e2={3,3}. Since lexicographic order works left-to-right, we check that 4>3 so e1 is ordered higher than e2.

POSTED BY: Daniel Lichtblau
Posted 2 years ago

Thanks, Daniel. I'm afraid I need an even more expansive explanation. I was with you through el1, el2. After that, how did you get w.e1, w.e2? Also, I'm missing the most basic knowledge of what the weighting affects. My goal is a general understanding of the weighting and the language describing it so I can use it in a variety of ways. But my immediate problem is to tell Lexicographic to use alternate variable ordering. For example, to use some other permutation of variable orders than defaults like w>x>y>z or x1>x2>x3>...

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract