Simple optimal string matching algorithm - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Journal of Algorithms in Cognition, Informatics and Logic Année : 2000

Simple optimal string matching algorithm

Mathieu Raffinot
  • Fonction : Auteur
  • PersonId : 844841

Résumé

We present a new string matching algorithm optimal on average (with equiprobability and independence of letters, in O(m + n log(\Sigma\) m/m), where n is the size of the text and m the size of the starched word, both taken on an alphabet Sigma) and linear in the worst case (in O(m + n)). Of all the algorithms that verify these two complexities. ours is the: simplest since it uses only a single structure, a suffix automaton, Moreover. its preprocessing phase is linearly dynamical; i.e., it is possible to search the words p(1), then p(1) p(2), p(1) p(2)p(3),,,., p(1) p(2)p(3).,. p(i) with O(Sigma\p(i)\) total preprocessing time, Among the algorithms that verify this property (for instance, the Knuth-Morris-Pratt algorithm) our algorithm is the only one to be optimal on average. (C) 2000 Academic Press.

Dates et versions

hal-00693770 , version 1 (02-05-2012)

Identifiants

Citer

Cyril Allauzen, Mathieu Raffinot. Simple optimal string matching algorithm. Journal of Algorithms in Cognition, Informatics and Logic, 2000, 36 (1), pp.102--116. ⟨10.1006/jagm.2000.1087⟩. ⟨hal-00693770⟩
69 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More