- 1、本文档共56页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Reverse Colussi algorithm反向Colussi演算法.ppt
Reverse Colussi algorithm Fastest pattern matching in strings, Colussi, L. Journal of Algorithms, Vol. 16 , No. 2, 1994, pp.163-189 Advisor: Prof. R. C. T. Lee Speaker: Y. K. Shie The Reverse Colussi Algorithm is an algorithm which solves the string matching problem and it is in the spirit of the original Colussi Algorithm.. The Main Points of the Reverse Colussi Algorithm 1. It changes the bad character rule from matching one character to matching a pair of characters. Reverse Colussi algorithm divides the position into special position and non-special position. Special position allow smaller number of jump. The Reverse Colussi Algorithm processes the special position first. Note that the Colussi Algorithm does not consider all of the positions where the prefix function assumes value -1. That this can be done can be seen by the following fact: The position where prefix function assumes -1 allows the largest number of steps to shift. Thus the Colussi Algorithm examines all positions which allow smaller number of steps of shift which is a safe action. Ti is the ith character in T (1≦i≦n). Pj are the jth character in P (1≦j≦m). The bad character rule is like the Rule 2-1, Character Matching Rule. Rule 2-1: Character Matching Rule(A Special Version of Rule 2) For any character x in T, find the nearest x in P which is to the left of x in T. Implication of Rule 2-1 Case 1. If there is an x in P to the left of T, move P so that the two x’s match. Case 2: If no such an x exists in P, consider the partial window defined by x in T and the string to the left of it. rcBc table rcBc table rcBc table rcBc table rcBc table rcBc table Y is the last character of the windows of T. s is the length which we shift in last step. k is an integer. case 1: If we can find Pm-k-1=Y and Pm-k-s-1=Pm-s-1, we fill the minimal k into rcBc[Y, s]. case 2: If we can find Pm-k-1=Y and km-s-1, we fill the minimal k into rcBc[Y, s
您可能关注的文档
- 2012届高三地理高考复习方案(湘教版)课件:第6单元第20讲 城市空间结构与城市区位.ppt
- 【物流精选】物流ABC成本管理方法.ppt
- 高中语文 《规范议论文写作训练 》教学课件 新人教版必.ppt
- 第5章其 他输入设备.ppt
- 下载 - PowerPoint Presentation.ppt
- Cultural Factors - Wayne State University文化因素-韦恩州立大学.ppt
- [牛津中小学英语网]unit9 Merry Christmas 课时一前半.ppt
- Tundra Biome - Wikispaces:苔原生物群落- wiki空间.ppt
- Cross Cultural Communication - ICBC201 - home跨文化沟通icbc201回家.ppt
- 2012年高考、复习与学科能力:生物-2012名师一号(精品课件):基因指导蛋白质的合成及对性状的控制.ppt
文档评论(0)