首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 171 毫秒
1.
一种时间复杂度最优的精确串匹配算法   总被引:14,自引:2,他引:12  
现有的串匹配算法通常以模式长度作为滑动窗口大小.在窗口移动后,往往会丢弃掉一些已扫描正文的信息.提出了LDM(linear DAWG matching)串匹配算法,该算法将正文分为[n/m]个相互重叠、大小为2m-1的扫描窗口.在每个扫描窗口内,算法批量地尝试m个可能位置,首先使用反向后缀自动机从窗口中间位置向前扫描模式前缀;若成功,则再使用正向有限状态自动机从中间位置向后扫描剩余的模式后缀.分析证明,LDM算法的最差、最好、平均时间复杂度分别达到了理论最好结果:O(n),O(n/m),O(n(1ogσm)/m).实际性能测试也验证了平均时间复杂度最优这一理论结果.而且,对于在较大字母表下查找短模式的情况,LDM算法速度在被测试算法中最快.总之,LDM算法不但适合进行离线模式匹配,而且还特别适合需要进行在线高速匹配的应用.  相似文献   

2.
一种有效的字符串有序跳跃模式近似匹配算法   总被引:1,自引:0,他引:1  
字符串的模式匹配问题是计算机科学的基本问题之一,而近似模式匹配更是近期的研究热点。本文分析了文本分析领域中出现的一种特殊的近似模式匹配问题,即字符串有序跳跃模式近似匹配问题,提出了一种基于有限自动机的组件组合分析算法。算法的特点在于将组件匹配过程与组配过程进行分离,这样既降低了问题的复杂度,又可以实现按策略组配的灵活性。组件匹配过程中利用有限自动机对跳跃模式的组件进行匹配查找;组件的组配过程中先对查找到的组件进行组合分析,然后再对各种组合进行初步筛选和基于策略的优选。初步筛选工作是依据顺序性、唯一性和最大数三条原则进行;而优选工作是根据四个设计的评价参数选择其中最佳组合。实验结果表明,该算法的确能解决字符串有序跳跃模式匹配问题,完全可以适用于句型匹配与主题词跳词匹配。  相似文献   

3.
一种基于反向有限自动机的多模式匹配算法   总被引:1,自引:1,他引:0       下载免费PDF全文
在基于有限自动机的多模式匹配算法DFSA的基础上,结合改进的BM单模式匹配算法的优点,提出一种快速的多模式字符串匹配算法。在一般情况下,该算法不需要匹配目标文本串的每个字符,能充分利用匹配过程中本次匹配不成功的信息和已成功的信息,跳过尽可能多的字符。实验表明,模式串较短时,该算法需要的时间约为DFSA的1/2,模式串较长时,所需时间约为DFSA算法的1/3。  相似文献   

4.
基于有序二叉树的多模式匹配算法   总被引:4,自引:0,他引:4  
一、简介在一个文本串中查找用户指定的模式串在信息抽取和文本编辑中有着广泛的应用。当前,有限状态自动机(DFSA)算法是解决多模式匹配问题的常用方法。DFSA算法在匹配前对模式串集合进行预处理,转换成树型有限状态自动机,然后只需对文本串进行一次扫描就可找出所有模式串,其查找时间复杂度是O(n)。后来,在这个算法的基础上又有一些改进,实现了跳跃式查找。基于树型结构的有限自动机特别适  相似文献   

5.
改进的多模式匹配算法   总被引:29,自引:2,他引:29  
在有限自动机的多模式匹配算法(DFSA算法)的基础上,结合Quick Search算法的优点,提出了一个快速的多模式字符串匹配算法,之后在算法中以连续跳跃的思想,给出了另一个更加有效的改进,在一般情况下,这两个算法不需要匹配目标文本串中的每个字符,并充分利用了匹配过程是本次匹配不成功的信息,跳过尽可能多的字符,在模式串较长和较短的情况下,算法都有很好的性能,实验表明,在模式串较短时,所提出的算法需要的匹配时间仅为DFSA算法的1/2到1/5,在模式串较长时,所需时间为DFSA算法的1/3至1/7。  相似文献   

