Journal of the ACM (JACM)
String-matching on ordered alphabets
Theoretical Computer Science - Selected papers of the Combinatorial Pattern Matching School
Text algorithms
The zooming method: a recursive approach to time-space efficient string-matching
Theoretical Computer Science
String matching with simple devices
Information Processing Letters
Succinct 2D dictionary matching with no slowdown
WADS'11 Proceedings of the 12th international conference on Algorithms and data structures
Simple real-time constant-space string matching
Theoretical Computer Science
A note on a simple computation of the maximal suffix of a string
Journal of Discrete Algorithms
Hi-index | 5.23 |
Constant-space linear-time string-matching algorithms are usually very sophisticated. Most of them consist of two phases: (very technical) preprocessing phase and searching phase. An exception is one-phase Crochemore's algorithm (Theoret. Comput. Sci. 92 (1992) 33). It is an on-line version of Knuth-Morris-Pratt algorithm (KMP) with "on-the-fly" computation of pattern shifts (as approximate periods). In this paper we explore further Crochemore's approach, and construct alternative algorithms which are differently structured. In Crochemore's algorithm the approximate-period function is restarted from inside, which means that several internal variables of this function are changing globally, also Crochemore's algorithm strongly depends on the concrete implementation of approximate-periods computation. We present a simple modification of KMP algorithm which works in O(1), space, O(n) time for any function which computes periods or approximate periods in O(1)-space and linear time. The approximate-period function can be treated as a black box. We identify class of patterns, self-maximal words, which are especially well suited for Crochemore-style string matching. A new O(1)-space string-matching algorithm, MaxSuffix-Matching, is proposed in the paper, which gives yet another example of applicability of maximal suffixes.