English

Enhanced Covers of Regular & Indeterminate Strings using Prefix Tables

Data Structures and Algorithms 2015-06-24 v1

Abstract

A \itbf{cover} of a string x=x[1..n]x = x[1..n] is a proper substring uu of xx such that xx can be constructed from possibly overlapping instances of uu. A recent paper \cite{FIKPPST13} relaxes this definition --- an \itbf{enhanced cover} uu of xx is a border of xx (that is, a proper prefix that is also a suffix) that covers a {\it maximum} number of positions in xx (not necessarily all) --- and proposes efficient algorithms for the computation of enhanced covers. These algorithms depend on the prior computation of the \itbf{border array} β[1..n]\beta[1..n], where β[i]\beta[i] is the length of the longest border of x[1..i]x[1..i], 1in1 \le i \le n. In this paper, we first show how to compute enhanced covers using instead the \itbf{prefix table}: an array π[1..n]\pi[1..n] such that π[i]\pi[i] is the length of the longest substring of xx beginning at position ii that matches a prefix of xx. Unlike the border array, the prefix table is robust: its properties hold also for \itbf{indeterminate strings} --- that is, strings defined on {\it subsets} of the alphabet Σ\Sigma rather than individual elements of Σ\Sigma. Thus, our algorithms, in addition to being faster in practice and more space-efficient than those of \cite{FIKPPST13}, allow us to easily extend the computation of enhanced covers to indeterminate strings. Both for regular and indeterminate strings, our algorithms execute in expected linear time. Along the way we establish an important theoretical result: that the expected maximum length of any border of any prefix of a regular string xx is approximately 1.64 for binary alphabets, less for larger ones.

Keywords

Cite

@article{arxiv.1506.06793,
  title  = {Enhanced Covers of Regular & Indeterminate Strings using Prefix Tables},
  author = {Ali Alatabbi and A. S. Sohidull Islam and M. Sohel Rahman and Jamie Simpson and W. F. Smyth},
  journal= {arXiv preprint arXiv:1506.06793},
  year   = {2015}
}
R2 v1 2026-06-22T09:58:13.109Z