<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Highly Adaptive Leader Election Algorithm for Mobile Ad Hoc Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Leila MELIT</string-name>
          <email>melitleila@yahoo.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nadjib Badache</string-name>
          <email>badache@mail.cerist.dz</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Department, University of Bejaia</institution>
          ,
          <addr-line>06000 Bejaia</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Laboratory of Computer Systems</institution>
          ,
          <addr-line>USTHB, Algiers</addr-line>
          ,
          <country country="DZ">Algeria.</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <fpage>2</fpage>
      <lpage>4</lpage>
      <abstract>
        <p>- Leader election has been identified as a basic building block in distributed computing. MANETs are distinct from traditional distributed systems as they are dynamic and self-organizing networks because of their dynamic wireless link formation and removal, network partitioning and disconnections, limited bandwidth and energy and highly variable message delay. These characteristics makes the design of leader election protocols even more challenging than in classical distributed networks. In this paper, we present a leader election algorithm taking into account irregular topologies and mobility of the nodes. This algorithm elects as leader the node with the highest priority among the nodes in its connected component, where priority can be defined in a variety of ways. The paper also presents proofs of correctness to exhibit the fairness of this algorithm.</p>
      </abstract>
      <kwd-group>
        <kwd>- leader election</kwd>
        <kwd>mobile ad hoc networks</kwd>
        <kwd>priority</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>The leader election problem [1] is one of the
fundamental problems in distributed computing. It
has been widely studied since one reason for this
wide interest is that many wired and wireless
distributed protocols need an election protocol.
For example, it is required in group
communication service [2] key distribution and
management [3] [4] and routing coordination [5].
In the context of mobile ad hoc networks, link
changes are common and may cause the
network to split into multiple connected
components. Additionally, two connected
components, each with its own leader, may
merge. Moreover, in many situations, it may be
desirable to elect a leader with some
systemrelated characteristic as mentioned in [6].
Therefore, the elected leader should be the node
which has the highest priority from among all
nodes in its connected component, where the
priority of a node is a performance–related
characteristic such as the node’s battery life,
computational capabilities, etc. Thus, the
requirements for a leader election algorithm
becomes: “Given a network of mobile nodes
each with a priority, after a finite number of
topological changes, every connected
component will eventually select a unique leader,
which is the node of the highest priority from
among the nodes in that component”.</p>
      <p>The aim of this paper is to propose a higher
priority index–finding algorithm that can work in
highly dynamic and asynchronous mobile ad hoc
networks.</p>
      <p>The rest of this paper is organized as follows:
the next section describes our leader election
algorithm for mobile ad hoc networks. The
correctness proof of the algorithm is given in
Section 3 and Section 4 concludes this paper.</p>
    </sec>
    <sec id="sec-2">
      <title>2. LEADER ELECTION ALGORITHM</title>
      <p>Figure1 shows our algorithm proposed to solve
the election problem in mobile ad hoc networks.</p>
      <p>Each mobile node of our system has two
possible states: leader or candidate. A node
passes in candidate state if it receives a leader
message from a node with higher priority. But it
can return to leader state when it detects the
departure of its leader.
Leader IDi ← IDi;
LeaderPriorityi ← Priorityi;
Statei ← leader;
IDElecMobilei ← 0;
IDElecLeaderi ← IDElecMobilei;
Start Timeri;
Broadcast leader (LeaderIDi, LeaderPriorityi, IDElecLeaderi);
Upon expiration of timeri do</p>
      <p>If (Statei = candidate) then</p>
      <p>Leader IDi ← IDi;
LeaderPriorityi ← Priorityi;</p>
      <p>Statei ← leader;
IDElecMobilei ← IDElecMobilei + 1;
IDElecLeaderi ← IDElecMobilei;
Broadcast leader (LeaderIDi, LeaderPriorityi, IDElecLeaderi);</p>
      <p>Restart Timeri;
