Metraipolis › archive › dc_1772436377ec
Apostolico–Giancarlo algorithm — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_algorithm
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-11-09T17:14:21.435Z
- SHA-256 of the archived text
d4aa49235992e86bb4bc73d34362e9adb4441da5ede4639ba12ec337279ef915- Stable URL of this page
https://metraipolis.com/documento/dc_1772436377ec
How to cite
Apostolico–Giancarlo algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_1772436377ec (Metraipolis archive dc_1772436377ec, sha256 d4aa49235992e86bb4bc73d34362e9adb4441da5ede4639ba12ec337279ef915)
BibTeX
@misc{dc1772436377ec,
title = {Apostolico–Giancarlo algorithm — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_algorithm},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_1772436377ec; sha256 d4aa49235992e86bb4bc73d34362e9adb4441da5ede4639ba12ec337279ef915},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
In computer science, the Apostolico–Giancarlo algorithm is a variant of the Boyer–Moore string-search algorithm, the basic application of which is searching for occurrences of a pattern P in a text T. As with other comparison-based string searches, this is done by aligning P to a certain index of T and checking whether a match occurs at that index. P is then shifted relative to T according to the rules of the Boyer–Moore algorithm, and the process repeats until the end of T has been reached. Application of the Boyer–Moore shift rules often results in large chunks of the text being skipped entirely. With regard to the shift operation, Apostolico–Giancarlo is exactly equivalent in functionality to Boyer–Moore. The utility of Apostolico–Giancarlo is to speed up the match-checking operation at any index. With Boyer–Moore, finding an occurrence of P in T requires that all n characters of P be explicitly matched. For certain patterns and texts, this is very inefficient – a simple example is when both pattern and text consist of the same repeated character, in which case Boyer–Moore runs in O(nm), where m is the length in characters of T. Apostolico–Giancarlo speeds this up by recording the number of characters matched at the alignments of T in a table, which is combined with data gathered during the pre-processing of P to avoid redundant equality checking for sequences of characters that are known to match. It can be seen as a generalization of the Galil rule. Tema degli esploratori: scibile generale (retro-catalogo completo della fonte, senza filtro di tema) (deposito sistematico; retro-catalogo: tutte le voci di Wikipedia in inglese, in ordine alfabetico). Fonte: Wikipedia in inglese, voce «Apostolico–Giancarlo algorithm» — https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_algorithm Wikidata Q4780701: «variante dell'algoritmo di ricerca di stringhe di Boyer-Moore» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q4780701 Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Apostolico%E2%80%93Giancarlo_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 1339972446, consultata il 2026-11-09T17:10:38.793Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 90846f1c55aa96bdabfe6bc14bc41b7c962a045673bffdad8655fcf9d6293ec3