Read-only forum archive

List of all monomials

List of all monomials

vinay · Tue May 01, 2018 8:28 am

Given a degree $d$, is there any way to list all monomials of degree $d$ in (decreasing / increasing) order with respect to the underlying monomial ordering?

One way I can think of is using string manipulation and multiple for loops, generate all monomials and then compare and then sort!
Was wondering if there is any better and efficient way!

Thanks
VInay

Re: List of all monomials

hannes · Wed May 02, 2018 11:28 am

Quote:
maxideal(d)
generates all monomials of degree d (as an ideal).
If you want to have them sorted wrt. the monomial ordering,
use
Quote:
LIB"general.lib";
sort(maxideal(d))[1];


Hans