A Fast Improved Algorithm for Pattern Matching in String
Jian Zhang · Microelectronics & Computer · 2007
On the basis of BM algorithm and some important improvement algorithms, a new improved algorithm- BMG is presented. This algorithm combines the merits of BMH and BMHS.At the same time, the uniqueness of next character is taken into account. This algorithm greatly enhances the probability of occurrence of the largest right Goodsuffix m+1, thus improves the matching speed effectively. BMG algorithm passed test and proves to be valid. The test results shows that the algorithm has better performance than BM, BMH, BMHS algorithm.