Computing the Longest Unbordered Substring
Résumé
A substring of a string is unbordered if its only border is the empty string. The study of unbordered substrings goes back to the paper of Ehrenfeucht and Silberger [7]. The main focus of [7] and of subsequent papers was to elucidate the relationship between the longest unbordered substring and the minimal period of strings. In this paper, we consider the algorithmic problem of computing the longest unbordered substring of a string. The problem was introduced recently in [12], where the authors showed that the average-case running time of the simple, border-array based algorithm can be bounded by O(n 2 /σ 4) for σ being the size of the alphabet. (The worst-case running time remained O(n 2).) Here we propose two algorithms, both presenting substantial theoretical improvements to the result of [12]. The first algorithm has O(n log n) average-case running time and O(n 2) worst-case running time, and the second algorithm has O(n 1.5) worst-case running time.
Origine : Fichiers produits par l'(les) auteur(s)
Loading...