Re: (Unsure where to post)
From: Colin Percival (cperciva_at_sfu.ca)
Date: 12/10/04
- Next message: Nicholas King: "Re: (Unsure where to post)"
- Previous message: |-|erc: "Re: Poll: Are PCs Turing Machines?"
- In reply to: atomx: "(Unsure where to post)"
- Next in thread: Nicholas King: "Re: (Unsure where to post)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 9 Dec 2004 23:11:34 +0000 (UTC)
atomx <prothe113@yahoo.com> wrote:
> What is an efficient algorithm for searching a large string (a block of
> memory that's 10-20mb in size) for a varying number of strings, each of
> which is of varying length and may contain zero or more "don't-care"
> characters at any position? The alphabet is large (256 -- searching
> for bytes) and the contents of the pattern and the search text are both
> fairly evenly distributed across the alphabet. The "don't-care"
> characters are fixed-length -- each one will match one and only one
> symbol. Patterns are long-ish (between 30 and 150 bytes each).
How many don't-care symbols do you have in a typical pattern? If
it's small, start with a filtering stage which takes the longest
don't-care-free substring of each pattern and searches for those
within the text.
Colin Percival
- Next message: Nicholas King: "Re: (Unsure where to post)"
- Previous message: |-|erc: "Re: Poll: Are PCs Turing Machines?"
- In reply to: atomx: "(Unsure where to post)"
- Next in thread: Nicholas King: "Re: (Unsure where to post)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|