| 注册

一种高效的模式串匹配算法

赵晓 何立风 王鑫 姚斌 巢宇燕 王亚妮

陕西科技大学学报(自然科学版)2017,Vol.35Issue(1):183-187,5.
陕西科技大学学报(自然科学版)2017,Vol.35Issue(1):183-187,5.

一种高效的模式串匹配算法

An efficient pattern matching algorithm for string searching

赵晓 1何立风 1王鑫 1姚斌 1巢宇燕 2王亚妮1

作者信息

  • 1. 陕西科技大学 电气与信息工程学院,陕西 西安 710021
  • 2. 日本名古屋产业大学 环境商务信息学院,爱知县 尾张旭市 488-8711
  • 折叠

摘要

Abstract

According to the analysis of the famous BM algorithm and the Horspool algorithm, we propose a simple and efficient pattern matching algorithm for string searching.When a mismatch happens,for shifting the pattern to the right,the shift amount in the Horspool al-gorithm is computed by using the rightmost character of the current text substring to the bad-character strategy.In comparison,the shift amount of our algorithm is the maximum one among all the shift amounts computed by using each of the already-matched characters.The maximum shift amount for each mismatch position of the pattern can be pre-computed by u-sing the pattern only.Experimental results demonstrated that our algorithm can obtain a lar-ger shift amount for a mismatch,and thus enhanced the efficiency of pattern matching for string searching.

关键词

模式匹配/字符串匹配/BM算法/Horspool算法

Key words

pattern matching/string searching/BM algorithm/Horspool algorithm

分类

信息技术与安全科学

引用本文复制引用

赵晓,何立风,王鑫,姚斌,巢宇燕,王亚妮..一种高效的模式串匹配算法[J].陕西科技大学学报(自然科学版),2017,35(1):183-187,5.

基金项目

国家自然科学基金项目(61601271,61471227,61603234);陕西省科技厅科技计划项目(2016SF-444);陕西省教育厅自然科学专项科研计划项目 ()

陕西科技大学学报(自然科学版)

OACSTPCD

2096-398X

访问量0
|
下载量0
段落导航相关论文