Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Graded weighted monomial order

14 views
Skip to first unread message

Venkitesh S.

unread,
Dec 20, 2024, 6:11:37 PM12/20/24
to Macaulay2
Hi!

I would like to define a monomial order in n variables, with respect to weights w_1,...,w_n.  However, I would like the order to be graded in the standard sense.  So given any two monomials m and m', I would like to define m < m' if either we have deg(m) < deg(m'), or we have deg(m) = deg(m') and weight(m) < weight(m').  Here, "deg" is the usual degree of a monomial, and "weight" is the dot product of the multiindex of the monomial with (w_1,...,w_n).  Is this possible in M2?

Regards,
S. Venkitesh

Douglas Leonard

unread,
Dec 20, 2024, 7:36:12 PM12/20/24
to maca...@googlegroups.com
A long time ago I wrote weightGrevlex and grevlexWeight monomial ordering functions in my QthPower package. 

I think they were exported. 
But even if not, you might be able to get some idea about how to do what you want from looking at the QthPower.m2 file, and write your own monomial ordering function.

Doug Leonard

From: maca...@googlegroups.com <maca...@googlegroups.com> on behalf of Venkitesh S. <vsi....@gmail.com>
Sent: Friday, December 20, 2024 5:11 PM
To: Macaulay2 <maca...@googlegroups.com>
Subject: [EXT] [Macaulay2] Graded weighted monomial order
 
CAUTION: Email Originated Outside of Auburn.
--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/macaulay2/587e9274-6fc1-4762-8cbb-88654461124dn%40googlegroups.com.

Michael Burr

unread,
Dec 20, 2024, 7:39:24 PM12/20/24
to Macaulay2
Are you looking for something like: R = QQ[x,y,z,MonomialOrder=>{Weights=>{1,1,1},Weights=>{1,2,3}}]?  This should first order using the weights {1,1,1}, i.e., the degree, and then use the second set of weights to break ties.  

Some examples: 
1) y*z is larger than x*y since they have the same degree, but y*z has weight 5 while x*y has weight only 3. 
2) x^3 is larger than z^2 since x^3 has a larger degree than z^2, even though the weight of x^3 is 3 and the weight of z^2 is 6.

Venkitesh S.

unread,
Dec 21, 2024, 12:57:24 PM12/21/24
to maca...@googlegroups.com
Nice!  Thanks Michael and Doug!  I am indeed trying to order using weights {1,1,1} first and then break ties using the second set of weights.  And Doug's package is even more flexible; that's good to know.

Regards,
S. Venkitesh

--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages