<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
radix	B-Data_Structure
tree	I-Data_Structure
(	O
also	O
radix	B-Data_Structure
trie	I-Data_Structure
or	O
compact	B-Data_Structure
prefix	I-Data_Structure
tree	I-Data_Structure
or	O
compressed	O
trie	B-General_Concept
)	O
is	O
a	O
data	B-General_Concept
structure	I-General_Concept
that	O
represents	O
a	O
space-optimized	O
trie	B-General_Concept
(	O
prefix	B-General_Concept
tree	I-General_Concept
)	O
in	O
which	O
each	O
node	O
that	O
is	O
the	O
only	O
child	O
is	O
merged	O
with	O
its	O
parent	O
.	O
</s>
<s>
The	O
result	O
is	O
that	O
the	O
number	O
of	O
children	O
of	O
every	O
internal	O
node	O
is	O
at	O
most	O
the	O
radix	O
of	O
the	O
radix	B-Data_Structure
tree	I-Data_Structure
,	O
where	O
is	O
a	O
positive	O
integer	O
and	O
a	O
power	O
of	O
2	O
,	O
having	O
≥	O
1	O
.	O
</s>
<s>
This	O
makes	O
radix	B-Data_Structure
trees	I-Data_Structure
much	O
more	O
efficient	O
for	O
small	O
sets	O
(	O
especially	O
if	O
the	O
strings	O
are	O
long	O
)	O
and	O
for	O
sets	O
of	O
strings	O
that	O
share	O
long	O
prefixes	O
.	O
</s>
<s>
Unlike	O
regular	O
trees	O
(	O
where	O
whole	O
keys	O
are	O
compared	O
en	O
masse	O
from	O
their	O
beginning	O
up	O
to	O
the	O
point	O
of	O
inequality	O
)	O
,	O
the	O
key	O
at	O
each	O
node	O
is	O
compared	O
chunk-of-bits	O
by	O
chunk-of-bits	O
,	O
where	O
the	O
quantity	O
of	O
bits	O
in	O
that	O
chunk	O
at	O
that	O
node	O
is	O
the	O
radix	O
of	O
the	O
radix	B-Data_Structure
trie	I-Data_Structure
.	O
</s>
<s>
When	O
is	O
2	O
,	O
the	O
radix	B-Data_Structure
trie	I-Data_Structure
is	O
binary	O
(	O
i.e.	O
,	O
compare	O
that	O
node	O
's	O
1-bit	O
portion	O
of	O
the	O
key	O
)	O
,	O
which	O
minimizes	O
sparseness	O
at	O
the	O
expense	O
of	O
maximizing	O
trie	B-General_Concept
depth	O
—	O
i.e.	O
,	O
maximizing	O
up	O
to	O
conflation	O
of	O
nondiverging	O
bit-strings	O
in	O
the	O
key	O
.	O
</s>
<s>
When	O
≥	O
4	O
is	O
a	O
power	O
of	O
2	O
,	O
then	O
the	O
radix	B-Data_Structure
trie	I-Data_Structure
is	O
an	O
-ary	O
trie	B-General_Concept
,	O
which	O
lessens	O
the	O
depth	O
of	O
the	O
radix	B-Data_Structure
trie	I-Data_Structure
at	O
the	O
expense	O
of	O
potential	O
sparseness	O
.	O
</s>
<s>
Radix	B-Data_Structure
trees	I-Data_Structure
are	O
useful	O
for	O
constructing	O
associative	B-Application
arrays	I-Application
with	O
keys	O
that	O
can	O
be	O
expressed	O
as	O
strings	O
.	O
</s>
<s>
They	O
find	O
particular	O
application	O
in	O
the	O
area	O
of	O
IP	B-Protocol
routing	B-Protocol
,	O
where	O
the	O
ability	O
to	O
contain	O
large	O
ranges	O
of	O
values	O
with	O
a	O
few	O
exceptions	O
is	O
particularly	O
suited	O
to	O
the	O
hierarchical	O
organization	O
of	O
IP	B-Protocol
addresses	I-Protocol
.	O
</s>
<s>
They	O
are	O
also	O
used	O
for	O
inverted	B-Algorithm
indexes	I-Algorithm
of	O
text	O
documents	O
in	O
information	B-Library
retrieval	I-Library
.	O
</s>
<s>
Radix	B-Data_Structure
trees	I-Data_Structure
support	O
insertion	O
,	O
deletion	O
,	O
and	O
searching	O
operations	O
.	O
</s>
<s>
Insertion	O
adds	O
a	O
new	O
string	O
to	O
the	O
trie	B-General_Concept
while	O
trying	O
to	O
minimize	O
the	O
amount	O
of	O
data	O
stored	O
.	O
</s>
<s>
Deletion	O
removes	O
a	O
string	O
from	O
the	O
trie	B-General_Concept
.	O
</s>
<s>
All	O
of	O
these	O
operations	O
are	O
O(k )	O
where	O
k	O
is	O
the	O
maximum	O
length	O
of	O
all	O
strings	O
in	O
the	O
set	O
,	O
where	O
length	O
is	O
measured	O
in	O
the	O
quantity	O
of	O
bits	O
equal	O
to	O
the	O
radix	O
of	O
the	O
radix	B-Data_Structure
trie	I-Data_Structure
.	O
</s>
<s>
The	O
lookup	O
operation	O
determines	O
if	O
a	O
string	O
exists	O
in	O
a	O
trie	B-General_Concept
.	O
</s>
<s>
This	O
operation	O
is	O
similar	O
to	O
tries	B-General_Concept
except	O
that	O
some	O
edges	O
consume	O
multiple	O
elements	O
.	O
</s>
<s>
The	O
datastructure	B-General_Concept
was	O
invented	O
in	O
1968	O
by	O
Donald	O
R	O
.	O
Morrison	O
,	O
with	O
whom	O
it	O
is	O
primarily	O
associated	O
,	O
and	O
by	O
Gernot	O
Gwehenberger	O
.	O
</s>
<s>
Donald	O
Knuth	O
,	O
pages	O
498-500	O
in	O
Volume	O
III	O
of	O
The	B-General_Concept
Art	I-General_Concept
of	I-General_Concept
Computer	I-General_Concept
Programming	I-General_Concept
,	O
calls	O
these	O
"	O
Patricia	O
's	O
trees	O
"	O
,	O
presumably	O
after	O
the	O
acronym	O
in	O
the	O
title	O
of	O
Morrison	O
's	O
paper	O
:	O
"	O
PATRICIA	O
-	O
Practical	O
Algorithm	O
to	O
Retrieve	O
Information	O
Coded	O
in	O
Alphanumeric	O
"	O
.	O
</s>
<s>
Today	O
,	O
Patricia	O
tries	B-General_Concept
are	O
seen	O
as	O
radix	B-Data_Structure
trees	I-Data_Structure
with	O
radix	O
equals	O
2	O
,	O
which	O
means	O
that	O
each	O
bit	O
of	O
the	O
key	O
is	O
compared	O
individually	O
and	O
each	O
node	O
is	O
a	O
two-way	O
(	O
i.e.	O
,	O
left	O
versus	O
right	O
)	O
branch	O
.	O
</s>
<s>
(	O
In	O
the	O
following	O
comparisons	O
,	O
it	O
is	O
assumed	O
that	O
the	O
keys	O
are	O
of	O
length	O
k	O
and	O
the	O
data	B-General_Concept
structure	I-General_Concept
contains	O
n	O
members	O
.	O
)	O
</s>
<s>
Unlike	O
balanced	B-Data_Structure
trees	I-Data_Structure
,	O
radix	B-Data_Structure
trees	I-Data_Structure
permit	O
lookup	O
,	O
insertion	O
,	O
and	O
deletion	O
in	O
O(k )	O
time	O
rather	O
than	O
O(log n )	O
.	O
</s>
<s>
This	O
does	O
not	O
seem	O
like	O
an	O
advantage	O
,	O
since	O
normally	O
k	O
≥	O
log	O
n	O
,	O
but	O
in	O
a	O
balanced	B-Data_Structure
tree	I-Data_Structure
every	O
comparison	O
is	O
a	O
string	O
comparison	O
requiring	O
O(k )	O
worst-case	O
time	O
,	O
many	O
of	O
which	O
are	O
slow	O
in	O
practice	O
due	O
to	O
long	O
common	O
prefixes	O
(	O
in	O
the	O
case	O
where	O
comparisons	O
begin	O
at	O
the	O
start	O
of	O
the	O
string	O
)	O
.	O
</s>
<s>
In	O
a	O
trie	B-General_Concept
,	O
all	O
comparisons	O
require	O
constant	O
time	O
,	O
but	O
it	O
takes	O
m	O
comparisons	O
to	O
look	O
up	O
a	O
string	O
of	O
length	O
m	O
.	O
Radix	B-Data_Structure
trees	I-Data_Structure
can	O
perform	O
these	O
operations	O
with	O
fewer	O
comparisons	O
,	O
and	O
require	O
many	O
fewer	O
nodes	O
.	O
</s>
<s>
Radix	B-Data_Structure
trees	I-Data_Structure
also	O
share	O
the	O
disadvantages	O
of	O
tries	B-General_Concept
,	O
however	O
:	O
as	O
they	O
can	O
only	O
be	O
applied	O
to	O
strings	O
of	O
elements	O
or	O
elements	O
with	O
an	O
efficiently	O
reversible	O
mapping	O
to	O
strings	O
,	O
they	O
lack	O
the	O
full	O
generality	O
of	O
balanced	O
search	O
trees	O
,	O
which	O
apply	O
to	O
any	O
data	O
type	O
with	O
a	O
total	O
ordering	O
.	O
</s>
<s>
This	O
can	O
also	O
be	O
problematic	O
if	O
a	O
data	O
type	O
only	O
provides	B-Application
a	O
comparison	O
operation	O
,	O
but	O
not	O
a	O
(	O
de	O
)	O
serialization	B-Application
operation	O
.	O
</s>
<s>
Hash	B-Algorithm
tables	I-Algorithm
are	O
commonly	O
said	O
to	O
have	O
expected	O
O(1 )	O
insertion	O
and	O
deletion	O
times	O
,	O
but	O
this	O
is	O
only	O
true	O
when	O
considering	O
computation	O
of	O
the	O
hash	O
of	O
the	O
key	O
to	O
be	O
a	O
constant-time	O
operation	O
.	O
</s>
<s>
When	O
hashing	O
the	O
key	O
is	O
taken	O
into	O
account	O
,	O
hash	B-Algorithm
tables	I-Algorithm
have	O
expected	O
O(k )	O
insertion	O
and	O
deletion	O
times	O
,	O
but	O
may	O
take	O
longer	O
in	O
the	O
worst	O
case	O
depending	O
on	O
how	O
collisions	O
are	O
handled	O
.	O
</s>
<s>
Radix	B-Data_Structure
trees	I-Data_Structure
have	O
worst-case	O
O(k )	O
insertion	O
and	O
deletion	O
.	O
</s>
<s>
The	O
successor/predecessor	O
operations	O
of	O
radix	B-Data_Structure
trees	I-Data_Structure
are	O
also	O
not	O
implemented	O
by	O
hash	B-Algorithm
tables	I-Algorithm
.	O
</s>
<s>
A	O
common	O
extension	O
of	O
radix	B-Data_Structure
trees	I-Data_Structure
uses	O
two	O
colors	O
of	O
nodes	O
,	O
'	O
black	O
 '	O
