一种KMP算法中求nextval数组的改进算法

An Improved Algorithm to Computing Nextval Array in KMP Method

  • 摘要: KMP算法是一经典的模式匹配算法,有着广泛的应用.实现该算法的关键是计算模式的next或nextval数组值.本文针对计算nextval数组传统算法难于求解的问题,提出了一种基于next数组来计算其nex-tval数组的改进方法.实验结果表明该方法能有效地提高计算效率,且易于求解.

     

    Abstract: KMP is a classical matching algorithm and widely applied.Computing the schemas' next or nextval array is the key to execute the algorithm.Because of the difficulty of calculating nextvla array,an improved algorithm to computing nextval array was proposed based on the next array.Experimental results show that this method can improve compute efficiency and is easy to be solved.

     

/

返回文章
返回