首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 234 毫秒
1.
在分析Boyer-Moore(BM)算法的基础上,提出了BM算法的一个新的变形。其基本思想是在算法的预处理阶段,对扩展模式串Pa建立好后缀规则,其中:P是模式串,a是字母表中的任一字符,既加大了已匹配后缀的长度,同时隐含了Sunday算法的坏字符规则,从而获得更大的窗口跳跃距离。理论分析证明,该算法具有线性最差时间复杂度和亚线性平均时间复杂度,空间复杂度为O(m(σ+1))。实验结果表明,该算法的实际性能与BM算法相比有明显改善,尤其适合小字母表的情形。  相似文献   

2.
归泳昆 《计算机科学》2008,35(3):264-266
最长公共子串(LCS)和最长递增子串(LIS)是两个非常经典的基础算法问题,并且在生物信息学中已有重要应用.2006年,Brodal等人提出了最长公共弱递增字串问题(LCWIS),并且给出了2字符字母表上线性时间算法和3字符字母表上O(nlogn)时间的算法.本文中,我们提出了一种新的在3字符字母表上寻找最长公共弱递增子串(LC-WIS)的算法.该算法利用了两个成熟的数据结构:约束堆(Bounded heap)和van Emde Boas树.我们算法的时间复杂度是O(nloglogn),空间复杂度为0(n),两者都是目前为止最优的.  相似文献   

3.
对BM串匹配算法的一个改进   总被引:9,自引:0,他引:9  
在对著名的Boyer-Moore串匹配算法进行分析后,对BM算法中的尝试位置移动处理部分进行改进,提出了IBM算法,该算法将好后缀移动与坏字符移动合并进行处理,从而尽量利用已有信息进行更大的尝试位置移动,使算法具有更高的效率,对IBM算法进行复杂度分析,对BM算法、KMP算法和IBM算法进行实际性能比较,结果表明IBM算法的平均运行时间明显优于BM算法与KMP算法。  相似文献   

4.
韩光辉  曾诚 《计算机应用》2013,33(8):2379-2382
建立BM算法中函数shift及其构造算法的严格的形式理论,对于BM算法及其各种变形的研究与改进是十分必要的。给出了shift的一个清晰的形式定义,引入模式串后缀的特征集及其最小值函数,通过特征集描述了shift的构造,从而严格建立了shift及其构造算法的理论基础。根据shift的构造定理与最小值函数的迭代计算方法,给出了shift的一个新的构造算法,证明了该算法具有线性的时间与空间复杂度。理论分析和计算结果表明,该算法比已有算法更简单,计算复杂度更低,因而更适合硬件实现。  相似文献   

5.
网络入侵检测系统的效率取决于模式匹配算法选择.分析了目前网络上常用的BM算法及其不足,提出了一种更高效的改进算法.该算法利用模式串自身的特点,能有效地减少字符重复比较的次数,并利用位置移动表代替BM算法中的好后缀和坏字符移动表,提高了算法的匹配效率.实验结果表明,改进的模式匹配算法能够有效提高网络入侵检测系统的检测速度...  相似文献   

6.
入侵检测系统中BM算法的改进   总被引:1,自引:0,他引:1  
随着网络安全问题的日益突出,入侵检测技术也成为当前研究的热点,模式匹配算法是入侵检测系统(IDS)中一种重要算法,直接影响剑系统的准确性和实时性.在研究BM算法和分析现有改进算法的基础上,提出了一种新的改进算法.该算法利用了末字符和下一个字符在模式串中首次出现的位置、存在性、唯一性的判断来增加模式串移动距离,利用记录因子记录上次匹配过程中的匹配后缀来减少比较次数,从而有效地加快模式匹配的速度,提高入侵检测的效率.  相似文献   

7.
王锋 《福建电脑》2010,26(7):77-79
串匹配算法在数字通信等方面应用广泛,BM算法是主要的串匹配算法之一。文章在分析了BM算法过程和一些现有的改进算法,对这些算法进行了比较,并结合BMG算法,提出了一个新的改进算法。该算法考虑了模式匹配时出现重复字符时,比较的前一个字符的出现情况以及模式串首字符的特性,提高了模式串移动m+1位的概率,提高了匹配速度。  相似文献   

