Re: data structure for strings

From: Mike N. Christoff <killallspammers_mchristoff_at_sympatico.ca>
Date: 2000/07/24
Message-ID: <ysOe5.11552$Gh.124576_at_news20.bellglobal.com>#1/1


I would not consider the storage requirements of the AC algorithm to be too large by any means - unless you are writing your code for an embedded system.

l8r, mike

Marc Tardif <intmktg_at_Gloria.CAM.ORG> wrote in message news:Pine.LNX.4.10.10007232050070.5828-100000_at_Gloria.CAM.ORG...
> If I have 130 words of up to 6 characters, in what kind of data structure
> can I store these words for quick string comparison? In other words, if I
> have an unknown word, I need to determine if it is like any of the 130
> words. This data structure does not need to be expandable, the list will
> always be the same 130 words.
>
> I thought of using the Aho-Corasick algorithm for multiple-pattern
> matching, but considering each trie entry takes about 20bytes (tree ptr,
> next, fail, label) and each tree node another 16bytes (trie ptr, left
> node, right node, balance), that ends-up taking far too much memory. Any
> other ideas would be much appreciated.
>
>
Received on Mon Jul 24 2000 - 00:00:00 CEST

Original text of this message