A unifying look at the Apostolico--Giancarlo string-matching algorithm

  • Authors:
  • Maxime Crochemore;Christophe Hancart;Thierry Lecroq

  • Affiliations:
  • Department of Computer Science, King's College London, Strand, London WC2R 2LS, UK and IGM (Institut Gaspard-Monge), Université de Marne-la-Vallée, 77454 Marne-la-Vallée Cedex 2, Fr ...;LIFAR (Laboratoire d'Informatique Fondamentale et Appliquée de Rouen), Faculté des Sciences et des Techniques, Université de Rouen, 76821 Mont-Saint-Aignan Cedex, France;LIFAR (Laboratoire d'Informatique Fondamentale et Appliquée de Rouen), and ABISS (Atelier Biologie Informatique Statistiques Sociolinguistique), Faculté des Sciences et des Techniques, U ...

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

Quantified Score

Hi-index 0.00

Visualization

Abstract

String matching is the problem of finding all the occurrences of a pattern in a text. We present a new method to compute the combinatorial shift function ("matching shift") of the well-known Boyer-Moore string matching algorithm. This method implies the computation of the length of the longest suffixes of the pattern ending at each position in this pattern. These values constituted an extra-preprocessing for a variant of the Boyer-Moore algorithm designed by Apostolico and Giancarlo. We give here a new presentation of this algorithm that avoids extra preprocessing together with a tight bound of 1.5n character comparisons (where n is the length of the text).