Abstract:It was assumed that the pattern and text characters are independent and uniformly distributed over a finite alphabet in classical string matching algorithms, and this assumption differs from real applications and causes many problems. Considering the probability distributions, the contexts of the characters, and the convenience of applications, this paper gives a concept hit rate and four extended concepts about it. Then it gives the theory analysis and detailed experiments with hit rate on the four classical algorithms. The map of the relationships is obtained between the hit rate and the algorithms’ performance, and at the same time some valuable conclusions are made through above work. As a character variable, hit rate describes the relativity of patterns and text and can serve as guidelines in the algorithms design, analysis and some other extended research fields of the string matching.