Home
Scholarly Works
A Simple Fast Hybrid Pattern-Matching Algorithm
Conference

A Simple Fast Hybrid Pattern-Matching Algorithm

Abstract

The Knuth-Morris-Pratt (KMP) pattern-matching algorithm guarantees both independence from alphabet size and worst-case execution time linear in the pattern length; on the other hand, the Boyer-Moore (BM) algorithm provides near-optimal average-case and best-case behaviour, as well as executing very fast in practice. We describe a simple algorithm that employs the main ideas of KMP and BM (with a little help from Sunday) in an effort to combine these desirable features. Experiments indicate that in practice the new algorithm is among the fastest exact pattern-matching algorithms discovered to date, perhaps dominant for alphabet size 8 or more.

Authors

Franek F; Jennings CG; Smyth WF

Series

Lecture Notes in Computer Science

Volume

3537

Pagination

pp. 288-297

Publisher

Springer Nature

Publication Date

January 1, 2005

DOI

10.1007/11496656_25

Conference proceedings

Lecture Notes in Computer Science

ISSN

0302-9743

Labels

View published work (Non-McMaster Users)

Contact the Experts team