Metraipolis › archive › dc_74d0d5a8ebaf
Knuth–Morris–Pratt algorithm — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-07T13:03:52.017Z
- SHA-256 of the archived text
d0382a0f3a0853d89b0396dd0a76aadaf735ead723a9924c6716f6c331c8ac22- Stable URL of this page
https://metraipolis.com/documento/dc_74d0d5a8ebaf
How to cite
Knuth–Morris–Pratt algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_74d0d5a8ebaf (Metraipolis archive dc_74d0d5a8ebaf, sha256 d0382a0f3a0853d89b0396dd0a76aadaf735ead723a9924c6716f6c331c8ac22)
BibTeX
@misc{dc74d0d5a8ebaf,
title = {Knuth–Morris–Pratt algorithm — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_74d0d5a8ebaf; sha256 d0382a0f3a0853d89b0396dd0a76aadaf735ead723a9924c6716f6c331c8ac22},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
In computer science, the Knuth–Morris–Pratt algorithm (or KMP algorithm) is a string-searching algorithm that searches for occurrences of a "word" W within a main "text string" S by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters. The algorithm was conceived by James H. Morris and independently discovered by Donald Knuth "a few weeks later" from automata theory. Morris and Vaughan Pratt published a technical report in 1970. The three also published the algorithm jointly in 1977. Independently, in 1969, Matiyasevich discovered a similar algorithm, coded by a two-dimensional Turing machine, while studying a string-pattern-matching recognition problem over a binary alphabet. This was the first linear-time algorithm for string matching. Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; ricerca «algorithm»). Fonte: Wikipedia in inglese, voce «Knuth–Morris–Pratt algorithm» — https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm Wikidata Q45285 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q45285 Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm?action=history). Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza. Estratto dell'introduzione non modificato nel contenuto; revisione 1368295129, consultata il 2026-10-07T12:34:33.959Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: fd1c729273d5c4b12ef5666b810ffd16d724b328729e423240be8eb24b7fb329