English

Incremental computation of the set of period sets

Discrete Mathematics 2025-02-19 v2

Abstract

Overlaps between words are crucial in many areas of computer science, such as code design, stringology, and bioinformatics. A self overlapping word is characterized by its periods and borders. A period of a word uu is the starting position of a suffix of uu that is also a prefix uu, and such a suffix is called a border. Each word of length, say n>0n>0, has a set of periods, but not all combinations of integers are sets of periods. Computing the period set of a word uu takes linear time in the length of uu. We address the question of computing, the set, denoted Γn\Gamma_n, of all period sets of words of length nn. Although period sets have been characterized, there is no formula to compute the cardinality of Γn\Gamma_n (which is exponential in nn), and the known dynamic programming algorithm to enumerate Γn\Gamma_n suffers from its space complexity. We present an incremental approach to compute Γn\Gamma_n from Γn1\Gamma_{n-1}, which reduces the space complexity, and then a constructive certification algorithm useful for verification purposes. The incremental approach defines a parental relation between sets in Γn1\Gamma_{n-1} and Γn\Gamma_n, enabling one to investigate the dynamics of period sets, and their intriguing statistical properties. Moreover, the period set of a word uu is the key for computing the absence probability of uu in random texts. Thus, knowing Γn\Gamma_n is useful to assess the significance of word statistics, such as the number of missing words in a random text.

Keywords

Cite

@article{arxiv.2410.12077,
  title  = {Incremental computation of the set of period sets},
  author = {Eric Rivals},
  journal= {arXiv preprint arXiv:2410.12077},
  year   = {2025}
}

Comments

21 pages, 4 figures, 5 algorithms, 27 references, 1 related resource on Zenodo, 6 appendices; accepted for publication at 50th conference SOFSEM 2025