<s>
In	O
coding	B-Error_Name
theory	I-Error_Name
,	O
the	O
Sardinas	B-Algorithm
–	I-Algorithm
Patterson	I-Algorithm
algorithm	I-Algorithm
is	O
a	O
classical	O
algorithm	O
for	O
determining	O
in	O
polynomial	O
time	O
whether	O
a	O
given	O
variable-length	B-Algorithm
code	I-Algorithm
is	O
uniquely	O
decodable	O
,	O
named	O
after	O
August	O
Albert	O
Sardinas	O
and	O
George	O
W	O
.	O
Patterson	O
,	O
who	O
published	O
it	O
in	O
1953	O
.	O
</s>
<s>
As	O
Knuth	O
reports	O
,	O
the	O
algorithm	O
was	O
rediscovered	O
about	O
ten	O
years	O
later	O
in	O
1963	O
by	O
Floyd	O
,	O
despite	O
the	O
fact	O
that	O
it	O
was	O
at	O
the	O
time	O
already	O
well	O
known	O
in	O
coding	B-Error_Name
theory	I-Error_Name
.	O
</s>
<s>
By	O
using	O
a	O
suffix	B-Architecture
tree	I-Architecture
to	O
speed	O
the	O
comparison	O
between	O
each	O
dangling	O
suffix	O
and	O
the	O
codewords	O
,	O
the	O
time	O
for	O
the	O
algorithm	O
can	O
be	O
bounded	O
by	O
O(nk )	O
,	O
where	O
n	O
is	O
the	O
total	O
length	O
of	O
the	O
codewords	O
and	O
k	O
is	O
the	O
number	O
of	O
codewords	O
.	O
</s>
<s>
Prefix	B-Algorithm
codes	I-Algorithm
and	O
block	O
codes	O
are	O
important	O
classes	O
of	O
codes	O
which	O
are	O
uniquely	O
decodable	O
by	O
definition	O
.	O
</s>
