<s>
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
finds	O
a	O
minimum	O
spanning	O
forest	O
of	O
an	O
undirected	O
edge-weighted	O
graph	O
.	O
</s>
<s>
It	O
is	O
a	O
greedy	B-Algorithm
algorithm	I-Algorithm
in	O
graph	O
theory	O
as	O
in	O
each	O
step	O
it	O
adds	O
the	O
next	O
lowest-weight	O
edge	O
that	O
will	O
not	O
form	O
a	O
cycle	O
to	O
the	O
minimum	O
spanning	O
forest	O
.	O
</s>
<s>
Other	O
algorithms	O
for	O
this	O
problem	O
include	O
Prim	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
,	O
the	O
reverse-delete	B-Algorithm
algorithm	I-Algorithm
,	O
and	O
Borůvka	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
The	O
following	O
code	O
is	O
implemented	O
with	O
a	O
disjoint-set	B-Algorithm
data	I-Algorithm
structure	I-Algorithm
.	O
</s>
<s>
Here	O
,	O
we	O
represent	O
our	O
forest	O
F	O
as	O
a	O
set	O
of	O
edges	O
,	O
and	O
use	O
the	O
disjoint-set	B-Algorithm
data	I-Algorithm
structure	I-Algorithm
to	O
efficiently	O
determine	O
whether	O
two	O
vertices	O
are	O
part	O
of	O
the	O
same	O
tree	O
.	O
</s>
<s>
For	O
a	O
graph	O
with	O
E	O
edges	O
and	O
V	O
vertices	O
,	O
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
can	O
be	O
shown	O
to	O
run	O
in	O
O(E log E )	O
time	O
,	O
or	O
equivalently	O
,	O
O(E log V )	O
time	O
,	O
all	O
with	O
simple	O
data	O
structures	O
.	O
</s>
<s>
We	O
can	O
achieve	O
this	O
bound	O
as	O
follows	O
:	O
first	O
sort	O
the	O
edges	O
by	O
weight	O
using	O
a	O
comparison	B-Algorithm
sort	I-Algorithm
in	O
O(E log E )	O
time	O
;	O
this	O
allows	O
the	O
step	O
"	O
remove	O
an	O
edge	O
with	O
minimum	O
weight	O
from	O
S	O
"	O
to	O
operate	O
in	O
constant	O
time	O
.	O
</s>
<s>
Next	O
,	O
we	O
use	O
a	O
disjoint-set	B-Algorithm
data	I-Algorithm
structure	I-Algorithm
to	O
keep	O
track	O
of	O
which	O
vertices	O
are	O
in	O
which	O
components	O
.	O
</s>
<s>
We	O
place	O
each	O
vertex	O
into	O
its	O
own	O
disjoint	B-Algorithm
set	I-Algorithm
,	O
which	O
takes	O
O(V )	O
operations	O
.	O
</s>
<s>
Even	O
a	O
simple	O
disjoint-set	B-Algorithm
data	I-Algorithm
structure	I-Algorithm
such	O
as	O
disjoint-set	O
forests	O
with	O
union	O
by	O
rank	O
can	O
perform	O
O(E )	O
operations	O
in	O
O(E log V )	O
time	O
.	O
</s>
<s>
Provided	O
that	O
the	O
edges	O
are	O
either	O
already	O
sorted	O
or	O
can	O
be	O
sorted	O
in	O
linear	O
time	O
(	O
for	O
example	O
with	O
counting	B-Algorithm
sort	I-Algorithm
or	O
radix	B-Algorithm
sort	I-Algorithm
)	O
,	O
the	O
algorithm	O
can	O
use	O
a	O
more	O
sophisticated	O
disjoint-set	B-Algorithm
data	I-Algorithm
structure	I-Algorithm
to	O
run	O
in	O
O( E	O
α(V )	O
)	O
time	O
,	O
where	O
α	O
is	O
the	O
extremely	O
slowly	O
growing	O
inverse	O
of	O
the	O
single-valued	O
Ackermann	O
function	O
.	O
</s>
<s>
We	O
show	O
that	O
the	O
following	O
proposition	O
P	O
is	O
true	O
by	B-Algorithm
induction	I-Algorithm
:	O
If	O
F	O
is	O
the	O
set	O
of	O
edges	O
chosen	O
at	O
any	O
stage	O
of	O
the	O
algorithm	O
,	O
then	O
there	O
is	O
some	O
minimum	O
spanning	O
tree	O
that	O
contains	O
F	O
and	O
none	O
of	O
the	O
edges	O
rejected	O
by	O
the	O
algorithm	O
.	O
</s>
<s>
Therefore	O
,	O
by	O
the	O
principle	B-Algorithm
of	I-Algorithm
induction	I-Algorithm
,	O
P	O
holds	O
when	O
F	O
has	O
become	O
a	O
spanning	O
tree	O
,	O
which	O
is	O
only	O
possible	O
if	O
F	O
is	O
a	O
minimum	O
spanning	O
tree	O
itself	O
.	O
</s>
<s>
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
inherently	O
sequential	O
and	O
hard	O
to	O
parallelize	O
.	O
</s>
<s>
It	O
is	O
,	O
however	O
,	O
possible	O
to	O
perform	O
the	O
initial	O
sorting	O
of	O
the	O
edges	O
in	O
parallel	O
or	O
,	O
alternatively	O
,	O
to	O
use	O
a	O
parallel	O
implementation	O
of	O
a	O
binary	B-Application
heap	I-Application
to	O
extract	O
the	O
minimum-weight	O
edge	O
in	O
every	O
iteration	O
.	O
</s>
<s>
As	O
parallel	O
sorting	O
is	O
possible	O
in	O
time	O
on	O
processors	O
,	O
the	O
runtime	O
of	O
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
can	O
be	O
reduced	O
to	O
O( E	O
α(V )	O
)	O
,	O
where	O
α	O
again	O
is	O
the	O
inverse	O
of	O
the	O
single-valued	O
Ackermann	O
function	O
.	O
</s>
<s>
A	O
variant	O
of	O
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
,	O
named	O
Filter-Kruskal	O
,	O
has	O
been	O
described	O
by	O
Osipov	O
et	O
al	O
.	O
</s>
<s>
The	O
basic	O
idea	O
behind	O
Filter-Kruskal	O
is	O
to	O
partition	O
the	O
edges	O
in	O
a	O
similar	O
way	O
to	O
quicksort	B-Algorithm
and	O
filter	O
out	O
edges	O
that	O
connect	O
vertices	O
of	O
the	O
same	O
tree	O
to	O
reduce	O
the	O
cost	O
of	O
sorting	O
.	O
</s>
<s>
The	O
following	O
pseudocode	B-Language
demonstrates	O
this	O
.	O
</s>
<s>
Finally	O
,	O
other	O
variants	O
of	O
a	O
parallel	O
implementation	O
of	O
Kruskal	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
have	O
been	O
explored	O
.	O
</s>
