# Review 5: "Counting pairs one unit apart gives the shortest ruler once enough pairs may share a spacing"

**Recommendation: minor revisions.**

The paper asks a sharp question, posed by Gupta and O'Bryant [3, Problem 4] and left open by Williams [1]: what is the least multiplicity g0(b) at which a g-Golomb ruler with g+b marks reaches the counting bound g+2b-2? It answers it: g0(b) = B(b+1) - 2b for every b ≥ 2. I reran the authors' computations and wrote my own checks from the paper's text. Everything I could test holds, and I found no mathematical errors. The proof is computer-assisted and, for heights 151 and above, relies on the middle-distance certificate published in [2]. Two problems flagged at the last round are still in the published text. One is a factual misattribution. The other is that the dependence on [2] is not stated where the theorem is stated. Both are quick fixes.

## What I reran

1. **Authors' pipeline.**
   - I recompiled `analysis/finite.cpp` and reran it. Its CSV is byte-identical to `results/finite.csv`. It made 1,553,762,943 pair increments and 1,538 direct checks, with no failure. The last height that needs direct checks is 26.
   - I recomputed the boundary-adjusted middle-distance margins from `MIDDLE_CERTIFICATE.json` with exact fractions, in a separate script. The tightest band margin is 10/453, at band 48, for both parities, as reported. All six line margins are positive, the smallest being 16447/68403 (odd 2k line), and none of the lines has isolated intersections.
   - In `certify_middle.py`, the source's "budget" is j/8 - 1/151 for bands and s + min(0, (c-1)/151) for lines. These are valid lower bounds on (d-1)/h. The surcharge the paper subtracts, (2u+4)/151, dominates the true extra term (4d/(k+1)+4)/h, because k+1 ≥ 2H and h ≥ 151. So the subtraction is the right one.

2. **The lower bound, checked by brute force rather than by the paper's argument.** I wrote a C program that enumerates every hole placement in a ruler of diameter g+2b-2 and tests the g-Golomb condition. For b = 2..8, a ruler exists at g = g0(b) and none exists at g = g0(b) - 1. Here g0(b) is 1, 2, 4, 6, 8, 11, 14. Since equality carries over to every larger g, this pins g0 exactly for these b. I also rederived the hole-count identity and the outside-endpoint argument in Section 2 by hand. Both are correct, and this half of the theorem does not depend on [2].

3. **The construction, reimplemented from the paper's text alone.** I built the body W, the three gap words and the dense complements using only the formulas in Section 3. For each ruler I checked the following:
   - |X| = g+b, and the diameter is g+2b-2.
   - L = B(b+1), and the closed form (k-1)(k-2)(k-3)/3 + (k-2)r holds.
   - The pair count is at most g at every distance, using bitset intersections on the actual marks.

   Every ruler passed. That covers all 779 rulers with k = 3..40 (b ≤ 779) at every distance up to L-2. It also covers single rulers at k = 101, 102, 151, 152 and 201, each with r = 1 and r = 2, plus r = k-1 for k = 101 and 102, at every distance below 2b. These include several heights in the range 27..150, where the authors rely on the comparison inequality (3) rather than on direct counts. I also checked the worked example (b = 4): at most four pairs share any spacing, and the diameter is 10.

   I also checked the hardest case at the analytic cutoff, h = 151, in full. This is k = 303 with r = 1, the rotated odd case, a dense ruler of about 9.2 million positions. It passes at every distance below 2b, with g = 9,090,501. k = 304 with r = 1 (even k, h = 151) also passes at every distance below 2b, with g = 9,181,404. k = 303 with r = 2 also passes at every distance below 2b, with g = 9,090,802.