6.
一种基于有限自动机的快速串匹配算法   总被引:1,自引:1,他引:0  
串匹配是字符串的基本操作之一,因此为它设计一个高效算法具有一定意义.文中基于有限自动机理论,在对经典的K.M.P.算法进行分析的基础上,提出了一种快速的串匹配算法.该算法利用自动机的状态转换表实现串匹配,避免了扫描字符串时的失败链回溯,从而加快了算法的运行速度.理论分析与实验结果均表明,在正文串比较长,模式串中局部匹配失败时失败链反馈较多的情况下,该算法在速度上明显优于K.M.P.算法.但在空间复杂度上,该算法需要较多的存储空间.  相似文献   

7.
基于自动机的多模式匹配算法是网络内容过滤与业务监管的核心技术之一,但随着模式集合的扩大,对存储资源消耗过大。为降低当前匹配算法的空间复杂度,同时保持较低的时间复杂度,提出了一种基于关键字预处理和状态编码的优化方法。关键字预处理用于过滤冗杂内容,大大降低了处理复杂度;而采用状态编码消除了NFA中的大量failure转移,可有效降低其开销。理论分析和实验仿真表明,相对于传统的基于TCAM的匹配算法,该算法在大大减少内存需求的情况下,实现了模式的高效匹配。  相似文献   

8.
陈新驰  韩建民  贾泂 《计算机工程》2012,38(11):173-176
Aho-Corasick自动机算法在模式匹配失配时,需要多次回溯才转移到有效的后继状态。为此,提出一种快速多模式匹配算法。该算法为每个状态建立失配时的后继指针,在模式匹配失配时,可以通过失配后继指针快速找到有效后继状态,从而避免Aho-Corasick自动机失配时的过多回溯,提高匹配效率。算法在自动机建立时采用动态规划的方法,为每个状态建立匹配长度和匹配量等信息,在模式匹配过程中,基于这些信息统计模式串在主串中的重复次数、最早出现模式串位置等信息。实验结果表明,该算法匹配精确、效率高,且支持在线操作。  相似文献   

9.
入侵检测系统(IDS)需要根据每个模式串的权值,计算给定主串的总权值并反馈给报警系统。传统的模式匹配算法在计算主串权值时效率低。为此,文中在Aho—Corasick算法的基础上,提出了带权模式匹配算法(WPM)及其改进算法(WPME)。算法优化了自动机的建立过程,对自动机每个节点的失配后继指针信息和匹配量信息进行预处理,从而避免了模式匹配阶段在计算主串权值时的回溯操作,降低了算法的时间复杂度。实验表明,改进后的算法具有效率高、匹配精确的特点。  相似文献   

10.
在积自动机基础上,利用互模拟关系引出商自动机,用以解决积自动机的状态组合爆炸问题。进而提出一个自然的测试语言包含的算法,这种算法的空间复杂度与规范自动机的状态目呈指数关系即O(2^k),其中K是规范自动机的状态数目。  相似文献   

11.
更快速的高阶细胞自动机超并行数据压缩方法   总被引:1,自引:0,他引:1  
构造出高阶置换映射,进而得出更有效的高阶细胞自动机超并行数据压缩方法,在不增加细胞自动机总体结构复杂性的情况下,比文献「1」中并行压缩方法的处理速度可以成倍地提高。证明了用遗传进化算法得到的高阶细胞自动机元胞级无失真数据压缩规则的正确性和可行性,讨论了有关的时间复杂性及高阶数据压缩方法的有效性。  相似文献   

12.
Theapproximate string matching problem is, given a text string, a pattern string, and an integerk, to find in the text all approximate occurrences of the pattern. An approximate occurrence means a substring of the text with edit distance at mostk from the pattern. We give a newO(kn) algorithm for this problem, wheren is the length of the text. The algorithm is based on the suffix automaton with failure transitions and on the diagonalwise monotonicity of the edit distance table. Some experiments showing that the algorithm has a small overhead are reported.  相似文献   

13.
For a given weighted finite automaton over a strong bimonoid we construct its reduced Nerode automaton, which is crisp-deterministic and equivalent to the original weighted automaton with respect to the initial algebra semantics. We show that the reduced Nerode automaton is even smaller than the Nerode automaton, which was previously used in determinization related to this semantics. We determine necessary and sufficient conditions under which the reduced Nerode automaton is finite and provide an efficient algorithm which computes the reduced Nerode automaton whenever it is finite. In determinization of weighted finite automata over semirings and fuzzy finite automata over lattice-ordered monoids this algorithm gives smaller crisp-deterministic automata than any other known determinization algorithm.  相似文献   

