Content deleted Content added
m →References: WP:CHECKWIKI error fixes - Replaced endash with hyphen in sortkey per WP:MCSTJR using AWB (9100) |
Skip redirect from Boyer-Moore string search algorithm to Boyer–Moore string search algorithm (hyphen-minus versus en dash) |
||
Line 1:
In [[computer science]], the '''Apostolico–Giancarlo algorithm''' is a variant of the [[
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 <math>P</math> in <math>T</math> requires that all <math>n</math> characters of <math>P</math> 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 <math>O(n m)</math> where <math>m</math> is the length in characters of <math>T</math>. Apostolico-Giancarlo speeds this up by recording the number of characters matched at the alignments of <math>T</math> in a table, which is combined with data gathered during the pre-processing of <math>P</math> to avoid redundant equality checking for sequences of characters that are known to match.
|