Research and Improvement of a Pattern Matching Algorithm Based on BNDM - Zhou, Yansen; Shi, Fengyuan (2019 IEEE 5th International Conference on Computer and Communications (ICCC), 2019)
The improvement of the time performance of a pattern matching algorithm mainly lies in reducing the number of character comparisons and increasing the distance of text string matching window moving to the right when mismatch occurs. To solve these problems, an improved algorithm based on the combination of word frequency, BNDM and BMHS2 is proposed. Firstly, in order to reduce the number of character comparisons in each matching window, a matching algorithm based on word frequency is introduced; Secondly, in order to improve the moving distance of matching window, BMHS2 and BNDM algorithms are introduced. when mismatch occurs, the matching window is moved to the right by using a large jump distance in BNDM and BMHS2 algorithms. Finally, the time performance of the three algorithms is tested and compared by multiple experiments. Experimental results show that the improved pattern matching algorithm I_BNDM_BMHS2 improves the matching time performance to some extent compared with BNDM and BMHS2 algorithms under the same experimental conditions.