Lune

FOCS2025顶会

Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance

Debarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka, Barna Saha

摘要

In this paper, we present the first dynamic algorithms for Dyck edit distance and tree edit distance that achieve subpolynomial update times. Dyck edit distance measures how far a parenthesis string is from a wellparenthesized expression (i.e., the Dyck language), while tree edit distance quantifies the minimum number of node insertions, deletions, and substitutions required to transform one rooted, ordered, and labeled tree into another. These problems have been studied extensively since the 1970s, with recent advances in both algorithmic efficiency and fine-grained complexity lower bounds. Despite this progress, no prior work has addressed efficient dynamic algorithms for these problems, even though many real-world applications involve evolving structured data such as LaTeX, JSON, XML, HTML, hierarchical datasets, and RNA secondary structures. We take the first step in this direction by designing new approximation algorithms for Dyck and tree edit distances in the dynamic setting. Our key technical contribution is a set of novel reduction and decomposition techniques that transform instances of Dyck and tree edit distance into efficiently maintainable instances of string edit distance. Leveraging existing dynamic algorithms for string edit distance, we obtain an no(1)n^{o(1)} approximation for Dyck edit distance with no(1)n^{o(1)} update time. This builds upon and significantly extends prior work on Dyck language decomposition ([Saha, FOCS’14] and [Koucký & Saks; SODA’23]). For tree edit distance, we introduce a new static reduction that improves the best-known approximation bound from O(n3/4)O\left(n^{3 / 4}\right) [Akutsu, Fukagawa, and Takasu; Algorithmica, 2010] to O~(n)\tilde{O}(\sqrt{n}). Moreover, while the previous result was restricted to constant-degree trees, ours holds for arbitrary trees. We then extend our reduction dynamically, yielding a dynamic tree edit distance algorithm with an approximation factor of n1/2+o(1)n^{1 / 2+o(1)} and update time no(1)n^{o(1)}. A core component of our approach is a new dynamic maintenance algorithm for heavy-light decomposition, a widely used technique in tree algorithms. Given its broad applicability, we believe this result is of independent interest. Finally, we introduce a novel static and dynamic decomposition method that achieves an O~(k)\tilde{O}(k)-approximation for tree edit distance when the tree edit distance is at most k; combined with the trivial bound k≤nk \leq n, this yields a deterministic O~(n)\tilde{O}(\sqrt{n})-approximation. While similar decompositions exist for strings, no prior work has successfully extended them to trees. Our approach breaks this barrier, improving the best-known approximations for tree edit distance both in the static and dynamic setting. In the static setting, our algorithm runs in O~(n)\tilde{O}(n) time; in the dynamic setting, it only requires a polylogarithmic worst-case update time. The state-of-the-art near-lineartime static algorithm for tree edit distance previously achieved an O(n)O(\sqrt{n})-approximation [Boroujeni, Ghodsi, Hajiaghayi, and Seddighin; STOC’19].

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion Balancing 引用了 A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and Beyond
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper32

  1. A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and BeyondJulia Chuzhoy, Yu Gao, Jason Li, Danupon Nanongkai 等FOCS 2020 · 76 次引用
  2. More Asymmetry Yields Faster Matrix MultiplicationJosh Alman, Ran Duan, Virginia Vassilevska Williams, Yinzhan Xu 等SODA 2025 · 35 次引用
  3. Deterministic Decremental Reachability, SCC, and Shortest Paths via Directed Expanders and Congestion BalancingAaron Bernstein, Maximilian Probst Gutenberg, Thatchaphol SaranurakFOCS 2020 · 35 次引用
  4. Edit Distance in Near-Linear Time: it's a Constant FactorAlexandr Andoni, Negev Shekel NosatzkiFOCS 2020 · 28 次引用
  5. Fast Dynamic Cuts, Distances and Effective Resistances via Vertex SparsifiersLi Chen, Gramoz Goranci, Monika Henzinger, Richard Peng 等FOCS 2020 · 22 次引用

相关 Paper

  1. Breaking the Cubic Barrier for (Unweighted) Tree Edit DistanceXiao MaoFOCS 2021 · 7 次引用
  2. Weighted Edit Distance Computation: Strings, Trees, and DyckDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka 等STOC 2023 · 4 次引用
  3. Faster Weighted and Unweighted Tree Edit Distance and APSP EquivalenceJakob Nogler, Adam Polak, Barna Saha, Virginia Vassilevska Williams 等STOC 2025 · 4 次引用
  4. Õ(n+poly(k))-time Algorithm for Bounded Tree Edit DistanceDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka 等FOCS 2022 · 5 次引用
  5. Approximating Edit Distance in the Fully Dynamic ModelTomasz Kociumaka, Anish Mukherjee, Barna SahaFOCS 2023 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