|
|
|
Boyer Moore Algorithm : Pattern Matching
|
The Boyer-Moore algorithm is considered as the most efficient string-matching algorithm in usual applications.The algorithm scans the characters of the pattern from right to left beginning with the rightmost one. In case of a mismatch (or a complete match of the whole pattern) it uses two precomputed functions to shift the window to the right. These two shift functions are called the good-suffix shift (also called matching shift and the bad-character shift (also called the occurrence shift).
created by syam1224 on 2008-04-21 16:43:07
|
|
|
|
Boyer-Moore String Matching algorithm

The algorithm of Boyer and Moore [BM 77] compares the pattern with the text from right to left. If the text symbol that is compared with the rightmost pattern symbol does not occur in the pattern at all, then the pattern can be shifted by m positions behind this text symbol. The following example illustrates this situation.
http://www.iti.fh-flensburg.de/lang/algorithmen/pa
created by syam1224 on 2008-04-22 00:24:07
|
|
Boyer–Moore string search algorithm from Wikipedia

The Boyer–Moore string search algorithm is a particularly efficient string searching algorithm, and it has been the standard benchmark for the practical string search literature.[1] It was developed by Bob Boyer and J Strother Moore in 1977.
http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_s
created by syam1224 on 2008-04-21 23:04:59
|
|
Boyer-Moore algorithm

* performs the comparisons from right to left;
* preprocessing phase in O(m+sigma) time and space complexity;
* searching phase in O(mn) time complexity;
* 3n text character comparisons in the worst case when searching for a non periodic pattern;
* O(n / m) best performance.
http://igm.univ-mlv.fr/~lecroq/string/node14.html#
created by syam1224 on 2008-04-21 16:51:41
|
|
|