串匹配的一种算法
A String Matching Algorithm
-
摘要: 本文提出一种合理的分割模式的方式,模式被分割后再将模式的各部分分别与正文进行匹配的算法。该算法的平均特性为O(m·10g2 n),其中m为模式中字符的个数,n为正文中字符的个数。本算法对在正文中多次寻找不同模式的匹配较为适用。Abstract: Let m be the number of characters in the pattern, and let n be the number of characters in the text. The expected complexity of the algoritm presented in this paper is O (mlog:n). The main idea of the algorithm is a reasonable cutting pattern. Every part of the pattern is matched with the text after cutting pattern The olgorithm fits the match for finding repeatedly different pattern in the text.
下载: