[Paper Review] Linear-Space Computation of the Edit-Distance between a String and a Finite Automaton
This paper presents linear-space algorithms for computing the edit-distance between a string and a finite automaton, using a generic shortest-distance framework with tailored queue disciplines. It achieves optimal time and space complexity for both edit-distance and optimal alignment computation, particularly efficient for acyclic or unambiguous automata over the tropical semiring.
The problem of computing the edit-distance between a string and a finite automaton arises in a variety of applications in computational biology, text processing, and speech recognition. This paper presents linear-space algorithms for computing the edit-distance between a string and an arbitrary weighted automaton over the tropical semiring, or an unambiguous weighted automaton over an arbitrary semiring. It also gives an efficient linear-space algorithm for finding an optimal alignment of a string and such a weighted automaton.
Motivation & Objective
- Address the need for efficient edit-distance computation between a string and a finite automaton in applications like computational biology and speech recognition.
- Overcome the high space complexity of traditional dynamic programming approaches, which scale quadratically with automaton size.
- Develop a general framework that unifies and extends classical edit-distance algorithms using shortest-distance computation over weighted automata.
- Enable linear-space computation of both edit-distance and optimal alignment, even for general weighted automata over the tropical semiring.
- Provide a scalable solution for large-scale string matching tasks involving compressed or structured representations of sequences, such as word lattices or protein families.
Proposed method
- Formalize the edit-distance problem as a shortest-path computation in a product automaton constructed from the string and the target automaton.
- Apply a generic shortest-distance algorithm using a meta-queue discipline derived from underlying queue disciplines over states of equal level.
- Use Hirschberg's technique to compute optimal alignments in linear space by recursively finding midpoints in the alignment path.
- Leverage the structure of unambiguous or acyclic automata to reduce time complexity by eliminating logarithmic factors.
- Define and apply different queue disciplines (e.g., FIFO, Dijkstra-like) to control the order of state processing and ensure space efficiency.
- Use reverse computation (from final to initial states) to compute backward distances needed for midpoint identification in the recursive alignment algorithm.
Experimental results
Research questions
- RQ1Can the edit-distance between a string and a finite automaton be computed in linear space, regardless of automaton size?
- RQ2How can optimal alignment between a string and an automaton be computed efficiently in linear space?
- RQ3What queue discipline strategies enable linear-space shortest-distance computation in the product automaton?
- RQ4Can the algorithm be generalized to weighted automata over arbitrary semirings, particularly unambiguous ones?
- RQ5What is the time complexity of the algorithm for different classes of automata, such as acyclic or Thompson automata?
Key findings
- The paper presents a linear-space algorithm for computing the edit-distance between a string and a finite automaton over the tropical semiring, with time complexity $O(|x||A|)$ for acyclic automata and $O(|x||A| ho au)$ in general, where $ ho au$ is the loop-connectedness of the automaton.
- An optimal alignment between the string and automaton can be computed in $O(|x|+|A|)$ space and $O(|x||A|)$ time for acyclic automata, and $O(|x||A| ho au au)$ time in the general case.
- The algorithm uses a recursive divide-and-conquer approach based on Hirschberg's technique, identifying midpoints in the alignment path to enable linear-space backtracking.
- The framework generalizes classical edit-distance algorithms by unifying them under a single shortest-distance computation with customizable queue disciplines.
- For unambiguous weighted automata over arbitrary semirings, the same linear-space approach applies, extending the applicability beyond the tropical semiring.
- The time complexity is further improved when the automaton has favorable structural properties, such as low loop-connectedness, reducing the logarithmic factor in the complexity.
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.