Abstract: We study Boyer-Moore-type string searching algorithms. We analyze the Horspool's variant. The searching time is linear. An exact expression of the linearity constant is derived and is proven to be asymptotically α, 1c⩽α⩽2(c + 1), where c is the cardinality of the alphabet. We exhibit a stationary process and reduce the problem to a word enumeration problem. The same technique applies to other variants of the Boyer-Moore algorithm.
Loading