Bounded Weighted Edit Distance: Dynamic Algorithms and Matching Lower Bounds
Abstract
The edit distance of two strings is the minimum number of character edits (insertions, deletions, and substitutions) needed to transform into . Its weighted counterpart minimizes the total cost of edits, which are specified using a function , normalized so that each edit costs at least one. The textbook dynamic-programming procedure, given strings and oracle access to , computes in time. Nevertheless, one can achieve better running times if the computed distance, denoted , is small: for unit weights [Landau and Vishkin; JCSS'88] and for arbitrary weights [Cassis, Kociumaka, Wellnitz; FOCS'23]. In this paper, we study the dynamic version of the weighted edit distance problem, where the goal is to maintain for strings that change over time, with each update specified as an edit in or . Very recently, Gorbachev and Kociumaka [STOC'25] showed that the unweighted distance can be maintained in time per update after -time preprocessing; here, denotes the current value of . Their algorithm generalizes to small integer weights, but the underlying approach is incompatible with large weights. Our main result is a dynamic algorithm that maintains in time per update after -time preprocessing. Here, is a real trade-off parameter and is an integer threshold fixed at preprocessing time, with returned whenever . We complement our algorithm with conditional lower bounds showing fine-grained optimality of our trade-off for and justifying our choice to fix .
Keywords
Cite
@article{arxiv.2507.02548,
title = {Bounded Weighted Edit Distance: Dynamic Algorithms and Matching Lower Bounds},
author = {Itai Boneh and Egor Gorbachev and Tomasz Kociumaka},
journal= {arXiv preprint arXiv:2507.02548},
year = {2025}
}
Comments
ESA 2025