Weighted Edit Distance Computation: Strings, Trees and Dyck

02/08/2023
by   Debarati Das, et al.
0

Given two strings of length n over alphabet Σ, and an upper bound k on their edit distance, the algorithm of Myers (Algorithmica'86) and Landau and Vishkin (JCSS'88) computes the unweighted string edit distance in 𝒪(n+k^2) 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 𝒪̃(n+poly(k))-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 w: Σ∪{ε}×Σ∪{ε}→ℝ_≥ 0 (such that w(a,a)=0 and w(a,b)≥ 1 for all a,b∈Σ∪{ε} with a b), the goal is to find an alignment that minimizes the total weight of edits. Except for the vanilla 𝒪(n^2)-time dynamic-programming algorithm and its almost trivial 𝒪(nk)-time implementation, none of the aforementioned developments on the unweighted edit distance apply to the weighted variant. In this paper, we propose the first 𝒪(n+poly(k))-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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/11/2023

Optimal Algorithms for Bounded Weighted Edit Distance

The edit distance of two strings is the minimum number of insertions, de...
research
07/14/2021

Levenshtein Graphs: Resolvability, Automorphisms Determining Sets

We introduce the notion of Levenshtein graphs, an analog to Hamming grap...
research
12/10/2021

How Compression and Approximation Affect Efficiency in String Distance Measures

Real-world data often comes in compressed form. Analyzing compressed dat...
research
06/30/2023

Efficient Parallel Output-Sensitive Edit Distance

Given two strings A[1..n] and B[1..m], and a set of operations allowed t...
research
07/16/2020

String Sanitization Under Edit Distance: Improved and Generalized

Let W be a string of length n over an alphabet Σ, k be a positive intege...
research
09/01/2021

Algorithme de recherche approximative dans un dictionnaire fondé sur une distance d'édition définie par blocs

We propose an algorithm for approximative dictionary lookup, where alter...
research
07/26/2021

An A*-algorithm for the Unordered Tree Edit Distance with Custom Costs

The unordered tree edit distance is a natural metric to compute distance...

Please sign up or login with your details

Forgot password? Click here to reset