File: noon10.m2

package info (click to toggle)
macaulay2 1.21%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 133,096 kB
  • sloc: cpp: 110,377; ansic: 16,306; javascript: 4,193; makefile: 3,821; sh: 3,580; lisp: 764; yacc: 590; xml: 177; python: 140; perl: 114; lex: 65; awk: 3
file content (87 lines) | stat: -rw-r--r-- 3,767 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
needsPackage "MonodromySolver"
setRandomSeed 0
needsPackage "ExampleIdeals"

parametrizedNoon = n -> (
    R := CC[x_1..x_10];
    polys := {x_1*x_2^2+x_1*x_3^2+x_1*x_4^2+x_1*x_5^2+x_1*x_6^2+x_1*x_7^2+x_1*x_8^2+x_1*x_9^2+x_1*x_10^2-1.1*x_1+1,
x_2*x_1^2+x_2*x_3^2+x_2*x_4^2+x_2*x_5^2+x_2*x_6^2+x_2*x_7^2+x_2*x_8^2+x_2*x_9^2+x_2*x_10^2-1.1*x_2+1,
x_3*x_1^2+x_3*x_2^2+x_3*x_4^2+x_3*x_5^2+x_3*x_6^2+x_3*x_7^2+x_3*x_8^2+x_3*x_9^2+x_3*x_10^2-1.1*x_3+1,
x_4*x_1^2+x_4*x_2^2+x_4*x_3^2+x_4*x_5^2+x_4*x_6^2+x_4*x_7^2+x_4*x_8^2+x_4*x_9^2+x_4*x_10^2-1.1*x_4+1,
x_5*x_1^2+x_5*x_2^2+x_5*x_3^2+x_5*x_4^2+x_5*x_6^2+x_5*x_7^2+x_5*x_8^2+x_5*x_9^2+x_5*x_10^2-1.1*x_5+1,
x_6*x_1^2+x_6*x_2^2+x_6*x_3^2+x_6*x_4^2+x_6*x_5^2+x_6*x_7^2+x_6*x_8^2+x_6*x_9^2+x_6*x_10^2-1.1*x_6+1,
x_7*x_1^2+x_7*x_2^2+x_7*x_3^2+x_7*x_4^2+x_7*x_5^2+x_7*x_6^2+x_7*x_8^2+x_7*x_9^2+x_7*x_10^2-1.1*x_7+1,
x_8*x_1^2+x_8*x_2^2+x_8*x_3^2+x_8*x_4^2+x_8*x_5^2+x_8*x_6^2+x_8*x_7^2+x_8*x_9^2+x_8*x_10^2-1.1*x_8+1,
x_9*x_1^2+x_9*x_2^2+x_9*x_3^2+x_9*x_4^2+x_9*x_5^2+x_9*x_6^2+x_9*x_7^2+x_9*x_8^2+x_9*x_10^2-1.1*x_9+1,
x_10*x_1^2+x_10*x_2^2+x_10*x_3^2+x_10*x_4^2+x_10*x_5^2+x_10*x_6^2+x_10*x_7^2+x_10*x_8^2+x_10*x_9^2-1.1*x_10+1};
    ind := flatten apply(#polys,i-> -- indices for parameters
    	apply(exponents polys#i, t->(i,t))
    	);
    AR := CC[apply(ind,i->A_i)][gens R];
    polysP := for i to #polys-1 list -- system with parameteric coefficients and same support 
    sum(exponents polys#i, t->A_(i,t)*AR_(t));
    polySystem transpose matrix {polysP}
    )
end ------------------------------------------------

restart ---------------------------------------------------------------------
load "noon10.m2"
nedges = 3
setRandomSeed 0
polys = parametrizedNoon 10 
(p0,x0) = createSeedPair polys
elapsedTime mixedVolume = computeMixedVolume specializeSystem (p0,polys)
elapsedTime (G,npaths) = monodromySolve(polys,p0,{x0},NumberOfEdges=>nedges,NumberOfNodes=>2,TargetSolutionCount=>mixedVolume, Verbose=>true)
-* -- Anton's office machine:
mixedVolume = 59029
  node1: 59001
  node2: 59001
trackedPaths 0
     -- 651.542 seconds elapsed

o7 = (HomotopyNode{...5...}, failed)
*-

restart ---------------------------------------------------------------------
load "noon10.m2"
nedges = 4
setRandomSeed 0
polys = parametrizedNoon 10 
(p0,x0) = createSeedPair polySystem polys
elapsedTime mixedVolume = computeMixedVolume specializeSystem (p0,polys)
elapsedTime (G,npaths) = monodromySolve(polys,p0,{x0},NumberOfEdges=>nedges,NumberOfNodes=>2,TargetSolutionCount=>mixedVolume, Verbose=>true)
-* -- Anton's office machine:
     -- 935.657 seconds elapsed

o7 = (HomotopyNode{...5...}, 236051)
*-

restart ---PHCpack------------------------------------------------------------------
load "noon10.m2"
needsPackage "PHCpack"
polys = parametrizedNoon 10 
(p0,x0) = createSeedPair polySystem polys
specPolys = specializeSystem (p0,polys)
R = CC[x_1..x_(numgens ring first specPolys)]
toR = map(R,ring first specPolys,vars R)
elapsedTime (mv,q,qsols) = mixedVolume(specPolys/toR,StartSystem => true);
-- 751.211 seconds elapsed

restart ---Bertini------------------------------------------------------------------
load "noon10.m2"
polys = parametrizedNoon 10 
(p0,x0) = createSeedPair polySystem polys
specPolys = specializeSystem (p0,polys)
R = CC[x_1..x_(numgens ring first specPolys)]
toR = map(R,ring first specPolys,vars R)
elapsedTime sols = solveSystem(specPolys/toR, Software=>BERTINI);
-- 2621.02 seconds elapsed

restart --M2engine------------------------------------------------------------------
load "noon10.m2"
polys = parametrizedNoon 10 
(p0,x0) = createSeedPair polySystem polys
specPolys = specializeSystem (p0,polys)
elapsedTime sols = solveSystem specPolys;
-- 250.841 seconds elapsed -- finds only 59027