Skip to content

C_91: new constant, the average edit distance between two random binary strings - #273

Open
leandrejack-afk wants to merge 4 commits into
teorth:mainfrom
leandrejack-afk:c91-edit-distance
Open

leandrejack-afk wants to merge 4 commits into
teorth:mainfrom
leandrejack-afk:c91-edit-distance

Conversation

@leandrejack-afk

@leandrejack-afk leandrejack-afk commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Update (7 Nov): A. Canli independently replayed the lower bound in this thread, with no code shared (comment). As CONTRIBUTING allows once a second party has confirmed a replay, the second commit removes its asterisk and cites the replay on the page.

This adds a new constant: the expected edit distance between two random binary strings of length n, divided by n, in the limit. It is the edit-distance counterpart of the Chvátal–Sankoff constant and has its own literature: Dančík's thesis, Lueker, Ganguly, Mossel and Rácz, Rosenfeld's upper bound 0.315514 (2024), and Bilardi and Schimd's exact computations and Monte Carlo estimates (2026). The page records both bound histories with their sources.

The new lower bound 0.216276* (previously 0.17372, or 0.178037 with T. S. Tomar's recent bound on C_31a) comes from a first-moment count of canonical optimal alignments, done exactly with a small transfer matrix and certified in exact rational arithmetic. It carries an asterisk as a self-archived result. The argument, the code, exhaustive checks of the canonical form and two fresh reviews are in the linked repository, pinned to a commit.

The computation and this page were prepared with the help of a large language model.

@arhancanli

Copy link
Copy Markdown

Independent replay of the lower bound this pull request adds, $C_{91} \ge 0.216276$ [J2026], with our own code, from the argument in edit-distance-lower/README.md (@ 574220e) and the two numbers $x$, $t$ of certify_rule5_R32.log alone. certify_*.py, count_check*.py, canon_check*.c and the code in review/ and review5/ were neither read nor run.

check result
the certificate ($k = 2$, $R = 32$): $x = 1178119585379/950178956526$, $t = 86841948745/634295171877$, log sha256 7bb076dd…3fc9 our automaton has 132 states; a rational $v > 0$ with $(Av)_i < v_i$ for every state, checked exactly; $\max_i (Av)_i/v_i = 0.999999998115539$ (your log prints 0.999999998116)
the same, second method the run states eliminated in closed form: a $4 \times 4$ nonnegative matrix whose spectral radius is below 1 exactly when $\rho(A)$ is; certified the same way (0.999999997869369)
$a^* = -2\ln x/\ln t$ $0.2162762712874192826\ldots$ (60-digit decimal arithmetic with error bounds): $C_{91} \ge 0.216276$ holds, margin $2.7 \cdot 10^{-7}$

How. We re-derived the argument: the rewriting proof of the five rules (with the lexicographic potential), the block factors, $h(r)$ for a run after a substitution, the first-moment bound $x^{-2n}t^{-an}G(x, t)$, and why capping run lengths only raises the weights. Then, with our own programs:

  • Canonical form. A dynamic programme over rule states gives the least cost over rule-obeying alignments. It equals the edit distance for all 262,144 binary pairs of sizes $(8, 8)$, $(7, 9)$, $(6, 10)$ and $(4, 12)$.
  • Block factors. For each move sequence obeying rules 1, 2 and 4, the probability that it is valid and obeys rules 3 and 5 was found by enumerating every letter assignment. It equals the product of block factors for all 139 sequences of sizes $(3, 3)$ to $(5, 2)$.
  • The automaton. Ours (states N, after S, MI, MD, and four kinds of capped runs) was built from the README's description. Uncapped, it equals both the sum of block products and the brute-force expected counts over all string pairs, by cost, at sizes $(5, 5)$, $(4, 6)$, $(6, 6)$, $(7, 5)$ and $(3, 8)$.

Red controls, all as expected:

  • $x$ raised by 1% gives $\rho(A) \ge 1.0189$ (a Collatz–Wielandt lower bound), so no certificate exists there;
  • with rule 5 dropped, the automaton at the same $x$ and $t$ has $\rho \ge 1.0062$;
  • the claim $0.216277$ is above $a^*$.

Not checked by computation: the rewriting argument for all string lengths (checked exhaustively only at the sizes above; we read the proof and found no gap) and the first-moment step.

Re-derive from https://github.com/arhancanli/quantavane-replays/tree/3a3662f9056544fa34521a5d25288fe3e933fcde/c91a: ./fetch.sh && ./run_all.sh (Python 3.9+, standard library only, about two minutes). As far as we can see, this is the first replay by a party unconnected with the author. We have no connection with the author. Prepared with AI assistance (Claude, Anthropic).

…play

Per CONTRIBUTING, a second party has confirmed the replay in the pull request
thread: A. Canli re-derived the bound from the argument and the two numbers x, t
alone, with no code shared (teorth#273, comment 6709273846; code at
arhancanli/quantavane-replays@3a3662f). The k = 4 value and the T2026 row keep
their asterisks.
@leandrejack-afk

Copy link
Copy Markdown
Contributor Author

Thank you for taking the time to do this, and for working from the argument and the two numbers alone rather than from my code. I am glad the bound held up on your side. The repository's guidelines allow the asterisk to come off once someone independent has replayed a result, so I have removed it from the 0.216276 row and the README table, and cited your replay on the page as [Can2026]. The k = 4 value and the other alphabet sizes keep their asterisks, since your replay covers the binary case only.

Resolves the README conflicts with the C_89 update and teorth#272: main's
rows and progress lines are kept as they are, the C_91 row goes after
C_89 at the end of the table, and its progress line goes after C_31b's.
scripts/check_pages.py reports 0 errors, 0 warnings, 0 notes.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete new-page/README diff and replay discussion at 494fd45adda32360f0a63701b5a0414e2a01934c. The edit-distance normalization and subadditivity argument have the correct direction, as does C₉₁ ≥ 1 − C₃₁ₐ. Using the posted exact x and t independently gives −2 log(x)/log(t) = 0.2162762712874192826…, safely above the recorded 0.216276 lower bound. The older complement values 0.162377 and 0.17372 also agree with the stated deductions.

The linked independent replay explicitly covers the binary certificate, and the author's response limits asterisk removal to that case, consistently with CONTRIBUTING. Looks good to me for the definition, arithmetic and verification-status bookkeeping inspected here. I did not reconstruct the transfer matrix, prove the canonical-alignment rewriting for all lengths, or replay the historical upper-bound computations.

AI-generated review. No repository build or end-to-end certificate replay was performed.

Prepared with AI assistance; validation scope and limitations are stated above.

Resolves the README conflicts with today's merges (C_89a to C_89c rows,
the C_49 and C_89b/C_89c progress lines): main's rows and progress lines
are kept as they are, the C_91 row goes after C_89c at the end of the
table, and its progress line goes after main's new C_89c lines.
scripts/check_pages.py reports 0 errors, 0 warnings, 0 notes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants