首页 | 本学科首页   官方微博 | 高级检索  
     

改进的多模式匹配算法
引用本文:王永成,沈州,许一震.改进的多模式匹配算法[J].计算机研究与发展,2002,39(1):55-60.
作者姓名:王永成  沈州  许一震
作者单位:上海交通大学计算机科学与工程系,上海,200030
基金项目:国家“八六三”高技术研究发展计划基金资助 (863 -3 0 6-ZD0 3 -0 4-1)
摘    要:在有限自动机的多模式匹配算法(DFSA算法)的基础上,结合Quick Search算法的优点,提出了一个快速的多模式字符串匹配算法,之后在算法中以连续跳跃的思想,给出了另一个更加有效的改进,在一般情况下,这两个算法不需要匹配目标文本串中的每个字符,并充分利用了匹配过程是本次匹配不成功的信息,跳过尽可能多的字符,在模式串较长和较短的情况下,算法都有很好的性能,实验表明,在模式串较短时,所提出的算法需要的匹配时间仅为DFSA算法的1/2到1/5,在模式串较长时,所需时间为DFSA算法的1/3至1/7。

关 键 词:算法复杂度  多模式匹配算法  有限自动机  计算机

IMPROVED ALGORITHMS FOR MATCHING MULTIPLE PATTERNS
WANG Yong Cheng,SHEN Zhou,and XU Yi Zhen.IMPROVED ALGORITHMS FOR MATCHING MULTIPLE PATTERNS[J].Journal of Computer Research and Development,2002,39(1):55-60.
Authors:WANG Yong Cheng  SHEN Zhou  and XU Yi Zhen
Abstract:Combined with the advantages of the Quick Search algorithm, a faster algorithm to perform multiple patterns match in a string is put forward on the basis of deterministic finite state automata (DFSA). Another algorithm is presented with the improvement of the idea of the QS algorithm, and it can match more efficiently. Generally, the two algorithms do not need inspect every character of the string. They skip as many characters as possible by making full use of information in matching failure. The proposed algorithms achieve excellent performance in the cases of both short patterns and long patterns. The actual experiments show that in case of short patterns the time it takes for a proposed algorithm to search a string is only 1/2~1/5 that of the DFSA, while in case of long patterns the ratio is 1/3~1/7.
Keywords:pattern match  string  finite state automata  multiple pattern match  computational complexity  information retrieval  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号