Question: Create elements of degree <= n.

Let L = {a1, a2, ..., an} (or L = [a1, a2, ..., an]) with is homogeneous polynomial. How to create function createDegree() return elements of degree <= n from L.

Expamle. L = {a-2b, b^2, (a+c)^2}.

createDegree(L,1) return {a - 2b}.

createDegree(L,2) return {b^2, (a - 2b)^2, (a+c)^2, a - 2b}.

createDegree(L,3) return {b^2, (a - 2b)^2, (a - 2b)^3, (a+c)^2, (a - 2b)b^2, (a - 2b)(a+c)^2, a - 2b}.

Thanks you very much.



Please Wait...