mapFolding 0.8.1__py3-none-any.whl → 0.8.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mapFolding/__init__.py +5 -1
- mapFolding/basecamp.py +2 -2
- mapFolding/beDRY.py +24 -31
- mapFolding/oeis.py +2 -2
- mapFolding/reference/__init__.py +45 -0
- mapFolding/reference/flattened.py +20 -2
- mapFolding/reference/hunterNumba.py +24 -0
- mapFolding/reference/irvineJavaPort.py +12 -0
- mapFolding/reference/{jax.py → jaxCount.py} +46 -27
- mapFolding/reference/jobsCompleted/[2x19]/p2x19.py +197 -0
- mapFolding/reference/jobsCompleted/__init__.py +50 -0
- mapFolding/reference/jobsCompleted/p2x19/p2x19.py +29 -0
- mapFolding/reference/lunnanNumpy.py +16 -1
- mapFolding/reference/lunnanWhile.py +15 -1
- mapFolding/reference/rotatedEntryPoint.py +18 -0
- mapFolding/reference/total_countPlus1vsPlusN.py +226 -203
- mapFolding/someAssemblyRequired/getLLVMforNoReason.py +20 -1
- mapFolding/someAssemblyRequired/synthesizeNumbaFlow.py +52 -37
- mapFolding/someAssemblyRequired/transformDataStructures.py +11 -5
- mapFolding/someAssemblyRequired/transformationTools.py +40 -42
- mapFolding/syntheticModules/__init__.py +1 -0
- mapFolding/theSSOT.py +69 -127
- {mapfolding-0.8.1.dist-info → mapfolding-0.8.3.dist-info}/METADATA +56 -31
- mapfolding-0.8.3.dist-info/RECORD +43 -0
- {mapfolding-0.8.1.dist-info → mapfolding-0.8.3.dist-info}/WHEEL +1 -1
- tests/conftest.py +43 -33
- tests/test_computations.py +7 -7
- tests/test_other.py +5 -4
- mapfolding-0.8.1.dist-info/RECORD +0 -39
- {mapfolding-0.8.1.dist-info → mapfolding-0.8.3.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.8.1.dist-info → mapfolding-0.8.3.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.8.1.dist-info → mapfolding-0.8.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import numpy
|
|
2
|
+
import numba
|
|
3
|
+
|
|
4
|
+
@numba.jit(numba.types.int64(), cache=True, parallel=False, boundscheck=False, error_model='numpy', fastmath=True, nopython=True, forceinline=True, looplift=True, no_cfunc_wrapper=False, no_cpython_wrapper=False, _nrt=True, )
|
|
5
|
+
def goGoGadgetAbsurdity():
|
|
6
|
+
|
|
7
|
+
foldsTotal = numba.types.int64(0)
|
|
8
|
+
my = numpy.array([3,1,1,2,1,2,3,2,0], dtype=numpy.int64)
|
|
9
|
+
foldsSubTotals = numpy.array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], dtype=numpy.int64)
|
|
10
|
+
gapsWhere = numpy.array([1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11
|
+
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
12
|
+
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
89
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
90
|
+
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
91
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
92
|
+
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
93
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
94
|
+
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
95
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
96
|
+
[ 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
97
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
98
|
+
[ 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
99
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
100
|
+
[ 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
101
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
102
|
+
[ 0, 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, 0, 0, 0, 0, 0, 0, 0],
|
|
103
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31, 0, 0, 0, 0, 0, 0],
|
|
104
|
+
[ 0, 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, 0, 0, 0, 0, 0],
|
|
105
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33, 0, 0, 0, 0],
|
|
106
|
+
[ 0, 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, 0, 0, 0],
|
|
107
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33,36,35, 0, 0],
|
|
108
|
+
[ 0, 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, 0],
|
|
109
|
+
[ 0, 2, 1, 4, 3, 6, 5, 8, 7,10, 9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33,36,35,38,37]],
|
|
110
|
+
|
|
111
|
+
[[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
112
|
+
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
113
|
+
[ 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
114
|
+
[ 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
115
|
+
[ 0, 3, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
116
|
+
[ 0, 1, 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,18,15,16,21,20,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
133
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
134
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,22,21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
135
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
136
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,24,23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
137
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
138
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,26,25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
139
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
140
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,28,27, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
141
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
142
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,30,29, 0, 0, 0, 0, 0, 0, 0],
|
|
143
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30, 0, 0, 0, 0, 0, 0],
|
|
144
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,32,31, 0, 0, 0, 0, 0],
|
|
145
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32, 0, 0, 0, 0],
|
|
146
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30,35,34,33, 0, 0, 0],
|
|
147
|
+
[ 0, 3, 4, 1, 2, 7, 8, 5, 6,11,12, 9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30,35,36,33,34, 0, 0],
|
|
148
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32,37,36,35, 0],
|
|
149
|
+
[ 0, 1, 2, 5, 6, 3, 4, 9,10, 7, 8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32,37,38,35,36]]], dtype=numpy.int64)
|
|
150
|
+
while my[6] > 0:
|
|
151
|
+
if my[6] <= 1 or track[1, 0] == 1:
|
|
152
|
+
if my[6] > the[1]:
|
|
153
|
+
foldsSubTotals[my[8]] += the[1]
|
|
154
|
+
else:
|
|
155
|
+
my[1] = 0
|
|
156
|
+
my[3] = track[3, my[6] - 1]
|
|
157
|
+
my[0] = 1
|
|
158
|
+
while my[0] <= the[0]:
|
|
159
|
+
if connectionGraph[my[0], my[6], my[6]] == my[6]:
|
|
160
|
+
my[1] += 1
|
|
161
|
+
else:
|
|
162
|
+
my[7] = connectionGraph[my[0], my[6], my[6]]
|
|
163
|
+
while my[7] != my[6]:
|
|
164
|
+
gapsWhere[my[3]] = my[7]
|
|
165
|
+
if track[2, my[7]] == 0:
|
|
166
|
+
my[3] += 1
|
|
167
|
+
track[2, my[7]] += 1
|
|
168
|
+
my[7] = connectionGraph[my[0], my[6], track[1, my[7]]]
|
|
169
|
+
my[0] += 1
|
|
170
|
+
my[5] = my[2]
|
|
171
|
+
while my[5] < my[3]:
|
|
172
|
+
gapsWhere[my[2]] = gapsWhere[my[5]]
|
|
173
|
+
if track[2, gapsWhere[my[5]]] == the[0] - my[1]:
|
|
174
|
+
my[2] += 1
|
|
175
|
+
track[2, gapsWhere[my[5]]] = 0
|
|
176
|
+
my[5] += 1
|
|
177
|
+
while my[6] > 0 and my[2] == track[3, my[6] - 1]:
|
|
178
|
+
my[6] -= 1
|
|
179
|
+
track[1, track[0, my[6]]] = track[1, my[6]]
|
|
180
|
+
track[0, track[1, my[6]]] = track[0, my[6]]
|
|
181
|
+
if my[6] > 0:
|
|
182
|
+
my[2] -= 1
|
|
183
|
+
track[0, my[6]] = gapsWhere[my[2]]
|
|
184
|
+
track[1, my[6]] = track[1, track[0, my[6]]]
|
|
185
|
+
track[1, track[0, my[6]]] = my[6]
|
|
186
|
+
track[0, track[1, my[6]]] = my[6]
|
|
187
|
+
track[3, my[6]] = my[2]
|
|
188
|
+
my[6] += 1
|
|
189
|
+
|
|
190
|
+
foldsTotal = foldsSubTotals.sum().item()
|
|
191
|
+
print(foldsTotal)
|
|
192
|
+
with numba.objmode():
|
|
193
|
+
open('c:/apps/mapFolding/mapFolding/jobs/[2x19]/[2x19].foldsTotal', 'w').write(str(foldsTotal))
|
|
194
|
+
return foldsTotal
|
|
195
|
+
|
|
196
|
+
if __name__ == '__main__':
|
|
197
|
+
goGoGadgetAbsurdity()
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""
|
|
2
|
+
New Contribution to OEIS A001415: First-ever calculations for 2x19 and 2x20 maps
|
|
3
|
+
|
|
4
|
+
My first computation of the 2x19 map completed on 01/10/2025.
|
|
5
|
+
My first computation of the 2x20 map completed on 01/14/2025.
|
|
6
|
+
|
|
7
|
+
These represent the first-ever calculations of fold patterns for these dimensions
|
|
8
|
+
and extend the known values in the Online Encyclopedia of Integer Sequences (OEIS)
|
|
9
|
+
for series A001415 "Number of ways of folding a 2 X n strip of stamps".
|
|
10
|
+
|
|
11
|
+
Directory Structure:
|
|
12
|
+
--------------------------------------------------------------------------
|
|
13
|
+
(.venv) > dir mapFolding/reference/jobsCompleted
|
|
14
|
+
|
|
15
|
+
01/10/2025 02:27 AM 14 [2,19].foldsTotal # First 2x19 calculation
|
|
16
|
+
01/14/2025 02:04 PM 15 [2,20].foldsTotal # First 2x20 calculation
|
|
17
|
+
--------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
In the subfolder [2x19]:
|
|
20
|
+
--------------------------------------------------------------------------
|
|
21
|
+
(.venv) > dir mapFolding/reference/jobsCompleted/[2x19]
|
|
22
|
+
|
|
23
|
+
02/12/2025 03:48 PM 19,822 p2x19.py # Optimized algorithm implementation
|
|
24
|
+
01/21/2025 03:36 AM 50,219 stateJob.pkl # Serialized computation state
|
|
25
|
+
01/22/2025 07:15 AM 14 [2x19].foldsTotal # Result of calculation
|
|
26
|
+
01/21/2025 03:37 AM 9,678,080 [2x19].ll # LLVM IR code generated from the optimized algorithm
|
|
27
|
+
--------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
A version of the algorithm tuned to compute a 2x19 map took approximately 28 hours of computation.
|
|
30
|
+
The LLVM IR file ([2x19].ll) was generated using the getLLVMforNoReason module and provides
|
|
31
|
+
insight into the low-level optimizations that made this computation possible.
|
|
32
|
+
|
|
33
|
+
Alternative Implementation:
|
|
34
|
+
--------------------------------------------------------------------------
|
|
35
|
+
(.venv) > dir mapFolding/reference/jobsCompleted/p2x19
|
|
36
|
+
|
|
37
|
+
02/16/2025 07:01 PM 14 p2x19.foldsTotal # Alternative implementation result
|
|
38
|
+
02/16/2025 12:40 AM 6,423 p2x19.py # Alternative optimized algorithm
|
|
39
|
+
--------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
This alternative implementation took approximately 18 hours of computation and demonstrates
|
|
42
|
+
how code transformation and algorithm optimization can significantly reduce computation time.
|
|
43
|
+
|
|
44
|
+
To use these values in your own research, you can access them through the OEIS_for_n function:
|
|
45
|
+
```
|
|
46
|
+
from mapFolding import oeisIDfor_n
|
|
47
|
+
result = oeisIDfor_n('A001415', 19) # For the 2x19 calculation
|
|
48
|
+
result = oeisIDfor_n('A001415', 20) # For the 2x20 calculation
|
|
49
|
+
```
|
|
50
|
+
"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from numba import uint8,jit,int64
|
|
2
|
+
from numpy import uint8
|
|
3
|
+
from numpy import array
|
|
4
|
+
@jit(int64(),_nrt=True,boundscheck=False,cache=True,error_model='numpy',fastmath=True,forceinline=True,inline='always',looplift=False,no_cfunc_wrapper=False,no_cpython_wrapper=False,nopython=True,parallel=False)
|
|
5
|
+
def countSequential()->int64:
|
|
6
|
+
groupsOfFolds=int64(0);leafAbove=array([1,2]+[0]*37,dtype=uint8);countDimensionsGapped=array([0]*39,dtype=uint8);gapRangeStart=array([0]*2+[1]+[0]*36,dtype=uint8);leafBelow=array([2,0,1]+[0]*36,dtype=uint8);gap1ndex=uint8(1);indexMiniGap=uint8(2);leafConnectee=uint8(2);indexDimension=uint8(2);gap1ndexCeiling=uint8(2);dimensionsUnconstrained=uint8(1);leaf1ndex=uint8(3);gapsWhere=array([1]+[0]*1444,dtype=uint8);connectionGraph=array([[[0]*39,[0,1]+[0]*37,[0,2,1]+[0]*36,[0,1,2,3]+[0]*35,[0,2,1,4,3]+[0]*34,[*range(0,6)]+[0]*33,[0,2,1,4,3,6,5]+[0]*32,[*range(0,8)]+[0]*31,[0,2,1,4,3,6,5,8,7]+[0]*30,[*range(0,10)]+[0]*29,[0,2,1,4,3,6,5,8,7,10,9]+[0]*28,[*range(0,12)]+[0]*27,[0,2,1,4,3,6,5,8,7,10,9,12,11]+[0]*26,[*range(0,14)]+[0]*25,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13]+[0]*24,[*range(0,16)]+[0]*23,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15]+[0]*22,[*range(0,18)]+[0]*21,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]+[0]*20,[*range(0,20)]+[0]*19,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19]+[0]*18,[*range(0,22)]+[0]*17,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21]+[0]*16,[*range(0,24)]+[0]*15,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23]+[0]*14,[*range(0,26)]+[0]*13,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25]+[0]*12,[*range(0,28)]+[0]*11,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27]+[0]*10,[*range(0,30)]+[0]*9,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29]+[0]*8,[*range(0,32)]+[0]*7,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31]+[0]*6,[*range(0,34)]+[0]*5,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33]+[0]*4,[*range(0,36)]+[0]*3,[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33,36,35]+[0]*2,[*range(0,38),0],[0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31,34,33,36,35,38,37]],[[0]*39,[0,1]+[0]*37,[0,1,2]+[0]*36,[0,3,2,1]+[0]*35,[0,3,4,1,2]+[0]*34,[0,1,2,5,4,3]+[0]*33,[0,1,2,5,6,3,4]+[0]*32,[0,3,4,1,2,7,6,5]+[0]*31,[0,3,4,1,2,7,8,5,6]+[0]*30,[0,1,2,5,6,3,4,9,8,7]+[0]*29,[0,1,2,5,6,3,4,9,10,7,8]+[0]*28,[0,3,4,1,2,7,8,5,6,11,10,9]+[0]*27,[0,3,4,1,2,7,8,5,6,11,12,9,10]+[0]*26,[0,1,2,5,6,3,4,9,10,7,8,13,12,11]+[0]*25,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12]+[0]*24,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,14,13]+[0]*23,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14]+[0]*22,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,16,15]+[0]*21,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16]+[0]*20,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,18,17]+[0]*19,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18]+[0]*18,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,20,19]+[0]*17,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20]+[0]*16,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,22,21]+[0]*15,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22]+[0]*14,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,24,23]+[0]*13,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24]+[0]*12,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,26,25]+[0]*11,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26]+[0]*10,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,28,27]+[0]*9,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28]+[0]*8,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,30,29]+[0]*7,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30]+[0]*6,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,32,31]+[0]*5,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32]+[0]*4,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30,35,34,33]+[0]*3,[0,3,4,1,2,7,8,5,6,11,12,9,10,15,16,13,14,19,20,17,18,23,24,21,22,27,28,25,26,31,32,29,30,35,36,33,34]+[0]*2,[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32,37,36,35,0],[0,1,2,5,6,3,4,9,10,7,8,13,14,11,12,17,18,15,16,21,22,19,20,25,26,23,24,29,30,27,28,33,34,31,32,37,38,35,36]]],dtype=uint8)
|
|
7
|
+
while leaf1ndex:
|
|
8
|
+
if leaf1ndex<=1 or leafBelow[0]==1:
|
|
9
|
+
if leaf1ndex>38:groupsOfFolds+=1
|
|
10
|
+
else:
|
|
11
|
+
dimensionsUnconstrained=2;gap1ndexCeiling=gapRangeStart[leaf1ndex-1];indexDimension=0
|
|
12
|
+
while indexDimension<2:
|
|
13
|
+
if connectionGraph[indexDimension,leaf1ndex,leaf1ndex]==leaf1ndex:dimensionsUnconstrained-=1
|
|
14
|
+
else:
|
|
15
|
+
leafConnectee=connectionGraph[indexDimension,leaf1ndex,leaf1ndex]
|
|
16
|
+
while leafConnectee!=leaf1ndex:
|
|
17
|
+
gapsWhere[gap1ndexCeiling]=leafConnectee
|
|
18
|
+
if countDimensionsGapped[leafConnectee]==0:gap1ndexCeiling+=1
|
|
19
|
+
countDimensionsGapped[leafConnectee]+=1;leafConnectee=connectionGraph[indexDimension,leaf1ndex,leafBelow[leafConnectee]]
|
|
20
|
+
indexDimension+=1
|
|
21
|
+
indexMiniGap=gap1ndex
|
|
22
|
+
while indexMiniGap<gap1ndexCeiling:
|
|
23
|
+
gapsWhere[gap1ndex]=gapsWhere[indexMiniGap]
|
|
24
|
+
if countDimensionsGapped[gapsWhere[indexMiniGap]]==dimensionsUnconstrained:gap1ndex+=1
|
|
25
|
+
countDimensionsGapped[gapsWhere[indexMiniGap]]=0;indexMiniGap+=1
|
|
26
|
+
while leaf1ndex and gap1ndex==gapRangeStart[leaf1ndex-1]:leaf1ndex-=1;leafBelow[leafAbove[leaf1ndex]]=leafBelow[leaf1ndex];leafAbove[leafBelow[leaf1ndex]]=leafAbove[leaf1ndex]
|
|
27
|
+
if leaf1ndex:gap1ndex-=1;leafAbove[leaf1ndex]=gapsWhere[gap1ndex];leafBelow[leaf1ndex]=leafBelow[leafAbove[leaf1ndex]];leafBelow[leafAbove[leaf1ndex]]=leaf1ndex;leafAbove[leafBelow[leaf1ndex]]=leaf1ndex;gapRangeStart[leaf1ndex]=gap1ndex;leaf1ndex+=1
|
|
28
|
+
return groupsOfFolds*38
|
|
29
|
+
if __name__=='__main__':import time;timeStart=time.perf_counter();foldsTotal=countSequential();print(foldsTotal,time.perf_counter()-timeStart);writeStream=open('C:/apps/mapFolding/mapFolding/jobs/p2x19.foldsTotal','w');writeStream.write(str(foldsTotal));writeStream.close()
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
"""
|
|
2
2
|
A generally faithful translation of the original Atlas Autocode code by W. F. Lunnon to Python using NumPy.
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
This implementation transforms Lunnon's 1971 algorithm to leverage NumPy's array operations for improved
|
|
5
|
+
performance while maintaining algorithmic fidelity. It preserves the core logic and variable naming
|
|
6
|
+
conventions of the original algorithm but benefits from NumPy's vectorized operations and efficient
|
|
7
|
+
memory management.
|
|
8
|
+
|
|
9
|
+
Key characteristics:
|
|
10
|
+
- Uses NumPy arrays instead of Python lists for better memory efficiency
|
|
11
|
+
- Maintains the original algorithm structure and control flow
|
|
12
|
+
- Preserves variable naming for algorithmic clarity
|
|
13
|
+
- Offers significant performance improvements over pure Python implementations
|
|
14
|
+
|
|
15
|
+
Reference:
|
|
16
|
+
W. F. Lunnon, Multi-dimensional map-folding, The Computer Journal, Volume 14, Issue 1, 1971,
|
|
17
|
+
Pages 75-80, https://doi.org/10.1093/comjnl/14.1.75
|
|
4
18
|
"""
|
|
19
|
+
|
|
5
20
|
import numpy
|
|
6
21
|
|
|
7
22
|
def foldings(p: list[int]) -> int:
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"""
|
|
2
2
|
A largely faithful translation of the original Atlas Autocode code by W. F. Lunnon to Python using `while`.
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
This implementation closely follows the structure and logic of Lunnon's 1971 paper, preserving the
|
|
5
|
+
variable names and core algorithm design. It uses while loops instead of Atlas Autocode's procedural
|
|
6
|
+
control structures, maintaining the imperative programming style of the original.
|
|
7
|
+
|
|
8
|
+
Key characteristics:
|
|
9
|
+
- Preserves original algorithm structure for historical accuracy
|
|
10
|
+
- Uses primarily scalar operations and explicit loops
|
|
11
|
+
- Maintains the original variable naming from Lunnon's work
|
|
12
|
+
- Provides a baseline for comparison against optimized implementations
|
|
13
|
+
|
|
14
|
+
Reference:
|
|
15
|
+
W. F. Lunnon, Multi-dimensional map-folding, The Computer Journal, Volume 14, Issue 1, 1971,
|
|
16
|
+
Pages 75-80, https://doi.org/10.1093/comjnl/14.1.75
|
|
4
17
|
"""
|
|
18
|
+
|
|
5
19
|
def foldings(p: list[int]) -> int:
|
|
6
20
|
"""
|
|
7
21
|
Run loop with (A, B) on each folding of a p[1] x ... x p[d] map, where A and B are the above and below vectors.
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Alternative algorithm entry point implementation for Lunnon's map folding algorithm.
|
|
3
|
+
|
|
4
|
+
This implementation demonstrates an interesting algorithmic variation where the main processing
|
|
5
|
+
loop is "rotated" to enter at a different point in the execution flow. Specifically, it's
|
|
6
|
+
structured to enter at the modulo operator rather than the traditional starting point.
|
|
7
|
+
|
|
8
|
+
Key characteristics:
|
|
9
|
+
- Restructures the control flow by reorganizing the entry point of the algorithm
|
|
10
|
+
- Separates preparation work from the main computational loop
|
|
11
|
+
- Uses explicit variable naming with index constants for clarity
|
|
12
|
+
- Demonstrates how the same algorithm can be approached from different entry points
|
|
13
|
+
|
|
14
|
+
Note: This implementation is intentionally incomplete and requires supporting code from
|
|
15
|
+
other modules to function. It serves primarily as a demonstration of how algorithmic
|
|
16
|
+
structure can be creatively redesigned while maintaining the core computational approach.
|
|
17
|
+
"""
|
|
18
|
+
|
|
1
19
|
from mapFolding import outfitFoldings
|
|
2
20
|
from numba import njit
|
|
3
21
|
import numpy
|