# A Survey Paper On Exact And Hybrid String Matching Algorithms

1689 Words7 Pages
A Survey Paper on Exact and Hybrid String Matching Algorithms Mohit Gupta UFID 90991438 Abstract and Introduction A string matching algorithm takes an input pattern and matches it against a given text. The algorithm aligns the pattern with the beginning of the text and keeps shifting the pattern forward until a match is found or end of the text is reached. String matching has a variety of applications like intrusion detection systems, information security, detecting plagiarism, bioinformatics, pattern matching and text mining. The general approach of string matching is dependent on the type of technique that is being used in the algorithm. Primitive algorithms use character for character matching whereas other some advanced algorithms…show more content…
To get near accurate results, the evaluations have been done in almost same conditions for all the algorithms. 1. Exact string matching algorithms 1.1 Classical methods: Classical string matching algorithms are based on character comparisons. 1.1.1 Brute-Force Algorithm: It simply performs character comparisons between the text and pattern. In case of a mismatch the index pointer moves by exactly one to the right. This algorithm is pretty slow and takes Θ(mn) time to find the given pattern in the text. 1.1.2 KMP (Knuth Morris Pratt) Algorithm (1977): This algorithm searches for occurrences of the pattern in a text from left to right by using that observation that when a mismatch occurs what is the max value of index by which we can shift the window, so as to avoid unnecessary comparisons and speeding up the process a little. The index of the sliding window’s farthest end is always incremented. The time complexity of this algorithm comes out to be linear in the sum of the lengths of the search pattern i.e. Θ(m+n) and since we can have the assumption that |m| << |n|, we can simply write the time complexity as Θ(n). Another popular algorithm in the exact string matching category is the BM algorithm. 1.1.3 Boyer-Moore(BM) Algorithm (1977): Considered as the best algorithm for single pattern matching. BM matches the pattern suffix from right to