<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
graph	B-Algorithm
traversal	I-Algorithm
(	O
also	O
known	O
as	O
graph	B-Algorithm
search	I-Algorithm
)	O
refers	O
to	O
the	O
process	O
of	O
visiting	O
(	O
checking	O
and/or	O
updating	O
)	O
each	O
vertex	O
in	O
a	O
graph	O
.	O
</s>
<s>
Tree	B-Algorithm
traversal	I-Algorithm
is	O
a	O
special	O
case	O
of	O
graph	B-Algorithm
traversal	I-Algorithm
.	O
</s>
<s>
Unlike	O
tree	B-Algorithm
traversal	I-Algorithm
,	O
graph	B-Algorithm
traversal	I-Algorithm
may	O
require	O
that	O
some	O
vertices	O
be	O
visited	O
more	O
than	O
once	O
,	O
since	O
it	O
is	O
not	O
necessarily	O
known	O
before	O
transitioning	O
to	O
a	O
vertex	O
that	O
it	O
has	O
already	O
been	O
explored	O
.	O
</s>
<s>
Both	O
the	O
depth-first	B-Algorithm
and	O
breadth-first	B-Algorithm
graph	I-Algorithm
searches	I-Algorithm
are	O
adaptations	O
of	O
tree-based	O
algorithms	O
,	O
distinguished	O
primarily	O
by	O
the	O
lack	O
of	O
a	O
structurally	O
determined	O
"	O
root	O
"	O
vertex	O
and	O
the	O
addition	O
of	O
a	O
data	O
structure	O
to	O
record	O
the	O
traversal	O
's	O
visitation	O
state	O
.	O
</s>
<s>
A	O
depth-first	B-Algorithm
search	I-Algorithm
(	O
DFS	O
)	O
is	O
an	O
algorithm	O
for	O
traversing	O
a	O
finite	O
graph	O
.	O
</s>
<s>
A	O
stack	O
(	O
often	O
the	O
program	O
's	O
call	B-General_Concept
stack	I-General_Concept
via	O
recursion	O
)	O
is	O
generally	O
used	O
when	O
implementing	O
the	O
algorithm	O
.	O
</s>
<s>
The	O
algorithm	O
then	O
backtracks	B-Algorithm
along	O
previously	O
visited	O
vertices	O
,	O
until	O
it	O
finds	O
a	O
vertex	O
connected	O
to	O
yet	O
more	O
uncharted	O
territory	O
.	O
</s>
<s>
It	O
will	O
then	O
proceed	O
down	O
the	O
new	O
path	O
as	O
it	O
had	O
before	O
,	O
backtracking	B-Algorithm
as	O
it	O
encounters	O
dead-ends	O
,	O
and	O
ending	O
only	O
when	O
the	O
algorithm	O
has	O
backtracked	O
past	O
the	O
original	O
"	O
root	O
"	O
vertex	O
from	O
the	O
very	O
first	O
step	O
.	O
</s>
<s>
DFS	O
is	O
the	O
basis	O
for	O
many	O
graph-related	O
algorithms	O
,	O
including	O
topological	B-Algorithm
sorts	I-Algorithm
and	O
planarity	O
testing	O
.	O
</s>
<s>
A	O
breadth-first	B-Algorithm
search	I-Algorithm
(	O
BFS	O
)	O
is	O
another	O
technique	O
for	O
traversing	O
a	O
finite	O
graph	O
.	O
</s>
<s>
BFS	O
visits	O
the	O
sibling	O
vertices	O
before	O
visiting	O
the	O
child	O
vertices	O
,	O
and	O
a	O
queue	B-Application
is	O
used	O
in	O
the	O
search	O
process	O
.	O
</s>
<s>
Breadth-first	B-Algorithm
search	I-Algorithm
can	O
be	O
used	O
to	O
solve	O
many	O
problems	O
in	O
graph	O
theory	O
,	O
for	O
example	O
:	O
</s>
<s>
Cheney	B-General_Concept
's	I-General_Concept
algorithm	I-General_Concept
;	O
</s>
<s>
Cuthill	B-Algorithm
–	I-Algorithm
McKee	I-Algorithm
algorithm	I-Algorithm
mesh	O
numbering	O
;	O
</s>
<s>
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
algorithm	I-Algorithm
for	O
computing	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
in	O
a	O
flow	B-Algorithm
network	I-Algorithm
;	O
</s>
<s>
flood	B-Protocol
fill	I-Protocol
algorithm	I-Protocol
for	O
marking	O
contiguous	O
regions	O
of	O
a	O
two	O
dimensional	O
image	O
or	O
n-dimensional	O
array	O
;	O
</s>
<s>
The	O
problem	O
of	O
graph	O
exploration	O
can	O
be	O
seen	O
as	O
a	O
variant	O
of	O
graph	B-Algorithm
traversal	I-Algorithm
.	O
</s>
<s>
It	O
is	O
an	O
online	B-Algorithm
problem	I-Algorithm
,	O
meaning	O
that	O
the	O
information	O
about	O
the	O
graph	O
is	O
only	O
revealed	O
during	O
the	O
runtime	O
of	O
the	O
algorithm	O
.	O
</s>
<s>
The	O
problem	O
can	O
also	O
be	O
understood	O
as	O
a	O
specific	O
version	O
of	O
the	O
travelling	B-Algorithm
salesman	I-Algorithm
problem	I-Algorithm
,	O
where	O
the	O
salesman	O
has	O
to	O
discover	O
the	O
graph	O
on	O
the	O
go	O
.	O
</s>
<s>
For	O
general	O
graphs	O
,	O
the	O
best	O
known	O
algorithms	O
for	O
both	O
undirected	O
and	O
directed	O
graphs	O
is	O
a	O
simple	O
greedy	B-Algorithm
algorithm	I-Algorithm
:	O
</s>
<s>
The	O
best	O
lower	O
bound	O
known	O
for	O
any	O
deterministic	O
online	B-Algorithm
algorithm	I-Algorithm
is	O
10/3	O
.	O
</s>
<s>
A	O
universal	O
traversal	O
sequence	O
is	O
a	O
sequence	O
of	O
instructions	O
comprising	O
a	O
graph	B-Algorithm
traversal	I-Algorithm
for	O
any	O
regular	O
graph	O
with	O
a	O
set	O
number	O
of	O
vertices	O
and	O
for	O
any	O
starting	O
vertex	O
.	O
</s>
