Error: Can you manually seed?

34 views
Skip to first unread message

Lina Liu

unread,
Apr 10, 2022, 12:45:21 PMApr 10
to Macaulay2
Hi, I got this new error today and I'm not sure how to go about it:

```
Macaulay2, version 1.19.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : needsPackage"MonodromySolver"
needsPackage"InvariantRing"

o1 = MonodromySolver

o1 : Package

i2 :
o2 = InvariantRing

o2 : Package

i3 : setRandomSeed 100;

i4 : declareVariable \ {x,s,t};

i5 : paramMatrix = gateMatrix{{s,t}};

i6 : varMatrix = gateMatrix{{x}};

i9 : H=x^5+(t-3)*x^4+(s-t+3)*x^3+(t^2-t-2*s-1)*x^2+s*x+t;

i10 : G = gateSystem(paramMatrix,varMatrix, gateMatrix{{H}});

i11 : M = monodromyGroup(G,"msOptions" => {NumberOfEdges=>1})
stdio:11:5:(3): error: heuristic linearity check failed
automated seeding assumes system is affine-linear in parameters
can you seed manually?
or, if you are working with a gate system GS, try the commands
debug MonodromySolver; newtonHomotopy GS
```

I've tried the example in this documentation: http://www2.macaulay2.com/Macaulay2/doc/Macaulay2-1.17/share/doc/Macaulay2/MonodromySolver/html/_monodromy__Group.html and it worked perfectly find. I've also had success with this code when using
```
i4 : declareVariable \ {x,y};

i5 : paramMatrix = gateMatrix{{x}};

i6 : varMatrix = gateMatrix{{y}};
```
If I were to manually set the seed,  how should I go about doing that?

With thanks,
Lina

Tim Duff

unread,
Apr 12, 2022, 2:07:39 PMApr 12
to Macaulay2
Hi Lina,

The error message you got also suggests trying an un-exported method called "newtonHomotopy". However, that error message doesn't provide enough guidance on how exactly to use this method. The code below shows it seems to work reasonably well on your example:

i9 : debug MonodromySolver
i10 : (p0, x0) = newtonHomotopy G
o10 = (p0, x0)
o10 : Sequence
i11 : monodromyGroup(G, p0, {x0},"msOptions" => {NumberOfEdges=>4}, FileName => "my_group.txt")
o11 = {{0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {0, 4, 3, 2, 1}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {4, 0, 1, 2, 3}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {0,
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      1, 2, 3, 4}, {0, 1, 2, 3, 4}, {3, 2, 1, 0, 4}, {0, 1, 2, 3, 4}, {3, 2, 1, 0, 4}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}, {3, 2, 1, 0, 4}, {0, 1, 2, 3, 4}}
o11 : List

Finding a seed / starting pair for monodromy is a potentially ambiguous operation. The variety V(G) in general may have multiple components. Which of these components should you sample from, and how would you actually do it? If G were linear in the parameters {s,t}, a natural strategy would be to pick a random value for x0, and compute a solution p0=(s0, t0) to the resulting linear system. That doesn't work here. "newtonHomotopy" is just another heuristic for getting a seed pair. It seems to work well enough on this example, although your mileage may vary in general. Depending on the type of example you're looking at, various other heuristics are also possible.

Also, in the above I've set the option NumberOfEdges to be larger, which has the effect of generating more monodromy loops. This is advisable if the root count is not very large, since the probability of generating a transitive action on the roots with a small, fixed number of loops usually seems to only go up with the root count.

Let me know if you have further questions!

Cheers,
Tim
Reply all
Reply to author
Forward
0 new messages