The zooming method: a recursive approach to time-space efficient string-matching

Leszek Ga̧sieniec, Wojciech Plandowski, Wojciech Rytter

Research output: Contribution to journalArticle

15 Scopus citations

Abstract

A new approach to time-space efficient string-matching is presented. The method is flexible, its implementation depends whether or not the alphabet is linearly ordered. The only known linear-time constant-space algorithm for string-matching over nonordered alphabets is the Galil-Seiferas algorithm, see Crochemore (1993) and Galil (1983) which are rather complicated. The zooming method gives probably the simplest string-matching algorithm working in constant space and linear time for nonordered alphabets. The novel feature of our algorithm is the application of the searching phase (which is usually simpler than preprocessing) in the preprocessing phase. The preprocessing has a recursive structure similar to selection in linear time, see Aho (1974). For ordered alphabets the preprocessing part is much simpler, its basic component is a simple and well-known algorithm for finding the maximal suffix, see Duval (1983). Hence we demonstrate a new application of this algorithm, see also Crochemore (1991). The idea of the zooming method was applied by Crochemore et al. (1995) to two-dimensional patterns.

Original languageEnglish (US)
Pages (from-to)19-30
Number of pages12
JournalTheoretical Computer Science
Volume147
Issue number1-2
DOIs
StatePublished - Aug 7 1995
Externally publishedYes

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint Dive into the research topics of 'The zooming method: a recursive approach to time-space efficient string-matching'. Together they form a unique fingerprint.

  • Cite this