Re: divide & conquer algorithm to implement string matching
- From: Logan Shaw <lshaw-usenet@xxxxxxxxxxxxx>
- Date: Wed, 30 May 2007 01:09:45 -0500
misterio wrote:
I'm trying to find a divide & conquer algorithm to implement a string
matching program that can find occurrences of a string like "0110" in
a string like "01101011001100110110".Does anybody has any idea?
Any match that exists must have a starting position at which the match
occurs. Graphically, the set of possible starting positions in your example
would be this:
01101011001100110110
ABCDEFGHIJKLMNOPQ
Positions A-Q are all the possible starting positions. You can
break this into subproblems on the basis of starting positions.
That is, by taking subsets of the set of possible starting positions.
For example, A-I and J-Q are two subsets. You could work on each
subset independently and then merge together the results.
As others have mentioned, this is not likely to gain you much
computational efficiency, though.
- Logan
.
- 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
- divide & conquer algorithm to implement string matching
- Prev by Date: Re: Schools working to overhaul the art of computer programming (TheColumbian)
- Next by Date: Re: Algorithm to extract lines of a tab with the max value for a given reference number
- 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
|