Weighted Edit Distance Computation: Strings, Trees and Dyck
Abstract
Given two strings of length over alphabet , and an upper bound on their edit distance, the algorithm of Myers (Algorithmica'86) and Landau and Vishkin (JCSS'88) computes the unweighted string edit distance in time. Till date, it remains the fastest algorithm for exact edit distance computation, and it is optimal under the Strong Exponential Hypothesis (STOC'15). Over the years, this result has inspired many developments, including fast approximation algorithms for string edit distance as well as similar poly-time algorithms for generalizations to tree and Dyck edit distances. Surprisingly, all these results hold only for unweighted instances. While unweighted edit distance is theoretically fundamental, almost all real-world applications require weighted edit distance, where different weights are assigned to different edit operations and may vary with the characters being edited. Given a weight function (such that and for all with ), the goal is to find an alignment that minimizes the total weight of edits. Except for the vanilla -time dynamic-programming algorithm and its almost trivial -time implementation, none of the aforementioned developments on the unweighted edit distance apply to the weighted variant. In this paper, we propose the first poly-time algorithm that computes weighted string edit distance exactly, thus bridging a fundamental gap between our understanding of unweighted and weighted edit distance. We then generalize this result to weighted tree and Dyck edit distances, which lead to a deterministic algorithm that improves upon the previous work for unweighted tree edit distance.
Cite
@article{arxiv.2302.04229,
title = {Weighted Edit Distance Computation: Strings, Trees and Dyck},
author = {Debarati Das and Jacob Gilbert and MohammadTaghi Hajiaghayi and Tomasz Kociumaka and Barna Saha},
journal= {arXiv preprint arXiv:2302.04229},
year = {2023}
}