<s>
External	B-Algorithm
memory	I-Algorithm
graph	I-Algorithm
traversal	I-Algorithm
is	O
a	O
type	O
of	O
graph	B-Algorithm
traversal	I-Algorithm
optimized	O
for	O
accessing	O
externally	O
stored	O
memory	O
.	O
</s>
<s>
Graph	B-Algorithm
traversal	I-Algorithm
is	O
a	O
subroutine	O
in	O
most	O
graph	O
algorithms	O
.	O
</s>
<s>
The	O
goal	O
of	O
a	O
graph	B-Algorithm
traversal	I-Algorithm
algorithm	O
is	O
to	O
visit	O
(	O
and	O
/	O
or	O
process	O
)	O
every	O
node	O
of	O
a	O
graph	O
.	O
</s>
<s>
Graph	B-Algorithm
traversal	I-Algorithm
algorithms	O
,	O
like	O
breadth-first	B-Algorithm
search	I-Algorithm
and	O
depth-first	B-Algorithm
search	I-Algorithm
,	O
are	O
analyzed	O
using	O
the	O
von	B-Architecture
Neumann	I-Architecture
model	I-Architecture
,	O
which	O
assumes	O
uniform	O
memory	O
access	O
cost	O
.	O
</s>
<s>
Since	O
accessing	O
the	O
disk	O
is	O
magnitudes	O
slower	O
than	O
accessing	O
internal	O
memory	O
,	O
the	O
need	O
for	O
efficient	O
traversal	O
of	O
external	B-Application
memory	I-Application
exists	O
.	O
</s>
<s>
For	O
external	B-Application
memory	I-Application
algorithms	I-Application
the	O
external	B-Application
memory	I-Application
model	I-Application
by	O
Aggarwal	O
and	O
Vitter	O
is	O
used	O
for	O
analysis	O
.	O
</s>
<s>
The	O
measure	O
of	O
performance	O
for	O
an	O
external	B-Application
memory	I-Application
algorithm	I-Application
is	O
the	O
number	O
of	O
I/Os	O
it	O
performs	O
.	O
</s>
<s>
The	O
breadth-first	B-Algorithm
search	I-Algorithm
algorithm	O
starts	O
at	O
a	O
root	O
node	O
and	O
traverses	O
every	O
node	O
with	O
depth	O
one	O
.	O
</s>
<s>
For	O
an	O
undirected	O
graph	O
,	O
Munagala	O
and	O
Ranade	O
proposed	O
the	O
following	O
external	B-Application
memory	I-Application
algorithm	I-Application
:	O
</s>
<s>
Let	O
denote	O
the	O
nodes	O
in	O
breadth-first	B-Algorithm
search	I-Algorithm
level	O
t	O
and	O
let	O
be	O
the	O
multi-set	O
of	O
neighbors	O
of	O
level	O
t-1	O
.	O
</s>
<s>
In	O
the	O
first	O
phase	O
the	O
graph	O
is	O
preprocessed	O
,	O
the	O
second	O
phase	O
performs	O
a	O
breadth-first	B-Algorithm
search	I-Algorithm
using	O
the	O
information	O
gathered	O
in	O
phase	O
one	O
.	O
</s>
<s>
The	O
breadth-first	B-Algorithm
search	I-Algorithm
phase	O
is	O
similar	O
to	O
the	O
MR	O
algorithm	O
.	O
</s>
<s>
Further	O
,	O
the	O
nodes	O
of	O
any	O
created	O
breadth-first	B-Algorithm
search	I-Algorithm
level	O
carry	O
identifiers	O
for	O
the	O
files	O
of	O
their	O
respective	O
subgraphs	O
.	O
</s>
<s>
The	O
depth-first	B-Algorithm
search	I-Algorithm
algorithm	O
explores	O
a	O
graph	O
along	O
each	O
branch	O
as	O
deep	O
as	O
possible	O
,	O
before	O
backtracing	O
.	O
</s>
<s>
The	O
algorithm	O
simulates	O
an	O
internal	O
depth-first	B-Algorithm
search	I-Algorithm
algorithm	O
.	O
</s>
<s>
1	O
procedure	O
BGVW-depth-first-search(G, v )	O
:	O
</s>
