Result 121, Theoretical computer science

Almost-linear approximation of edit distance

For every fixed rational ε∈(0,1)\varepsilon\in(0,1), gives a randomized (1+ε)(1+\varepsilon) approximation to unit-cost edit distance in worst-case expected time N1+o(1)N^{1+o(1)}, with success probability at least 2/3. The strings have total length N and polynomially bounded integer symbols. This is an asymptotic guarantee at fixed accuracy.

Lean formalization Algorithm or complexity result

The bigger picture

Why it matters

Edit distance counts the fewest single-symbol insertions, deletions and substitutions needed to turn one string into another. The manuscript reports a randomized way to estimate this measure very accurately in almost-linear time, for any fixed rational accuracy setting.

What changes?

For every fixed rational epsilon between zero and one, the manuscript claims a factor of one plus epsilon approximation with success probability at least two-thirds. It handles arbitrary explicitly stored strings of total length N, with polynomially bounded integer symbols. Worst-case expected runtime is N to the power one plus a term tending to zero as N grows, on a random-access machine with words of logarithmic bit length. All edits cost one; equal strings return zero deterministically.

What does that help mathematicians do?

For example, fixing epsilon at one hundredth gives a one-percent multiplicative approximation under the reported almost-linear expected-time bound. The permitted error scales with the actual distance rather than the total string length, so the guarantee remains informative even for very similar strings. This supports studying small relative differences without demanding exact computation, while leaving exact edit distance as a separate task.

Are there practical applications?

The practical connection is measuring differences between stored strings. The reported advance is asymptotic, not a demonstrated speedup on realistic workloads. The supplied abstract provides no benchmarks or implementation evidence. In particular, the bound does not establish the same runtime when epsilon shrinks with input length, nor does expected runtime guarantee a fast finish on every run.

This section was generated by GPT-6 Astra Medium. This explanation is based on the result summary and manuscript abstracts below. This context is separate from OpenAI's source text.

Manuscript

An Almost-Linear Approximation Scheme for Edit Distance

September 24, 2026 46 pages

We give a uniform randomized approximation scheme for unit-cost edit distance. For every fixed rational ε∈(0,1)\varepsilon\in(0,1), it estimates the distance between arbitrary explicitly stored strings of total length N within a factor 1+ε1+\varepsilon with probability at least 2/3, in worst-case expected time N1+o(1)N^{1+o(1)} on a logarithmic-word RAM. The algorithm supports polynomially bounded integer alphabets and returns zero deterministically on equal strings.

Cite (BibTeX)
@misc{OAI:An-Almost-Linear-Approximation-Scheme-for-Edit-Distance-September-24-2026,
  author = {{OpenAI}},
  title = {{An Almost-Linear Approximation Scheme for Edit Distance}},
  howpublished = {OpenAI Math Release preprint
                  \href{https://github.com/openai/math/blob/main/preprints/An-Almost-Linear-Approximation-Scheme-for-Edit-Distance-September-24-2026/paper.pdf}{OAI:An-Almost-Linear-Approximation-Scheme-for-Edit-Distance-September-24-2026}},
  year = {2026}
}

Lean formalization

OpenAI's note on what the formalization covers, from lean/docs/121.md.

Almost-linear approximation of edit distance

The following describes the scope of the Lean formalization related to the following accompanying paper(s):

Scope

The formalization gives a randomized (1+ε)(1+\varepsilon)-approximation for unit-cost edit distance between explicitly stored integer strings, for every fixed rational 0<ε<10<\varepsilon<1. Its estimate is at least the true distance and at most (1+ε)(1+\varepsilon) times it with probability at least 2/32/3; equal strings return zero on every execution.

For total length at most NN and integer symbols bounded by a fixed polynomial in NN, expected work is at most (N+2)1+η(N+2)^{1+\eta} for every fixed η>0\eta>0 and all sufficiently large NN. Space is polynomially bounded on every execution.

Comparator links

Result Comparator statement
Almost-linear randomized approximation of edit distance EditApproximation.lean

Data from github.com/openai/math at commit adc7f12, committed October 6, 2026 at 21:58 UTC, last checked for changes about 8 hours ago. Titles, subjects, summaries, abstracts and Lean notes are OpenAI's; page counts are read from the PDFs. The map, related results, search, kinds of results and the named-problem index are Emergent Mind's, built with text embeddings and an LLM, and may contain errors.

An Emergent Mind Labs project. Emergent Mind is not affiliated with OpenAI. None of these results has been peer reviewed. Cite the manuscripts themselves, using the BibTeX on each result's page.