17. Upon reception of message Leader (LeaderIDj, LeaderPriorityj, IDElecLeaderj) do
18. If (LeaderPriorityi &lt; LeaderPriorityj) or ((LeaderPriorityi = LeaderPriorityj) and (LeaderIDi &gt; LeaderIDj)) then
19. LeaderIDi ← LeaderIDj;
20. LeaderPriorityi ← LeaderPriorityj;
21. IDElecLeaderi ← IDElecLeaderj;
22. If (Statei = leader) then
23. Statei ←candidate;
24. Broadcast leader (LeaderIDj, LeaderPriorityj, IDElecLeaderj);
25. Restart Timeri;
26.
27.
28.
29.
30.</p>
      <p>Else</p>
      <p>If ((LeaderPriorityi=LeaderPriorityj) and (LeaderIDi=LeaderIDj) and (IDElecLeaderi &lt; IDElecLeaderj)) then
IDElecLeaderi ← IDElecLeaderj;
Broadcast leader (LeaderIDj, LeaderPriorityj, IDElecLeaderj);</p>
      <p>Restart Timeri;
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
•
•
•
•
The competition takes place only between nodes
that are in a leader state. Each node that lost
becomes in the candidate state. Our algorithm
ensures the leader of each connected
component to be the unique node in its
connected component in leader state. The other
nodes in its connected component must be in
candidate state.</p>
      <p>Assumptions on system, mobile nodes and
networks are:</p>
      <p>Each node has unique identifier that is
fixed throughout the node’s lifetime.</p>
      <p>Each node has a priority associated with
it. The priority of a node indicates its
“attractiveness” as a leader of the
network, and can be any performance–
related attribute.</p>
      <p>Each node pi maintains the following data
structures:</p>
      <p>IDi: indicates the identifier of the node.</p>
      <p>Priorityi: indicates the priority of the node.
•
•
•
•
•
•</p>
      <p>LeaderIDi: indicates the leader’s identifier
LeaderPriorityi: integer; indicates the
priority of the leader.</p>
      <p>Statei: indicates the state of the mobile
node i. It can take two possible values:
Leader or candidate.</p>
      <p>Timeri: represents the maximum delay
that pi expects until it receives a message
from the leader of the connected
component that it belongs.</p>
      <p>IDElecmobilei: indicates the identifier of
the latest leader message originated by i.</p>
      <p>IDElecLeaderi: indicates the identifier of
the latest leader message originated by
the leader of i.</p>
      <p>We say that the leader of a node i is lower
priority than j’s one if and only if:
(LeaderPriorityi &lt; LeaderPriorityj) or
((LeaderPriorityi = LeaderPriorityj) and
(LeaderIDi &gt; LeaderIDj)).
When a node triggers an election, it elects itself,
informs its neighbors and starts its timer. The
expiration of the timer for a node in the leader
state means that it hasn’t received a leader
message from a node with higher priority. So it
continues its participation in the competition by
sending a leader message containing its
information. However, the node in the candidate
state, when its timer expires, it realizes that the
leader is absent and triggers a new election.</p>
      <p>Each node i upon receiving a message Leader
(LeaderIDj, LeaderPriorityj, IDElecLeaderj)
compares the priority of its leader with the priority
of LeaderIDj indicated by LeaderPriorityj. If its
leader priority is the lowest, it updates its
information by those transported by the received
leader message, turns its state to candidate only
if it was in the Leader state, restart its timer and
rebroadcast the same message received. If the
leaders of the nodes i and j have the same
priority, but IDElecLeaderi &lt; IDElecLeaderj, then
the node i puts its IDElecLeaderi to
IDElecLeaderj, rebroadcasts the same message
that had received and restarts its timer. The
comparison between IDElecLeaderi and
IDElecLeaderj allows the algorithm to drop old
messages.</p>
      <p>Our algorithm is can tolerate node mobility,
network partitioning and merging components.</p>
      <p>For example, if the leader breaks down, then
after a bounded time, each node detecting the
leader departure elects itself as leader and
broadcasts its identifier with its priority (lines
816). If this failure causes partitioning of the
component in two other components, each
component will have eventually a unique leader.</p>
      <p>Moreover, if a node other than the leader breaks
