<s>
In	O
distributed	B-Architecture
computing	I-Architecture
,	O
leader	B-Operating_System
election	I-Operating_System
is	O
the	O
process	B-Operating_System
of	O
designating	O
a	O
single	O
process	B-Operating_System
as	O
the	O
organizer	O
of	O
some	O
task	O
distributed	O
among	O
several	O
computers	O
(	O
nodes	O
)	O
.	O
</s>
<s>
After	O
a	O
leader	B-Operating_System
election	I-Operating_System
algorithm	O
has	O
been	O
run	O
,	O
however	O
,	O
each	O
node	O
throughout	O
the	O
network	O
recognizes	O
a	O
particular	O
,	O
unique	O
node	O
as	O
the	O
task	O
leader	O
.	O
</s>
<s>
The	O
definition	O
of	O
this	O
problem	O
is	O
often	O
attributed	O
to	O
LeLann	O
,	O
who	O
formalized	O
it	O
as	O
a	O
method	O
to	O
create	O
a	O
new	O
token	O
in	O
a	O
token	O
ring	B-Architecture
network	I-Architecture
in	O
which	O
the	O
token	O
has	O
been	O
lost	O
.	O
</s>
<s>
Leader	B-Operating_System
election	I-Operating_System
algorithms	O
are	O
designed	O
to	O
be	O
economical	O
in	O
terms	O
of	O
total	O
bytes	B-Application
transmitted	O
,	O
and	O
time	O
.	O
</s>
<s>
The	O
algorithm	O
suggested	O
by	O
Gallager	O
,	O
Humblet	O
,	O
and	O
Spira	O
for	O
general	O
undirected	O
graphs	O
has	O
had	O
a	O
strong	O
impact	O
on	O
the	O
design	O
of	O
distributed	O
algorithms	O
in	O
general	O
,	O
and	O
won	O
the	O
Dijkstra	O
Prize	O
for	O
an	O
influential	O
paper	O
in	O
distributed	B-Architecture
computing	I-Architecture
.	O
</s>
<s>
A	O
general	O
method	O
that	O
decouples	O
the	O
issue	O
of	O
the	O
graph	O
family	O
from	O
the	O
design	O
of	O
the	O
leader	B-Operating_System
election	I-Operating_System
algorithm	O
was	O
suggested	O
by	O
Korach	O
,	O
Kutten	O
,	O
and	O
Moran	O
.	O
</s>
<s>
The	O
problem	O
of	O
leader	B-Operating_System
election	I-Operating_System
is	O
for	O
each	O
processor	O
eventually	O
to	O
decide	O
whether	O
it	O
is	O
a	O
leader	O
or	O
not	O
,	O
subject	O
to	O
the	O
constraint	O
that	O
exactly	O
one	O
processor	O
decides	O
that	O
it	O
is	O
the	O
leader	O
.	O
</s>
<s>
An	O
algorithm	O
solves	O
the	O
leader	B-Operating_System
election	I-Operating_System
problem	O
if	O
:	O
</s>
<s>
A	O
valid	O
leader	B-Operating_System
election	I-Operating_System
algorithm	O
must	O
meet	O
the	O
following	O
conditions	O
:	O
</s>
<s>
An	O
algorithm	O
for	O
leader	B-Operating_System
election	I-Operating_System
may	O
vary	O
in	O
the	O
following	O
aspects	O
:	O
</s>
<s>
Communication	O
mechanism	O
:	O
the	O
processors	O
are	O
either	O
synchronous	O
in	O
which	O
processes	O
are	O
synchronized	O
by	O
a	O
clock	O
signal	O
or	O
asynchronous	B-Application
where	O
processes	O
run	O
at	O
arbitrary	O
speeds	O
.	O
</s>
<s>
Process	B-Operating_System
names	O
:	O
whether	O
processes	O
have	O
a	O
unique	O
identity	O
or	O
are	O
indistinguishable	O
(	O
anonymous	O
)	O
.	O
</s>
<s>
Network	B-Architecture
topology	I-Architecture
:	O
for	O
instance	O
,	O
ring	B-Architecture
,	O
acyclic	O
graph	O
or	O
complete	O
graph	O
.	O
</s>
<s>
A	O
ring	B-Architecture
network	I-Architecture
is	O
a	O
connected-graph	O
topology	B-Architecture
in	O
which	O
each	O
node	O
is	O
exactly	O
connected	O
to	O
two	O
other	O
nodes	O
,	O
i.e.	O
,	O
for	O
a	O
graph	O
with	O
n	O
nodes	O
,	O
there	O
are	O
exactly	O
n	O
edges	O
connecting	O
the	O
nodes	O
.	O
</s>
<s>
A	O
ring	B-Architecture
can	O
be	O
unidirectional	O
,	O
which	O
means	O
processors	O
only	O
communicate	O
in	O
one	O
direction	O
(	O
a	O
node	O
could	O
only	O
send	O
messages	O
to	O
the	O
left	O
or	O
only	O
send	O
messages	O
to	O
the	O
right	O
)	O
,	O
or	O
bidirectional	O
,	O
meaning	O
processors	O
may	O
transmit	O
and	O
receive	O
messages	O
in	O
both	O
directions	O
(	O
a	O
node	O
could	O
send	O
messages	O
to	O
the	O
left	O
and	O
right	O
)	O
.	O
</s>
<s>
A	O
ring	B-Architecture
is	O
said	O
to	O
be	O
anonymous	O
if	O
every	O
processor	O
is	O
identical	O
.	O
</s>
<s>
This	O
is	O
due	O
to	O
the	O
fact	O
that	O
there	O
is	O
no	O
possibility	O
of	O
breaking	O
symmetry	O
in	O
an	O
anonymous	O
ring	B-Architecture
if	O
all	O
processes	O
run	O
at	O
the	O
same	O
speed	O
.	O
</s>
<s>
Consider	O
an	O
anonymous	O
ring	B-Architecture
R	O
with	O
size	O
n>1	O
.	O
</s>
<s>
Assume	O
there	O
exists	O
an	O
algorithm	O
"	O
A	O
"	O
to	O
solve	O
leader	B-Operating_System
election	I-Operating_System
in	O
this	O
anonymous	O
ring	B-Architecture
R	O
.	O
</s>
<s>
Inductive	O
step	O
:	O
in	O
round	O
,	O
every	O
process	B-Operating_System
send	O
the	O
same	O
message	O
to	O
the	O
right	O
and	O
send	O
the	O
same	O
message	O
to	O
the	O
left	O
.	O
</s>
<s>
Since	O
all	O
the	O
processes	O
are	O
in	O
the	O
same	O
state	O
after	O
round	O
,	O
in	O
round	O
k	O
,	O
every	O
process	B-Operating_System
will	O
receive	O
the	O
message	O
from	O
the	O
left	O
edge	O
,	O
and	O
will	O
receive	O
the	O
message	O
from	O
the	O
right	O
edge	O
.	O
</s>
<s>
The	O
above	O
lemma	O
contradicts	O
the	O
fact	O
that	O
after	O
some	O
finite	O
number	O
of	O
rounds	O
in	O
an	O
execution	O
of	O
A	O
,	O
one	O
process	B-Operating_System
entered	O
the	O
elected	O
state	O
and	O
other	O
processes	O
entered	O
the	O
non-elected	O
state	O
.	O
</s>
<s>
A	O
common	O
approach	O
to	O
solve	O
the	O
problem	O
of	O
leader	B-Operating_System
election	I-Operating_System
in	O
anonymous	O
rings	O
is	O
the	O
use	O
of	O
probabilistic	B-General_Concept
algorithms	I-General_Concept
.	O
</s>
<s>
Since	O
there	O
is	O
no	O
algorithm	O
for	O
anonymous	O
rings	O
(	O
proved	O
above	O
)	O
,	O
the	O
asynchronous	B-Application
rings	O
would	O
be	O
considered	O
as	O
asynchronous	B-Application
non-anonymous	O
rings	O
.	O
</s>
<s>
In	O
non-anonymous	O
rings	O
,	O
each	O
process	B-Operating_System
has	O
a	O
unique	O
,	O
and	O
they	O
do	O
n't	O
know	O
the	O
size	O
of	O
the	O
ring	B-Architecture
.	O
</s>
<s>
Leader	B-Operating_System
election	I-Operating_System
in	O
asynchronous	B-Application
rings	O
can	O
be	O
solved	O
by	O
some	O
algorithm	O
with	O
using	O
messages	O
or	O
messages	O
.	O
</s>
<s>
In	O
the	O
algorithm	O
,	O
every	O
process	B-Operating_System
sends	O
a	O
message	O
with	O
its	O
to	O
the	O
left	O
edge	O
.	O
</s>
<s>
On	O
the	O
th	O
phase	O
,	O
a	O
process	B-Operating_System
will	O
determine	O
whether	O
it	O
is	O
the	O
winner	O
among	O
the	O
left	O
side	O
and	O
right	O
side	O
neighbors	O
.	O
</s>
<s>
If	O
it	O
is	O
a	O
winner	O
,	O
then	O
the	O
process	B-Operating_System
can	O
go	O
to	O
next	O
phase	O
.	O
</s>
<s>
In	O
phase	O
,	O
each	O
process	B-Operating_System
needs	O
to	O
determine	O
itself	O
is	O
a	O
winner	O
or	O
not	O
by	O
sending	O
a	O
message	O
with	O
its	O
to	O
the	O
left	O
and	O
right	O
neighbors	O
(	O
neighbor	O
do	O
not	O
forward	O
the	O
message	O
)	O
.	O
</s>
<s>
If	O
the	O
process	B-Operating_System
receives	O
two	O
s	O
,	O
then	O
it	O
is	O
the	O
winner	O
in	O
phase	O
.	O
</s>
<s>
In	O
Attiya	O
and	O
Welch	O
's	O
Distributed	B-Architecture
Computing	I-Architecture
book	O
,	O
they	O
described	O
a	O
non-uniform	O
algorithm	O
using	O
messages	O
in	O
synchronous	O
ring	B-Architecture
with	O
known	O
ring	B-Architecture
size	O
.	O
</s>
<s>
In	O
phase	O
,	O
if	O
there	O
is	O
a	O
process	B-Operating_System
with	O
,	O
then	O
process	B-Operating_System
sends	O
termination	O
message	O
to	O
the	O
other	O
processes	O
(	O
sending	O
termination	O
messages	O
cost	O
rounds	O
)	O
.	O
</s>
<s>
The	O
algorithm	O
will	O
check	O
if	O
there	O
is	O
a	O
phase	O
number	O
equals	O
to	O
a	O
process	B-Operating_System
,	O
then	O
does	O
the	O
same	O
steps	O
as	O
phase	O
.	O
</s>
<s>
Itai	O
and	O
Rodeh	O
introduced	O
an	O
algorithm	O
for	O
a	O
unidirectional	O
ring	B-Architecture
with	O
synchronized	O
processes	O
.	O
</s>
<s>
They	O
assume	O
the	O
size	O
of	O
the	O
ring	B-Architecture
(	O
number	O
of	O
nodes	O
)	O
is	O
known	O
to	O
the	O
processes	O
.	O
</s>
<s>
For	O
a	O
ring	B-Architecture
of	O
size	O
n	O
,	O
a≤n	O
processors	O
are	O
active	O
.	O
</s>
<s>
To	O
determine	O
the	O
value	O
of	O
c	O
,	O
each	O
candidate	O
sends	O
a	O
token	O
(	O
pebble	O
)	O
at	O
the	O
start	O
of	O
the	O
phase	O
which	O
is	O
passed	O
around	O
the	O
ring	B-Architecture
,	O
returning	O
after	O
exactly	O
n	O
time	O
units	O
to	O
its	O
sender	O
.	O
</s>
<s>
This	O
algorithm	O
achieves	O
leader	B-Operating_System
election	I-Operating_System
with	O
expected	O
message	O
complexity	O
of	O
O(nlogn )	O
.	O
</s>
<s>
In	O
typical	O
approaches	O
to	O
leader	B-Operating_System
election	I-Operating_System
,	O
the	O
size	O
of	O
the	O
ring	B-Architecture
is	O
assumed	O
to	O
be	O
known	O
to	O
the	O
processes	O
.	O
</s>
<s>
Even	O
assuming	O
an	O
algorithm	O
exists	O
,	O
the	O
leader	O
could	O
not	O
estimate	O
the	O
size	O
of	O
the	O
ring	B-Architecture
.	O
</s>
<s>
in	O
any	O
anonymous	O
ring	B-Architecture
,	O
there	O
is	O
a	O
positive	O
probability	O
that	O
an	O
algorithm	O
computes	O
a	O
wrong	O
ring	B-Architecture
size	O
.	O
</s>
<s>
A	O
process	B-Operating_System
receiving	O
a	O
message	O
and	O
compares	O
it	O
with	O
its	O
own	O
.	O
</s>
<s>
Hirschberg	B-Operating_System
and	I-Operating_System
Sinclair	I-Operating_System
improved	O
this	O
algorithm	O
with	O
message	O
complexity	O
by	O
introducing	O
a	O
2	O
directional	O
message	O
passing	O
scheme	O
allowing	O
the	O
processors	O
to	O
send	O
messages	O
in	O
both	O
directions	O
.	O
</s>
<s>
The	O
mesh	O
is	O
another	O
popular	O
form	O
of	O
network	B-Architecture
topology	I-Architecture
,	O
especially	O
in	O
parallel	O
systems	O
,	O
redundant	O
memory	O
systems	O
and	O
interconnection	O
networks	O
.	O
</s>
<s>
A	O
typical	O
algorithm	O
to	O
solve	O
the	O
leader	B-Operating_System
election	I-Operating_System
in	O
an	O
unoriented	O
mesh	O
is	O
to	O
only	O
elect	O
one	O
of	O
the	O
four	O
corner	O
nodes	O
as	O
the	O
leader	O
.	O
</s>
<s>
Wake-up	O
process	B-Operating_System
:	O
in	O
which	O
nodes	O
initiate	O
the	O
election	O
process	B-Operating_System
.	O
</s>
<s>
Election	O
process	B-Operating_System
:	O
the	O
election	O
in	O
outer	O
ring	B-Architecture
takes	O
two	O
stages	O
at	O
most	O
with	O
messages	O
.	O
</s>
<s>
Leader	B-Operating_System
election	I-Operating_System
in	O
an	O
oriented	O
mesh	O
is	O
trivial	O
.	O
</s>
<s>
Similar	O
to	O
procedures	O
in	O
ring	B-Architecture
structures	O
,	O
this	O
method	O
in	O
each	O
stage	O
eliminates	O
potential	O
candidates	O
until	O
eventually	O
one	O
candidate	O
node	O
is	O
left	O
.	O
</s>
<s>
A	O
Hypercube	B-Operating_System
is	O
a	O
network	O
consisting	O
of	O
nodes	O
,	O
each	O
with	O
degree	O
of	O
and	O
edges	O
.	O
</s>
<s>
A	O
similar	O
electoral	O
stages	O
as	O
before	O
can	O
be	O
used	O
to	O
solve	O
the	O
problem	O
of	O
leader	B-Operating_System
election	I-Operating_System
.	O
</s>
<s>
In	O
the	O
case	O
of	O
unoriented	O
hypercubes	B-Operating_System
,	O
a	O
similar	O
approach	O
can	O
be	O
used	O
but	O
with	O
a	O
higher	O
message	O
complexity	O
of	O
.	O
</s>
<s>
Complete	B-Architecture
networks	I-Architecture
are	O
structures	O
in	O
which	O
all	O
processes	O
are	O
connected	O
to	O
one	O
another	O
,	O
i.e.	O
,	O
the	O
degree	O
of	O
each	O
node	O
is	O
n-1	O
,	O
n	O
being	O
the	O
size	O
of	O
the	O
network	O
.	O
</s>
<s>
Dummy	O
:	O
nodes	O
that	O
do	O
not	O
participate	O
in	O
the	O
leader	B-Operating_System
election	I-Operating_System
algorithm	O
.	O
</s>
<s>
Based	O
on	O
a	O
priority	O
scheme	O
,	O
candidate	O
nodes	O
collaborate	O
in	O
the	O
virtual	O
ring	B-Architecture
.	O
</s>
<s>
At	O
some	O
point	O
,	O
candidates	O
become	O
aware	O
of	O
the	O
identity	O
of	O
candidates	O
that	O
precede	O
them	O
in	O
the	O
ring	B-Architecture
.	O
</s>
<s>
As	O
the	O
name	O
implies	O
,	O
these	O
algorithms	O
are	O
designed	O
to	O
be	O
used	O
in	O
every	O
form	O
of	O
process	B-Operating_System
networks	O
without	O
any	O
prior	O
knowledge	O
of	O
the	O
topology	B-Architecture
of	O
a	O
network	O
or	O
its	O
properties	O
,	O
such	O
as	O
its	O
size	O
.	O
</s>
<s>
The	O
cost	O
of	O
mega-merger	B-Operating_System
method	O
is	O
where	O
m	O
is	O
the	O
number	O
of	O
edges	O
and	O
n	O
is	O
the	O
number	O
of	O
nodes	O
.	O
</s>
<s>
Yo-yo	B-Operating_System
(	O
algorithm	O
)	O
is	O
a	O
minimum	O
finding	O
algorithm	O
consisting	O
of	O
two	O
parts	O
:	O
a	O
preprocessing	O
phase	O
and	O
a	O
series	O
of	O
iterations	O
.	O
</s>
<s>
In	O
this	O
phase	O
sources	O
start	O
the	O
process	B-Operating_System
to	O
propagate	O
to	O
each	O
sink	O
the	O
smallest	O
values	O
of	O
the	O
sources	O
connected	O
to	O
that	O
sink	O
.	O
</s>
<s>
In	O
radio	O
network	O
protocols	O
,	O
leader	B-Operating_System
election	I-Operating_System
is	O
often	O
used	O
as	O
a	O
first	O
step	O
to	O
approach	O
more	O
advanced	O
communication	O
primitives	O
,	O
such	O
as	O
message	O
gathering	O
or	O
broadcasts	O
.	O
</s>
<s>
The	O
very	O
nature	O
of	O
wireless	O
networks	O
induces	O
collisions	O
when	O
adjacent	O
nodes	O
transmit	O
at	O
the	O
same	O
time	O
;	O
electing	O
a	O
leader	O
allows	O
to	O
better	O
coordinate	O
this	O
process	B-Operating_System
.	O
</s>
<s>
While	O
the	O
diameter	O
D	O
of	O
a	O
network	O
is	O
a	O
natural	O
lower	O
bound	O
for	O
the	O
time	O
needed	O
to	O
elect	O
a	O
leader	O
,	O
upper	O
and	O
lower	O
bounds	O
for	O
the	O
leader	B-Operating_System
election	I-Operating_System
problem	O
depend	O
on	O
the	O
specific	O
radio	O
model	O
studied	O
.	O
</s>
<s>
Known	O
runtimes	O
for	O
single-hop	B-Protocol
networks	O
range	O
from	O
a	O
constant	O
(	O
expected	O
with	O
collision	O
detection	O
)	O
to	O
O(n log n )	O
rounds	O
(	O
deterministic	O
and	O
no	O
collision	O
detection	O
)	O
.	O
</s>
<s>
In	O
multi-hop	B-Protocol
networks	O
,	O
known	O
runtimes	O
differ	O
from	O
roughly	O
O( ( D+	O
log	O
n	O
)	O
(	O
log2	O
log	O
n	O
)	O
)	O
rounds	O
(	O
with	O
high	O
probability	O
in	O
the	O
beeping	O
model	O
)	O
,	O
O(D log n )	O
(	O
deterministic	O
in	O
the	O
beeping	O
model	O
)	O
,	O
O(n )	O
(	O
deterministic	O
with	O
collision	O
detection	O
)	O
to	O
O( n	O
log3/2	O
n	O
(	O
log	O
log	O
n	O
)	O
0.5	O
)	O
rounds	O
(	O
deterministic	O
and	O
no	O
collision	O
detection	O
)	O
.	O
</s>
