Alternative Gröbner Basis Packages

170 Views Asked by At

Hello helpful readers!

The situation: I computed the solution space of $5$ variables with $4$ constraints as an expression of one free parameter. I did this using the groebner basis function in Mathematica. I'm looking to repeat the calculation for $9$ variables with $8$ constraints. However, Mathematica's wheel's start spinning and hours later it hasn't finished its computation (scripts below). I've double checked my constraints and variables. Thus it appears I need a faster version of the Buchberger's algorithm.

The questions: Does anyone know of a open source Buchberger algorithm package that's faster than Mathematica $11$'s? I checked Mathematica $12$ and it didn't appear to have any updates for Gröbner basis, is this true? Alternatively a package with a parallelized algorithm would help (I have access to a high performance cluster).

Best, Tuna

UPDATE: Macaulay2 editor unable to compute solution in timely fashion. m2 script provided below.

Mathematica Code (5,4) unknowns (a21, a31, a32, b3, z)

w = a21 + a31 + a32;
b2 = z*a32;
b1 = z*a31;
r = b1 + b2 + b3;
g = b2*a21 + b3*w;
j = b2*(a21^2) + b3*w^2;

con1 = w + r == 1;
con2 = g + a21*a32 == 1/2;
con3 = r*(g + 2*a21*a32) + a21*a32*(a31 + a32) == 1/3;
con4 = b3*a21*a32 == 1/6;

sols = GroebnerBasis[{con1, con2, con3, con4}, ParameterVariables -> a21]

Mathematica Code (9,8) Unknowns (A2, A3, A4, A5, B1, B2, B3, B4, B5)

a21 = B1;
a32 = B2;
a31 = A2*a32 + B1;
a43 = B3;
a42 = A3*a43 + B2;
a41 = A2*a42 + B1;
a54 = B4;
a53 = A4*a54 + B3;
a52 = A3*a53 + B2;
a51 = A2*a52 + B1;
b5 = B5;
b4 = A5*b5 + B4;
b3 = A4*b4 + B3;
b2 = A3*b3 + B2;
b1 = A2*b2 + B1;

c1 = 0;
c2 = a21;
c3 = a31 + a32;
c4 = a41 + a42 + a43;
c5 = a51 + a52 + a53 + a54;

b = {b1, b2, b3, b4, b5};
c = {c1, c2, c3, c4, c5};
a = {{0, 0, 0, 0, 0},
    {a21, 0, 0, 0, 0},
    {a31, a32, 0, 0, 0},
    {a41, a42, a43, 0, 0},
    {a51, a52, a53, a54, 0}};

con1 = b1 + b2 + b3 + b4 + b5 == 1 ;
con2 = b.c == 1/2;
con3 = b.c^2 == 1/3;
con4 = b.a.c == 1/6;
con5 = b.c^3 == 1/4;
con6 = (c*b).a.c == 1/8;
con7 = b.a.(c^2) == 1/12;
con8 = b.a.a.c == 1/24;
constraints = {con1, con2, con3, con4, con5, con6, con7, con8};

m2 Script

R=QQ[a21,a31,a32,b3,z, MonomialOrder=> Lex];
con3_1=-1 + a21 + a31 + a32 + b3 + a31*z + a32*z;
con3_2=-1/2 + a21*a32 + (a21 + a31 + a32)*b3 + a21*a32*z;
con3_3=-1/3 + a21*a32*(a31 + a32) + (b3 + (a31 + a32)*z)*((a31 + a32)*b3 + a21*(b3 + a32*(2 + z)));
con3_4=-1/6 + a21*a32*b3;
I = ideal(con3_1, con3_2, con3_3, con3_4)
J = groebnerBasis I

R=QQ[A2,A3,A4,A5,B1, B2, B3, B4, B5, MonomialOrder=> Lex];
con1=-1 + B1 + B2 + B3 + B4 + B5 + A5*B5 + A4*(B4 + A5*B5) + A3*(B3 + A4*(B4 + A5*B5)) + A2*(B2 + A3*(B3 + A4*(B4 + A5*B5)));
con2=-1/2 + (B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))*B5 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))*(B4 + A5*B5)+ (B1 + B2 + A2*B2)*(B3 + A4*(B4 + A5*B5)) + B1*(B2 + A3*(B3 + A4*(B4 + A5*B5)));
con3=-1/3 + (B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))^2*B5 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))^2*(B4 + A5*B5) + (B1 + B2 + A2*B2)^2*(B3 + A4*(B4 + A5*B5)) + B1^2*(B2 + A3*(B3 + A4*(B4 + A5*B5)));
con4=-1/6 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))*B4*B5 + (B1 + B2 + A2*B2)*((B3 + A4*B4)*B5 + B3*(B4 + A5*B5)) + B1*((B2 + A3*(B3 + A4*B4))*B5 + (B2 + A3*B3)*(B4 + A5*B5) + B2*(B3 + A4*(B4 + A5*B5)));
con5=-1/4 + (B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))^3*B5 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))^3*(B4 + A5*B5) + (B1 + B2 + A2*B2)^3*(B3 + A4*(B4 + A5*B5)) + B1^3*(B2 + A3*(B3 + A4*(B4 + A5*B5)));
con6=-1/8 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))*B4*(B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))*B5 + (B1 + B2 + A2*B2)*((B3 + A4*B4)*(B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))*B5 + B3*(B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))*(B4 + A5*B5)) + B1*((B2 + A3*(B3 + A4*B4))*(B1 + B2 + B3 + B4 + A4*B4 + A3*(B3 + A4*B4) + A2*(B2 + A3*(B3 + A4*B4)))*B5 + (B2 + A3*B3)*(B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))*(B4 + A5*B5) + B2*(B1 + B2 + A2*B2)*(B3 + A4*(B4 + A5*B5)));
con7=-1/12 + (B1 + B2 + B3 + A3*B3 + A2*(B2 + A3*B3))^2*B4*B5 + (B1 + B2 + A2*B2)^2*((B3 + A4*B4)*B5 + B3*(B4 + A5*B5)) +  B1^2*((B2 + A3*(B3 + A4*B4))*B5 + (B2 + A3*B3)*(B4 + A5*B5) + B2*(B3 + A4*(B4 + A5*B5)));
con8=-1/24 + (B1 + B2 + A2*B2)*B3*B4*B5 +  B1*((B2 + A3*B3)*B4*B5 + B2*((B3 + A4*B4)*B5 + B3*(B4 + A5*B5)));
I = ideal(con1,con2,con3,con4,con5,con6,con7,con8);
J = groebnerBasis I
1

There are 1 best solutions below

1
On

What about trying it with Macaulay 2? I remember using it years ago for Gröbner bases, and it was able to do huge calculations.