Research and Analysis of QSP Algorithm
DOI:
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    BM algorithm is a classical single pattern matching algorithm. QS algorithm is an improved algorithm of BM algorithm. Because computing the moving distance to right position only by analyzing the character T[j+m], the overall matching efficiency of QS is not high. Therefore, an improved algorithm(QSP) accordingly to the QS algorithm is proposed. The core idea of QSP algorithm is finding all characters that appear more than once in the pattern string from left to right, calculating the jumping expectation difference value of these characters, getting the highest expectation difference value and maxPos value that is the position of it in the preprocessing phase, and changing the value of skipp2 array. During the matching phase, in order to move the pointer farthest at each time, it firstly considers the relationship between P[maxPos] and T[j+maxPos], then moves to right by using the skipp1 and skipp2 arrays. The experimental result shows that the comparison number and matching time of QSP are less than QS. Its efficiency has been improved obviously.

    Reference
    Related
    Cited by
Get Citation

李莉,江育娥,林劼.针对QSP算法的研究与分析.计算机系统应用,2016,25(3):28-33

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:June 19,2015
  • Revised:August 17,2015
  • Adopted:
  • Online: March 17,2016
  • Published:
Article QR Code
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-3
Address:4# South Fourth Street, Zhongguancun,Haidian, Beijing,Postal Code:100190
Phone:010-62661041 Fax: Email:csa (a) iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063