English

Computing String Covers in Sublinear Time

Data Structures and Algorithms 2024-09-24 v1

Abstract

Let TT be a string of length nn over an integer alphabet of size σ\sigma. In the word RAM model, TT can be represented in O(n/logσn)O(n /\log_\sigma n) space. We show that a representation of all covers of TT can be computed in the optimal O(n/logσn)O(n/\log_\sigma n) time; in particular, the shortest cover can be computed within this time. We also design an O(n(logσ+loglogn)/logn)O(n(\log\sigma + \log \log n)/\log n)-sized data structure that computes in O(1)O(1) time any element of the so-called (shortest) cover array of TT, that is, the length of the shortest cover of any given prefix of TT. As a by-product, we describe the structure of cover arrays of Fibonacci strings. On the negative side, we show that the shortest cover of a length-nn string cannot be computed using o(n/logn)o(n/\log n) operations in the PILLAR model of Charalampopoulos, Kociumaka, and Wellnitz (FOCS 2020).

Keywords

Cite

@article{arxiv.2409.14559,
  title  = {Computing String Covers in Sublinear Time},
  author = {Jakub Radoszewski and Wiktor Zuba},
  journal= {arXiv preprint arXiv:2409.14559},
  year   = {2024}
}

Comments

Preprint accepted to SPIRE 2024