Constant-Time Randomized Parallel String Matching

Maxime Crochemore, Zvi Galil, Leszek Gasieniec, Kunsoo Park, Wojciech Rytter
1997 SIAM journal on computing (Print)  
Given a pattern string of length m for the string matching problem, we design an algorithm that computes deterministic samples of a su ciently long substring of the pattern in constant time. This problem used to be the bottleneck in the pattern preprocessing for one-and two-dimensional pattern matching. The best previous time bound was O(log 2 m= log log m). We use this algorithm to obtain the following results. All algorithms below are optimal parallel algorithms on a CRCW PRAM. 1. A
more » ... tic string-matching algorithm which takes O(log log m) time for preprocessing and constant time for text search, which are the best possible in both preprocessing and text search. 2. A constant-time deterministic string-matching algorithm in the case that the text length n satis es n = (m 1+ ) for a constant > 0. 3. A simple string-matching algorithm that has constant time with high probability for random input. 4. The main result: A constant expected time Las-Vegas algorithm for computing the period of the pattern and all witnesses and thus for string matching itself. In both cases an (log log m) lower bound is known for deterministic algorithms.
doi:10.1137/s009753979528007x fatcat:tlj6h2fsabb4vawaubk2p74zxy