An Improved Algorithm for The k-Dyck Edit Distance Problem
Dvir Fried, Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz, Ely Porat, Tatiana Starikovskaya
Abstract
A Dyck sequence is a sequence of opening and closing parentheses (of various types) that is balanced. The Dyck edit distance of a given sequence of parentheses S is the smallest number of edit operations (insertions, deletions, and substitutions) needed to transform S into a Dyck sequence. We consider the threshold Dyck edit distance problem, where the input is a sequence of parentheses S and a positive integer k, and the goal is to compute the Dyck edit distance of S only if the distance is at most k, and otherwise report that the distance is larger than k. Backurs and Onak [PODS'16] showed that the threshold Dyck edit distance problem can be solved in O(n + k 16 ) time.
In this work, we design new algorithms for the threshold Dyck edit distance problem which costs O(n + k 4.544184 ) time with high probability or O(n + k 4.853059 ) deterministically. Our algorithms combine several new structural properties of the Dyck edit distance problem, a refined algorithm for fast (min, +) matrix product, and a careful modification of ideas used in Valiant's parsing algorithm.
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.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights cites Weighted Edit Distance Computation: Strings, Trees, and Dyck
- Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights cites Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance
- Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights cites Optimal Algorithms for Bounded Weighted Edit Distance
- Weighted Edit Distance Computation: Strings, Trees, and Dyck cites Faster Algorithms for Bounded-Difference Min-Plus Product
- Weighted Edit Distance Computation: Strings, Trees, and Dyck cites Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance
- Faster Algorithms for Bounded-Difference Min-Plus Product cites Truly Subcubic Min-Plus Product for Less Structured Matrices, with Applications
- Faster Algorithms for Bounded-Difference Min-Plus Product cites A Refined Laser Method and Faster Matrix Multiplication
- Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance cites Faster Algorithms for Bounded-Difference Min-Plus Product
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Truly Subcubic Min-Plus Product for Less Structured Matrices, with Applications
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Weighted Edit Distance Computation: Strings, Trees, and Dyck
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Faster min-plus product for monotone instances
- Faster Weighted and Unweighted Tree Edit Distance and APSP Equivalence cites Optimal Algorithms for Bounded Weighted Edit Distance
- Faster min-plus product for monotone instances cites Faster Algorithms for Bounded-Difference Min-Plus Product
- Faster min-plus product for monotone instances cites A Refined Laser Method and Faster Matrix Multiplication
- Optimal Algorithms for Bounded Weighted Edit Distance cites Weighted Edit Distance Computation: Strings, Trees, and Dyck
- Optimal Algorithms for Bounded Weighted Edit Distance cites Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance
Cited by top-tier papers5
- Õ(n+poly(k))-time Algorithm for Bounded Tree Edit DistanceDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka et al.FOCS 2022 · 5 citations
- 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
- Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer WeightsEgor Gorbachev, Tomasz KociumakaSTOC 2025 · 1 citation
Builds on4
- A Refined Laser Method and Faster Matrix MultiplicationJosh Alman, Virginia Vassilevska WilliamsSODA 2021 · 275 citations
- Truly Subcubic Min-Plus Product for Less Structured Matrices, with ApplicationsVirginia Vassilevska Williams, Yinzhan XuSODA 2020 · 19 citations
- Faster min-plus product for monotone instancesShucheng Chi, Ran Duan, Tianle Xie, Tianyi ZhangSTOC 2022 · 12 citations
- Faster Algorithms for Bounded-Difference Min-Plus ProductShucheng Chi, Ran Duan, Tianle XieSODA 2022 · 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
- Simple, deterministic, fast (but weak) approximations to edit distance and Dyck edit distanceMichal Koucký, Michael E. SaksSODA 2023 · 1 citation
- Almost-optimal sublinear-time edit distance in the low distance regimeKarl Bringmann, Alejandro Cassis, Nick Fischer, Vasileios NakosSTOC 2022 · 4 citations
- Breaking the Cubic Barrier for (Unweighted) Tree Edit DistanceXiao MaoFOCS 2021 · 7 citations
- Faster Pattern Matching under Edit Distance : A Reduction to Dynamic Puzzle Matching and the Seaweed Monoid of Permutation MatricesPanagiotis Charalampopoulos, Tomasz Kociumaka, Philip WellnitzFOCS 2022 · 8 citations
