A Very Fast String Search Algorithm
-
Graphical Abstract
-
Abstract
A very fast algorithm to perform pattern matching in strings was described. The proposed match algorithm combines the advantages of Karp-Rabin's algorithm and Boyer-Moore's algorithm. Instead of checking at each position of the text if the pattern occurs, it is only to check the resemblance between the contents of the string and the pattern by using a hashing function and can skips as many characters as possible. In the cases of short patterns its time complexity can theoretically reach O(n) even in the worst cases. In actual experiments, the time it takes to search a string is about 1/10 of the time KR algorithm takes.
-
-