Question: How to order a set of multivariable polynomials based on a given ranking ?

Hello,

I need to order a set of polynomials based on a given ranking. For example:

F:=[F1,F2,F3,F4,F5,F6]:
F1 := x1*x4^2+x4^2-x1*x2*x4-x2*x4+x1*x2+3*x2;
F2 := x1*x4-x3-x1*x2;
F3 := x3*x4-2*x2^2-x1*x2-1;
F4 := x1*x3^2+x3^2-x1^2*x2*x3-x1*x2*x3+x1^3*x2+3*x1^2*x2;
F5 := -x3^2 + x1*x2*x3 -2*x1*x2^2-x1^2*x2-x1;
F6 := 2*x1*x2^2+2*x1^2*x2^2-2*x1^2*x2+x1^2+x1;

The order used to rank the polynomials is based on the variables in the following order: x1 < x2 < x3 < x4.

The ranking criteria are:

  1. The first polynomial should be the one involving x4 with the lowest degree of nonlinearity in x4 and the fewest number of terms (in this case, F2).
  2. The next polynomial should also involve x4, but with the lowest degree of nonlinearity and the next fewest number of terms and so on.
  3. Once the polynomials in x4 are exhausted, the ranking continues similarly for the next variable x3, followed by x2, and finally x1.

How can I do this efficiently?

Obs.:If necessary, I can share my solution to the problem, though it's far from efficient.

Please Wait...