14.
基于遗传进化的元胞级并行无失真数据压缩方法   总被引:5,自引:1,他引:4  
帅典勋  顾静 《计算机学报》1999,22(8):797-803
利用一阶和二阶细胞自动机,进行元胞级并行无失真数据压缩,细胞自动机中的数据压缩规则由遗传进化算法得到,构造相应的全局置的置换映射,分别证明了一阶和二阶细胞自动机文本压缩规则的正确性。讨论阴关的时间复杂性及符号动力学特性。  相似文献   

15.
一种改进的区域自动机构造方法   总被引:2,自引:0,他引:2  
用时间自动机验证一个有穷状态实时系统的正确性,可归结为判定两个时间正则语言的包含问题,亦可归结为判定两个时间正则语言的交是否为空的问题。在判定一个时间正则语言是否为空时,先要将时间自动机转化为无时间的区域自动机。Alur和Dill给出的构造区域自动机的算法,存在许多不可达或虽可达但无用的状态。通过对时钟约束进行分析,在求时钟区域和时间后继的过程中,不断地将一些不可达或无用状态筛掉,使构造出的区域自动机更为优化,改进了Alur等人给出的算法。  相似文献   

16.
The notion of Boyer-Moore automaton was introduced by Knuth, Morris, and Pratt in their historical paper on fast pattern matching. It leads to an algorithm that requires more preprocessing but is more efficient than the original Boyer-Moore's algorithm. We formalize the notion of Boyer-Moore automaton and we give an efficient building algorithm. Also, bounds on the number of states are presented, and the concept of potential of a transition is introduced to improve the worst-and average-case behavior of these machines. We show that looking at the rightmost unknown character, as suggested by Knuthet al., is not necessarily optimal.R. A. Baeza-Yates gratefully acknowledges the support of Grant C-11001 from Fundación Andes, and C. Choffrut gratefully acknowledges the support of the PRC Mathématiques et Informatique.  相似文献   

17.
A characterization of a cyclic check experiment for a reduced connected finite group automaton is found relative to the class of all the reduced connected finite group automata. On this basis, an algorithm for construction of a cyclic check experiment is proposed. Exact estimates of the multiplicity and minimum length of such an experiment are found. __________ Translated from Kibernetika i Sistemnyi Analiz, No. 3, pp. 32–46, May–June 2005.  相似文献   

18.
We present two new techniques for regular expression searching and use them to derive faster practical algorithms. Based on the specific properties of Glushkov’s nondeterministic finite automaton construction algorithm, we show how to encode a deterministic finite automaton (DFA) using O(m2m) bits, where m is the number of characters, excluding operator symbols, in the regular expression. This compares favorably against the worst case of O(m2m|Σ|) bits needed by a classical DFA representation (where Σ is the alphabet) and O(m22m) bits needed by the Wu and Manber approach implemented in Agrep. We also present a new way to search for regular expressions, which is able to skip text characters. The idea is to determine the minimum length ℓ of a string matching the regular expression, manipulate the original automaton so that it recognizes all the reverse prefixes of length up to ℓ of the strings originally accepted, and use it to skip text characters as done for exact string matching in previous work. We combine these techniques into two algorithms, one able and one unable to skip text characters. The algorithms are simple to implement, and our experiments show that they permit fast searching for regular expressions, normally faster than any existing algorithm.  相似文献   

19.
Systems of induced generating actions of automaton permutations groups on words of length r are investigated. A family of irreducible systems of generators is constructed, and the cardinality of such systems is found to be related with r. The infinite generativity (even in the topological sense) of groups of all automaton permutations, finite automaton permutations, and finitary automaton permutations is established; the well-known proof of this fact contained an error. Translated from Kibernetika i Sistemnyi Analiz, No. 3, pp. 121–133, May–June, 2000.  相似文献   

20.
串匹配算法中的自动机紧缩存储技术   总被引:1,自引:1,他引:0  
自动机是串匹配算法中常用的数据结构,对自动机实现紧缩存储可以节省算法空间。总结常用自动机紧缩存储方法,分析其原理、时间效率、空间效率和优缺点,给出各种方法与数据稀疏性之间的关系。运用紧缩存储方法实现基本AC算法,对随机数据和真实数据的实验结果证明该算法有效。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

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