English

Computing Covers Using Prefix Tables

Data Structures and Algorithms 2015-03-02 v2

Abstract

An \emph{indeterminate string} x=x[1..n]x = x[1..n] on an alphabet Σ\Sigma is a sequence of nonempty subsets of Σ\Sigma; xx is said to be \emph{regular} if every subset is of size one. A proper substring uu of regular xx is said to be a \emph{cover} of xx iff for every i1..ni \in 1..n, an occurrence of uu in xx includes x[i]x[i]. The \emph{cover array} γ=γ[1..n]\gamma = \gamma[1..n] of xx is an integer array such that γ[i]\gamma[i] is the longest cover of x[1..i]x[1..i]. Fifteen years ago a complex, though nevertheless linear-time, algorithm was proposed to compute the cover array of regular xx based on prior computation of the border array of xx. In this paper we first describe a linear-time algorithm to compute the cover array of regular string xx based on the prefix table of xx. We then extend this result to indeterminate strings.

Keywords

Cite

@article{arxiv.1412.3016,
  title  = {Computing Covers Using Prefix Tables},
  author = {Ali Alatabbi and M. Sohel Rahman and W. F. Smyth},
  journal= {arXiv preprint arXiv:1412.3016},
  year   = {2015}
}

Comments

14 pages, 1 figure

R2 v1 2026-06-22T07:25:21.877Z