Hostname: page-component-5db58dd55d-xnzfm Total loading time: 0 Render date: 2026-07-09T04:39:48.380Z Has data issue: false hasContentIssue false

Fast circular dictionary-matching algorithm

Published online by Cambridge University Press:  11 May 2015

TANVER ATHAR
Affiliation:
Department of Informatics, King's College London, London, UK
CARL BARTON
Affiliation:
Department of Informatics, King's College London, London, UK
WIDMER BLAND
Affiliation:
Department of Computing and Software, McMaster University, Hamilton, Canada
JIA GAO
Affiliation:
Department of Informatics, King's College London, London, UK
COSTAS S. ILIOPOULOS
Affiliation:
Department of Informatics, King's College London, London, UK
CHANG LIU
Affiliation:
Department of Informatics, King's College London, London, UK
SOLON P. PISSIS
Affiliation:
Department of Informatics, King's College London, London, UK
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Circular string matching is a problem which naturally arises in many contexts. It consists in finding all occurrences of the rotations of a pattern of length m in a text of length n. There exist optimal worst- and average-case algorithms for circular string matching. Here, we present a suboptimal average-case algorithm for circular string matching requiring time $\mathcal{O}$ (n) and space $\mathcal{O}$ (m). The importance of our contribution is underlined by the fact that the proposed algorithm can be easily adapted to deal with circular dictionary matching. In particular, we show how the circular dictionary-matching problem can be solved in average-case time $\mathcal{O}$ (n + M) and space $\mathcal{O}$ (M), where M is the total length of the dictionary patterns, assuming that the shortest pattern is sufficiently long. Moreover, the presented average-case algorithms and other worst-case approaches were also implemented. Experimental results, using real and synthetic data, demonstrate that the implementation of the presented algorithms can accelerate the computations by more than a factor of two compared to the corresponding implementation of other approaches.

Information

Type
Paper
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/3.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
Copyright © Cambridge University Press 2015