English

Locally consistent decomposition of strings with applications to edit distance sketching

Data Structures and Algorithms 2023-11-28 v2

Abstract

In this paper we provide a new locally consistent decomposition of strings. Each string xx is decomposed into blocks that can be described by grammars of size O~(k)\widetilde{O}(k) (using some amount of randomness). If we take two strings xx and yy of edit distance at most kk then their block decomposition uses the same number of grammars and the ii-th grammar of xx is the same as the ii-th grammar of yy except for at most kk indexes ii. The edit distance of xx and yy equals to the sum of edit distances of pairs of blocks where xx and yy differ. Our decomposition can be used to design a sketch of size O~(k2)\widetilde{O}(k^2) for edit distance, and also a rolling sketch for edit distance of size O~(k2)\widetilde{O}(k^2). The rolling sketch allows to update the sketched string by appending a symbol or removing a symbol from the beginning of the string.

Keywords

Cite

@article{arxiv.2302.04475,
  title  = {Locally consistent decomposition of strings with applications to edit distance sketching},
  author = {Sudatta Bhattacharya and Michal Koucký},
  journal= {arXiv preprint arXiv:2302.04475},
  year   = {2023}
}
R2 v1 2026-06-28T08:35:40.291Z