Knuth–Morris–Pratt algorithm: Difference between revisions

Content deleted Content added
Line 26:
}}</ref><ref>Knuth mentions this fact in the errata of his book ''Selected Papers on Design of Algorithms '' : {{quotation|I learned in 2012 that Yuri Matiyasevich had anticipated the linear-time pattern matching and pattern preprocessing algorithms of this paper, in the special case of a binary alphabet, already in 1969. He presented them as constructions for a Turing machine with a two-dimensional working memory.}}</ref> got in 1969 a similar algorithm, coded by a two-dimensional Turing machine, by studying a string pattern matching recognition problem.
 
==Background==
==Background==
A string matching algorithm wants to find the starting index <code>m</code> in string <code>S[]</code> that matches the search word <code>W[]</code>.