[Paper Review] Faster Language Edit Distance, Connection to All-pairs Shortest Paths and Related Problems.
This paper presents the first algorithm to compute language edit distance in truly sub-cubic time, achieving Õ(n^ω poly(ε)) runtime with a (1+ε)-approximation factor using connections to all-pairs shortest paths. It also supports local alignment by estimating edit distances for all substrings of the input string.
Given a context free language L(G) over alphabet Σ and a string s ∈ Σ∗, the language edit distance problem seeks the minimum number of edits (insertions, deletions and substitutions) required to convert s into a valid member of L(G). The well-known dynamic programming algorithm solves this problem in O(n3) time (ignoring grammar size) where n is the string length [Aho, Peterson 1972, Myers 1985]. Despite its numerous applications in data management, machine learning, compiler optimization, com-putational biology, computer vision and linguistics, there is no algorithm known till date that computes or approximates language edit distance problem in true sub-cubic time. In this paper we give the first such algorithm that computes language edit distance almost optimally. For any arbitrary > 0, our algorithm runs in Õ ( n ω poly() ) time and returns an estimate within a mul-tiplicative approximation factor of (1 + ) with high probability, where ω is the exponent of ordinary matrix multiplication of n dimensional square matrices. It also computes the edit script. We further solve the local alignment problem; for all substrings of s, we can estimate their language edit distance
Motivation & Objective
- To address the long-standing open problem of computing language edit distance in truly sub-cubic time.
- To provide a near-optimal approximation of the language edit distance within a (1+ε) factor.
- To extend the solution to support local alignment, estimating edit distances for all substrings of the input string.
- To leverage connections between language edit distance and all-pairs shortest paths for improved efficiency.
Proposed method
- Reduces the language edit distance problem to a variant of the all-pairs shortest paths (APSP) problem using a novel graph construction.
- Employs a randomized approximation framework to achieve (1+ε)-approximation with high probability.
- Uses the exponent ω of matrix multiplication as a key parameter, achieving Õ(n^ω poly(ε)) time complexity.
- Constructs a dynamic programming structure over a graph representation of the grammar and string to compute edit distances efficiently.
- Integrates techniques from APSP and string algorithms to support both global and local alignment computation.
- Computes the actual edit script by tracking back through the constructed graph and dynamic programming table.
Experimental results
Research questions
- RQ1Can language edit distance be computed in truly sub-cubic time?
- RQ2Is it possible to achieve a (1+ε)-approximation for language edit distance in near-linear or near-cubic time?
- RQ3How can the language edit distance problem be connected to all-pairs shortest paths to enable faster computation?
- RQ4Can the algorithm support local alignment, i.e., estimate edit distances for all substrings of the input string?
Key findings
- The proposed algorithm runs in Õ(n^ω poly(ε)) time, achieving a (1+ε)-approximation with high probability.
- It is the first algorithm to compute language edit distance in truly sub-cubic time, breaking the O(n^3) barrier.
- The algorithm supports both global and local alignment, estimating edit distances for all substrings of the input string.
- The method successfully reduces language edit distance to a problem solvable via all-pairs shortest paths, enabling faster computation.
- The algorithm computes the actual edit script, not just the distance, which is crucial for applications requiring transformation sequences.
- The result establishes a strong connection between language edit distance and matrix multiplication complexity, highlighting ω as a key parameter.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.