文件名称:kmp

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • [PDF]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 56kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 李*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

问题:串的模式匹配算法---KMP

方法:从主串S中寻找模式串T出现的位置。

基本思想:从主串S的第1个字符起和模式串T的第一个字符比较,若相等,则继续逐个比较后续字符;否则从主串的下一个字符再重新和模式的字符比较;依此类推,直到在主串S中找到模式串T的全部字符相匹配为止,这时匹配成功,否则匹配不成功;KMP算法可以在O(n+m)的时间数量级上完成串的模式匹配操作。其改进在于:每当一趟匹配过程中出现字符比较不等时,不需回溯i指针,而得利用已经得到的“部分匹配”的结果将模式向右滑动尽可能远的一段距离后,继续比较。-The problem: string pattern matching algorithm--- KMP method: to find the position of the pattern string T from the main string S. Basic idea: from a character from the main string S and the first character of the mode string T if equal, continue to compare apples to apples Subsequent characters Otherwise, the next character from the main string and re-mode character comparisons and so on, until all of the characters of the pattern string T found in the main string S match, whereupon the matching is successful, otherwise the match is unsuccessful KMP algorithm can be completed in the level of O (n+m) the amount of time the pattern of the string matching operation. The improvement comprising: varying character comparisons, do not need to backtrack to the i pointer has been " partial match" results, derived from the use of sliding mode right as far a distance as possible whenever the trip matching process, continue comparison.
(系统自动生成,下载前可以参看下载内容)

下载文件列表





kmp.pdf

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org