登录
首页 » Windows核心 » BM 算法是一个较优的模式匹配算法。一般,如果不考虑模式串的长度,一个具有时间复杂度O(n)的算法应该是最优的了,但是事实不是如此。BM算法可以实现更高效率的模...

BM 算法是一个较优的模式匹配算法。一般,如果不考虑模式串的长度,一个具有时间复杂度O(n)的算法应该是最优的了,但是事实不是如此。BM算法可以实现更高效率的模...

于 2023-01-27 发布 文件大小:1.48 kB
0 56
下载积分: 2 下载次数: 2

代码说明:

BM 算法是一个较优的模式匹配算法。一般,如果不考虑模式串的长度,一个具有时间复杂度O(n)的算法应该是最优的了,但是事实不是如此。BM算法可以实现更高效率的模式匹配。分析和实验说明,BM匹配算法对于那些字符集比较大,而模式串中出现的字符比较少的时候,工作效率最快。而且,考虑KMP匹配方式的优化,可以结合KMP匹配和BM匹配,进一步提高效率。 -BM algorithm is a better pattern matching algorithm. General, if we do not consider the length of pattern, a time complexity O (n) algorithm should be optimal, but the fact is not the case. BM algorithm can achieve higher efficiency of pattern matching. Analysis and experiments, BM-matching algorithm for those relatively large character set, and the mode string of characters appearing in less time, the efficiency of the fastest. Moreover, consider the KMP matching optimization, you can match the combination of KMP and BM match, and further improve efficiency.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696522资源总数
  • 104029会员总数
  • 31今日下载