• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science

Previous Articles     Next Articles

An online pattern matchingsolving algorithm
 under the nonoverlapping condition
 

WU You-xi,WANG Bo,GAO Xue-dong   

  1. (School of Artificial Intelligence,Hebei University of Technology,Tianjin 300401,China)
  • Received:2019-04-18 Revised:2019-06-25 Online:2019-12-25 Published:2019-12-25

Abstract:

Pattern matching under the nonoverlapping condition is one of many pattern matching algorithms for gap constraint problems.Although it is proved that pattern matching under the nonoverlapping condition is a polynomial time complexity problem and an effective solving algorithm is proposed, the current solving algorithm adopts offline calculation, which has the disadvantage of high spatial complexity.In order to solve this problem, this paper designs an online solving algorithm. The algorithm reads the sequence string and finds the root-leaf path in the flow net tree that meets the constraint conditions, which realizes fast pruning of useless nodes and thus speeds up the matching speed.Compared with the spatial complexity of the offline algorithm, the spatial complexity of the online algorithm is O(m×maxlen×W), where m, maxlen, and W represent the pattern string length, the maximum pattern length constraint and the maximum gap constraint, respectively.Experimental results not only verify the completeness of our proposed algorithm, but also demonstrate that it consumes less memory than the existing algorithm.

Key words: pattern matching, gap constraint, nonoverlapping condition, online algorithm, Nettree