Re: divide & conquer algorithm to implement string matching
- From: misterio <giagimari@xxxxxxxxx>
- Date: 30 May 2007 07:44:00 -0700
It should be noted that this approach is extremely unfruitful!Let n be
the lenght of the main string and m the lenght of the pattern to
search on the main string.This algorithm has a time complexity of
O(O(m) * (n * O(m))),that is,if O(m) is proportional to O(n),this
gives an O(n^3) time complexity.A really really really bad algorithm.
P.S. The (n * O(m)) should be something like ((2n - 1) * O(m)), if I
consider to stop at partitions of 1 element and not 4,so I tried cut
some constant multiplicator,but it's irrelevant.
.
- Follow-Ups:
- Re: divide & conquer algorithm to implement string matching
- From: misterio
- Re: divide & conquer algorithm to implement string matching
- References:
- divide & conquer algorithm to implement string matching
- From: misterio
- Re: divide & conquer algorithm to implement string matching
- From: Logan Shaw
- Re: divide & conquer algorithm to implement string matching
- From: misterio
- Re: divide & conquer algorithm to implement string matching
- From: misterio
- divide & conquer algorithm to implement string matching
- Prev by Date: Re: divide & conquer algorithm to implement string matching
- Next by Date: Re: divide & conquer algorithm to implement string matching
- Previous by thread: Re: divide & conquer algorithm to implement string matching
- Next by thread: Re: divide & conquer algorithm to implement string matching
- Index(es):
Relevant Pages
|