down and causes the partitioning of the
component, then nothing will change in the
component that contains the leader, but the other
component elects a new leader and its identifier
is propagated throughout that component. The
detection of partition from the leader is
guaranteed by the use of the timer.</p>
    </sec>
    <sec id="sec-3">
      <title>3. CORRECTESS</title>
      <p>We assume that T is the moment when the
topology becomes static. We also assume that
Nmax is the node that has the highest priority
value in its component. The following theorems
establish the correctness of the leader election
algorithm proposed above.</p>
      <p>Lemma 1. There is a time after which Nmax
permanently satisfies that leaderNmax = Nmax
and broadcasts periodically a message leader</p>
      <sec id="sec-3-1">
        <title>LeaderPriorityNmax, (LeaderIDNmax, IDElecLeaderNmax).</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Proof:</title>
      <p>Lemma 1 means that after time t&gt; T, node Nmax
will not receive any message leader (LeaderIDj,
LeaderPriorityj, IDElecLeaderj) such as
(LeaderPriorityj &gt; LeaderPriorityNmax) or
([LeaderPriorityNmax = LeaderPriorityj] and
[LeaderIDj &lt; Nmax]). Therefore, it will not
execute the lines (17-25) of the algorithm, and
the property leaderNmax = Nmax is always
satisfied at every time t&gt; T. To see that it is
satisfied, we distinguish the following cases:</p>
      <p>Case 1: There was no node i in the Nmax’s
component such as (LeaderPriorityi &gt;
LeaderPriorityNmax) or ((LeaderPriorityNmax =
LeaderPriorityi) and (LeaderIDi &lt; Nmax)). In this
case, lines (17-25) of Task 1 had never been
executed by the node Nmax. LeaderNmax =
Nmax is always satisfied and will always be
satisfied at every time t&gt; T.</p>
      <p>Case 2: There was at least one node i in the
component such that (LeaderPriorityi &gt;
LeaderPriorityNmax) or ((LeaderPriorityNmax =
LeaderPriorityi) and (LeaderIDi &lt; Nmax)) which
sent periodically the message leader (LeaderIDi,
LeaderPriorityi, IDElecLeaderi) by executing line
15 of the algorithm. In this case, leaderIDNmax =
i has been satisfied after execution of Line 19.
Then, after a finite number of topology changes
(after a time t&gt; T), the node i (and definitely all
nodes that are higher priority than Nmax) left the
component or crashed. Therefore, Nmax
becomes the node that has the highest priority in
its component. We distinguish two sub cases.</p>
      <p>a. After time t&gt; T, the node Nmax will not
receive any message leader (LeaderIDi,
LeaderPriorityi, IDElecLeaderi) such as
(LeaderPriorityi &gt; LeaderPriorityNmax) or
((LeaderPriorityNmax = LeaderPriorityi) and
(LeaderIDi &lt; Nmax)). So, lines 19-25 will not be
executed, the timer will not be restarted at line 25
and it will finally expired (line 8) and
leaderIDNmax = Nmax will be satisfied (line 10).</p>
      <p>b. After time t&gt; T, node Nmax receives a
message leader (LeaderIDi, LeaderPriorityi,
IDElecLeaderi). It is an old message originated
by node i and is still circulating in the component
after the departure of i. But when the node Nmax
receives this message for the second time,
condition in line 27 will never be satisfied
(because IDElecLeaderi is the same for the two
messages) and so lines 28-30 will not be
executed. Therefore, Nmax will not restart its
timer, this later will expire. Consequently, lines</p>
      <sec id="sec-4-1">
        <title>8-16 will be executed and</title>
        <p>becomes Nmax.
leaderIDNmax
Finally, as leaderIDNmax = Nmax, Nmax
broadcasts permanently and periodically the
message leader (LeaderIDNmax,
LeaderPriorityNmax, IDElecLeaderNmax).</p>
        <p>Lemma 2. There is a time after which every
