An Efficient Algorithm for Complex Pattern Matching over Continuous Data Streams Based on Bit-Parallel Method
Tomoya Saito, Takuya Kida, Hiroki Arimura · 2007
In this paper, we study a complex pattern matching problem over a single continuous stream of numerical values. Based on bit-parallel technique for string matching, we propose an efficient algorithm called BPS (Bit-Parallel matching on Streams) that finds the set of all occurrences of a given pattern of length m in an input stream of length n in O(1/u' mn) time for ordered values and in O(1/u' mn log m) time for real values over a fixed data range, where w is the bit-width of registers. This time complex properly improves the time complexity O(mn) of the previous algorithms. The keys of the algorithm are fast NFA simulation based on bit- parallel operation and hit predicate table lookup technique. We also present empirical analysis to evaluate the performance of the algorithm showing that the proposed algorithm is twice as fast as and more stable than the previous algorithms.