# The string search algorithm by Knuth, Morris and Pratt

 Title: The string search algorithm by Knuth, Morris and Pratt Authors: Fabian Hellauer (hellauer /at/ in /dot/ tum /dot/ de) and Peter Lammich Submission date: 2017-12-18 Abstract: The Knuth-Morris-Pratt algorithm is often used to show that the problem of finding a string s in a text t can be solved deterministically in O(|s| + |t|) time. We use the Isabelle Refinement Framework to formulate and verify the algorithm. Via refinement, we apply some optimisations and finally use the Sepref tool to obtain executable code in Imperative/HOL. BibTeX: @article{Knuth_Morris_Pratt-AFP, author = {Fabian Hellauer and Peter Lammich}, title = {The string search algorithm by Knuth, Morris and Pratt}, journal = {Archive of Formal Proofs}, month = dec, year = 2017, note = {\url{https://isa-afp.org/entries/Knuth_Morris_Pratt.html}, Formal proof development}, ISSN = {2150-914x}, } License: BSD License Status: [ok] This is a development version of this entry. It might change over time and is not stable. Please refer to release versions for citations.