网站大量收购独家精品文档,联系QQ:2885784924

Reverse Colussi algorithm反向Colussi演算法.ppt

  1. 1、本文档共56页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 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

文档评论(0)

cai + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档