An improvement of the franek-jennings-smyth pattern matching algorithm

Research output: Chapter in Book/Report/Conference proceedingConference contribution

1 Citation (Scopus)

Abstract

In this paper, we propose a new pattern matching algorithm based on the Franek-Jennings-Smyth (FJS) algorithm. The FJS algorithm is a hybrid of the Knuth- Morris-Pratt (KMP) and the Sunday algorithms. The worst case time complexity of the KMP algorithm is linear time and the Sunday algorithm is quadratic time. However, the Sunday algorithm is faster than the KMP algorithm in practice. Inheriting the virtues of those algorithms, the FJS algorithm runs in linear time in the worst case and fast in practice. We improve the FJS algorithm by further taking an idea inspired by the Quite-Naive algorithm by Cantone and Faro. The experimental results show that our algorithm is faster than the FJS algorithm in general except when a pattern is extremely short.

Original languageEnglish
Title of host publicationProceedings of the Prague Stringology Conference, PSC 2019
EditorsJan Holub, Jan Zdarek
PublisherPrague Stringology Club
Pages56-68
Number of pages13
ISBN (Electronic)9788001066188
Publication statusPublished - 2019 Jan 1
Event23rd Prague Stringology Conference, PSC 2019 - Prague, Czech Republic
Duration: 2019 Aug 262019 Aug 28

Publication series

NameProceedings of the Prague Stringology Conference, PSC 2019

Conference

Conference23rd Prague Stringology Conference, PSC 2019
CountryCzech Republic
CityPrague
Period19/8/2619/8/28

Keywords

  • Exact pattern matching
  • Knuth-Morris-Pratt algorithm
  • Sunday algorithm

ASJC Scopus subject areas

  • Mathematics(all)

Fingerprint Dive into the research topics of 'An improvement of the franek-jennings-smyth pattern matching algorithm'. Together they form a unique fingerprint.

  • Cite this

    Kobayashi, S., Diptarama, H., Yoshinaka, R., & Shinohara, A. (2019). An improvement of the franek-jennings-smyth pattern matching algorithm. In J. Holub, & J. Zdarek (Eds.), Proceedings of the Prague Stringology Conference, PSC 2019 (pp. 56-68). (Proceedings of the Prague Stringology Conference, PSC 2019). Prague Stringology Club.