• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Design and analysis of a leader electionalgorithm for mobile ad hoc networks

Design and analysis of a leader electionalgorithm for mobile ad hoc networks






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Design and analysis of a leader electionalgorithm for mobile ad hoc networks Design and analysis of a leader electionalgorithm for mobile ad hoc networks Document Transcript

    • Design and Analysis of a Leader ElectionAlgorithm for Mobile Ad Hoc NetworksSudarshan Vasudevan, Jim Kurose, Don TowsleyDepartment of Computer ScienceUniversity of Massachusetts, Amherst{svasu, kurose, towsley}@cs.umass.eduAbstractLeader election is a very important problem, not only in wirednetworks, but in mobile, ad hoc networks as well. Existing solutionsto leader election do not handle frequent topology changes anddynamic nature of mobile networks. In this paper, we present aleader election algorithm that is highly adaptive to arbitrary (possiblyconcurrent) topological changes and is therefore well-suited for usein mobile ad hoc networks. The algorithm is based on finding anextrema and uses diffusing computations for this purpose. We show,using linear-time temporal logic, that the algorithm is “weakly”self-stabilizing and terminating. We also simulate the algorithm ina mobile ad hoc setting. Through our simulation study, we elaborateon several important issues that can significantly impact performanceof such a protocol for mobile ad hoc networks such as choice ofsignaling, broadcast nature of wireless medium etc. Our simulationstudy shows that our algorithm is quite effective in that each node hasa leader approximately 97-99% of the time in a variety of operatingconditions.I. INTRODUCTIONLeader election is a fundamental control problem in bothwired and wireless systems. For example, in group communi-cation protocols, the election of a new coordinator is requiredwhen a group coordinator crashes or departs the system. In thecontext of wireless networks, leader election has a variety ofapplications such as key distribution [9], routing coordination[23], sensor coordination [16], and general control [15], [20].When nodes are mobile, topologies can change and nodes maydynamically join/leave a network. In such networks, leaderelection can occur frequently, making it a particularly criticalcomponent of system operation.The classical statement of the leader election problem [19] isto eventually elect a unique leader from a fixed set of nodes.Indeed, several algorithms have been proposed to solve thisproblem. However, in the context of mobile, ad hoc networksthis statement must be specialized in two important ways :• The election algorithm must tolerate arbitrary, concur-rent topological changes and should eventually terminateelecting a unique leader.• The elected leader should be the most-valued-node fromamong all the nodes within that connected component,where the value of a node is a performance-relatedcharacteristic such as remaining battery life, minimumThis work was supported in part by the National Science Foundation undergrant ANI-0085848, and by the Defense Advanced Projects Research Agencyunder contract N66001-99-C-8616.average distance to other nodes or computation capabili-ties.The first modification is motivated by the need to accom-modate frequent topology changes - changes that can occurduring the leader election process itself. Network partitionscan form due to node movement; multiple partitions can alsomerge into a single connected component. It is important torealize that it is impossible to guarantee a unique leader atall times. For example, when a network partition occurs orwhen two components merge, it will take some time for a newleader to be elected. Thus, the modified problem definitionrequires that eventually every connected component has aunique leader. Our second modification arises from the factthat in many situations, it may be desirable to elect a leaderwith some system-related characteristic rather than simplyelecting a “random” leader. For example, in a mobile ad hocnetwork it might be desirable to elect the node with maximumremaining battery life, or the node with a minimum averagedistance to other nodes, as the leader. Leader election basedon such an ordering among nodes fits well in the class ofleader election algorithms that are known as “extrema-finding”leader-election algorithms. The second modification to thestatement of leader election problem, therefore, requires theelected leader to be the most-valued-node from the set ofnodes in its connected component. Given the modificationsdescribed above, the requirements for leader election algorithmbecome: Given a network of mobile nodes each with a value,after a finite number of topological changes, every connectedcomponent will eventually select a unique leader, which is themost-valued-node from among the nodes in that component.Existing solutions to the problem of leader election do notwork in the highly dynamic environment found in mobilenetworks. Existing solutions to the leader election problemassume a static topology (e.g. [14], [22], [8], [16], [13],[26], [1]), or assume that topological changes stop beforean election starts (e.g. [3], [24]) or assume an unrealisticcommunication model such as a message-order preservingnetwork [6]. While there are some proposals for leader electionin mobile networks [20], these algorithms are designed toperform random node election and cannot be modified toperform extrema-finding. We therefore propose an electionalgorithm to perform extrema-finding in a highly dynamicand asynchronous environment such as found in a mobile,ad hoc network. Unlike existing work on leader election, anProceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • important contribution of this paper is that it presents a verysystematic and methodical evaluation of our leader electionalgorithm based on simulations in a mobile, wireless setting.Our simulation study provides useful insights relating to thedesign of our algorithm and the signaling used. As we willsee, we exploit these insights to develop a very efficient leaderelection algorithm.Our proposed algorithm uses the concept of diffusingcomputations [10] to perform leader election. Informally, thealgorithm operates as follows. When an election is triggered ata node, the node starts a diffusing computation to determine itsnew leader. Several nodes can start diffusing computations inresponse to the departure of a leader and hence several diffus-ing computations can be in progress concurrently; however, anode participates in only one diffusing computation at a time.Eventually, when a diffusing computation terminates, the nodeinitiating the computation informs other nodes of the identityof the elected leader. An election can be triggered at a node fora number of reasons such as disconnection from its leader orthe value of the leader falling below some application-definedthreshold. We emphasize that the operation of our electionalgorithm is generic and does not depend on how electionsare triggered.The primary contributions of this paper are the following:• We present an extrema-finding leader election algorithmthat operates asynchronously and accommodates arbi-trary topological changes induced by node mobility. Weprove using temporal logic that this algorithm achieves a“weak” form of stabilization, i.e., given that each processstarts in a designated initial state, that after a finitenumber of topological changes the algorithm convergesto a desired stable state in finite amount of time.• We develop an improved understanding of how to designand implement a distributed algorithm, such as extrema-finding leader election, that accounts for the broadcastnature of wireless channels and the mobility found inan ad hoc network. In the context of leader election, weobserve that the choice of signaling used in the protocol,accounting for the broadcast nature of wireless medium,and making subtle design changes in the leader electionalgorithm significantly improve the performance of ouralgorithm. In our context, this results in an algorithm thatensures that a node has a leader over 97% of the time ina wide variety of operating conditions.• We present a thorough study of the performance of thealgorithm as a function of mobility, transmission rangeand node density.The rest of the paper is organized as follows. In Section II,we discuss related work. Section III describes our modelassumptions and objectives. In Section IV, we describe ourelection algorithm. Simulation setting and the performancemetrics are described in Section V. Section VI describesthe lessons learned during algorithm design. In Section VII,we formally specify the various correctness properties of ouralgorithm. In Section VIII, we discuss some simulation resultsand conclude in Section IX.II. RELATED WORKAlthough leader-election is a fairly old problem, it hasreceived surprisingly little attention in the context of mobile,ad hoc networks.Leader election algorithms for static networks have beenproposed in [14], [22]. These algorithms work by constructingseveral spanning trees with a prospective leader at the rootof the spanning tree and recursively reducing the number ofspanning trees to one. However, these algorithms work only ifthe topology remains static and hence cannot be used in a mo-bile setting. There have been several clustering and hierarchy-construction schemes that can be adapted to perform leaderelection [8], [16], [13], [26], [1]. However, these algorithmseither assume static networks or a synchronous system andtherefore cannot be used in an asynchronous, mobile system.Several leader election algorithms [6], [3], [24] have beenproposed for wired networks that assume process crashes andlink failures and are therefore closely related to our work.However, in [3], [24] process failures are assumed to occurbefore election starts while in [6] the election algorithmsmake strong assumptions such as that the network be order-preserving i.e., a message m sent by a node i at time t isreceived by all nodes before another message m’ sent by nodej at some instant t > t. Such assumptions are very strong andmake these solutions impractical in mobile environments.There has been some work on spanning tree constructionin the domain of self-stabilizing systems [11] that is relatedto our work. Informally, a self-stabilizing system is one thatcan recover from any arbitrary global state and reach adesired stable global state within finite time. Self-stabilizingspanning tree algorithms for a shared memory model havebeen proposed in [4], [2], [12]. These algorithms assume ashared-memory model and are not suitable for a message-passing system such as an ad hoc network. In [25] a spanningtree algorithm for a message-passing system is proposed andis based on the algorithm in [4]. However, the algorithmsin [4], [25] require nodes to know an a priori upper boundon the number of nodes in the network to detect illegal states.Also, the stabilization time is proportional to this bound. In amobile, ad hoc network, with frequent partitions and mergessuch information will not be usually available.Leader election algorithms for mobile ad hoc networks havebeen proposed in [20], [15]. As noted earlier, we are interestedin an extrema-finding algorithm, because for the applicationsdiscussed in Section I, it is desirable to elect a leader withsome system-related attributes such as maximum battery life ormaximum computation power. The algorithms in [20] are notextrema-finding and cannot be extended to perform extrema-finding. Although, extrema-finding leader election algorithmsfor mobile ad hoc networks have been proposed in [15], thesealgorithms are unrealistic as they require nodes to meet andexchange information in order to elect a leader and are notwell-suited to the applications discussed earlier. Several clus-tering algorithms have been proposed for mobile networks(e.g.[18], [5]), but these algorithms elect clusterheads only withintheir single hop neighborhood.The main contributions of this paper are thus a designProceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • of an efficient asynchronous, leader election algorithm thatcan adapt to arbitrary topological changes as seen in a mo-bile, ad hoc network. Using linear-time temporal logic, weprove that our algorithm stabilizes to a desired state despitearbitrary topological changes caused by node mobility. Animportant distinction of our work from existing work onleader election is that we present a careful and systematicsimulation-based study of our election algorithm in a mobile,wireless environment. We present several interesting insightsculled from our experiences in simulating these algorithmsin mobile environments and exploit them to design a highlyefficient leader election algorithm. Our simulations show thatthe algorithm works very well, with each node having a leaderfor 97%-99% of time. In particular, we observe that subtle andseemingly small changes in the election algorithm and choiceof signaling can have significant performance consequences.These insights can be very useful in the design of otherprotocols for mobile, ad hoc networks.III. OBJECTIVES, CONSTRAINTS AND ASSUMPTIONSIn developing a leader election algorithm, we first defineour system model, assumptions, and goal. We model an adhoc network as an undirected graph that changes over time asnodes move. The vertices in the graph correspond to mobilenodes and an edge between a pair of nodes represents the factthat the two nodes are within each other’s transmission radiiand, hence, can directly communicate with one another. Thegraph can become disconnected if the network is partitioneddue to node movement. We make the following assumptionsabout the nodes and system architecture:1) Node Value: Each node has a value associated withit. The value of a node indicates its “desirability” asa leader of the network and can be any performance-related attribute such as the node’s battery power, com-putational capabilities etc.2) Unique and Ordered Node IDs: All nodes have uniqueidentifiers. They are used to identify participants duringthe election process. Node IDs are used to break tiesamong nodes which have the same value.3) Links: Links are bidirectional and FIFO, i.e. messagesare delivered in order over a link between two neighbors.4) Node Behavior: Node mobility may result in arbitrarytopology changes including network partitioning andmerging. Furthermore, nodes can crash arbitrarily at anytime and can come back up again at any time.5) Node-to-Node Communications: A message deliveryis guaranteed only when the sender and the receiverremain connected (not partitioned) for the entire durationof message transfer.6) Buffer Size: Each node has a sufficiently large receivebuffer to avoid buffer overflow at any point in itslifetime.The objective of our leader election algorithm is to ensurethat after a finite number of topology changes, eventually eachnode i has a leader which is the most-valued-node from amongall nodes in the connected component to which i belongs.IV. LEADER ELECTION ALGORITHMOur leader election algorithm is based on the classicaltermination-detection algorithm for diffusing computations byDijkstra and Scholten [10]. In this section, we describe a leaderelection algorithm based on diffusing computations. In latersections, we will discuss in detail how this algorithm can beadapted to a mobile setting.A. Leader Election in a Static NetworkWe first describe our election algorithm in the context ofa static network, under the assumption that nodes and linksnever fail. The algorithm operates by first “growing” and then“shrinking” a spanning tree rooted at the node that initiatesthe election algorithm. We refer to this computation-initiatingnode as the source node. As we will see, after the spanningtree shrinks completely, the source node will have adequateinformation to determine the most-valued-node and will thenbroadcast its identity to the rest of the nodes in the network.The algorithm uses three messages, viz. Election, Ack andLeader.Election. Election messages are used to “grow” the span-ning tree. When election is triggered at a source node s (forinstance, upon departure of its current leader), the node beginsa diffusing computation by sending an Election message toall of its immediate neighbors. Each node, i, other than thesource, designates the neighbor from which it first receivesan Election message as its parent in the spanning tree. Nodei then propagates the received Election message to all of itsneighboring nodes (children) except its parent.Ack. When node i receives an Election message from aneighbor that is not its parent, it immediately responds with anAck message. Node i does not, however, immediately returnan Ack message to its parent. Instead, it waits until it hasreceived Acks from all of its children, before sending an Ackto its parent. As we will see shortly, the Ack message sent byi to its parent contains leader-election information based onthe Ack messages i has received from its children.Once the spanning tree has completely grown, the spanningtree “shrinks” back toward the source. Specifically, once allof i’s outgoing Election messages have been acknowledged,i sends its pending Ack message to its parent node. Tree“shrinkage” begins at the leaves of the spanning tree, whichare parents to no other node. Eventually, each leaf receives Ackmessages for all Election messages it has sent. These leavesthus eventually send their pending Ack messages to their re-spective parents, who in turn send their pending Ack messagesto their own parents, and so on, until the source node receivesall of its pending Ack messages. In its pending Ack message, anode announces to its parent the identifier and the value of themost-valued-node among all its downstream nodes. Hence thesource node eventually has sufficient information to determinethe most-valued-node from among all nodes in the network,since the spanning tree spans all network nodes.Leader. Once the source node for a computation has re-ceived Acks from all of its children, it then broadcasts a Leadermessage to all nodes announcing the identifier of the most-valued-node.Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • Example:Let us illustrate a sample execution of the algorithm. Wedescribe the algorithm in a somewhat synchronous mannereven though all the activities are in fact asynchronous. Con-sider the network shown in Figure 1. In this figure, and for therest of the paper, thin arrows indicate the direction of flow ofmessages and thick arrows indicate parent pointers. These par-ent pointers together represent the constructed spanning tree.The number adjacent to each node in Figure 1(a) representsits value. As shown in Figure 1, node A is a source nodethat starts a diffusing computation by sending out Electionmessages (denoted as “E” in the figure) to its immediateneighbors, viz. nodes B and C, shown in Figure 1(a). Asindicated in Figure 1(b), nodes B and C set their parentpointers to point to node A and in turn propagate an Electionmessage to all their neighbors except their parent nodes. HenceB and C send Election messages to one another. These Electionmessages are immediately acknowledged since nodes B and Chave already received Election messages from their respectiveparents. Note that immediate acknowledgments are not shownin the figure. In Figure 1(c), a complete spanning tree is built.In Figure 1(d), the spanning tree starts “shrinking” as nodesD and F send their pending Ack messages (denoted by “A”)to their respective parent nodes in the spanning tree. Each ofthese Ack messages contains the identity of the most-valued-node (and its actual value) downstream to nodes D and F, inthis case the nodes themselves, since they are the leaves of thetree. Eventually, the source A hears pending acknowledgmentsfrom both B and C in Figure 1(e) and then broadcasts theidentity of the leader, D, via the Leader message (denoted by“L” in the figure) shown in Figure 1(f).A(f)(e)(d)(c)(b)(a)CBDFABDF"E""E""E""E""E""E"ACBDF"E""E"ACBDFACBDFACBDFC352107,"A(D,10)""A(F,7)""A(D,10)""A(F,7)""L(D,10)""L(D,10)"Fig. 1. An execution of leader election algorithm based on Dijkstra-Scholtentermination detection algorithm. Thin arrows indicate direction of flow ofmessages while the thick arrows represent the constructed spanning tree.Message PurposeElection for growing a spanning treeAck to acknowledge receipt of an Election msgLeader to announce the new leaderProbe to determine if a node is still connectedReply sent in response to a Probe msgTABLE IMESSAGE TYPES USED IN THE ELECTION ALGORITHM.Variables Meaningδi a binary variable indicating if i is currentlyin an election or notpi i’s parent node in the spanning tree∆i a binary variable indicating if i has sent anAck to pi or notlidi i’s leaderNi i’s current neighborsSi set of nodes from which i is yet to hear an Ackfromsrci i’s computation-indexTABLE IILIST OF VARIABLES MAINTAINED BY A NODE i DURING THE ELECTIONPROCESS.B. Leader Election in a Mobile, Ad Hoc NetworkWe now describe the operation of our leader electionalgorithm in the context of a mobile, ad hoc network. In theprevious section, we provided an overview of the algorithm’soperation in a static network. But with the introduction ofnode mobility, node crashes, link failures, network partitionsand merging of partitions, the simple algorithm is inadequate.Furthermore, we assumed in the previous section that only onenode triggers an election. In reality, many nodes may concur-rently trigger leader elections, with each of them independentlystarting a diffusing computation, due to lack of knowledge ofother computations started by other nodes.We note that throughout the discussion of our algorithm’soperation and for the rest of the paper, we assume that thevalue of the node is the same as its identifier. We emphasizethat this assumption has been made only for simplicity ofpresentation and results in no loss of generality.Before we describe how our algorithm accommodates nodemobility, we describe the variables and messages used by thealgorithm.1) Variables and Message types: The message types andvariables used in the algorithm are shown in Table I andTable II respectively. The algorithm involves five messagetypes: Election, Ack, Leader, Probe and Reply. The first threemessage types were described in Section IV-A. We will discussthe use of Probe and Reply messages while describing ouralgorithm’s operation.Each node i maintains a boolean variable δi, whose value is0 if node i has a leader, and 1 if it is in the process of electingone. The variable srci contains the computation-index of thediffusing computation in which node i is currently partici-pating. As we will see in Section IV-B.3, this computation-index uniquely identifies a computation and is required tohandle multiple, concurrent computations. During a diffusingcomputation, node i keeps track of its parent, pi. Variable ∆iis set to 0 if node i has sent its pending Ack message to itsparent and 1 if it has not (i.e., it is still in the spanning tree).Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • Each node i maintains its current leader in lidi. Ni is thelist of i’s current neighbors (maintained by periodic exchangeof messages between neighbors) and, Si represents the set ofnodes that i has yet to hear an Ack message from. It is updatedeach time i receives an Ack message.2) Bootstrapping the Election Process: Each node startsexecution by initializing the different variables of the leaderelection algorithm. After the initialization, the algorithm ineach node loops forever, and on each iteration, checks ifany of the actions in the algorithm specification are enabled,executing at least one enabled action on every loop iteration.Formal specification of the algorithm and the execution modelare presented in [27].3) Handling Multiple, Concurrent Computations: Theleader of a connected component periodically sends heartbeatmessages to other nodes. The absence of a heartbeat messagefrom its leader for a predefined timeout period triggers a freshleader election process at a node. It should be noted that morethan one node can concurrently detect leader departure andeach node can initiate diffusing computations independently,leading to concurrent diffusing computations. We handle mul-tiple, concurrent diffusing computations by requiring that eachnode participate in only one diffusing computation at a time. Inorder to achieve this, each diffusing computation is identifiedby a computation-index. This computation-index is a pair, viz.num, id , where id represents the identifier of the node thatinitiated that computation and num is an integer, which isdescribed below.Definition: num1, id1 num2, id2 ⇐⇒ ((num1 >num2) ∨ ((num1 = num2) ∧ (id1 > id2)))A diffusing computation A is said to have higher prioritythan another diffusing computation B iff computation-indexAcomputation-indexBA given source always starts a diffusing computation withnum greater than that of any other computation it previouslyinitiated, while the source-id field is used to break ties amongconcurrent diffusing computations with different sources butthe same num value. As a result, there is a total ordering oncomputation-indices. The variable num is incremented eachtime a node starts a fresh diffusing computation. When anode participating in a diffusing computation “hears” anothercomputation with a higher computation-index, the node stopsparticipating in its current computation in favor of the highercomputation-index. For instance, in Figure 2(a), node G sendsan Election message with computation-index, 3, D , to nodeA whose current computation-index is 3, B . Upon receivingthis Election message, node A stops participating in its currentcomputation, sets its computation-index to 3, D , as shownin Figure 2(b), and propagates the received Election messageto nodes B and C.(a)BCA<3,D> <3,D>GD<3,D>H<3,D>(b)CB<2,B><2,B><2,B>A G<3,D>DH<3,D>Fig. 2. Handling concurrent diffusing computationsC. Algorithm Performed by the NodesThe main idea of our algorithm is to “grow” and “shrink” aspanning tree during the election process and announce theleader after the tree shrinks completely. However, if nodemovement results in changes to this spanning tree, then nodesdetect these changes and take appropriate actions. In thissection, we describe through examples, how our election al-gorithm accommodates arbitrary changes in topology inducedby node mobility.Initiate Election: Node i begins the election process inresponse to the departure of its current leader. As described inSection IV-A, node i starts the process of “growing” a span-ning tree by propagating Election messages to its neighbors,informing them of the start of an election of a new leader.In triggering a fresh election, node i sets its variable δi to1 to indicate that it is currently involved in an election. Asdescribed in Section IV-A, i announces a leader only after ithears Ack messages from all the nodes to which it sends anElection message. The list Si is, therefore, initialized to Ni,i’s current neighbors.Spanning Tree Construction: Node j, upon receiving anElection message from node i, say E, joins the spanning treeby setting its parent pointer, pj = i, and in turn propagatesElection messages to its own neighbors in the set Nj. Asdescribed in Section IV-A, these Election messages are prop-agated forward to all nodes and eventually a spanning tree ofnodes is constructed.Handling Node Partitions: Once node i joins an election,it must receive Ack messages from all nodes in list Si beforeit can report an Ack message to its parent node. However,because of node mobility, it may happen that node j, whichhas yet to report an Ack message, gets disconnected from nodei. Node i must detect this event, since otherwise it will neverreport an Ack message to its parent and, therefore, no leaderwill be announced.BC ADH E(a)BCDH EBCDH EBCDH ELdr(H)Ldr(C)(c) (d) (e)ABCDH E(b)Ldr(C)Ldr(H)Fig. 3. Operation of Leader Election Algorithm in the face of partitionsConsider a scenario in which a parent-child pair becomesdisconnected during the election process, i.e. the conditionProceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • di,j = ∞ is true for some j ∈ Si, as illustrated in Figure 3.Figure 3(a) shows an example topology where the parentpointers represent the constructed spanning tree. Because ofnode mobility, node A becomes disconnected from the restof the nodes and the topology changes to that shown inFigure 3(b). In order to detect such events, each node in thespanning tree sends periodic Probe messages to every node jin its list Si. A node which receives a Probe message respondswith a Reply message. The absence of a Reply message froma node j for a certain timeout period causes node i to removej from list Si and to no longer wait for an Ack message fromnode j. As shown in Figure 3, node B, which has alreadyreceived an Ack message from node C but has yet to hearan Ack message from node A, eventually infers, using Probemessages, that node A has departed. Node B therefore removesA from the list SB. Node B now has no more Ack messagesto wait for and broadcasts a Leader message announcing C asthe leader as illustrated in Figure 3(c).When a node disconnects from its parent, it can no longerreport an Ack message to its parent. Hence, it terminates thediffusing computation by announcing its maximal downstreamnode as the leader. In our example, node D, which hasA as its parent, eventually receives Ack messages from allits immediate children. As shown in Figure 3(d), node Dsubsequently detects node A’s departure and terminates thecomputation by broadcasting a Leader message, announcingH as the leader. In essence, node D, in the absence of a parentnode, reports its maximal downstream node through its currentneighbors.Finally, node C, whose current leader is itself, propagatesthe new leader, H, upstream to node B. Thus, all nodeseventually have node H as their leader. Node A also eventuallydetects the departure of node D and its parent, node B. In thiscase, node A announces itself to be the leader.Handling Partition Merges: Node mobility can also causepartitions to merge. There are several possibilities. The sim-plest case, as shown in Figure 4(a), involves two connectedcomponents, each with a unique leader, merging together bythe formation of a new link between nodes A and U (indicatedby a dashed line). Nodes A and U then exchange their leaderidentities over the newly formed link. Since node U has ahigher-identity-leader (W) than A (C), A adopts W as its ownleader and then broadcasts the new leader to the rest of thenodes in its component.Ldr(W)UVW(a) (b)Ldr(C)ACBACLdr(C) BUWVVWAV(c)UBA(d)CWUBCLdr(W)Ldr(W)Fig. 4. Operation of Leader Election Algorithm in the face of mergesAnother possibility is that one or both of the componentsmerging together are without a leader and are involved in acomputation. As shown in Figure 4(b), nodes U, V, W areinvolved in a computation and merge with nodes A, B andC which have C as their leader. Our algorithm handles thiscase by allowing the ongoing computation to terminate beforethe exchange of leader identities takes place. In Figure 4(b),node A, upon detecting a new link formation announces itsleader identity to node U. Upon termination of the ongoingcomputation, node U announces its leader (node W) to nodeA, which adopts W as its new leader and propagates thisinformation to nodes B and C. The case when both mergingcomponents have an ongoing computation is also handledsimilarly.Handling Node Crashes and Restarts: Our algorithmalso tolerates arbitrary node crashes and recoveries. A nodefailure is treated as an instance of network partitioning andappropriate actions are taken, as described earlier. For ouralgorithm to tolerate node recoveries, we assume that whena node recovers from a crash, it first bootstraps the electionprocess as described in Section IV-B.2. At the end of thebootstrap phase, the recovered node is without a leader andtherefore starts a new election to find its leader. In essence,node crashes are treated as occurrences of partitions while theevent of a node recovering from a failure is treated as themerging of two components.Having described the operation of our election algorithmand its ability to adapt to arbitrary topological changes, wenext study its performance through simulation in a mobile, adhoc network under a variety of operating conditions.V. SIMULATION SETTINGWe simulate our algorithm using GloMoSim [30], an event-driven, packet-level simulator. The main objective of oursimulations was to gain a better understanding of how todesign and implement leader election algorithms for ad hocnetworks and also study in detail how various simulationparameters impact the performance of our algorithm. Theperformance metrics which we consider in our simulationsare the Fraction of Time Without Leader, Message-Overhead,Election-Time and Election-Rate defined below.A. Performance MetricsWe now define the various performance metrics considered.Fraction of Time Without Leader (F) is the fraction of simu-lation time that a node is involved in an election (as indicatedby δ = 1). Election-Rate (R) is defined as the average numberof elections that a node participates in per unit time (i.e. theaverage rate at which node i goes from δi = 0 to δi = 1).Election-Time (T) is defined as the mean time elapsed betweenthe instant at which a node begins participating in an electionprocess (corresponds to δi = 1 in our algorithm) and theinstant at which it knows the identity of its leader (δi = 0). Insome cases, node partitions occur during the election process,as shown in Figure 3. In that example, nodes B, C and Hall participate in the same diffusing computation, which isinitiated by B and they all have identical computation-indexes.Node B first chose C as its leader and then subsequentlyit chose node H as its leader. Election-Time corresponds toProceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • the time elapsed from the instant at which node B startsparticipating in the election until the time at which B chose Has its leader. Message-Overhead (M) is defined as the averagenumber of messages sent by a node per election.In all of our simulations, we study the behavior of thevarious performance metrics as a function of the number ofnodes (N) in the simulation. For a given N, the results areaveraged over all nodes in each simulation run and over 10different simulation runs. We plot the 95% confidence intervalson the graphs.B. Simulation EnvironmentNodes are randomly placed in a 2000m × 2000m obstacle-free terrain. For all network sizes, nodes move according tothe Random Waypoint mobility model. The parameters of thismodel are the minimum node speed (Vmin), maximum nodespeed (Vmax) and node pause time (Pt). In accordance withsuggestions made in [29], we set the minimum node speed to apositive value (1m/s in our case) throughout our simulations.Throughout our simulations, we use the IEEE 802.11 MACprotocol and Free Space Propagation path-loss model. For theresults reported in this paper, the underlying routing protocolused is AODV [23]. We would like to point out that we alsosimulated our algorithm with DSR [17] as the routing protocoland observed very little change in the results shown in thispaper. We refer the interested reader to [27].In our simulations, a leader node periodically broadcastsBeacon messages to all other nodes. Absence of some number(indicated by max-beacon-loss) of Beacon messages fromits leader causes a node to start a fresh election. In oursimulations, we set the value of beacon-interval to 20 secondsand of max-beacon-loss to 6. This means that a node triggersan election, if it does not receive a heartbeat from the leaderfor a duration of two minutes. Note that max-beacon-lossis arbitrarily chosen and can be set according to applicationrequirements.VI. DESIGN ISSUES AND LESSONS LEARNEDWe now describe various issues involved in designing anefficient leader election algorithm with particular emphasison the fact that the election algorithm operates in a mobile,wireless ad hoc network. Using simulations, we illustrate howsubtle changes in the algorithm and signaling methods it usesresult in dramatic differences in its performance. We believethat the lessons learned from our simulations can be useful inother protocol designs.In Figure 5, we plot the fraction of time a node is withouta leader (F) against number of nodes (N) for four differentimplementations of our election algorithm, which we callElection-TCP, Election-UDP, Election-Bcast and Election-Opt. Each of these versions will be described very shortly. Thecurves were obtained from a scenario in which nodes movedaccording to Random Waypoint model with Vmin = 1m/s,Vmax = 3m/s and Pt = 150s. The node transmission rangewas 200m and each simulation was run for 100 simulationminutes. Each point is obtained by averaging over 10 differentruns. The main purpose of this graph is merely to depict00. 20 40 60 80 100 120 140FractionofTimeWithoutaLeaderNumber of Nodes in SimulationElection-TCPElection-UDPElection-BcastElection-OptFig. 5. “Evolution” of Leader Election Algorithmthe dramatic improvements in performance by careful designchoices.From Figure 5, several interesting insights can be gleanedas we change from one algorithm to another, improving thealgorithm each time based on the insights obtained. We explainhow each change to the algorithm improves upon the previouscase, until we achieve a really efficient algorithm.1. Election-TCP: The uppermost-most curve in Figure 5represents the Election-TCP version of our election algorithm.In this version, all messages (except the Leader message whichis always flooded) are sent using TCP. This curve can beregarded as the most naive implementation of our electionalgorithm and serves as a baseline against which the otherversions can be compared.From Figure 5, we see that the fraction of time that the nodeis without a leader is 0.54, when N = 120. There are severalreasons that Election-TCP performs very poorly. Firstly, eachleader-election message incurs the additional overhead of athree-way handshake before it is actually sent and a connectionteardown phase after it is sent. This introduces a significantoverhead on the wireless link bandwidth. Secondly, the largeTCP timeout values for connection set-up, introduce a signif-icant delay before node disconnections are detected by ouralgorithm, thereby resulting in an increased election duration.We therefore conclude that TCP is not a suitable choice forsignaling for our election algorithm.2. Election-UDP: The next curve immediately belowElection-TCP in Figure 5, represents the Election-UDP ver-sion. In this version, all algorithm messages are sent point-to-point using UDP. If the message delivery fails after a fixednumber of trials, the destination is assumed to be disconnected.We observe from the graph that the fraction F dropssignificantly from 0.54 to 0.37, when N = 120. This confirmsour conclusion that TCP is not suitable for messaging inwireless networks, especially for distributed algorithms suchas leader election. Although Election-UDP shows a significantimprovement over Election-TCP, we will soon see that wecan make further improvements in the performance of ouralgorithm.3. Election-Bcast: The curve immediately below Election-UDP is labeled Election-Bcast and represents the version inwhich Election messages are sent using UDP broadcast. Wewill see shortly that broadcasting Election messages can helpreduce not only the Election messages but also the number ofAck messages.Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • 1) Reduction in number of Election messages: Recallfrom the algorithm description that, on joining an elec-tion, each node sends Election messages to all of itsneighbors. In Election-UDP, a node unicasts an Electionmessage to each of its immediate neighbors. However,because of the broadcast nature of wireless medium, asingle broadcast Election message is sufficient to reachall neighbors.2) Reduction in number of Ack messages: One inter-esting “side-effect” of using broadcast to send Electionmessages is that nodes need not maintain a list of theirneighbors, as is done in the Election-TCP and Election-UDP versions of our algorithm. In Election-TCP andElection-UDP versions of our algorithm, node i reportsan Ack message for each Election message it receives.This means that the number of Ack messages that a nodehas to send increases with the number of neighbors.Example:Consider an example network as shown in Figure 6.DABCFig. 6. An example network and the corresponding spanning treeNode A is the source of the computation and nodesB, C and D are its children. Based on our algorithmdescription, nodes B, C and D would each receivethree Election messages. Since each node sends an Ackmessage for every Election message it receives, a totalof 9 Ack messages are sent in the Election-TCP andElection-UDP versions of our algorithm.We can reduce the number of Ack messages by observingthat a child-node needs to send an Ack message onlyto its parent node and can “ignore” Election messagesreceived from other nodes. In Figure 6, upon receivingan Election message from node A, nodes B, C and Deach report back an explicit Child message to nodeA, accepting A as their parent. Based on the receivedChild messages, each parent knows precisely who itschildren are in the spanning tree. Meanwhile, nodeA, after sending an Election message, starts a timercalled CHILD-TIMEOUT, to receive Child messagesfrom its children and upon expiry of CHILD-TIMEOUT,A knows that nodes B, C and D are its children. NodesB, C and D in turn propagate Election messages to oneanother. Since each of these nodes already has nodeA as its parent, none of them report Ack messages toone another. Eventually, nodes B, C and D report theirpending Ack message to their parent-node A. Thus, withthe proposed modification nodes B, C and D send 2messages (1 Child + 1 Ack) each and therefore thetotal number of messages is reduced from 9 to 6.This modification can greatly reduce the number of Ackmessages in a densely connected network, where eachnode has a large number of neighbors and consequentlyexperiences contention for the shared wireless medium.As seen in Figure 5, use of the above optimizations causesa further decrease in F from about 0.37 to 0.11 when thereare 120 nodes. Thus we see that the reduction in messageoverhead also translates into a reduction in fraction F. Thekey insight we obtain from Election-Bcast is that the broadcastnature of wireless medium should be exploited not only forefficient messaging, but also in the form of optimizations tothe proposed algorithm itself.4. Election-Opt: In the Election-TCP, Election-UDP andElection-Bcast versions of the algorithm, whenever a nodereceives an Election message, it immediately joins the electionby propagating the Election message to its own immediateneighbors. However, if a node currently has a leader that isnot the same as departed leader (as indicated in the receivedElection message), then a node does not join the election andsuppresses forwarding of the Election message. But it adoptsa new leader if the newly elected leader has higher identitythan its current leader.Example:Consider the scenario in Figure 7, when a node G, whichis without a leader, starts a new computation and almostsimultaneously merges (represented by a dashed line in thefigure) with another connected component which has a leader,viz node C. Node A, upon receiving an Election message fromnode G does not propagate G’s Election message any furtherand immediately reports back an Ack message to node G. Buteventually when node H is elected as the leader (by nodes D,G and H), G’s Leader message propagates to node A. SinceH has a higher identifier than node A’s current leader (nodeC), A adopts H as its leader and in turn propagates a Leadermessage to nodes B and C, which eventually adopt H as theirleader.CBGDHCCC"E""E"AFig. 7. Optimization : Avoiding unnecessary electionsWith this optimization, the fraction F again shows anothersignificant decrease from 0.11 in case of Election-Bcast toabout 0.025 when N = 120. The lowest curve, in particular,demonstrates the efficiency of our algorithm, in that each nodehas a leader up to 97.5% of the time.From this section, we observe that careful signaling choicesand algorithm optimizations can result in a very efficient algo-rithm design. We next formally specify the various correctnessproperties of our Election-Opt algorithm using temporal logicand subsequently study, using simulations, its performance ina wide variety of operating conditions.VII. FORMAL VERIFICATION OF ALGORITHMUsing linear-time temporal logic [21], we formally verifythe correctness of the Election-Opt algorithm described in theprevious section. Due to space limitations, we do not presentthe proofs here. Detailed proofs are available in [27].Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • A temporal formula consists of predicates, boolean oper-ators (∨, ∧, ¬, ⇒, ⇐⇒ ), quantification operators (∀, ∃) andtemporal operators like (’at every moment in the future’), ♦(’eventually’), (’at some moment in the past’), that are usedto reason about past and the future. We use temporal logic toformally specify algorithm properties and establish invariantsof our leader election algorithm.In [27], we show that starting in a designated initial state,the system is guaranteed to reach a state satisfying predicateP after an arbitrary (but finite) number of changes and that itwill forever remain in a state satisfying P, whereP ≡ (∀i ∃l : (δi = 0 ∧ lidi = l ∧ l = max{j|di,j < ∞}))In words, predicate P describes the set of all states in which anode i’s leader (lidi) is l, the maximum-identifier-node in i’sconnected component, and that l remains i’s leader forever.Thus, we achieve a weaker form of stabilization with ouralgorithm, in which stabilization is guaranteed provided eachprocess starts execution in a designated initial state.The proof of correctness of our election algorithm involvesestablishing the Safety Property and Progress Property de-scribed below:• Safety Property: If diffusing computations stop in thenetwork, then eventually all nodes will have a uniqueleader from within their connected component which isthe maximum-identifier-node in that component. Moreformally:If G ≡ (∀i : δi = 0)then we prove that:G ⇒ ♦ P (1)• Progress Property: This property states that eventuallypredicate G holds true i.e., there are no more diffusingcomputations in the network and all diffusing computa-tions stop. Formally, we prove that:♦ G (2)The Safety and Progress properties together ensure that thesystem eventually converges to a desired stable state specifiedby predicate P. Together, the Safety and Liveness propertiesguarantee that our algorithm also satisfies the TerminationProperty which states that eventually none of the programactions in our algorithm are enabled.VIII. SENSITIVITY ANALYSIS : RESULTS ANDDISCUSSIONA. Election-Rate and Fraction of Time Without LeaderWe first study the impact of node mobility and transmissionrange of nodes on the Election-Rate (R) and Fraction ofTime Without Leader (F). We run each of our simulationsfor a duration of 400 minutes while discarding the dataobtained from the first 150 minutes (corresponding to theinitial transient phase).1. Impact of Node Mobility: In order to study the impactof node mobility, we vary Vmax, the maximum node speedwhile keeping pause times and minimum node speed fixed.The graphs in Figure 8, show the Election-Rate and Fractionof Time Without Leader for three different values of Vmax viz.3m/s, 9m/s, 19m/s. 20 40 60 80 100 120 140MeanElectionRate(permin)Number of Nodes in Simulation (N)Vmax = 3m/sVmax = 9m/sVmax = 19m/s(a) Mean Election Rate00. 20 40 60 80 100 120 140FractionofTimeWithoutLeaderNumber of Nodes in SimulationVmax = 3m/sVmax = 9m/sVmax = 19m/s(b) Fraction (F)Fig. 8. Performance Vs Vmax. Here Tx = 200m, Vmin = 1m/s andPt = 10s.The first conclusion we draw based on 8(a) is that, ir-respective of actual value of Vmax, the Election Rate of anode first increases with N and then starts decreasing withany further increase in N. This is because when N is small(e.g., N = 20), most of the nodes can be expected to beisolated (i.e. not connected to any other node) and remainso for long durations. As N increases, there will be a fewcomponents each with a few nodes. Node mobility results infrequent leader departures and hence an increased ElectionRate. But after a certain threshold, the node density (nodes perunit area) becomes very high and most of the nodes belong to alarge connected component. Although nodes move around, thehigh node density means that components remain connectedfor longer durations and, hence, Election Rate drops. Thesecond observation from Figure 8(a) is that Election-Rate,rather interestingly, decreases with the increase in node speedsfor large values of N. We explain this behavior based on anobservation made in [7] that higher speeds lead to a shorterlifetime of small components. In our case, what this meansis that even though nodes might get disconnected from theirleaders, at higher speeds they are disconnected only for veryshort durations. Hence, before max-beacon-loss becomes 6these disconnected nodes get re-connected to their leaders,thereby avoiding a fresh election.From Figure 8(b), the Fraction of Time Without Leader(F) of a node initially increases with increase in N but theneventually drops slightly with further increase in N. Thisbehavior can be described based on the trends observed inElection-Rate. Initially, with increase in N, F also increasesdue to the increase in Election-Rate and also due to the factthat elections can be expected to be longer when there aremore nodes. However, for N ≥ 100, longer election durationsare counterbalanced by a sharp decrease in Election-Rate andthis accounts for the slight drop in F. Also, with an increase inVmax, F drops still further because of the decrease in Election-Rate as described earlier. As seen from Figure 8(b), F is alwaysbelow 3% and is very close to 0 when Vmax = 19m/s. Thismeans that each node always has a leader 97% to almost 100%of the time.Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • We also studied the impact of pause times on our algo-rithm’s performance. We observed that pause times had verylittle impact on F and Election-Rate. We refer the interestedreader to [27].2. Impact of Transmission Range (Tx): Keeping thenode speeds and pause times fixed, we study the impact ofTx on Election-Rate and F for three different choices of Tx,viz. 200m, 250m and 300m. From Figure 9(a), we see that00. 20 40 60 80 100 120 140MeanElectionRate(permin)Number of Nodes in Simulation (N)Tx = 200mTx = 250mTx = 300m(a) Mean Election Rate00. 20 40 60 80 100 120 140FractionofTimeWithoutLeaderNumber of Nodes in SimulationTx = 200mTx = 250mTx = 300m(b) Fraction (F)Fig. 9. Performance Vs Tx. Here Vmax = 3m/s, Vmin = 1m/s andPt = 10s.an increased transmission range of nodes leads to a higherElection-Rate when N is small (i.e. N = 20). Intuitively, this isbecause for a large value of Tx, there are fewer isolated nodes,but each component still consists of only a small number ofnodes. For large values of N (N ≥ 60), the Election-Ratebecomes smaller with an increase in Tx. This is because, fora given N, the component sizes are larger for large values of Txand partitions occur less frequently. From Figure 9(b), we seethat F increases with Tx for small values of N, but for largevalues of N, it decreases with Tx because of correspondingdecrease in Election-Rate. Again, we see that F is very low:always less than 0.03 and almost 0 when Tx = 300m andN = 120.B. Election-Time and Message-OverheadWe observed in Section VIII-A that the Election-Rate isvery low (almost 0) in some scenarios and therefore, to getmeaningful estimates of Election-Time and Message Overheadwe would have had to run the simulations for very longdurations. Therefore, in order to study Election-Time andMessage-Overhead, we perform simulations in which electionsare triggered at periodic intervals of time. Each simulation isrun for a duration of 200 minutes and we discard the datafrom the first 50 minutes, allowing for the nodes to convergeto a constant average speed.1. Impact of Node Mobility: As in Section VIII-A, we plotthe performance curves for three different choices of Vmax,viz. 3m/s (low speed), 9m/s (medium) and 19m/s (high speed),as shown in Figure 10. The pause time is fixed at 10 secondsfor all node speeds.We first observe from Figure 10(a) that, irrespective ofVmax, Election-Time increases with N. This is intuitive since0510152025300 20 40 60 80 100 120 140MeanElectionTime(T)(insecs)Number of Nodes in Simulation (N)Vmax = 3m/sVmax = 9m/sVmax = 19m/s(a) Mean Election Time0123450 20 40 60 80 100 120 140MessageOverheadNumber of Nodes in Simulation (N)Bcast + Vmax = 3m/sBcast + Vmax = 9m/sBcast + Vmax = 19m/sUcast + Vmax = 3m/sUcast + Vmax = 9m/sUcast + Vmax = 19m/s(b) Message OverheadFig. 10. Performance Vs Vmax. Here Tx = 200m, Vmin = 1m/s andPt = 10s.as N increases, both the node density and the number of nodesinvolved in an election are expected to increase. This leads togreater contention for channel bandwidth and higher messagedelays. Furthermore, for a given N, the mean Election-time of anode increases as the node-speed increases. This, most likely,is due to increased message delays incurred by the unicast Ackand Child messages. At higher node speeds, link breaks occurmore frequently, therefore increasing both the AODV routingoverhead (in terms of number of control packets) and unicastmessage delays. From Figure 10(a), the Election-Time rangesfrom 15 seconds when Vmax = 3m/s to about 23 secondswhen Vmax = 19m/s.The Message Overhead is shown in Figure 10(b). Broadcastmessage overhead and unicast message overhead are shownseparately. Recall from Section VI that, any node (except forthe source) in the spanning tree sends at least one unicast Childmessage and one Ack message to its parent. In addition, eachnode sends at least 2 broadcast messages, viz. one Electionmessage upon joining the election and one Leader messageupon termination. From Figure 10(b), we see that when N =20, (i.e., there are many isolated nodes), each node just sends2 broadcast messages, 1 Election + 1 Leader per election. Butwith the increase in N, both the broadcast message overheadand unicast message overhead increase, irrespective of actualvalue of Vmax. This is because as N increases, componentsbecome larger and several nodes initiate elections concurrentlywhen a leader departs. The broadcast overhead increasesbecause each node sends one broadcast Election messagefor every computation it joins, while the unicast overheadincreases since each node sends a unicast Child message foreach computation it joins. The broadcast Message-Overheadshows very little difference with an increase in Vmax, whilethe unicast Message-Overhead increases only slightly. This isbecause, as elections get longer (with increasing Vmax), theparent and child nodes in the spanning tree are more likely toexchange Probe and Reply messages, leading to an increase inunicast overhead. However, it is evident from the graphs thatthis increase is very small. We thus conclude from Figure 10(b)that the Message-Overhead incurred by our algorithm is verysmall, ranging from 2-3 broadcast messages and 0-3 unicastmessages per node per election.We also studied the impact of pause times (Pt) on theProceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE
    • performance metrics. We observed that pause times have littleeffect on both Election-Time and Message-Overhead. Due tospace limitations we do not present the results here and referthe interested reader to [27].2. Impact of Transmission Range of Nodes: We nextstudy the effect of transmission range (Tx) of individualnodes on Election-Time and Message-Overhead. Due to spacelimitations, we do not present the results here. But we referthe interested reader to [27].Our study shows that for a given N, Election-Time increaseswith an increase in Tx. This is intuitive, since the increase intransmission range leads to increased node density (averagenumber of neighbors for a given node) and larger compo-nent sizes. Hence, there will be larger numbers of nodesparticipating in any given election. Increased node densityalso translates into greater contention for channel bandwidth,leading to greater message delays. The Message-Overheadwas again observed to be fairly small. However, it showeda slight increase with an increase in Tx. This is because,as components grow larger in size and fewer in number, thenumber of concurrent elections triggered on leader departureincreases, leading to a higher message overhead (both unicastand broadcast messages) as explained earlier.IX. CONCLUSIONS AND DISCUSSIONIn this paper, we proposed an asynchronous, distributedextrema finding algorithm for mobile, ad hoc networks andshowed it to be “weakly” self-stabilizing. We formally estab-lished this property of our algorithm using temporal logic.Finally, we simulated our algorithm and provide useful in-sights, based on our experiences in designing a leader electionalgorithm. We found that subtle changes to algorithm and thesignaling methods it uses lead to dramatic improvements in ouralgorithm performance. We also studied in detail the impact ofvarious parameters such as node mobility, transmission range,etc. on the various performance metrics of our algorithm.Although, in this paper we described our algorithm as anextrema-finding one, our algorithm can be used in scenarioswhere just a unique leader is desired. Also, it might sometimesbe useful to elect top k nodes in the network as opposed tojust a single node with the extrema. This case can be triviallyhandled by modifying our algorithm to have each node reportthe top k downstream nodes in its Ack message to its parentduring the election process. Also, in Section III, we assumedthat the links were bidirectional. However, the algorithmshould work correctly even in the case of unidirectional links,provided that there is symmetric connectivity between nodes.We are currently working on the proof of correctness in thecase of unidirectional links. We are also investigating on howour election algorithm can be adapted to perform clustering inwireless, ad hoc networks.REFERENCES[1] A. Amis, R. Prakash, T. Vuong, and D.T. Huynh. MaxMin D-ClusterFormation in Wireless Ad Hoc Networks. In Proc. of IEEE INFOCOM,March 1999.[2] Y. Afek, S. Kutten and M. Yung. Local Detection for Global SelfStabilization. In Theoretical Computer Science, Vol 186 No. 1-2, 339pp. 199-230, October 1997.[3] M. Aguilera, C. Gallet, H. Fauconnier, S. Toueg Stable leader election.In LNCS 2180, p. 108 ff.[4] A. Arora and M. Gouda. Distributed Reset. In IEEE Transactions onComputers, 43(9), 1026–1038, 1994.[5] P. Basu, N. Khan and T. Little. A Mobility based metric for clusteringin mobile ad hoc networks. In International Workshop on WirelessNetworks and Mobile Computing, April 2001.[6] J. Brunekreef, J. Katoen, R. Koymans and S. Mauw. Design andAnalysis of Leader Election Protocols in Broadcast Networks. InDistributed Computing, vol. 9 no. 4, pages 157-171, 1996.[7] T. Chu and I. Nikolaidis. On the Artifacts of Random WaypointSimulations. In Proc. of 1st International Workshop on Wired/WirelessInternet Communications (WWIC 2002), 2002.[8] D. Coore, R. Nagpal and R. Weiss. Paradigms for Structure in anAmorphous Computer. Technical Report 1614, Massachussetts Instituteof Technology Artificial Intelligence Laboratory, October 1997.[9] B. DeCleene et al. Secure Group Communication for Wireless Networks.In Proc. of MILCOM 2001, VA, October 2001.[10] E.W. Dijkstra and C.S. Scholten. Termination detection for diffusingcomputations. In Information Processing Letters, vol. 11, no. 1,pp. 1-4,August 1980.[11] E.W. Dijkstra. Self-stabilizing systems in spite of distributed control. InCommunications of the ACM, 17:634-644,1974.[12] S. Dolev, A. Israeli and S. Moran. Uniform dynamic self-stabilizingleader election part 1: Complete graph protocols. In LNCS 579, 1993.[13] D. Estrin,R. Govindan,J. Heidemann and S. Kumar. Next CenturyChallenges : Scalable Coordination in Sensor Networks. In Proc. ofACM MOBICOM,August 1999.[14] R. Gallager, P. Humblet and P. Spira. A Distributed Algorithm for Min-imum Weight Spanning Trees. In ACM Transactions on ProgrammingLanguages and Systems, vol.4, no.1, pages 66-77, January 1983.[15] K. Hatzis, G. Pentaris, P. Spirakis, V. Tampakas and R. Tan. FundamentalControl Algorithms in Mobile Networks. In Proc. of 11th ACM SPAA,pages 251-260, March 1999.[16] W. Heinzelman,A. Chandrakasan and H. Balakrishnan. Energy-EfficientCommunication Protocol for Wireless Microsensor Networks. In Proc.of HICSS, 2000.[17] D. Johnson and D. Maltz. DSR : The Dynamic Source Routing Protocolfor Multi-Hop Wireless Ad Hoc Networks. In Ad Hoc Networking,edited by Charles E. Perkins, Chapter 5, pp. 139-172, Addison-Wesley,2001.[18] C. Lin and M. Gerla. Adaptive Clustering for Mobile Wireless Networks.In IEEE Journal on Selected Areas in Communications, 15(7):1265-75,1997.[19] N. Lynch. Distributed Algorithms. c 1996, Morgan Kaufmann Publish-ers, Inc.[20] N. Malpani, J. Welch and N. Vaidya. Leader Election Algorithms forMobile Ad Hoc Networks. In Fourth International Workshop on DiscreteAlgorithms and Methods for Mobile Computing and Communications,Boston, MA, August 2000.[21] Z. Manna and A. Pnueli. The Temporal Logic of Reactive andConcurrent Systems - Specification.[22] D. Peleg. Time Optimal Leader Election in General Networks. InJournal of Parallel and Distributed Computing, vol.8, no.1, pages 96-99,January 1990.[23] C. Perkins and E. Royer. Ad-hoc On-Demand Distance Vector Routing.In Proc. of the 2nd IEEE WMCSA, New Orleans, LA, February 1999,pp. 90-100.[24] G. Taubenfeld. Leader Election in presence of n-1 initial failures. InInformation Processing Letters, vol.33, no.1, pages 25-28, October 1989.[25] G. Varghese. Self-Stabilization by local checking and correction. Ph.D.Thesis, LCS Technical Report, 1992.[26] S. Vasudevan, B. DeCleene, N. Immerman, J. Kurose and D. Towsley.Leader Election Algorithms for Wireless Ad Hoc Networks. In Proc. ofIEEE DISCEX III, 2003.[27] S. Vasudevan, J. Kurose and D. Towsley. Design and Analysis ofa Leader Election Algorithm for Mobile, Ad Hoc Networks. UMassCMPSCI Technical Report 03-20.[28] C. Wong, M. Gouda and S. Lam. Secure Group Communication usingKey Graphs. In Proc. of ACM SIGCOMM ’98, September 1998.[29] J. Yoon, M. Liu and B. Noble. Random Waypoint Considered HarmfulIn Proc. of IEEE INFOCOM, 2003.[30] X. Zeng, R. Bagrodia and M. Gerla. GloMoSim: a Library for ParallelSimulation of Large-scale Wireless Networks. In Proc. of 12th Workshopon Parallel and Distributed Simulations, Alberta, Canada, May 1998.Proceedings of the 12th IEEE International Conference on Network Protocols (ICNP’04)1092-1648/04 $ 20.00 IEEE