SIAM Journal on Computing · 1994 · 75 citations · 13 references
ComputingComputer ScienceMathematicsAlgorithmsCombinatoricsTheory Of ComputationAlgorithm AnalysisComputational ComplexitySearching AlgorithmsSpace ComplexityString AlgorithmsTime ComplexityComparison ComplexityComplexity Of String AlgorithmsLower Bound ComputationLower Bound TechniquesLower BoundsString SearchString SearchingUpper Bound Computation
The problem of finding all occurrences of a pattern of length m in a text of length n is considered. It is shown that the Boyer–Moore string matching algorithm performs roughly $3n$ comparisons and that this bound is tight up to $O({n / m})$; more precisely, an upper bound of ${{3n - 3(n - m + 1)} / {(m + 2)}}$ comparisons is shown, as is a lower bound of $3n(1 - o(1))$ comparisons, as $\frac{n}{m} \to \infty $ and $m \to \infty $. While the upper bound is somewhat involved, its main elements provide a simple proof of a $4n$ upper bound for the same algorithm.
13
V. J. Rayward‐Smith, Thomas H. Cormen, Charles E. Leiserson et al. · Journal of the Operational Research Society · 1991 · 17K citations
Fast Pattern Matching in Strings
Donald E. Knuth, James H. Morris, Vaughan Pratt · SIAM Journal on Computing · 1977 · 2.9K citations
Alfred V. Aho, Margaret J. Corasick · Communications of the ACM · 1975 · 2.9K citations · Full text
A fast string searching algorithm
Robert S. Boyer, J Strother Moore · Communications of the ACM · 1977 · 2.3K citations · Full text