8.
基于组合策略的单模式串精确匹配算法   总被引:1,自引:0,他引:1  
以仅使用后缀有限自动机的RF算法作为参照对象,对采用组合策略的LDM、ILDM1、ILDM2等算法时间复杂度进行了比较研究。实验表明,LDM和ILDM1算法的时间复杂度要差于RF算法,即组合策略是失效的。实验还发现,ILDM2算法中把模式前缀长度R是否超过模式长度m的1/ 2作为正向有限自动机暂停匹配的条件,对于中小字母表的模式串的匹配也不是最佳策略。  相似文献   

9.
针对基于后缀WM匹配算法中的字符重复匹配问题,给出了相应的改进算法.该算法针对扫描阶段确定的与模式串前缀、后缀和前m个字符的后缀都相同的文本串字符块,在匹配阶段跳过文本串字符块中已经确定的字符块,避免了对已经确定的字符块的重复匹配,减少匹配开销.实验结果表明,相对于原始算法,改进算法降低了系统匹配的运行时间,提高了系统运行的效率.  相似文献   

10.
经典字符串匹配算法的本质都是从左向右或者从右向左顺序进行字符匹配的,在主串中存在大量子串与模式串前缀或者后缀相同时效率较低,并且模式串最大右移长度为模式串长度。改进算法采用二分匹配字符串的方法,有效地避免了由主串中大量子串与模式串前缀相同或者后缀相同引起的无意义比较次数。模式串的移动距离根据改进的坏字符规则进行计算,增大了模式串的移动距离。实验结果表明,改进的字符串匹配算法可以有效地减少字符串的匹配次数和移动次数,达到了提高算法效率的目的。  相似文献   

11.
This paper considers a single machine capacitated lot-sizing and scheduling problem. The problem is to determine the lot sizes and the sequence of lots while satisfying the demand requirements and the machine capacity in each period of a planning horizon. In particular, we consider sequence-dependent setup costs that depend on the type of the lot just completed and on the lot to be processed. The setup state preservation, i.e., the setup state at the end of a period is carried over to the next period, is also considered. The objective is to minimize the sum of setup and inventory holding costs over the planning horizon. Due to the complexity of the problem, we suggest a two-stage heuristic in which an initial solution is obtained and then it is improved using a backward and forward improvement method that incorporates various priority rules to select the items to be moved. Computational tests were done on randomly generated test instances and the results show that the two-stage heuristic outperforms the best existing algorithm significantly. Also, the heuristics with better priority rule combinations were used to solve case instances and much improvement is reported over the conventional method as well as the best existing algorithm.  相似文献   

12.
CAN is a heuristic algorithm that employs an information theoretic measure to learn rules. CAN approach distinguishes itself from other approaches by being direct, meaning that there are no intermediate representations, an induced rule is never altered in later stages and only tests that appear in the final solution are generated. In the selection of rule conditions (tests) existing rule induction algorithms do not provide a satisfactory answer to the partitioning of the feature space of discrete feature variables with nonordered qualitative values (i.e., categorical attributes) for multiclass problems. Existing algorithms have exponential complexity in N, where N is the number of feature values. Therefore, heuristic algorithms are employed at this step. An important contribution of this paper is to show that in test selection within CAN framework optimal partitions are achieved in linear time in N for the multiclass case.  相似文献   

13.
QoS路由的DCLC单播路由(Delay-Constrained Least-Cost Unicast Routing)问题属于NP-完全问题。本文提出一种多项式复杂度的分布式启发算法DCLC-DSF。DCLC-DSF基于简单的选择函数,每个网络结点只需维持本地的状态信息:相邻链路的延时和代价度量。该算法有以下优点:1)简单性;2)动态性;3)重路由功能;4)协商功能。在最坏情况下,DCLC-DSF的消息复杂度为O(e^2),结点的计算复杂度为O(n^2);在稳定的网络环境下,消息复杂度为O(e)。此外,本文还给出DCLC-DSF算法有限状态机模型。仿真实验表明:DCLC-DSF算法的平均代价不精确度是最佳算法的5-8%,证明它是一种简单、精确、健壮的的启发式算法。  相似文献   

