The article analyzes the classical BM algorithm and an improved algorithm, and then it puts forward a new improved algorithm which called I_BM algorithm according to the characteristics of the string matching. The I_B...The article analyzes the classical BM algorithm and an improved algorithm, and then it puts forward a new improved algorithm which called I_BM algorithm according to the characteristics of the string matching. The I_BM algorithm determines the right distance according to the first character of the pattern string and the distance between the matching windows, so it fasts matching. The matching way of I_BM algorithm is from right to left. In order to verify the IBM algorithm' s performance, it does experiments on I_BM algorithm from two aspects of the matching times and the numbers of matching characters under the condition of the same text strings and pattem string. The experimental results show that I_BM algorithm is more quickly and more efficient because it reduces greatly the number of matching and character comparison for maximizing to skip the bad characters.展开更多
文摘The article analyzes the classical BM algorithm and an improved algorithm, and then it puts forward a new improved algorithm which called I_BM algorithm according to the characteristics of the string matching. The I_BM algorithm determines the right distance according to the first character of the pattern string and the distance between the matching windows, so it fasts matching. The matching way of I_BM algorithm is from right to left. In order to verify the IBM algorithm' s performance, it does experiments on I_BM algorithm from two aspects of the matching times and the numbers of matching characters under the condition of the same text strings and pattem string. The experimental results show that I_BM algorithm is more quickly and more efficient because it reduces greatly the number of matching and character comparison for maximizing to skip the bad characters.