### 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 language | English |
---|---|

Title of host publication | Proceedings of the Prague Stringology Conference, PSC 2019 |

Editors | Jan Holub, Jan Zdarek |

Publisher | Prague Stringology Club |

Pages | 56-68 |

Number of pages | 13 |

ISBN (Electronic) | 9788001066188 |

Publication status | Published - 2019 Jan 1 |

Event | 23rd Prague Stringology Conference, PSC 2019 - Prague, Czech Republic Duration: 2019 Aug 26 → 2019 Aug 28 |

### Publication series

Name | Proceedings of the Prague Stringology Conference, PSC 2019 |
---|

### Conference

Conference | 23rd Prague Stringology Conference, PSC 2019 |
---|---|

Country | Czech Republic |

City | Prague |

Period | 19/8/26 → 19/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

*Proceedings of the Prague Stringology Conference, PSC 2019*(pp. 56-68). (Proceedings of the Prague Stringology Conference, PSC 2019). Prague Stringology Club.