The number of runs in a string: improved analysis of the linear upper bound

  • Authors:
  • Wojciech Rytter

  • Affiliations:
  • Department of Computer Science, New Jersey Institute of Technology, Instytut Informatyki, Uniwersytet Warszawski, Warszawa, Poland

  • Venue:
  • STACS'06 Proceedings of the 23rd Annual conference on Theoretical Aspects of Computer Science
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

A run (or a maximal repetition) in a string is an inclusion-maximal periodic segment in a string. Let ρ(n) be the maximal number of runs in a string of length n. It has been shown in [8] that ρ(n)=O(n), the proof was very complicated and the constant coefficient in O(n) has not been given explicitly. We propose a new approach to the analysis of runs based on the properties of subperiods: the periods of periodic parts of the runs. We show that ρ(n) ≤ 5 n. Our proof is inspired by the results of [4], where the role of new periodicity lemmas has been emphasized.