14.
Scheduling DAGs to multiprocessors is one of the key issues in high-performance computing. Most realistic scheduling algorithms are heuristic and heuristic algorithms often have room for improvement. The quality of a scheduling algorithm can be effectively improved by a local search. In this paper, we present a fast local search algorithm based on topological ordering. This is a compaction algorithm that can effectively reduce the schedule length produced by any DAG Scheduling algorithm. Thus, it can improve the quality of existing DAG scheduling algorithms. This algorithm can quickly determine the optimal search direction. Thus, it is of low complexity and extremely fast  相似文献   

15.
一种改进的BM模式匹配算法   总被引:1,自引:0,他引:1       下载免费PDF全文
刘沛骞  冯晶晶 《计算机工程》2011,37(17):248-249
针对BM模式匹配算法的效率问题,提出其改进算法.分析BM模式匹配算法的原理,若文本串中连续的几个字符不在模式字符串中出现,则不需要被比对,以此改变模式字符串的匹配顺序,提高算法的匹配效率.实验结果表明,改进的BM模式匹配算法可以有效地减少字符串的匹配次数和比对次数,能获得良好的字符串匹配效率.  相似文献   

16.
分析了BF,KMP,BM模式匹配算法,在此算法的基础上提出了一种改进的模式匹配算法(FBM),该算法的思想是时BM 算法中滑动距离函数dist右移模式距离大小进行改进,并且定义了两个新的滑动距离函数,在不同的条件下,分别调用不同的滑动距离函数,更好地拉制模式匹配过程.实验结果表明,该算法比BF,KMP和BM算法显著减少...  相似文献   

17.
基于IMOM和IBOHM启发式策略的扩展规则算法   总被引:1,自引:1,他引:0  
李莹  孙吉贵  吴瑕  朱兴军 《软件学报》2009,20(6):1521-1527
基于扩展规则的方法是一种定理证明方法.在IER(improved extension rule)扩展规则算法的基础上,提出了IMOM(improved maximum occurrences on clauses of maximum size)和IBOHM(improved BOHM)启发式策略,并将两种启发式策略用于IER算法中,有指导性地选择限定搜索空间的子句,设计并实现了算法IMOMH_IER和IBOHMH_IER.实验结果表明,由于这两种启发式策略能够选择较为合适的搜索空间,可以尽快地判定出原问  相似文献   

18.
In this paper we consider two questions. First we consider whether every pattern language which is regular can be generated by a regular pattern. We show that this is indeed the case for extended (erasing) pattern languages if alphabet size is at least four. In all other cases, we show that there are patterns generating a regular language which cannot be generated by a regular pattern. Next we consider whether there are pattern languages which are context-free but not regular. We show that, for alphabet size 2 and 3, there are both erasing and non-erasing pattern languages which are context-free but not regular. On the other hand, for alphabet size at least 4, every erasing pattern language which is context-free is also regular. It is open at present whether there exist non-erasing pattern languages which are context-free but not regular for alphabet size at least 4.  相似文献   

19.
本文尝试用改进的蚁群算法(IACA)求解热精轧机组负荷分配优化问题.首先,建立负荷分配优化的目标函数和约束条件.为了避免蚁群算法(ACS)在加速收敛中出现停滞现象,IACA通过局部和全局信息素浓度更新、引入约束条件的蚂蚁视觉启发函数和基于轧制理论的智力启发函数对状态转移规则进行改进计算;为了保证算法在迭代后期能够收敛,IACA动态更新状态转移规则中的阈值常数和局部信息素浓度挥发系数.基于实际生产数据的仿真结果表明,IACA能够按照目标函数的要求进行合理的负荷分配,且解的性能优于经验值;与其他优化算法比较,IACA具有较快的求解速度和较高的求解精度.  相似文献   

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

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