摘要
分析了几种模式匹配算法,通过对BM模式匹配算法的研究,提出一种基于BM模式匹配算法的改进思路。改进算法通过对模式串的预处理提高匹配跳跃的步长,从时间和空间复杂度分析,该改进算法提高了模式匹配的效率,实验证明模式字符串的重复率越低的情况下可以大大提高匹配的效率。
Based on the study of BF, KMP and BM algorithm, BM algorithm is analyzed. To increase the speed of algorithm,the shift position that has matched partially in BM algorithm is improved. A new shift distance function is added based on the old one, and marked the most of known information to increase the shift distance so that it is more efficient. In the end, by citing specific examples an analysis of the BM algorithm that is modified is carded out. The results show that the BM algorithm that is modified is quicker and more efficient.
出处
《后勤工程学院学报》
2008年第1期54-57,共4页
Journal of Logistical Engineering University