The option Algorithm determines which algorithm is used to compute the results. The default option is called Default, it attempts to automatically choose the fastest algorithm according to a simple rule. However, the algorithm may also be chosen manually.
i1 : setRandomSeed 367;
|
i2 : R = QQ[x,y,z,w];
|
i3 : chernClass( minors(2,matrix{{x,y,z},{y,z,w}}), Algorithm=>ProjectiveDegree)
3 2
o3 = 2H + 3H
ZZ[H]
o3 : -----
4
H
|
There are three algorithms which can be used, ProjectiveDegree, ResidualSymbolic, and Bertini. When choosing the ProjectiveDegree option, the main step is the computation of projective degrees, for which Gröbner basis methods will be used. When choosing ResidualSymbolic, Gröbner basis methods will be used to compute so-called residuals. These computations can also be done numerically using the regenerative cascade implemented in Bertini. This is done by choosing the option Bertini and provided Bertini is installed and configured.
For many examples over a finite field the ProjectiveDegree option will offer better performance. When working over the rationals the ResidualSymbolic algorithm is often faster. Hence when the field is QQ (the rationals), the option ResidualSymbolic will be automatically chosen, and for any other field, i.e., ZZ/32749 or some other finite field, the ProjectiveDegree option will be automatically chosen. Note that this is only a general trend which has been observed in testing, and this may not necessarily true for any particular example, hence if one method is not working well the user may wish to try another.
i4 : R=ZZ/32749[v_0..v_5];
|
i5 : I=ideal(4*v_3*v_2-v_0^2,v_5*(v_0*v_1*v_4-v_2^3));
o5 : Ideal of R
|
i6 : time CSMClass(I,Algorithm=>ProjectiveDegree)
-- used 0.513006 seconds
5 4 3 2
o6 = 5H + 10H + 9H + 8H
ZZ[H]
o6 : -----
6
H
|
i7 : time CSMClass(I,Algorithm=>ResidualSymbolic)
-- used 1.33525 seconds
5 4 3 2
o7 = 5H + 10H + 9H + 8H
ZZ[H]
o7 : -----
6
H
|
i8 : S=QQ[s_0..s_3];
|
i9 : K=ideal(4*s_3*s_2-s_0^2,(s_0*s_1*s_3-s_2^3));
o9 : Ideal of S
|
i10 : time CSMClass(K,Algorithm=>ProjectiveDegree)
-- used 0.290765 seconds
3 2
o10 = 2H + 6H
ZZ[H]
o10 : -----
4
H
|
i11 : time CSMClass(K,Algorithm=>ResidualSymbolic)
-- used 0.0717306 seconds
3 2
o11 = 2H + 6H
ZZ[H]
o11 : -----
4
H
|
Note that there are some specific examples where we may see the difference in performance change to favour one algorithm over the other when changing fields, however such examples observed thus far are too time consuming to include here.