|国家预印本平台
首页|一种新的串模式匹配算法

一种新的串模式匹配算法

New Algorithm of Pattern Matching

中文摘要英文摘要

模式的匹配算法一直是计算机搜索领域的研究的重点工程。本文首先分析了传统的蛮力字符串匹配和增强型的Boyer-Moore算法,并提出了一种新的匹配算法。该算法 首先在文本T中查找模式串P的首字母和尾字母,要求对应的长度相同,每找到一个则将它在文本中的位置存储在R数组中,然后依次提取这些位置,从这些位置开始继续匹配模式串P。对于频繁使用的要匹配的文本和模式串来说,由于预先保存了模式串在文本中的所有存储位置,所以匹配速度会非常快。本文用具体的数据给出了测试的结果,分析了该算法的时间复杂度。

Pattern matching algorithm has been research in the field of computer search for a key project. This paper analyzes the traditional brute force string matching algorithm and enhanced the Boyer-Moore algorithm, and proposed a new matching algorithm. The algorithm to find patterns in the text string T P and the end of the first letter of letters, corresponding to the length of the same requirements, which will each find a place in the text is stored in the R array, followed by extraction of these positions, from these locations begin to match the pattern string P. For the frequently used text and pattern to match string, because the pattern stored in advance in the text string in all stored, so the match will be very fast speed. In this paper, the specific data given the results, analyze the time complexity of the algorithm.

韩雷钧、张凯

计算技术、计算机技术

模式匹配算法时间复杂度

Pattern MatchingAlgorithmTime complexity

韩雷钧,张凯.一种新的串模式匹配算法[EB/OL].(2010-10-12)[2025-08-02].http://www.paper.edu.cn/releasepaper/content/201010-125.点此复制

评论