Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
162 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

A fast implementation of the good-suffix array for the Boyer-Moore string matching algorithm (2402.16469v1)

Published 26 Feb 2024 in cs.DS

Abstract: String matching is the problem of finding all the occurrences of a pattern in a text. It has been intensively studied and the Boyer-Moore string matching algorithm is probably one of the most famous solution to this problem. This algorithm uses two precomputed shift tables called the good-suffix table and the bad-character table. The good-suffix table is tricky to compute in linear time. Text book solutions perform redundant operations. Here we present a fast implementation for this good-suffix table based on a tight analysis of the pattern. Experimental results show two versions of this new implementation are the fastest in almost all tested situations.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (12)
  1. A. Apostolico and R. Giancarlo. The Boyer–Moore–Galil string searching strategies revisited. SIAM J. Comput., 15(1):98–105, 1986.
  2. A fast string searching algorithm. Commun. ACM, 20(10):762–772, 1977.
  3. C. Charras and T. Lecroq. Handbook of exact string matching algorithms. King’s College Publications, 2004.
  4. Algorithms on strings. Cambridge University Press, 2007.
  5. S. Faro and T. Lecroq. The Exact String Matching Problem: a Comprehensive Experimental Evaluation. Report arXiv:1012.2547, 2010.
  6. S. Faro and T. Lecroq. The exact online string matching problem: a review of the most recent results. ACM Computing Surveys, 45(2):13, 2013.
  7. Z. Galil. On improving the worst case running time of the Boyer–Moore string searching algorithm. Commun. ACM, 22(9):505–508, 1979.
  8. R. N. Horspool. Practical fast searching in strings. Software – Practice & Experience, 10(6):501–506, 1980.
  9. A. Hume and D. M. Sunday. Fast string searching. Software – Practice & Experience, 21(11):1221–1248, 1991.
  10. Fast pattern matching in strings. SIAM J. Comput., 6(1):323–350, 1977.
  11. T. Lecroq. A variation on the Boyer-Moore algorithm. Theoretical Computer Science, 92(1):119–144, 1992.
  12. W. Rytter. A correct preprocessing algorithm for Boyer–Moore string searching. SIAM J. Comput., 9(3):509–512, 1980.

Summary

We haven't generated a summary for this paper yet.