Re: the lowest number of comparisons in string matching
- From: Tor Myklebust <tmyklebu@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Sep 2006 16:39:12 +0000 (UTC)
Tim Peters <tim.one@xxxxxxxxxxx> wrote:
[snip]
While it may not be immediately obvious, it's possible to construct an
essentially similar searcher for any pattern. Such constructions can be
found in any text covering finite automata and regular languages.
One can actually get away with fewer comparisons in the average case.
One technique for doing so is to read the pattern right-to-left as one
progresses through the text left-to-right --- see, for instance, the
Boyer-Moore algorithm and the modification due to Apostolico and
Giancarlo. (I seem to remember a paper, possibly by Rytter, in which a
sublinear lower bound and a slightly worse, but still sublinear,
algorithm for doing string matching were discussed. Again, everything
in the average case, since improving the worst-case behaviour is
hopeless.)
Tor Myklebust
.
- Follow-Ups:
- References:
- the lowest number of comparisons in string matching
- From: laura
- Re: the lowest number of comparisons in string matching
- From: Tim Peters
- the lowest number of comparisons in string matching
- Prev by Date: Re: (Probably flawed) Polynomial time Graph Isomorphism
- Next by Date: Re: An algorithm with Minimum vertex cover without considering its performance
- Previous by thread: Re: the lowest number of comparisons in string matching
- Next by thread: Re: the lowest number of comparisons in string matching
- Index(es):
Relevant Pages
|