Correctness and Efficiency of the Pattern Matching Algorithms

Abstract A few lines pattern matching algorithm is obtained by using the correctness proof of programs as a tool to the design of efficient algorithms. The new algorithm is obtained from a brute force algorithm by three refinement steps. The first step leads to the algorithm of Knuth, Morris, and Pratt that performs 2n character comparisons in the worst case and (1 + α)n comparisons in the average case (0

[1]  Zvi Galil,et al.  Saving Space in Fast String-Matching , 1980, SIAM J. Comput..

[2]  Leonidas J. Guibas,et al.  A new proof of the linearity of the Boyer-Moore string searching algorithm , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[3]  Robert S. Boyer,et al.  A fast string searching algorithm , 1977, CACM.

[4]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[5]  L. Colussi,et al.  Recursion As an Effective Step in Program Development , 1984, TOPL.

[6]  C. A. R. Hoare,et al.  An Axiomatic Definition of the Programming Language PASCAL , 1973, Acta Informatica.

[7]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .