A Composite Boyer-Moore Algorithm for the String Matching Problem
Zhengda Xiong · 2010
The string matching problem has found wide application in computer science, molecular biology, genetic engineering, semantics and many other fields. In this paper, we give analysis to several classical algorithms, KMP, BM and their improvements. Then, by compositing the main method of the BM algorithm, we propose a new algorithm - the Composite BM algorithm (CBM). Differing from the BM algorithm that only uses current matching information, the CBM algorithm tries to take full advantage of the historical matching information. In this way, CBM accelerates the forward speed of the pattern during the matching, and hence the whole string matching process is speeded up effectively. Finally, for binary matching, we made random test to BM and CBM, the result shown the efficiency of CBM is higher than of BM.