期刊文献+

带记忆的Boyer-Moore型模式匹配算法及其复杂性分析

A Boyer-Moore Type String Matching Algorithm with Memory and Its Computational Complexity
下载PDF
导出
摘要 通过构建前缀匹配自动机,使得每轮匹配后下个匹配窗口的文本总是保持左端部分为模式的一个前缀、右端部分全为未比较过的字符的形式.对于与此相应的模式匹配算法,已证明文本内的每个字符在整个匹配过程中最多被比较一次,从而字符总比较次数不超过n,已达到任意算法最坏情况下字符总比较次数的最小值.另外,在适当条件下还从理论上证明了此算法的亚线性(即字符总比较次数小于cn,其中常数c<1).根据实验结果,算法的实际运行速度快于Boyer-Moore算法. A new string matching automata was constructed. The automata had the advantage that each of the matching windows always kept the uniform form in which the left part in this window was a prefix of the pattern and the characters of the right part were not compared. It has been proved that each of the characters in the text is compared once at most and thus the total compared number in the matching process is less than or equal to the length n of the text. It is minimum in the upper bounds of the total compared numbers of the string matching algorithms in the worst case. When the pattern P is not quasi-cyclic,it has been proved that this algorithm is sublinear, Experiments have shown that the running speed of the algorithm is faster than the BoyerMoore algorithm.
作者 刘晓华
出处 《湖南大学学报(自然科学版)》 EI CAS CSCD 北大核心 2008年第1期84-88,共5页 Journal of Hunan University:Natural Sciences
关键词 模式匹配 BOYER-MOORE算法 自动机 计算复杂性 string matching Boyer-Moore algorithm suffix tree computational complexity
  • 相关文献

参考文献9

  • 1COLE R. Tight bounds on the complexity of the Boyer-Moore string matching algorithm [J ]. SIAM Journal on Computing, 1994, 23 (5) : 1075-1091.
  • 2KNUTH D E, MORRIS J, PRATT V. Fast pattern matching in strings[J]. SIAM Journal on Computing, 1973, 6:323 - 350.
  • 3GUIBAS L J, ODLYZKO A M. A new proof of the linearity of the Boyer-Moore string searching algorithm [J ]. SIAM Journal on Computing, 1980, 9(4) : 672 - 682.
  • 4APOSTOLICO A, GIANCARLO R. The Boyer-Moore-Galil string searching strategies revisited [J ]. SIAM Journal on Computing, 1986, 15(1):98- 105.
  • 5COLUSSI L, GALIL Z, GIANCARLO R. On the exact complexity of string matching [ C]//Proceedings of the Thirty First Annual IEEE Symposium on the Foundations of Computer Science, st. Louis, MO, 1990 : 135 - 143.
  • 6BOYER R, MOORE S. A fast string matching algorithm[J]. Communications of ACM, 1977,20:762 - 772.
  • 7GALIL Z. On improving the worst case running time of the Boyer-Moore string matching algorithm [ J ]. Communications of ACM, 1979, 22:505 - 508.
  • 8LECROQ T. A variation on the Boyer-Moore algorithm[J ]. The oretieal Computer Science, 1992,92( 1 ) : 119 - 144.
  • 9CROCHEMORE M, LECROQ T. Tight bounds on the Complexity of the Apostolico-Gincarlo algorithm[J ]. Information Processing Letters, 1997, 63(4): 195- 203.

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部