Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
10.55041/IJSREM23183
Volume:
7 |
6 |
Jun 2023
Pages:
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
String matching is a problem with many appli-cations, ranging from simple text processing to complicated bioinformatics and plagiarism detection. This paper surveys four of the string matching algorithms most commonly in use for string matching: Naive, Rabin-Karp, Knuth-MorrisPratt (KMP), and Boyer-Moore. Each of these algorithms uses a different approach to a solution of the described problem. Some algorithms have distinct advantages and difficulties regarding time and space complexity and practical performance. The naive algorithm is easy to understand but very inefficient for large texts since its time complexity is O(m*n). Rabin-Karp uses hashing in an attempt to speed this up and has an averagecase time complexity of O(m + n) but can be slow as O(m * n) if hash collisions continually happen. The KMP algorithm develops this further through preprocessing of the pattern to get a constant time complexity of O(m + n) and hence make it very suitable for single-pattern searches. Further optimization is done in the Boyer-Moore algorithm; it scans the pattern from right to left, skips parts of the text, hence achieving the best cases of O(m + n) with worst cases rarely going to O(m * n). This survey makes a deep analysis and comparative study on these algorithms, focusing on theoretical Aspects, practical implementations, and performance metrics to give an all-rounded insight into these algorithms. Conclusions from the survey will help choose the best-fit algorithm for an application given a scenario so that the best performance could be achieved considering any string matching scenario.
KEYWORDS
Publication Date
11/26/2024
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
9
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...