# Review of "Binary patterns can need a linear number of extra letters before their subsequence-count histograms differ"

**Recommendation: minor revisions.**

## What the paper claims

For each length-k binary pattern and host length n, the paper takes the histogram of embedding counts over all 2^n hosts. Two patterns are strongly Wilf-equivalent (Menon–Singh) if these histograms agree for every n. The paper asks how many extra host letters it can take before two *inequivalent* patterns show different histograms. It makes two claims:

1. **Theorem (asymptotic).** For every large enough prime k = 4m + r, with r in {1, 3}, there is a palindromic block U such that P = UUMUU and Q = UMUUU (M = 0^r) have equal histograms at every excess up to floor(k/32768), and different histograms at some host length no greater than 2k − 1.
2. **Computation.** Seven explicit pairs have exact first differing excesses of 1, 3, 5, 6, 9, 14 and 23. The k = 401 pair agrees through host length 423 and separates at 424.

The question gets a clear, positive answer: the delay can be linear in k, which is stronger than the √k the study set out to find. The result is a proof, not a pattern found by scanning data, so the evidence standard here is whether the proof is correct and whether the computations are right.

## Checking the proof

I went through each step and found no gap. In order:

- **Reduced moments and restoration.** The formula raw_n = Σ_j C(n, k+j) 2^{n−k−j} A_{h,j} is correct, and it is triangular with unit diagonal at n = k + j. So the first differing A_{h,j} equals the first raw difference, which justifies the last column of Table 1.
- **Factorization into pieces.** A piece is cut wherever all h paths have read the same number of pattern letters. Every piece with excess 0 is a single site read together. Host letters are fixed by the paths, because every reduced site is used by some path. The bijection with collections of disjoint intervals holds, so Z_w is a hard-core polymer partition function.
- **Connected logarithm.** The argument that mixed coefficients vanish when the support splits into non-overlapping groups is the standard Mayer/cluster-expansion fact, and it is correctly applied. Because the weights depend only on interval content, log Z_w mod z^{d+1} = Σ_u N_w(u) G_d(u), and G_d(u) vanishes unless u has a connected cover of cost ≤ d. I agree this gives the claimed reduction to factor frequencies.
- **Envelope bound.** I checked that the min and max envelopes are valid embeddings. They share at least l − e sites. Shared sites pair indices i < j: a joint advance from equal values at the start would force every path to advance, which gives excess 0. So cost(I) ≤ e for every positive-excess piece, and cost ≥ 1. The bound does not depend on h, which is what makes "all moments, hence the full histogram" go through.
- **Equal factor counts in P and Q through length m.** This is correct, since both cuts sit in U^4 with identical m-letter context. `check.py` also asserts it for the seven pairs.
- **Random-block lemma.** I rechecked each step:
  - |i_t − j_t| ≤ q.
  - At most 2r marker pairs, and at most 8 pairs that hit the same palindrome bit (sums of indices strictly increase within 0..8m−2).
  - Multigraph degree ≤ 16, so the bound is 2^{−(l−q−14)/16}.
  - (l−q−14)/16 > l/17 once l > ~240, and C(l,q)^2 ≤ 2^{l/152} ≤ 2^{l/128}.
  - The tail sum and the Markov step are fine.
  - floor(m/(2C)) = floor(k/32768) because 4m + r cannot cross a multiple of 32768.
- **Prime congruence.** The formula for A_{2,k−1} is right. The binomials off the anti-diagonal i + j = k − 1 vanish mod k by Kummer (a carry in base k), and C(k−1, i)^2 ≡ 1. A palindrome gives 0 mod k. A non-palindrome of odd length gives a value between 1 and k − 1. The argument that Q is not a palindrome (0^r U^2 = U^2 0^r is impossible when U contains a one) is correct.

## Rerunning the computations

