English

Almost Linear Size Edit Distance Sketch

Data Structures and Algorithms 2024-06-18 v1

Abstract

Edit distance is an important measure of string similarity. It counts the number of insertions, deletions and substitutions one has to make to a string xx to get a string yy. In this paper we design an almost linear-size sketching scheme for computing edit distance up to a given threshold kk. The scheme consists of two algorithms, a sketching algorithm and a recovery algorithm. The sketching algorithm depends on the parameter kk and takes as input a string xx and a public random string ρ\rho and computes a sketch skρ(x;k)sk_{\rho}(x;k), which is a digested version of xx. The recovery algorithm is given two sketches skρ(x;k)sk_{\rho}(x;k) and skρ(y;k)sk_{\rho}(y;k) as well as the public random string ρ\rho used to create the two sketches, and (with high probability) if the edit distance ED(x,y)ED(x,y) between xx and yy is at most kk, will output ED(x,y)ED(x,y) together with an optimal sequence of edit operations that transforms xx to yy, and if ED(x,y)>kED(x,y) > k will output LARGE. The size of the sketch output by the sketching algorithm on input xx is k2O(log(n)loglog(n))k{2^{O(\sqrt{\log(n)\log\log(n)})}} (where nn is an upper bound on length of xx). The sketching and recovery algorithms both run in time polynomial in nn. The dependence of sketch size on kk is information theoretically optimal and improves over the quadratic dependence on kk in schemes of Kociumaka, Porat and Starikovskaya (FOCS'2021), and Bhattacharya and Kouck\'y (STOC'2023).

Keywords

Cite

@article{arxiv.2406.11225,
  title  = {Almost Linear Size Edit Distance Sketch},
  author = {Michal Koucký and Michael Saks},
  journal= {arXiv preprint arXiv:2406.11225},
  year   = {2024}
}
R2 v1 2026-06-28T17:08:10.811Z