Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading the ADFA search algorithm

Status
Not open for further replies.

stormbind

Technical User
Mar 6, 2003
1,165
GB
In my random readings, I came across something by the name of "Acyclic Deterministic Finite Automaton" search algorithm which is apparently more scalable than BST.

But this is all I know :(

The most promising paper on the subject requires a subscription, so I am hoping someone here will have example code in Java.

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
Found these :


In fact, loads of stuff on DFA structures, and their associative search alogorithms :
From the little I've read, the [A]DFA is a data structure - so you would need to build that first, and then you have algorithms that search that data structure such as 'Trie' or Judy ....

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
oops, looks like a Trie is also a data structure itself, rather than a search alg :)

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
OK,
This has an article on how to implement Trie structures. You have to register, but its free :

The OpenAnitVirus project ( ) seems to have implemented a Trie structure too - I geuss download their code and have a look at the package org.openantivirus.engine.censor.trie


Probably your two best bets for some actual code.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks man :)

(I think) I have written a Trie structure, but the ADFA is supposed to take up less space and I cannot fathom how.

Btw, I am fairly sure Judy is also a data structure, and I suspect it cannot be implemented in pure Java. The original was written in C and concerned mainly with efficient use of CPU cache - wouldn't JVM get in the way of such low-level data manipulations?

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
A Trie *is* a ADFA isn't it ?
As for how it takes up less space & stuff ... bit beyond me. I never was that good at maths and big brain stuff :p

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Well, I rarely mess with trees because RDMBS generally bundle competitive implementations :p

However, I have found that Java makes it easy to create new structures: things like BST and Trie seem straight forward.
wikipedia
If only the dictionary words need to be stored, however, without any additional information required to be stored along with each word, minimal acyclic deterministic finite automata are much more compact than tries.
This is why I want to understand the ADFA.

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top