Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance
Debarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka, Barna Saha, Hamed Saleh
Abstract
Computing the edit distance of two strings is one of the most basic problems in computer science and combinatorial optimization. Tree edit distance is a natural generalization of edit distance in which the task is to compute a measure of dissimilarity between two (unweighted) rooted trees with node labels. Perhaps the most notable recent application of tree edit distance is in NoSQL big databases, such as MongoDB, where each row of the database is a JSON document represented as a labeled rooted tree and finding dissimilarity between two rows is a basic operation. Until recently, the fastest algorithm for tree edit distance ran in cubic time (Demaine, Mozes, Rossman, Weimann; TALG’10); however, Mao (FOCS’21) broke the cubic barrier for the tree edit distance problem using fast matrix multiplication.Given a parameter k as an upper bound on the distance, an -time algorithm for edit distance has been known since the 1980s due to works of Myers (Algorithmica’86) and Landau and Vishkin (JCSS’88). The existence of an -time algorithm for tree edit distance has been posed as open question, e.g., by Akmal and Jin (ICALP’21), who give a stateof-the-art -time algorithm. In this paper, we answer this question positively.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 91682748-5d27-49bb-9469-84ddaee4a4f7Cited by top-tier papers6
- Weighted Edit Distance Computation: Strings, Trees, and DyckDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka et al.STOC 2023 · 4 citations
- Faster Weighted and Unweighted Tree Edit Distance and APSP EquivalenceJakob Nogler, Adam Polak, Barna Saha, Virginia Vassilevska Williams et al.STOC 2025 · 4 citations
- Optimal Algorithms for Bounded Weighted Edit DistanceAlejandro Cassis, Tomasz Kociumaka, Philip WellnitzFOCS 2023 · 4 citations
- X-TED: Massive Parallelization of Tree Edit DistanceDayi Fan, Rubao Lee, Xiaodong ZhangVLDB 2024 · 2 citations
- Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer WeightsEgor Gorbachev, Tomasz KociumakaSTOC 2025 · 1 citation
Builds on8
- Edit Distance in Near-Linear Time: it's a Constant FactorAlexandr Andoni, Negev Shekel NosatzkiFOCS 2020 · 28 citations
- Does preprocessing help in fast sequence comparisons?Elazar Goldenberg, Aviad Rubinstein, Barna SahaSTOC 2020 · 15 citations
- Small-space and streaming pattern matching with editsTomasz Kociumaka, Ely Porat, Tatiana StarikovskayaFOCS 2021 · 13 citations
- Breaking the Cubic Barrier for (Unweighted) Tree Edit DistanceXiao MaoFOCS 2021 · 7 citations
- Constant factor approximations to edit distance on far input pairs in nearly linear timeMichal Koucký, Michael E. SaksSTOC 2020 · 5 citations
Related papers
- 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
- Approximating Edit Distance in the Fully Dynamic ModelTomasz Kociumaka, Anish Mukherjee, Barna SahaFOCS 2023 · 1 citation
- JEDI: These aren't the JSON documents you're looking for?Thomas Hütter, Nikolaus Augsten, Christoph M. Kirsch, Michael J. Carey et al.SIGMOD 2022 · 14 citations
- UltraTWD: Optimizing Ultrametric Trees for Tree-Wasserstein DistanceFangchen Yu, Yanzhen Chen, Jiaxing Wei, Jianfeng Mao et al.ICML 2025
- Faster Sublinear-Time Edit DistanceKarl Bringmann, Alejandro Cassis, Nick Fischer, Tomasz KociumakaSODA 2024 · 3 citations
