Re: the lowest number of comparisons in string matching
- From: "laura" <laura.brandusan@xxxxxxxxx>
- Date: 24 Sep 2006 15:35:51 -0700
Hi,
Which is the number of comparisons in the worst case?
thanks,
laura
Tor Myklebust wrote:
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:
- Re: the lowest number of comparisons in string matching
- From: Tor Myklebust
- Re: the lowest number of comparisons in string matching
- References:
- the lowest number of comparisons in string matching
- From: laura
- Re: the lowest number of comparisons in string matching
- From: Tim Peters
- Re: the lowest number of comparisons in string matching
- From: Tor Myklebust
- the lowest number of comparisons in string matching
- Prev by Date: Re: On the complexity of determining whether n numbers are distinct
- 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
|