message leader (p, LeaderPriorityp,
IDElecLeaderp) with p ≠ Nmax disappears from
the system.
Note that initially, each node p begins the
execution by electing itself as leader. i.e.,
leaderIDp = p (line 1). As long as it remains
leader, it broadcasts leader (LeaderIDp,
LeaderPriorityp, IDElecLeaderp) (line 15). Also
note that each node p on receipt of each
message leader (LeaderIDj, LeaderPriorityj,
IDElecLeaderj), makes leaderp = j if j is higher
priority than p (lines 17-25).</p>
        <p>At a time t&gt; T, Nmax is the node that has the
highest priority value in its component and it
periodically broadcasts the message leader
(LeaderIDNmax, LeaderPriorityNmax,
IDElecLeaderNmax) (Lemma 1). Each node p ≠
Nmax, upon receipt of this message makes
leaderIDp = Nmax (line 19) and sends leader
(LeaderIDNmax, LeaderPriorityNmax,
IDElecLeaderNmax) to all its neighbours as
shown on line 24 of the algorithm.</p>
        <p>After time t&gt; T, the timer of p will not expire as
Nmax periodically broadcasts the message
leader (LeaderIDNmax, LeaderPriorityNmax,
IDElecLeaderNmax). So p will never execute line
15 of the algorithm (the message leader
(LeaderIDp, LeaderPriorityp, IDElecLeaderp) will
never be sent).</p>
        <p>Finally, every message leader (LeaderIDp,
LeaderPriorityp, IDElecLeaderp) with p ≠ Nmax
was disappeared from the system.</p>
        <p>Theorem. There is a time after which each
node p in the same component have
leaderNmax = Nmax, where Nmax is the node
that has the highest priority value in that
component.
Lemma 1 shows that there is a moment after
which the node Nmax maintains leaderNmax =
Nmax (ie it is the leader of its component) and
periodically broadcasts the message leader
(LeaderIDNmax, LeaderPriorityNmax,
IDElecLeaderNmax) to notify the other nodes in
its component that it is the leader. Lemma 2
shows that no other message will circulate into
the component. So the only message that is
circulating is the message leader
(LeaderIDNmax, LeaderPriorityNmax,
IDElecLeaderNmax) and all nodes of the
component have Nmax as a leader.</p>
      </sec>
      <sec id="sec-4-2">
        <title>So, the algorithm ensures that:</title>
        <p>For each component C in ad hoc network, there
is a node Nmax in C and a moment after which,
for every node p in C, leader p = Nmax which is
the node of the highest priority in C.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. CONCLUSION</title>
      <p>In this paper, we have proposed a leader election
algorithm for ad hoc networks that can tolerate
intermittent failures, such as link failures, sudden
crash or recovery of mobile nodes, network
partitions, and merging of connected network
components. This algorithm ensures that every
connected component will eventually select a
unique leader having the highest priority. To elect
a unique leader, the algorithm requires mobile
nodes to communicate only with their immediate
neighbors. Our future plan is to simulate the
algorithm to study self-stabilization propriety
witch is very important in mobile computing.
5. REFERENCES
[2] G.-C. Roman, Q. Huang, and A. Hazemi,
“Consistent group membership in ad hoc
networks”, Proceeding of the 23rd
International Conference on Software
Engineering (ICSE ’01), 2001, pp. 381-388.
[3] N. Asokan and P. Ginzboorg, “Key
agreement in ad hoc networks”, Computer
Comm., vol. 23, no. 17, 2000, pp.
16271637.
[4] B. Lehane, L. Dolye, and D. O’Mahony, “Ad
hoc key management infrastructure”,
Proceedings of the International Conference
on Information Technology: Coding and
Computing (ITCC ’05), vol. 2, 2005, pp.
540545.
[5] C. Perkins and E. Royer, “Ad-hoc
OnDemand Distance Vector Routing”,
Proceedings of the 2nd IEEE Workshop on
Mobile Computing Systems and
Applications, New Orleans, LA, February
1999, pp. 90-100.
[6] S. Vasudevan, J. Kurose, and D. Towsley,
“Design and analysis of a leader election
algorithm for mobile ad hoc networks”,
Proceedings of the 12th IEEE International
Conference on Network Protocols
(ICNP’04), Octobre 2004, pp. 350-360.</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>