We formally define a class of sequential pattern matching algorithms that includes all variations of the Morris-Pratt algorithm. We prove for the worst case and the average case the existence of a complexity bound which is a linear function of the text string length for the Morris-Pratt algorithm, using the Subadditive Ergodic Theorem. We establish some structural property of Morris-Pratt-like algorithms, proving the existence of "unavoidable positions" where the algorithm must stop to compare. We compute also the complexity of the Boyer-Moore algorithm
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.