A New Efficient Hybrid String Matching Algorithm to Solve the Exact String Matching Problem
Sinan Sameer Mahmood Al-Dabbagh *
Department of Software Engineering and Information Technology, Al-Mansour University College, Baghdad, Iraq.
Nawaf Hazim Barnouti
Al-Mansour University College, Baghdad, Iraq
*Author to whom correspondence should be addressed.
Abstract
The string matching algorithms are considered one of the most studied in the computer science field because the fundamental role they play in many different applications such as information retrieval, editors, security applications, firewall, and biological applications. This study aims to introduce a new hybrid algorithm based on two well-known algorithms, namely, the modified Horspool and SSABS hybrid algorithms. Two factors used to analyze the proposed algorithm which is the total number of character comparisons and total number of attempts. The ABSBMH algorithm which is the name chosen for the proposed hybrid algorithm was tested on different types of standard datatype. The ABSBMH algorithm shows less number of character comparisons when compared to the results of other algorithms, while show almost no big different in the results of number of attempts this is due to the proposed hybrid algorithm preprocessing phase based on SSABS algorithm which is the same preprocessing phase of the Quick Search algorithm, so for all these reasons the results of the ABSBMH and other algorithms in terms of total number of attempts have been shown a small different, this is because it use different pattern lengths which are selected randomly from the databases. The experiential results expose that performance of the hybrid algorithm influenced by the type of the dataset used, the DNA sequence shows the worst result, while the English text datatype show the best results in terms of total number of character comparisons.
Keywords: String matching algorithm, ABSBMH algorithm, pattern matching, exact string matching, SSABS algorithm, horspool algorithm, quick search algorithm, hybrid string matching