We present a simple and very efficient algorithm for string matching based on the combination of weak factor recognition and hashing. Despite its quadratic worst-case running time, our algorithm exhibits a sublinear behaviour. We also propose some practical improvements of our algorithm and a variant with a linear worst- case time complexity. Experimental results show that, in most cases, some of the variants of our algorithm obtain the best running times when compared, under various conditions, against the most effective algorithms present in the literature. For instance, in the case of small alphabets and long patterns, the gain in running time is up to 18%. This makes our proposed algorithm one of the most flexible solutions in practical cases.
Cantone D., Faro S., Pavone A. (2019). Linear and efficient string matching algorithms based on weak factor recognition. ACM JOURNAL OF EXPERIMENTAL ALGORITHMICS, 24(1), 1-20 [10.1145/3301295].
Linear and efficient string matching algorithms based on weak factor recognition
Pavone A.
2019-02-14
Abstract
We present a simple and very efficient algorithm for string matching based on the combination of weak factor recognition and hashing. Despite its quadratic worst-case running time, our algorithm exhibits a sublinear behaviour. We also propose some practical improvements of our algorithm and a variant with a linear worst- case time complexity. Experimental results show that, in most cases, some of the variants of our algorithm obtain the best running times when compared, under various conditions, against the most effective algorithms present in the literature. For instance, in the case of small alphabets and long patterns, the gain in running time is up to 18%. This makes our proposed algorithm one of the most flexible solutions in practical cases.File | Dimensione | Formato | |
---|---|---|---|
Pubblicazione 2019 - ACMJEA.pdf
Solo gestori archvio
Tipologia:
Versione Editoriale
Dimensione
479.24 kB
Formato
Adobe PDF
|
479.24 kB | Adobe PDF | Visualizza/Apri Richiedi una copia |
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.