Backtracking — where it appears
Named by 3 essays across 2 fields — each of them below, with the objects they name alongside it.
The shift the pattern already knows
On a text of 8,192 characters the naive scan examines 520,256 of them and Knuth–Morris–Pratt examines 16,321 — a factor of 32, and 16,321 is 99.6% of the 2n that no input can push it past. On ordinary random text the same two algorithms examine 20,862 and 20,833. Both measurements are of the same pair of algorithms and only one of them is the reason anybody uses the second.
The search that starts in the middle
The same pattern, the same six occurrences, the same index — and 830 interval extensions, or 303, according to which end the search begins at. A pattern cut into three pieces has an error-free one, and only a search with two ends can start there.
The folklore is about a matcher
Four million steps against three hundred and twenty-nine, on a twenty-character expression matched against twenty characters. One of the two machines doubles with every character of the input and the other does not, and only one of them is what a regular expression is.
Named alongside it
The objects these essays reach for when they reach for this one.
AlphabetAlphabet sizeAmortised analysisApproximate matchingAutomatonBidirectional indexCharacter comparisonConstant factorError budgetExponential timeFailure functionFilter