[Paper Review] Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false)
This paper proves that computing the edit distance between two strings cannot be done in strongly subquadratic time unless the Strong Exponential Time Hypothesis (SETH) is false. The authors reduce the Orthogonal Vectors Problem to edit distance, showing that a faster edit distance algorithm would imply a faster algorithm for CNF-SAT, violating SETH, thus establishing edit distance as SETH-hard.
The edit distance (a.k.a. the Levenshtein distance) between two strings is defined as the minimum number of insertions, deletions or substitutions of symbols needed to transform one string into another. The problem of computing the edit distance between two strings is a classical computational task, with a well-known algorithm based on dynamic programming. Unfortunately, all known algorithms for this problem run in nearly quadratic time. In this paper we provide evidence that the near-quadratic running time bounds known for the problem of computing edit distance might be tight. Specifically, we show that, if the edit distance can be computed in time $O(n^{2-δ})$ for some constant $δ>0$, then the satisfiability of conjunctive normal form formulas with $N$ variables and $M$ clauses can be solved in time $M^{O(1)} 2^{(1-ε)N}$ for a constant $ε>0$. The latter result would violate the Strong Exponential Time Hypothesis, which postulates that such algorithms do not exist.
Motivation & Objective
- To establish conditional lower bounds for exact edit distance computation.
- To show that any algorithm computing edit distance in O(n^{2−δ}) time for δ>0 would violate the Strong Exponential Time Hypothesis (SETH).
- To demonstrate that edit distance is among the problems that are SETH-hard, placing it in a class of problems with tight conditional lower bounds.
- To provide a reduction from the Orthogonal Vectors Problem to edit distance using vector gadgets and pattern matching over structured sequences.
Proposed method
- Constructs specialized 'gadget' sequences for each vector in sets A and B to encode vector orthogonality.
- Concatenates gadget sequences from set A into the first string and from set B into the second string.
- Uses a pattern-matching function PATTERN(P₁, P₂) to measure alignment cost between substrings, proving it is bounded below by a threshold when no orthogonal pair exists.
- Applies a transformation to the strings by adding a symmetric prefix and suffix of a new symbol (6) to enforce cost separation in edit distance.
- Proves that edit distance equals Y when no orthogonal vectors exist, and Y−2 when an orthogonal pair exists, using lemmas on cost lower bounds and achievable edit sequences.
- Reduces the Orthogonal Vectors Problem to edit distance, showing that a fast edit distance algorithm would imply a fast algorithm for CNF-SAT.
Experimental results
Research questions
- RQ1Can edit distance be computed in strongly subquadratic time, i.e., O(n^{2−δ}) for some δ>0?
- RQ2What are the conditional lower bounds for exact edit distance computation under widely accepted complexity assumptions?
- RQ3Is there a reduction from a known SETH-hard problem like Orthogonal Vectors to edit distance?
- RQ4Does the structure of edit distance via dynamic programming allow for faster algorithms than currently known?
Key findings
- If edit distance can be computed in O(n^{2−δ}) time for any δ>0, then CNF-SAT with N variables and M clauses can be solved in M^{O(1)}2^{(1−ε)N} time for some ε>0.
- This would violate the Strong Exponential Time Hypothesis (SETH), which asserts that no such algorithm exists for CNF-SAT.
- The edit distance problem is therefore SETH-hard, meaning it is unlikely to admit a strongly subquadratic algorithm.
- The reduction constructs strings using vector gadgets and a symmetric padding with symbol '6', ensuring that edit distance is exactly Y when no orthogonal vectors exist and Y−2 when an orthogonal pair exists.
- The proof relies on showing that any alignment achieving low cost must align entire vector gadgets, and partial alignments incur higher costs due to forced deletions or substitutions of special symbols.
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.