and	O
'	O
white	O
 '	O
.	O
</s>
<s>
The	O
HAT-trie	B-Data_Structure
is	O
a	O
cache-conscious	O
data	B-General_Concept
structure	I-General_Concept
based	O
on	O
radix	B-Data_Structure
trees	I-Data_Structure
that	O
offers	O
efficient	O
string	O
storage	O
and	O
retrieval	O
,	O
and	O
ordered	O
iterations	O
.	O
</s>
<s>
comparable	O
to	O
the	O
cache-conscious	O
hashtable	B-Algorithm
.	O
</s>
<s>
A	O
PATRICIA	O
trie	B-General_Concept
is	O
a	O
special	O
variant	O
of	O
the	O
radix	O
2	O
(	O
binary	O
)	O
trie	B-General_Concept
,	O
in	O
which	O
rather	O
than	O
explicitly	O
store	O
every	O
bit	O
of	O
every	O
key	O
,	O
the	O
nodes	O
store	O
only	O
the	O
position	O
of	O
the	O
first	O
bit	O
which	O
differentiates	O
two	O
sub-trees	O
.	O
</s>
<s>
Notable	O
features	O
of	O
the	O
PATRICIA	O
trie	B-General_Concept
include	O
that	O
the	O
trie	B-General_Concept
only	O
requires	O
one	O
node	O
to	O
be	O
inserted	O
for	O
every	O
unique	O
key	O
stored	O
,	O
making	O
PATRICIA	O
much	O
more	O
compact	O
than	O
a	O
standard	O
binary	O
trie	B-General_Concept
.	O
</s>
<s>
In	O
this	O
respect	O
PATRICIA	O
bears	O
a	O
certain	O
resemblance	O
to	O
indexing	O
using	O
a	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
The	O
adaptive	O
radix	B-Data_Structure
tree	I-Data_Structure
is	O
a	O
radix	B-Data_Structure
tree	I-Data_Structure
variant	O
that	O
integrates	O
adaptive	O
node	O
sizes	O
to	O
the	O
radix	B-Data_Structure
tree	I-Data_Structure
.	O
</s>
<s>
One	O
major	O
drawback	O
of	O
the	O
usual	O
radix	B-Data_Structure
trees	I-Data_Structure
is	O
the	O
use	O
of	O
space	O
,	O
because	O
it	O
uses	O
a	O
constant	O
node	O
size	O
in	O
every	O
level	O
.	O
</s>
<s>
The	O
major	O
difference	O
between	O
the	O
radix	B-Data_Structure
tree	I-Data_Structure
and	O
the	O
adaptive	O
radix	B-Data_Structure
tree	I-Data_Structure
is	O
its	O
variable	O
size	O
for	O
each	O
node	O
based	O
on	O
the	O
number	O
of	O
child	O
elements	O
,	O
which	O
grows	O
while	O
adding	O
new	O
entries	O
.	O
</s>
<s>
Hence	O
,	O
the	O
adaptive	O
radix	B-Data_Structure
tree	I-Data_Structure
leads	O
to	O
a	O
better	O
use	O
of	O
space	O
without	O
reducing	O
its	O
speed	O
.	O
</s>
<s>
This	O
variant	O
of	O
radix	B-Data_Structure
tree	I-Data_Structure
achieves	O
a	O
higher	O
space	O
efficiency	O
than	O
the	O
one	O
which	O
only	O
allows	O
internal	O
nodes	O
with	O
at	O
least	O
two	O
children	O
.	O
</s>
