<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
an	O
efficient	O
data	B-General_Concept
structure	I-General_Concept
for	O
representing	O
the	O
substring	B-Algorithm
index	I-Algorithm
of	O
a	O
given	O
string	O
which	O
allows	O
the	O
storage	O
,	O
processing	O
,	O
and	O
retrieval	O
of	O
compressed	O
information	O
about	O
all	O
its	O
substrings	O
.	O
</s>
<s>
The	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
a	O
string	O
is	O
the	O
smallest	O
directed	O
acyclic	O
graph	O
with	O
a	O
dedicated	O
initial	O
vertex	O
and	O
a	O
set	O
of	O
"	O
final	O
"	O
vertices	O
,	O
such	O
that	O
paths	O
from	O
the	O
initial	O
vertex	O
to	O
final	O
vertices	O
represent	O
the	O
suffixes	O
of	O
the	O
string	O
.	O
</s>
<s>
In	O
terms	O
of	O
automata	B-Application
theory	I-Application
,	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
the	O
minimal	O
partial	B-Algorithm
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
that	O
recognizes	O
the	O
set	O
of	O
suffixes	O
of	O
a	O
given	O
string	O
.	O
</s>
<s>
The	O
state	B-Application
graph	I-Application
of	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
called	O
a	O
directed	B-General_Concept
acyclic	I-General_Concept
word	I-General_Concept
graph	I-General_Concept
(	O
DAWG	O
)	O
,	O
a	O
term	O
that	O
is	O
also	O
sometimes	O
used	O
for	O
any	O
deterministic	B-General_Concept
acyclic	I-General_Concept
finite	I-General_Concept
state	I-General_Concept
automaton	I-General_Concept
.	O
</s>
<s>
They	O
suggested	O
a	O
linear	O
time	O
online	B-Algorithm
algorithm	I-Algorithm
for	O
its	O
construction	O
and	O
showed	O
that	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
a	O
string	O
having	O
length	O
at	O
least	O
two	O
characters	O
has	O
at	O
most	O
states	B-Application
and	O
at	O
most	O
transitions	O
.	O
</s>
<s>
Further	O
works	O
have	O
shown	O
a	O
close	O
connection	O
between	O
suffix	O
automata	O
and	O
suffix	B-Architecture
trees	I-Architecture
,	O
and	O
have	O
outlined	O
several	O
generalizations	O
of	O
suffix	O
automata	O
,	O
such	O
as	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
obtained	O
by	O
compression	O
of	O
nodes	O
with	O
a	O
single	O
outgoing	O
arc	O
.	O
</s>
<s>
Suffix	O
automata	O
provide	O
efficient	O
solutions	O
to	O
problems	O
such	O
as	O
substring	B-Algorithm
search	I-Algorithm
and	O
computation	O
of	O
the	O
largest	B-Algorithm
common	I-Algorithm
substring	I-Algorithm
of	O
two	O
and	O
more	O
strings	O
.	O
</s>
<s>
The	O
concept	O
of	O
suffix	B-General_Concept
automaton	I-General_Concept
was	O
introduced	O
in	O
1983	O
by	O
a	O
group	O
of	O
scientists	O
from	O
University	O
of	O
Denver	O
and	O
University	O
of	O
Colorado	O
Boulder	O
consisting	O
of	O
Anselm	O
Blumer	O
,	O
Janet	O
Blumer	O
,	O
Andrzej	O
Ehrenfeucht	O
,	O
David	O
Haussler	O
and	O
Ross	O
McConnell	O
,	O
although	O
similar	O
concepts	O
had	O
earlier	O
been	O
studied	O
alongside	O
suffix	B-Architecture
trees	I-Architecture
in	O
the	O
works	O
of	O
Peter	O
Weiner	O
,	O
Vaughan	O
Pratt	O
and	O
Anatol	O
Slissenko	O
.	O
</s>
<s>
showed	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
built	O
for	O
the	O
string	O
of	O
length	O
greater	O
than	O
has	O
at	O
most	O
states	B-Application
and	O
at	O
most	O
transitions	O
,	O
and	O
suggested	O
a	O
linear	O
algorithm	O
for	O
automaton	O
construction	O
.	O
</s>
<s>
In	O
1983	O
,	O
Mu-Tian	O
Chen	O
and	O
Joel	O
Seiferas	O
independently	O
showed	O
that	O
Weiner	O
's	O
1973	O
suffix-tree	O
construction	O
algorithm	O
while	O
building	O
a	O
suffix	B-Architecture
tree	I-Architecture
of	O
the	O
string	O
constructs	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
reversed	O
string	O
as	O
an	O
auxiliary	O
structure	O
.	O
</s>
<s>
applied	O
the	O
compressing	O
technique	O
used	O
in	O
suffix	B-Architecture
trees	I-Architecture
to	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
and	O
invented	O
the	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
,	O
which	O
is	O
also	O
called	O
the	O
compacted	O
directed	B-General_Concept
acyclic	I-General_Concept
word	I-General_Concept
graph	I-General_Concept
(	O
CDAWG	O
)	O
.	O
</s>
<s>
developed	O
an	O
algorithm	O
for	O
construction	O
of	O
CDAWG	O
for	O
a	O
set	O
of	O
words	O
given	O
by	O
a	O
trie	B-General_Concept
.	O
</s>
<s>
Usually	O
when	O
speaking	O
about	O
suffix	O
automata	O
and	O
related	O
concepts	O
,	O
some	O
notions	O
from	O
formal	O
language	O
theory	O
and	O
automata	B-Application
theory	I-Application
are	O
used	O
,	O
in	O
particular	O
:	O
</s>
<s>
Formally	O
,	O
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
is	O
determined	O
by	O
5-tuple	O
,	O
where	O
:	O
</s>
<s>
is	O
a	O
set	O
of	O
automaton	O
"	O
states	B-Application
"	O
,	O
</s>
<s>
is	O
a	O
set	O
of	O
"	O
final	O
"	O
states	B-Application
of	O
automaton	O
,	O
</s>
<s>
is	O
a	O
partial	B-Algorithm
"	O
transition	O
"	O
function	O
of	O
automaton	O
,	O
such	O
that	O
for	O
and	O
is	O
either	O
undefined	O
or	O
defines	O
a	O
transition	O
from	O
over	O
character	O
.	O
</s>
<s>
Most	O
commonly	O
,	O
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
is	O
represented	O
as	O
a	O
directed	O
graph	O
(	O
"	O
diagram	O
"	O
)	O
such	O
that	O
:	O
</s>
<s>
Set	O
of	O
graph	O
vertices	O
corresponds	O
to	O
the	O
state	O
of	O
states	B-Application
,	O
</s>
<s>
Graph	O
has	O
several	O
marked	O
vertices	O
corresponding	O
to	O
the	O
set	O
of	O
final	O
states	B-Application
,	O
</s>
<s>
In	O
these	O
terms	O
,	O
the	O
language	O
recognized	O
by	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
is	O
the	O
language	O
of	O
its	O
(	O
possibly	O
empty	O
)	O
suffixes	O
.	O
</s>
<s>
If	O
language	O
is	O
recognized	O
by	O
some	O
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
,	O
there	O
exists	O
unique	O
up	O
to	O
isomorphism	O
automaton	O
that	O
recognizes	O
the	O
same	O
language	O
and	O
has	O
the	O
minimum	O
possible	O
number	O
of	O
states	B-Application
.	O
</s>
<s>
In	O
these	O
terms	O
,	O
a	O
"	O
suffix	B-General_Concept
automaton	I-General_Concept
"	O
is	O
the	O
minimal	O
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
recognizing	O
the	O
language	O
of	O
suffixes	O
of	O
the	O
word	O
.	O
</s>
<s>
It	O
allows	O
to	O
formulate	O
the	O
following	O
lemma	O
defining	O
a	O
bijection	B-Algorithm
between	O
the	O
right	O
context	O
of	O
the	O
word	O
and	O
the	O
set	O
of	O
right	O
positions	O
of	O
its	O
occurrences	O
in	O
:	O
</s>
<s>
It	O
implies	O
several	O
structure	O
properties	O
of	O
suffix	B-General_Concept
automaton	I-General_Concept
states	B-Application
.	O
</s>
<s>
Any	O
state	O
of	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
recognizes	O
some	O
continuous	O
chain	O
of	O
nested	O
suffixes	O
of	O
the	O
longest	O
word	O
recognized	O
by	O
this	O
state	O
.	O
</s>
<s>
A	O
"	O
prefix	B-General_Concept
tree	I-General_Concept
"	O
(	O
or	O
"	O
trie	B-General_Concept
"	O
)	O
is	O
a	O
rooted	O
directed	O
tree	B-Application
in	O
which	O
arcs	O
are	O
marked	O
by	O
characters	O
in	O
such	O
a	O
way	O
no	O
vertex	O
of	O
such	O
tree	B-Application
has	O
two	O
out-going	O
arcs	O
marked	O
with	O
the	O
same	O
character	O
.	O
</s>
<s>
Some	O
vertices	O
in	O
trie	B-General_Concept
are	O
marked	O
as	O
final	O
.	O
</s>
<s>
Trie	B-General_Concept
is	O
said	O
to	O
recognize	O
a	O
set	O
of	O
words	O
defined	O
by	O
paths	O
from	O
its	O
root	O
to	O
final	O
vertices	O
.	O
</s>
<s>
In	O
this	O
way	O
prefix	B-General_Concept
trees	I-General_Concept
are	O
a	O
special	O
kind	O
of	O
deterministic	B-General_Concept
finite	I-General_Concept
automata	I-General_Concept
if	O
you	O
perceive	O
its	O
root	O
as	O
an	O
initial	O
vertex	O
.	O
</s>
<s>
The	O
"	O
suffix	B-Architecture
trie	I-Architecture
"	O
of	O
the	O
word	O
is	O
a	O
prefix	B-General_Concept
tree	I-General_Concept
recognizing	O
a	O
set	O
of	O
its	O
suffixes	O
.	O
</s>
<s>
"	O
A	O
suffix	B-Architecture
tree	I-Architecture
"	O
is	O
a	O
tree	B-Application
obtained	O
from	O
a	O
suffix	B-Architecture
trie	I-Architecture
via	O
the	O
compaction	O
procedure	O
,	O
during	O
which	O
consequent	O
edges	O
are	O
merged	O
if	O
the	O
degree	O
of	O
the	O
vertex	O
between	O
them	O
is	O
equal	O
to	O
two	O
.	O
</s>
<s>
By	O
its	O
definition	O
,	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
can	O
be	O
obtained	O
via	O
minimization	B-General_Concept
of	O
the	O
suffix	B-Architecture
trie	I-Architecture
.	O
</s>
<s>
It	O
may	O
be	O
shown	O
that	O
a	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
obtained	O
by	O
both	O
minimization	B-General_Concept
of	O
the	O
suffix	B-Architecture
tree	I-Architecture
(	O
if	O
one	O
assumes	O
each	O
string	O
on	O
the	O
edge	O
of	O
the	O
suffix	B-Architecture
tree	I-Architecture
is	O
a	O
solid	O
character	O
from	O
the	O
alphabet	O
)	O
and	O
compaction	O
of	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
.	O
</s>
<s>
Besides	O
this	O
connection	O
between	O
the	O
suffix	B-Architecture
tree	I-Architecture
and	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
same	O
string	O
there	O
is	O
as	O
well	O
a	O
connection	O
between	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
string	O
and	O
the	O
suffix	B-Architecture
tree	I-Architecture
of	O
the	O
reversed	O
string	O
.	O
</s>
<s>
,	O
which	O
implies	O
the	O
suffix	O
link	O
tree	B-Application
of	O
the	O
string	O
and	O
the	O
suffix	B-Architecture
tree	I-Architecture
of	O
the	O
string	O
are	O
isomorphic	O
:	O
</s>
<s>
A	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
string	O
of	O
length	O
has	O
at	O
most	O
states	B-Application
and	O
at	O
most	O
transitions	O
.	O
</s>
<s>
This	O
may	O
be	O
formulated	O
in	O
a	O
stricter	O
way	O
as	O
where	O
and	O
are	O
the	O
numbers	O
of	O
transitions	O
and	O
states	B-Application
in	O
automaton	O
correspondingly	O
.	O
</s>
<s>
Given	O
the	O
correspondence	O
between	O
states	B-Application
of	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
and	O
vertices	O
of	O
the	O
suffix	B-Architecture
tree	I-Architecture
,	O
it	O
is	O
possible	O
to	O
find	O
out	O
the	O
second	O
state	O
that	O
may	O
possibly	O
split	O
after	O
a	O
new	O
character	O
is	O
appended	O
.	O
</s>
<s>
In	O
terms	O
of	O
suffix	B-Architecture
trees	I-Architecture
it	O
corresponds	O
to	O
the	O
insertion	O
of	O
the	O
new	O
longest	O
suffix	O
into	O
the	O
suffix	B-Architecture
tree	I-Architecture
of	O
.	O
</s>
<s>
Besides	O
suffix	O
links	O
it	O
is	O
also	O
needed	O
to	O
define	O
final	O
states	B-Application
of	O
the	O
automaton	O
.	O
</s>
<s>
Thus	O
if	O
the	O
state	O
recognizing	O
is	O
denoted	O
by	O
,	O
then	O
all	O
final	O
states	B-Application
(	O
that	O
is	O
,	O
recognizing	O
suffixes	O
of	O
)	O
form	O
up	O
the	O
sequence	O
.	O
</s>
<s>
After	O
the	O
character	O
is	O
appended	O
to	O
possible	O
new	O
states	B-Application
of	O
suffix	B-General_Concept
automaton	I-General_Concept
are	O
and	O
.	O
</s>
<s>
States	B-Application
corresponding	O
to	O
these	O
suffixes	O
may	O
be	O
determined	O
via	O
traversal	O
of	O
suffix	O
link	O
path	O
for	O
.	O
</s>
<s>
Construction	O
of	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
for	O
the	O
word	O
abbcbc	O
+∅	O
→	O
a280x150px280x150pxAfter	O
first	O
character	O
is	O
appended	O
,	O
only	O
one	O
state	O
is	O
created	O
in	O
suffix	O
automaton.Similarly	O
,	O
only	O
one	O
leaf	O
is	O
added	O
to	O
the	O
suffix	O
tree.	O
+a	O
→	O
ab280x150px280x150pxNew	O
transitions	O
are	O
drawn	O
from	O
all	O
previous	O
final	O
states	B-Application
as	O
b	O
did	O
n't	O
appear	O
before.For	O
the	O
same	O
reason	O
another	O
leaf	O
is	O
added	O
to	O
the	O
root	O
of	O
the	O
suffix	O
tree.	O
+ab	O
→	O
abb280x180px280x180pxThe	O
state	O
2	O
recognizes	O
words	O
ab	O
and	O
b	O
,	O
but	O
only	O
b	O
is	O
the	O
new	O
suffix	O
,	O
therefore	O
this	O
word	O
is	O
separated	O
into	O
state	O
4.In	O
the	O
suffix	B-Architecture
tree	I-Architecture
it	O
corresponds	O
to	O
the	O
split	O
of	O
the	O
edge	O
leading	O
to	O
the	O
vertex	O
2.	O
+abb	O
→	O
abbc280x180px280x180pxCharacter	O
c	O
occurs	O
for	O
the	O
first	O
time	O
,	O
so	O
transitions	O
are	O
drawn	O
from	O
all	O
previous	O
final	O
states.Suffix	O
tree	O
of	O
reverse	O
string	O
has	O
another	O
leaf	O
added	O
to	O
the	O
root.	O
+abbc	O
→	O
abbcb280x210px280x210pxState	O
4	O
consists	O
of	O
the	O
only	O
word	O
b	O
,	O
which	O
is	O
suffix	O
,	O
thus	O
the	O
state	O
is	O
not	O
split.Correspondingly	O
,	O
new	O
leaf	O
is	O
hanged	O
on	O
the	O
vertex	O
4	O
in	O
the	O
suffix	O
tree.	O
+abbcb	O
→	O
abbcbc280x210px280x210pxThe	O
state	O
5	O
recognizes	O
words	O
abbc	O
,	O
bbc	O
,	O
bc	O
and	O
c	O
,	O
but	O
only	O
last	O
two	O
are	O
suffixes	O
of	O
new	O
word	O
,	O
so	O
they	O
're	O
separated	O
into	O
new	O
state	O
8.Correspondingly	O
,	O
edge	O
leading	O
to	O
the	O
vertex	O
5	O
is	O
split	O
and	O
vertex	O
8	O
is	O
put	O
in	O
the	O
middle	O
of	O
the	O
edge	O
.	O
</s>
<s>
Theoretical	O
results	O
above	O
lead	O
to	O
the	O
following	O
algorithm	O
that	O
takes	O
character	O
and	O
rebuilds	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
into	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
:	O
</s>
<s>
States	B-Application
corresponding	O
to	O
suffixes	O
of	O
are	O
updated	O
with	O
transitions	O
to	O
.	O
</s>
<s>
If	O
none	O
of	O
states	B-Application
on	O
the	O
suffix	O
path	O
had	O
a	O
transition	O
by	O
,	O
then	O
never	O
occurred	O
in	O
before	O
and	O
the	O
suffix	O
link	O
from	O
should	O
lead	O
to	O
;	O
</s>
<s>
To	O
obtain	O
such	O
complexity	O
,	O
one	O
has	O
to	O
use	O
the	O
methods	O
of	O
amortized	B-General_Concept
analysis	I-General_Concept
.	O
</s>
<s>
The	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
closely	O
related	O
to	O
other	O
suffix	O
structures	O
and	O
substring	B-Algorithm
indices	I-Algorithm
.	O
</s>
<s>
Given	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
a	O
specific	O
string	O
one	O
may	O
construct	O
its	O
suffix	B-Architecture
tree	I-Architecture
via	O
compacting	O
and	O
recursive	O
traversal	O
in	O
linear	O
time	O
.	O
</s>
<s>
Similar	O
transforms	O
are	O
possible	O
in	O
both	O
directions	O
to	O
switch	O
between	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
and	O
the	O
suffix	B-Architecture
tree	I-Architecture
of	O
reversed	O
string	O
.	O
</s>
<s>
Other	O
than	O
this	O
several	O
generalizations	O
were	O
developed	O
to	O
construct	O
an	O
automaton	O
for	O
the	O
set	O
of	O
strings	O
given	O
by	O
trie	B-General_Concept
,	O
compacted	O
suffix	O
automation	O
(	O
CDAWG	O
)	O
,	O
to	O
maintain	O
the	O
structure	O
of	O
the	O
automaton	O
on	O
the	O
sliding	O
window	O
,	O
and	O
to	O
construct	O
it	O
in	O
a	O
bidirectional	O
way	O
,	O
supporting	O
the	O
insertion	O
of	O
a	O
characters	O
to	O
both	O
the	O
beginning	O
and	O
the	O
end	O
of	O
the	O
string	O
.	O
</s>
<s>
As	O
was	O
already	O
mentioned	O
above	O
,	O
a	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
obtained	O
via	O
both	O
compaction	O
of	O
a	O
regular	O
suffix	B-General_Concept
automaton	I-General_Concept
(	O
by	O
removing	O
states	B-Application
which	O
are	O
non-final	O
and	O
have	O
exactly	O
one	O
out-going	O
arc	O
)	O
and	O
the	O
minimization	B-General_Concept
of	O
a	O
suffix	B-Architecture
tree	I-Architecture
.	O
</s>
<s>
Similarly	O
to	O
the	O
regular	O
suffix	B-General_Concept
automaton	I-General_Concept
,	O
states	B-Application
of	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
may	O
be	O
defined	O
in	O
explicit	O
manner	O
.	O
</s>
<s>
This	O
equivalence	O
relation	O
is	O
a	O
transitive	O
closure	O
of	O
the	O
relation	O
defined	O
by	O
,	O
which	O
highlights	O
the	O
fact	O
that	O
a	O
compacted	O
automaton	O
may	O
be	O
obtained	O
by	O
both	O
gluing	O
suffix	B-Architecture
tree	I-Architecture
vertices	O
equivalent	O
via	O
relation	O
(	O
minimization	B-General_Concept
of	O
the	O
suffix	B-Architecture
tree	I-Architecture
)	O
and	O
gluing	O
suffix	B-General_Concept
automaton	I-General_Concept
states	B-Application
equivalent	O
via	O
relation	O
(	O
compaction	O
of	O
suffix	B-General_Concept
automaton	I-General_Concept
)	O
.	O
</s>
<s>
The	O
total	O
number	O
of	O
equivalence	O
classes	O
for	O
this	O
relation	O
does	O
not	O
exceed	O
which	O
implies	O
that	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
string	O
having	O
length	O
has	O
at	O
most	O
states	B-Application
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
construct	O
a	O
generalization	O
of	O
suffix	B-General_Concept
automaton	I-General_Concept
that	O
would	O
recognize	O
the	O
language	O
formed	O
up	O
by	O
suffixes	O
of	O
all	O
words	O
from	O
the	O
set	O
.	O
</s>
<s>
Constraints	O
for	O
the	O
number	O
of	O
states	B-Application
and	O
transitions	O
in	O
such	O
automaton	O
would	O
stay	O
the	O
same	O
as	O
for	O
a	O
single-word	O
automaton	O
if	O
you	O
put	O
.	O
</s>
<s>
This	O
idea	O
is	O
further	O
generalized	O
to	O
the	O
case	O
when	O
is	O
not	O
given	O
explicitly	O
but	O
instead	O
is	O
given	O
by	O
a	O
prefix	B-General_Concept
tree	I-General_Concept
with	O
vertices	O
.	O
</s>
<s>
At	O
the	O
same	O
time	O
,	O
the	O
number	O
of	O
transitions	O
in	O
such	O
automaton	O
may	O
reach	O
,	O
for	O
example	O
for	O
the	O
set	O
of	O
words	O
over	O
the	O
alphabet	O
the	O
total	O
length	O
of	O
words	O
is	O
equal	O
to	O
,	O
the	O
number	O
of	O
vertices	O
in	O
corresponding	O
suffix	B-Architecture
trie	I-Architecture
is	O
equal	O
to	O
and	O
corresponding	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
formed	O
of	O
states	B-Application
and	O
transitions	O
.	O
</s>
<s>
Algorithm	O
suggested	O
by	O
Mohri	O
mainly	O
repeats	O
the	O
generic	O
algorithm	O
for	O
building	O
automaton	O
of	O
several	O
strings	O
but	O
instead	O
of	O
growing	O
words	O
one	O
by	O
one	O
,	O
it	O
traverses	O
the	O
trie	B-General_Concept
in	O
a	O
breadth-first	B-Algorithm
search	I-Algorithm
order	O
and	O
append	O
new	O
characters	O
as	O
it	O
meet	O
them	O
in	O
the	O
traversal	O
,	O
which	O
guarantees	O
amortized	B-General_Concept
linear	O
complexity	O
.	O
</s>
<s>
Some	O
compression	B-General_Concept
algorithms	I-General_Concept
,	O
such	O
as	O
LZ77	O
and	O
RLE	B-Algorithm
may	O
benefit	O
from	O
storing	O
suffix	B-General_Concept
automaton	I-General_Concept
or	O
similar	O
structure	O
not	O
for	O
the	O
whole	O
string	O
but	O
for	O
only	O
last	O
its	O
characters	O
while	O
the	O
string	O
is	O
updated	O
.	O
</s>
<s>
In	O
1985	O
,	O
Janet	O
Blumer	O
developed	O
an	O
algorithm	O
to	O
maintain	O
a	O
suffix	B-General_Concept
automaton	I-General_Concept
on	O
a	O
sliding	O
window	O
of	O
size	O
in	O
worst-case	O
and	O
on	O
average	O
,	O
assuming	O
characters	O
are	O
distributed	O
independently	O
and	O
uniformly	O
.	O
</s>
<s>
She	O
also	O
showed	O
complexity	O
cannot	O
be	O
improved	O
:	O
if	O
one	O
considers	O
words	O
construed	O
as	O
a	O
concatenation	O
of	O
several	O
words	O
,	O
where	O
,	O
then	O
the	O
number	O
of	O
states	B-Application
for	O
the	O
window	O
of	O
size	O
would	O
frequently	O
change	O
with	O
jumps	O
of	O
order	O
,	O
which	O
renders	O
even	O
theoretical	O
improvement	O
of	O
for	O
regular	O
suffix	O
automata	O
impossible	O
.	O
</s>
<s>
The	O
same	O
should	O
be	O
true	O
for	O
the	O
suffix	B-Architecture
tree	I-Architecture
because	O
its	O
vertices	O
correspond	O
to	O
states	B-Application
of	O
the	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
reversed	O
string	O
but	O
this	O
problem	O
may	O
be	O
resolved	O
by	O
not	O
explicitly	O
storing	O
every	O
vertex	O
corresponding	O
to	O
the	O
suffix	O
of	O
the	O
whole	O
string	O
,	O
thus	O
only	O
storing	O
vertices	O
with	O
at	O
least	O
two	O
out-going	O
edges	O
.	O
</s>
<s>
A	O
variation	O
of	O
McCreight	O
's	O
suffix	B-Architecture
tree	I-Architecture
construction	O
algorithm	O
for	O
this	O
task	O
was	O
suggested	O
in	O
1989	O
by	O
Edward	O
Fiala	O
and	O
Daniel	O
Greene	O
;	O
several	O
years	O
later	O
a	O
similar	O
result	O
was	O
obtained	O
with	O
the	O
variation	O
of	O
Ukkonen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
by	O
Jesper	O
Larsson	O
.	O
</s>
<s>
The	O
existence	O
of	O
such	O
an	O
algorithm	O
,	O
for	O
compacted	O
suffix	B-General_Concept
automaton	I-General_Concept
that	O
absorbs	O
some	O
properties	O
of	O
both	O
suffix	B-Architecture
trees	I-Architecture
and	O
suffix	O
automata	O
,	O
was	O
an	O
open	O
question	O
for	O
a	O
long	O
time	O
until	O
it	O
was	O
discovered	O
by	O
Martin	O
Senft	O
and	O
Tomasz	O
Dvorak	O
in	O
2008	O
,	O
that	O
it	O
is	O
impossible	O
if	O
the	O
alphabet	O
's	O
size	O
is	O
at	O
least	O
two	O
.	O
</s>
<s>
The	O
window	O
for	O
which	O
suffix	B-General_Concept
automaton	I-General_Concept
is	O
built	O
in	O
this	O
algorithm	O
is	O
not	O
guaranteed	O
to	O
be	O
of	O
length	O
but	O
it	O
is	O
guaranteed	O
to	O
be	O
at	O
least	O
and	O
at	O
most	O
while	O
providing	O
linear	O
overall	O
complexity	O
of	O
the	O
algorithm	O
.	O
</s>
<s>
Suffix	B-General_Concept
automaton	I-General_Concept
of	O
the	O
string	O
may	O
be	O
used	O
to	O
solve	O
such	O
problems	O
as	O
:	O
</s>
<s>
Finding	O
the	O
longest	B-Algorithm
common	I-Algorithm
substring	I-Algorithm
of	O
and	O
in	O
,	O
</s>
<s>
It	O
is	O
assumed	O
here	O
that	O
is	O
given	O
on	O
the	O
input	O
after	O
suffix	B-General_Concept
automaton	I-General_Concept
of	O
is	O
constructed	O
.	O
</s>
<s>
Suffix	O
automata	O
are	O
also	O
used	O
in	O
data	B-General_Concept
compression	I-General_Concept
,	O
music	O
retrieval	O
and	O
matching	O
on	O
genome	O
sequences	O
.	O
</s>
