Lune

FOCS2023Top-tier venue

Approximating Edit Distance in the Fully Dynamic Model

Tomasz Kociumaka, Anish Mukherjee, Barna Saha

Abstract

The edit distance is a fundamental measure of sequence similarity, defined as the minimum number of character insertions, deletions, and substitutions needed to transform one string into the other. Given two strings of length at most n, a simple dynamic programming computes their edit distance exactly in O(n2)\mathcal{O}\left(n^{2}\right) time, which is also the best possible (up to subpolynomial factors) assuming the Strong Exponential Time Hypothesis (SETH). The last few decades have seen tremendous progress in edit distance approximation, where the runtime has been brought down to subquadratic, to near-linear, and even to sublinear at the cost of approximation. In this paper, we study the dynamic edit distance problem where the strings change dynamically as the characters are substituted, inserted, or deleted over time. Each change may happen at any location of either of the two strings. The goal is to maintain the (exact or approximate) edit distance of such dynamic strings while minimizing the update time. The exact edit distance can be maintained in O(nlog⁡2n)\mathcal{O}\left(n \log ^{2} n\right) time per update (Charalampopoulos, Kociumaka, Mozes; 2020), which is again tight assuming SETH. Unfortunately, even with the unprecedented progress in edit distance approximation in the static setting, strikingly little is known regarding dynamic edit distance approximation. Utilizing the best near-linear-time (Andoni, Nosatzki; 2020) and sublinear-time (Goldenberg, Kociumaka, Krauthgamer, Saha; 2022) approximation algorithm, an old exact algorithm (Landau and Vishkin; 1988), and a generic dynamic strings implementation (Mehlhorn, Sundar, Uhrig; 1996), it is possible to achieve an O(nc)\mathcal{O}\left(n^{c}\right)-approximation in n0.5−c+o(1)n^{0.5-c+o(1)} update time for any constant c∈[0,16]c \in\left[0, \frac{1}{6}\right]. Improving upon this trade-off, characterized by the approximation-ratio and update-time product n0.5+o(1)n^{0.5+o(1)}, remains wide open. The contribution of this work is a dynamic no(1)n^{o(1)}-approximation algorithm with amortized expected update time of no(1)n^{o(1)}. In other words, we bring the approximation-ratio and update-time product down to no(1)n^{o(1)}, which is also the best possible with the current state of the art in static algorithms. Our solution utilizes an elegant framework of precision sampling trees for edit distance approximation (Andoni, Krauthgamer, Onak; 2010). We show how to dynamically maintain precision sampling trees, which comes with significant nontriviality and can be an independent tool of interest for further development in dynamic string algorithms.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights cites Faster Sublinear-Time Edit Distance
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites Fast Dynamic Cuts, Distances and Effective Resistances via Vertex Sparsifiers
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and Beyond
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites Edit Distance in Near-Linear Time: it's a Constant Factor
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites New algorithms and hardness for incremental single-source shortest paths in directed graphs
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion Balancing
  • Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance cites Dynamic Dynamic Time Warping
  • Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion Balancing cites A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and Beyond
  • Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion Balancing cites New algorithms and hardness for incremental single-source shortest paths in directed graphs
  • Faster Sublinear-Time Edit Distance cites Edit Distance in Near-Linear Time: it's a Constant Factor
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Dynamic Dynamic Time WarpingKarl Bringmann, Nick Fischer, Ivor van der Hoog, Evangelos Kipouridis et al.SODA 2024 · 21 citations
  2. Faster Sublinear-Time Edit DistanceKarl Bringmann, Alejandro Cassis, Nick Fischer, Tomasz KociumakaSODA 2024 · 3 citations
  3. Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer WeightsEgor Gorbachev, Tomasz KociumakaSTOC 2025 · 1 citation
  4. Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit DistanceDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka et al.FOCS 2025 · 1 citation

Builds on22

  1. A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and BeyondJulia Chuzhoy, Yu Gao, Jason Li, Danupon Nanongkai et al.FOCS 2020 · 76 citations
  2. Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion BalancingAaron Bernstein, Maximilian Probst Gutenberg, Thatchaphol SaranurakFOCS 2020 · 35 citations
  3. Edit Distance in Near-Linear Time: it's a Constant FactorAlexandr Andoni, Negev Shekel NosatzkiFOCS 2020 · 28 citations
  4. Fast Dynamic Cuts, Distances and Effective Resistances via Vertex SparsifiersLi Chen, Gramoz Goranci, Monika Henzinger, Richard Peng et al.FOCS 2020 · 22 citations
  5. New algorithms and hardness for incremental single-source shortest paths in directed graphsMaximilian Probst Gutenberg, Virginia Vassilevska Williams, Nicole WeinSTOC 2020 · 21 citations

Related papers

  1. Optimal Algorithms for Bounded Weighted Edit DistanceAlejandro Cassis, Tomasz Kociumaka, Philip WellnitzFOCS 2023 · 4 citations
  2. Weighted Edit Distance Computation: Strings, Trees, and DyckDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka et al.STOC 2023 · 4 citations
  3. Breaking the Cubic Barrier for (Unweighted) Tree Edit DistanceXiao MaoFOCS 2021 · 7 citations
  4. Reducing approximate Longest Common Subsequence to approximate Edit DistanceAviad Rubinstein, Zhao SongSODA 2020 · 24 citations
  5. Approximation Schemes for Edit Distance and LCS in Quasi-Strongly Subquadratic TimeXiao Mao, Aviad RubinsteinSTOC 2026 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines