Bounded Weighted Edit Distance with Metric Costs
Jihan Wang
Key points
From the paper's conclusion- We give a deterministic $O(n+k^2)$-time algorithm for bounded weighted edit distance when the input costs form an integer metric on the alphabet extended by a gap symbol.
Abstract
We give a deterministic $O(n+k^2)$-time algorithm for bounded weighted edit distance when the input costs form an integer metric on the alphabet extended by a gap symbol. Here $n$ is the total input length and $k$ is the given threshold on the distance. If the distance is at most $k$, the algorithm returns it with an optimal alignment. Otherwise, it reports that the distance exceeds $k$. The running time matches the classical unit-cost bound and is independent of the alphabet size and of the largest cost. The algorithm keeps only the farthest-reaching prefix alignment for each cost and each difference between the total gap costs of the aligned prefixes. For real metrics whose nonzero costs are at least one, scaling and upward rounding give a $(1+\varepsilon)$-approximation for the bounded problem in $\widetilde{O}(n+(k/\varepsilon)^2)$ time. If insertions and deletions have integer costs, the running time improves to $\widetilde{O}(n+k^2/\varepsilon)$.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Metric Weighted Edit Distance: $(3+\varepsilon)$-Approximation in $\widetilde O_\varepsilon(N^{1.6})$ TimearXiv · 2026
- Fine-Grained Hardness of Approximating Dynamic Time WarpingarXiv · 2026
- How to Fix a Broken Metric: A Linear Kernel, Tight Bounds, and Tree MetricsarXiv · 2026
- Faster Deterministic All-Pairs Shortest Paths with Real Edge WeightsarXiv · 2026
- Hardness Results for Approximate Distance Labeling in Sparse GraphsarXiv · 2026
- Dimension Thresholds for Relative-Error Representations of Finite Metrics in Pseudo-Euclidean SpacesarXiv · 2026