Robin-Karp Algorithm & Boyer-Moore Algorithm

Read Complete Research Material



Robin-Karp algorithm & Boyer-Moore Algorithm

Robin-Karp algorithm & Boyer-Moore Algorithm

Rabin-Karp algorithm

The core aim of the algorithm of Rabin-Karp was to determine a pattern which involves a substring within a text with the usage of hashing. It has been observed that this algorithm is of considerable theoretical importance and is also considered very important for multiple pattern matching. In addition to this, it is also observed that this algorithm is not used for single pattern matching. For instance in the text of m and n length patter, the running time of the algorithm in this case is n, but the worst performance is found to be in the nm case. On the other hand, this algorithm possesses a significant benefit of being capable of finding any string of k or less than k time on average basis, regardless of the size.

For instance, a student is found writing an English paper on the topic of Moby Dick. In this case, a teacher could be in apposition to find some relevant material about Moby Dick and extract a list of words or sentences in the paper written by the student. The Rabin-Karp algorithm possess an ability to search through a special role throughout the list of the words and sentences found in the materials extracted from the source (Akepogu, 2011). This algorithm also possesses the ability of avoiding thwarting with some minor changes within the system. It is also noted that the searching for single string algorithms could be impractical because of the number of strings that are being searched for.

A very important objective of the Rabin-Karp algorithm is to increase the speed of the test pattern, rather than the pursuance of a more sophisticated jump. It has been observed that a hash function is considered to be a function that is capable of converting each function to a numeric value, which is also known as a hash value. A significant point is also exploited by the Rabin-Karp algorithm that if there is equality in the two strings, then their value of those strings would also be equal. It is considered by a number of people that all that is required to be done is the computation of a hash value of the substring that is being searched for, and then searching for a substring having a similar hash value.

It has been researched that there are two problems that exist in this algorithm. Firstly, the same number needs to be assigned to few strings because of so many different strings to keep the evaluates of the mixture small. On the other hand, it should be verified that the algorithm could take a long time for long substrings. It is also observed that a longer time would not be taken in most reasonable inputs by keeping the average search good. The important concept of the performance of the Rabin-Karp algorithm is the efficient and correct computation of that values involved in the mixing of the substrings that occur in continuation within the ...