Average-optimal string matching

  • Authors:
  • Kimmo Fredriksson;Szymon Grabowski

  • Affiliations:
  • Department of Computer Science, University of Kuopio, P.O. Box 1627, 70211 Kuopio, Finland;Computer Engineering Department, Technical University of Łód, Al. Politechniki 11, 90-924 Łód, Poland

  • Venue:
  • Journal of Discrete Algorithms
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.