- `certify.py`, `check.py`, `verify.py` and `table.py` reproduce `results/` byte for byte, in about a minute in total.
- **Independent check.** I wrote my own raw-moment dynamic program (`$TMPDIR`; mod 10^9+7). It works directly on the h-fold product of prefix-progress states, with no reduced counts, pieces or covers.
  - For h = 2, all seven pairs agree at excess D − 1 and differ at excess D, as Table 1 states. The residues match every entry in the last column, including −104,599,040,800 for k = 401.
  - For h = 3, the pairs with k = 13, 29, 61, 101 and 193 also agree at D − 1 and differ at D.
  - For h = 4 and h = 5, the pairs with k = 13 and 29 also agree at D − 1 and differ at D.
  - An h = 3 run for k = 313 did not finish within the session, so I report nothing for it.

  The third-moment checks matter because the equality half of the certificate is a claim about *every* moment. The paper's own direct histogram check covers only k ≤ 61, so this extends the independent evidence for equality to k = 193.

## What should change

1. **State the result as a theorem with explicit hypotheses, and split the proof into lemmas (most important).** The proof is correct but written as dense, continuous prose. A combinatorialist will have to rebuild the logical structure to check it. Suggested structure:
   - a numbered Theorem: prime k ≥ 32768 (see point 2), k = 4m + r, and the two conclusions;
   - Lemma 1: factorization into pieces;
   - Lemma 2: connected logarithm (cite the standard polymer/cluster expansion, e.g. Kotecký–Preiss, and keep the short self-contained proof);
   - Lemma 3: the envelope cost bound;
   - Lemma 4: cheap intervals have small total coverage;
   - Lemma 5: the prime congruence.

   This would cost few words and would make the paper checkable by readers outside the subfield.
2. **Replace "sufficiently large" with the real threshold.** Nothing in the probabilistic step needs m to be large: 8m Σ_{l>4096} l 2^{−l/32} < m/100 holds for every m ≥ 1. The bound floor(k/32768) is simply 0 below k = 32768. Say so. Also state plainly that the theorem's constant is far below what the explicit blocks achieve (23 extra letters at k = 401, where the theorem guarantees 0). Then readers will not confuse the table with an instance of the theorem.
3. **Define a_I precisely.** "counting its other uncut pieces by excess e" should say "counting uncut pieces on I with positive excess, by excess". For |I| = 1 this means pieces in which the paths read the one letter at different host sites.
4. **Say what is still open, once.** The paper gives no upper bound on the delay for arbitrary inequivalent pairs. The 2k − 1 bound holds only for palindrome versus non-palindrome at prime k. The closing paragraph gestures at this. One direct sentence would be clearer: "Whether some computable f(k) suffices for all inequivalent pairs is open." Also say how Menon–Singh's verification through length 13 was done, if it depends on a bounded range of host lengths, because that is the practical setting this result bears on.
5. **Trim the motivating scan paragraph.** The 32,760-histogram scan and the "five tests … six swaps" probes are project history. They also live in another study. Their place in the paper is one sentence of motivation (the length-12 and length-76 ties). The theorem does not rest on them.
6. **Say how the seven block lengths were chosen.** NOTES says the blocks were SHAKE-derived and frozen, with no seed search. The paper should say this, and say why these m values were used (primes k = 4m + 1 up to 401?). Then a reader knows the exact thresholds were not cherry-picked.

## record.json

- `summary` and `findings` are accurate. `type: finding` is right.
- `so_what` is clear and not misleading. "Can grow in proportion to the pattern length" is true. Adding "though the guaranteed rate is tiny" would stop a lay reader from inferring something like "about 6% extra letters" in general.
- `importance` level 3 is generous. The result settles a natural question that only the few people working on strong Wilf equivalence of binary subsequences ask. Its main consequence is methodological: a computer check over any sublinear range of host lengths cannot certify equivalence. That fits level 2 ("changes how specialists run or read one kind of analysis") better than level 3. I would lower it to 2, but this is not a reason to hold the paper.

## Bottom line

The main claim is a correct theorem, with an explicit construction and a matching computational table that I reproduced independently. The paper is publishable once the proof is laid out as a theorem with lemmas and the small clarifications above are made.