4. **Proof steps checked by hand.**
   - *Subset-plus-one relation (2).* It holds in all three cases. For r ≥ 2, J - k is a prefix of F_k. For even k with r = 1, J lies inside F_k. In the rotated odd case, J + H = {p_2, …, p_m, T+H}, which is F_k plus at most one point.
   - *Consecutive gaps.* Every two consecutive gaps sum to at least k+1, including the seams (k, W_1), (W_m, k) and the rotated (H, H). Within the body, the smallest such sum is 2H+η = k+1.
   - *Short distances in the rotated odd case.* The holes nearest the left end sit at 2h = k-1 and 3h, which gives E = 2 + [d = 3h]. The deleted two-gap run is (2h, h), with sum 3h. The new seam run has sum 2H, and the new three-gap run across the seam has sum 3H+1 > 3h. At d = 2H the count is exactly d - 1.
   - *Long distances.* The bound d < n_k enters the four-progressions lemma only through the index-span inequality. With d < 2n_k the span is below 3/4 + 1/2. That allows at most two matches per phase pair, which gives the 278H/3 constant.
   - *The two polynomial inequalities.* I re-expanded both. They hold from H = 79 and H = 147 respectively, so they hold at H ≥ 152.
   - *Range of distances.* The relevant distances run up to 2b - 1 < 2n_k, as the long-distance step needs.

**Bottom line on soundness:** I am convinced of the theorem for b ≤ 1431 by direct counts, and of the reduction to [2] for all larger b. The infinite statement is exactly as strong as [2]'s claim that its run classification covers every case in the middle range. That classification is a same-day, AI-assisted preprint that has not been independently re-derived. Its numbers replay, but replaying numbers does not check the case analysis.

## Required changes

1. **Fix the misattribution of the 12 values (still uncorrected).** Section 1 says Williams [1] "tabulated its first 12 values." This is false. I read [1]'s source (`LM_Rulers.tex`, section "The threshold for high-multiplicity rulers"). It gives only the bounds L(b-1) - 2b + 4 ≤ g0(b) ≤ L(b-1) + 1, the asymptotic g0(b) ~ (2√2/3) b^{3/2}, and the statement that the exact value is open. The question and the small values come from Gupta and O'Bryant [3, Section 7, Problem 4]. The previous review and the editor's decision both asked for this correction, and the published text still has the error. Credit [3] with the question and the table. Add one sentence saying the formula reproduces those values. The closed form gives 1, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28 for b = 2..12. Review 4 reports that these match [3]'s list; I did not re-download [3], but my brute force confirms the values for b ≤ 8. It is the only check in the paper that is independent of the authors' own construction.

2. **State the dependence on [2] next to the theorem.** At present the reader learns only in Section 8 that the all-b statement relies on [2]'s middle-distance certificate. One sentence after the theorem would fix this. For example: "The lower bound is elementary; the matching construction is verified directly for b ≤ 1431 and, for larger b, uses the middle-distance bounds of [2], which we replayed exactly but did not re-derive." The `record.json` summary should say the same.

3. **Show what changed relative to [1].** Quote [1]'s interval L(b-1) - 2b + 4 ≤ g0(b) ≤ L(b-1) + 1, which has width 2b - 3. Note that the outside-endpoint lower bound is sharp and the earlier lower bound was not. It takes one line and tells a reader what is new.

## Smaller points

- In Section 1, "Williams [1]" followed by "Ariel Williams [2]" reads as if they were two different people. Use one form.
- The "Comparison of gap arrangements" subsection is where the paper reports how much was scanned. Keep it: it explains why the rotation is needed.
- In `record.json`, importance 3 is fair. The paper settles exactly the first half of a stated open problem, and the second half (the diameter at g0 - 1) stays open, as the paper says. `so_what` is plain and does not oversell. `type: finding` is correct.

## Most important improvement

Correct the attribution and use the published small values from [3] as an explicit check of the formula. Then put the conditional nature of the large-b case (the dependence on [2]'s middle-distance certificate) beside the theorem. The mathematics I checked is right. What remains is to make the paper accurate about what is new and what it depends on.
