An O(n log n) algorithm for finding all repetitions in a string
Journal of Algorithms
Theoretical Computer Science
Algorithms on strings, trees, and sequences: computer science and computational biology
Algorithms on strings, trees, and sequences: computer science and computational biology
Simple and flexible detection of contiguous repeats using a suffix tree
Theoretical Computer Science
Introduction to Formal Language Theory
Introduction to Formal Language Theory
Computation of Squares in a String (Preliminary Version)
CPM '94 Proceedings of the 5th Annual Symposium on Combinatorial Pattern Matching
Optimal suffix tree construction with large alphabets
FOCS '97 Proceedings of the 38th Annual Symposium on Foundations of Computer Science
Finding Maximal Repetitions in a Word in Linear Time
FOCS '99 Proceedings of the 40th Annual Symposium on Foundations of Computer Science
Linear time algorithms for finding and representing all the tandem repeats in a string
Journal of Computer and System Sciences
Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications)
Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications)
An efficient algorithm for online square detection
Theoretical Computer Science - Computing and combinatorics
Computing Longest Previous Factor in linear time and applications
Information Processing Letters
Fast and Practical Algorithms for Computing All the Runs in a String
CPM '07 Proceedings of the 18th annual symposium on Combinatorial Pattern Matching
Linear pattern matching algorithms
SWAT '73 Proceedings of the 14th Annual Symposium on Switching and Automata Theory (swat 1973)
Hi-index | 5.23 |
A repetition is a nonempty string of the form X^q, where q=2. Given a string S character by character and the value of q, the on-line repetition detection problem is to detect and report the first repetition in S, if it exists, in an on-line manner. Leung, Peng and Ting first studied the problem for q=2 and gave an O(mlog^2m) time algorithm (refer to [H.-F. Leung, Z. Peng, H.-F. Ting, An efficient algorithm for online square detection, Theoretical Computer Science 363 (1) (2006) 69-75]), where m is the ending position of the first repetition in S. In this paper, we improve the above cited work by reducing the time complexity to O(mlog@b), where @b is the number of distinct characters in the first m characters of S. Moreover, we also solve the problem for q=3 with the same time complexity.