forked from hvds/divrep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread-line-coded.txt
More file actions
140 lines (140 loc) · 8.7 KB
/
read-line-coded.txt
File metadata and controls
140 lines (140 loc) · 8.7 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
printf("RUN\n");
printf("===\n");
printf("\n");
printf("The Makefile will typically build a binary called 'pcoul'. The standard\n");
printf("way to run it is:\n");
printf(" pcoul [-r<path to logfile>] [-f<force primes>] -x<min:max>\n");
printf(" [-g<damp:gain] [-p<minp:maxp>] [-s<randseed>] [-o] [-d]\n");
printf(" [-j<strategy>] <n> <k>\n");
printf("\n");
printf("On a Unix-like system you will usually invoke it as \"./pcoul\". On Windows\n");
printf("you will usually invoke it as \"pcoul\" or as \"pcoul.exe\".\n");
printf("\n");
printf("Options:\n");
printf("If \"-r/path/to/logfile\" is specified, progress is regularly written to the\n");
printf("specified file (by default at least once every 600s, see 'LOG' in coul.c).\n");
printf("If the file already exists, it will attempt to determine the last point\n");
printf("reached according to that log, and continue processing from that point.\n");
printf("By default there is no logfile, and progress will only be shown on the\n");
printf("terminal.\n");
printf("\n");
printf("If \"-R\" is specified, the file is _not_ read to determine the point to\n");
printf("recover from: calculation always goes from the beginning. This can be\n");
printf("useful to combine several separate runs into a single log file.\n");
printf("\n");
printf("If \"-f7\" is specified, it will set force_all = 7 to treat all primes p <= 7\n");
printf("as fully forced primes (see 'HOW IT WORKS' below). By default, force_all is\n");
printf("set to k (the maximum) when n == 2 (mod 4), and to 0 otherwise.\n");
printf("\n");
printf("If \"-F7\" is specified, it will set unforce_all = 7 to treat all primes\n");
printf("p >= 7 as unforceable. Unforceable primes are treated like partially\n");
printf("forced primes by suppressing batches where each power of the relevant\n");
printf("prime is one less than a power of 2. \"-F\" is equivalent to \"-F1\", to\n");
printf("treat all primes as unforceable. Default is 0, in which case no primes\n");
printf("are unforceable.\n");
printf("\n");
printf("If \"-x100:1000\" is specified, it will look for solutions v_0 with\n");
printf("100 < v_0 <= 1000. \"-x:1000\" or \"-x1000\" are equivalent to \"-x0:1000\".\n");
printf("Also supports exponential notation (without decimal), so \"-x13e6\"\n");
printf("is equivalent to \"-x13000000\".\n");
printf("The default minimum is zero; there is no default maximum: this is a\n");
printf("required option.\n");
printf("\n");
printf("If \"-X\" is specified, it will search for all solutions up to the\n");
printf("specified maximum. By default, it will search only for solutions that\n");
printf("improve on the best found so far.\n");
printf("Even with -X, it will still track the best solution found to report it\n");
printf("at the end of the run.\n");
printf("\n");
printf("If \"-g2:3\" is specified, it will set gain = 3/2. This is a multiplier\n");
printf("used to control the transition from recurse() to walk_v() (see 'HOW IT\n");
printf("WORKS' below). A higher gain means it spends more time in recurse(),\n");
printf("a lower gain means it spends more time in walk_v(). Also supports\n");
printf("exponential notation (without decimal), so \"-g13e6\" is equivalent to\n");
printf("\"-g13000000\". Fine-tuning the gain can make a big difference to runtime;\n");
printf("default gain is 1.\n");
printf("\n");
printf("If \"-p50:100\" is specified, it will allocate (see 'HOW IT WORKS' below)\n");
printf("only powers of primes p < 100, and will allocate at least one power of\n");
printf("a prime p > 50. This can be used to search more selectively to improve\n");
printf("an upper limit. \"-p:100\" or \"-p100\" are equivalent to \"-p0:100\".\n");
printf("By default it considers all possible allocations.\n");
printf("\n");
printf("If \"-W100\" is specified, it will use a different process to test all\n");
printf("possible cases involving p^e with p > 100, and then continue with the\n");
printf("normal process as if \"-p100\" had been specified. This can give a very\n");
printf("substantial speed improvement if the -W value is chosen with care.\n");
printf("Default is not to do this (equivalent to -Winfinity).\n");
printf("\n");
printf("\"-p\" and \"-W\" may also be specified in the form \"100^2\" rather than\n");
printf("as a simple integer, in which case it expresses a limit on the\n");
printf("allocated power p^e rather than a limit on the prime regardless of\n");
printf("power.\n");
printf("\n");
printf("The extended forms \"-px\" and \"-Wx\" can be used for fine-grained control:\n");
printf("the minimum, maximum and threshold values in this case should be a\n");
printf("comma-separated list of \"p^e\" override values. Thus \"-p100 -px1^5,0^11\"\n");
printf("allows p <= 100 for all powers except that no powers of the form p^5\n");
printf("are allowed, and all powers of the form p^11.\n");
printf("\n");
printf("If \"-s2\" is specified, it will initialize the random number generator\n");
printf("with seed 2, used at least for ECM factorization. The default seed is 1,\n");
printf("intended to help make results more reproducible.\n");
printf("\n");
printf("If \"-o\" is specified, it will not attempt to factorize numbers beyond\n");
printf("a certain point, but will instead print them as a possible candidate.\n");
printf("(**Not yet implemented.**) The default is to fully factorize numbers\n");
printf("as far as needed to prove whether they are or are not a candidate.\n");
printf("\n");
printf("If \"-a\" is specified, it will establish only each valid set of batch\n");
printf("allocations of forced primes, and output those sets assigning an index\n");
printf("to each one (for use by '-b' below).\n");
printf("\n");
printf("If \"-b100\" is specified, it will find the set of batch allocations of\n");
printf("forced primes with index 100, and run the normal calculations only\n");
printf("over that batch.\n");
printf("\n");
printf("If \"-j1\" is specified, it will use \"strategy 1\" when determining the\n");
printf("next position to which to allocate another prime power (default\n");
printf("\"strategy 0\"). For D(120,2) with pattern \"2^7 3^4\", for example,\n");
printf("strategy 0 will pick the second position and start allocating p^2,\n");
printf("since it has the highest remaining tau to fulfill; strategy 1 will\n");
printf("pick the first position and start allocating p^4, since it has the\n");
printf("highest prime dividing the remaining tau to fulfill. \"-j2\" uses\n");
printf("\"strategy 2\", which is the opposite of \"strategy 0\": it looks for\n");
printf("the _lowest_ remaining tau to fill. \"-j3\" uses \"strategy 3\", which\n");
printf("is identical to \"strategy 0\" except that if the last allocation at\n");
printf("some position was a) unforced, and b) the square root of the remaining\n");
printf("(even) tau, that position will automatically be picked.\n");
printf("\"-j1\" is the default when n is divisible by at least two distinct odd\n");
printf("primes; \"-j0\" is the default in all other cases.\n");
printf("\n");
printf("If \"-I...\" is specified, the argument should be a pattern of the same\n");
printf("form as that generated for progress lines. All prime powers specified\n");
printf("are then forced into place.\n");
printf("\n");
printf("If \"-m9=5\" is specified, the first element of the sequence v_0 is\n");
printf("forced to satisfy v_0 == 5 (mod 9). This option may be specified\n");
printf("multiple times. Note that this means only that allocations will be\n");
printf("rejected if they are not consistent with the modular constraints:\n");
printf("we do not preemptively work out what allocations would be required\n");
printf("for consistency.\n");
printf("\n");
printf("Specifying \"-d\" enables debugging. By default, progress is shown on the\n");
printf("terminal every 1 seconds (see \"DIAG\" in coul.c), overwriting the previous\n");
printf("progress line each time. With \"-d\", it instead shows progress at every\n");
printf("step on a new line (but only a single line for walk_v()). If \"-d\" is\n");
printf("specified twice, a line is shown for each iteration of walk_v().\n");
printf("\n");
printf("<n> and <k> are mandatory arguments, specifying that we want to search\n");
printf("for D(n, k) (equivalently T(n/2, k) in the terminology of A292580).\n");
printf("<n> must be a positive even integer; <k> must be a positive integer.\n");
printf("Note that this code is optimized for relatively small values of <n>,\n");
printf("targetting 2 <= n <= 100; much higher n may require a lot of memory\n");
printf("and long start-up times.\n");
printf("\n");
printf("\n");
printf("HOW IT WORKS\n");
printf("============\n");
printf("\n");
printf("See the wiki page <https://github.com/hvds/divrep/wiki/D(n,k)-calculation>.\n");