Average-optimal string matching

https://doi.org/10.1016/j.jda.2008.09.001Get rights and content
Under an Elsevier user license
open archive

Abstract

The exact string matching problem is to find the occurrences of a pattern of length m from a text of length n symbols. We develop a novel and unorthodox filtering technique for this problem. Our method is based on transforming the problem into multiple matching of carefully chosen pattern subsequences. While this is seemingly more difficult than the original problem, we show that the idea leads to very simple algorithms that are optimal on average. We then show how our basic method can be used to solve multiple string matching as well as several approximate matching problems in average optimal time. The general method can be applied to many existing string matching algorithms. Our experimental results show that the algorithms perform very well in practice.

Keywords

String matching
Multiple string matching
Optimality
Bit-parallelism

Cited by (0)