A minimal periods algorithm with applications

  • Authors:
  • Zhi Xu

  • Affiliations:
  • The University of Western Ontario, Department of Computer Science, Middlesex College, London, Ontario, Canada

  • Venue:
  • CPM'10 Proceedings of the 21st annual conference on Combinatorial pattern matching
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Kosaraju in "Computation of squares in a string" briefly described a linear-time algorithm for computing the minimal squares starting at each position in a word. Using the same construction of suffix trees, we generalize his result and describe in detail how to compute the minimal α power, with a period of length longer than s, starting at each position in a word w for arbitrary exponent α 1 and integer s ≥ 0. The algorithm runs in O(α|w|)-time for s = 0 and in O(|w|2)-time otherwise. We provide a complete proof of the correctness and computational complexity of the algorithm. The algorithm can be used to detect certain types of pseudo-patterns in words, which was our original goal in studying this generalization.