Maximal Closed Substrings

09/01/2022
by   Golnaz Badkobeh, et al.
0

A string is closed if it has length 1 or has a nonempty border without internal occurrences. In this paper we introduce the definition of a maximal closed substring (MCS), which is an occurrence of a closed substring that cannot be extended to the left nor to the right into a longer closed substring. MCSs with exponent at least 2 are commonly called runs; those with exponent smaller than 2, instead, are particular cases of maximal gapped repeats. We show that a string of length n contains 𝒪(n^1.5) MCSs. We also provide an output-sensitive algorithm that, given a string of length n over a constant-size alphabet, locates all m MCSs the string contains in 𝒪(nlog n + m) time.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset