<s>
A	O
GADDAG	B-Data_Structure
is	O
a	O
data	B-General_Concept
structure	I-General_Concept
presented	O
by	O
Steven	O
Gordon	O
in	O
1994	O
,	O
for	O
use	O
in	O
generating	O
moves	O
for	O
Scrabble	B-Application
and	O
other	O
word-generation	O
games	O
where	O
such	O
moves	O
require	O
words	O
that	O
"	O
hook	O
into	O
"	O
existing	O
words	O
.	O
</s>
<s>
It	O
is	O
often	O
in	O
contrast	O
to	O
move-generation	O
algorithms	O
using	O
a	O
directed	B-General_Concept
acyclic	I-General_Concept
word	I-General_Concept
graph	I-General_Concept
(	O
DAWG	O
)	O
such	O
as	O
the	O
one	O
used	O
by	O
Maven	B-General_Concept
.	O
</s>
<s>
It	O
is	O
generally	O
twice	O
as	O
fast	O
as	O
the	O
traditional	O
DAWG	O
algorithms	O
,	O
but	O
take	O
about	O
5	O
times	O
as	O
much	O
space	O
for	O
regulation	O
Scrabble	B-Application
dictionaries	O
.	O
</s>
<s>
Quackle	O
,	O
an	O
open-source	O
Scrabble	B-Application
program	O
,	O
uses	O
a	O
GADDAG	B-Data_Structure
to	O
generate	O
moves	O
.	O
</s>
<s>
The	O
name	O
GADDAG	B-Data_Structure
comes	O
from	O
DAG	O
for	O
directed	O
acyclic	O
graph	O
,	O
prefixed	O
by	O
its	O
own	O
reverse	O
.	O
</s>
<s>
A	O
GADDAG	B-Data_Structure
is	O
a	O
specialization	O
of	O
a	O
Trie	B-General_Concept
,	O
containing	O
states	O
and	O
branches	O
to	O
other	O
GADDAGs	B-Data_Structure
.	O
</s>
<s>
This	O
means	O
every	O
word	O
has	O
as	O
many	O
representations	O
as	O
it	O
does	O
letters	O
;	O
since	O
the	O
average	O
word	O
in	O
most	O
Scrabble	B-Application
regulation	O
dictionaries	O
is	O
5	O
letters	O
long	O
,	O
this	O
makes	O
the	O
GADDAG	B-Data_Structure
about	O
5	O
times	O
as	O
big	O
as	O
a	O
simple	O
DAWG	O
.	O
</s>
<s>
For	O
any	O
word	O
in	O
a	O
dictionary	O
that	O
is	O
formed	O
by	O
a	O
non-empty	O
prefix	O
x	O
and	O
a	O
suffix	O
y	O
,	O
a	O
GADDAG	B-Data_Structure
contains	O
a	O
direct	O
,	O
deterministic	O
path	O
for	O
any	O
string	O
REV(x )	O
+y	O
,	O
where	O
+	O
is	O
a	O
concatenation	O
operator	O
.	O
</s>
<s>
It	O
fails	O
,	O
however	O
,	O
to	O
address	O
the	O
first	O
constraint	O
:	O
supposing	O
one	O
want	O
to	O
'	O
hook	O
into	O
 '	O
the	O
letter	O
P	O
in	O
HARPY	O
,	O
and	O
the	O
board	O
has	O
2	O
spaces	O
before	O
the	O
P	O
,	O
one	O
must	O
search	O
the	O
dictionary	O
for	O
all	O
words	O
containing	O
letters	O
from	O
the	O
rack	O
where	O
the	O
third	O
letter	O
is	O
P	O
.	O
This	O
is	O
inefficient	O
when	O
searching	O
through	O
the	O
DAWG	O
,	O
as	O
many	O
searches	O
through	O
the	O
trie	B-General_Concept
will	O
be	O
fruitless	O
.	O
</s>
<s>
This	O
is	O
addressed	O
by	O
the	O
GADDAG	B-Data_Structure
's	O
storage	O
of	O
prefixes	O
:	O
by	O
traversing	O
the	O
P	O
branch	O
of	O
a	O
GADDAG	B-Data_Structure
,	O
one	O
sees	O
all	O
words	O
that	O
have	O
a	O
P	O
somewhere	O
in	O
their	O
composition	O
,	O
and	O
can	O
"	O
travel	O
up	O
"	O
the	O
prefix	O
to	O
form	O
the	O
word	O
with	O
tiles	O
in	O
the	O
rack	O
.	O
</s>
