Fast Pattern Matching in Strings

An algorithm is presented which finds all occurrences of one given string within another, in running time proportional to the sum of the lengths of the strings. The constant of proportionality is low enough to make this algorithm of practical use, and the procedure can also be extended to deal with some more general pattern-matching problems. A theoretical application of the algorithm shows that the set of concatenations of even palindromes, i.e., the language $\{\alpha \alpha ^R\}^*$, can be recognized in linear time. Other algorithms which run even faster on the average are also considered.

[1]  A. Markoff Sur une question de Jean Bernoulli , 1881 .

[2]  Edgar N. Gilbert,et al.  Synchronization of binary messages , 1960, IRE Trans. Inf. Theory.

[3]  H. Wilf,et al.  Uniqueness theorems for periodic functions , 1965 .

[4]  Donald E. Knuth,et al.  On the Translation of Languages from Left to Right , 1965, Inf. Control..

[5]  Malcolm C. Harrison,et al.  Implementation of the substring test by hashing , 1971, CACM.

[6]  Stephen A. Cook,et al.  Linear Time Simulation of Deterministic Two-Way Pushdown Automata , 1971, IFIP Congress.

[7]  Arnold L. Rosenberg,et al.  Rapid identification of repeated patterns in strings, trees and arrays , 1972, STOC.

[8]  白井 良明 MITのArtificial Intelligence Laboratory , 1973 .

[9]  Peter Weiner,et al.  Linear Pattern Matching Algorithms , 1973, SWAT.

[10]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[11]  M. Fischer,et al.  STRING-MATCHING AND OTHER PRODUCTS , 1974 .

[12]  Donald E. Knuth,et al.  Structured Programming with go to Statements , 1974, CSUR.

[13]  Glenn K. Manacher,et al.  A New Linear-Time ``On-Line'' Algorithm for Finding the Smallest Initial Palindrome of a String , 1975, JACM.

[14]  Zvi Galil On converting on-line algorithms into real-time and on real-time algorithms for string-matching and palindrome recognition , 1975, SIGA.

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

[16]  Underwood Dudley Elementary Number Theory , 1978 .