English

Shortest cover after edit

Data Structures and Algorithms 2024-04-29 v2

Abstract

This paper investigates the (quasi-)periodicity of a string when the string is edited. A string CC is called a cover (as known as a quasi-period) of a string TT if each character of TT lies within some occurrence of CC. By definition, a cover of TT must be a border of TT; that is, it occurs both as a prefix and as a suffix of TT. In this paper, we focus on the changes in the longest border and the shortest cover of a string when the string is edited only once. We propose a data structure of size O(n)O(n) that computes the longest border and the shortest cover of the string in O(logn)O(\ell \log n) time after an edit operation (either insertion, deletion, or substitution of some string) is applied to the input string TT of length nn, where \ell is the length of the string being inserted or substituted. The data structure can be constructed in O(n)O(n) time given string TT.

Keywords

Cite

@article{arxiv.2402.17428,
  title  = {Shortest cover after edit},
  author = {Kazuki Mitani and Takuya Mieno and Kazuhisa Seto and Takashi Horiyama},
  journal= {arXiv preprint arXiv:2402.17428},
  year   = {2024}
}
R2 v1 2026-06-28T15:01:48.685Z