Leader Election in Trees with Customized Advice
LLeader Election in Trees with Customized Advice
Barun Gorain ∗ Andrzej Pelc ∗† Abstract
Leader election is a basic symmetry breaking problem in distributed computing. All nodesof a network have to agree on a single node, called the leader. If the nodes of the network havedistinct labels, then agreeing on a single node means that all nodes have to output the labelof the elected leader. If the nodes are anonymous, the task of leader election is formulated asfollows: every node of the network must output a simple path starting at it, which is coded as asequence of port numbers, such that all these paths end at a common node, the leader. In thispaper, we study deterministic leader election in anonymous trees.Our goal is to establish tradeoffs between the allocated time τ and the amount of informationthat has to be given a priori to the nodes of a network to enable leader election in time τ .Following the framework of algorithms with advice , this information is provided to all nodesat the start by an oracle knowing the entire tree, in form of binary strings assigned to allnodes. There are two possible variants of formulating this advice assignment. Either the stringsprovided to all nodes are identical, or strings assigned to different nodes may be potentiallydifferent, i.e., advice can be customized . As opposed to previous papers on leader election withadvice, in this paper we consider the latter option.The maximum length of all assigned binary strings is called the size of advice . For a giventime τ allocated to leader election, we give upper and lower bounds on the minimum size ofadvice sufficient to perform leader election in time τ . All our bounds except one pair are tightup to multiplicative constants, and in this one exceptional case, the gap between the upper andthe lower bound is very small. Keywords: leader election, tree, advice, deterministic distributed algorithm, time. ∗ D´epartement d’informatique, Universit´e du Qu´ebec en Outaouais, Gatineau, Qu´ebec J8X 3X7, Canada. E-mails: [email protected] , [email protected] † Research supported in part by NSERC Discovery Grant 8136 – 2013 and by the Research Chair in DistributedComputing of the Universit´e du Qu´ebec en Outaouais. a r X i v : . [ c s . D C ] F e b Introduction
Background.
Leader election is a basic symmetry breaking problem in distributed computing[33]. All nodes of a network have to agree on a single node, called the leader. Performing leaderelection is essential in applications where a single node has to subsequently broadcast a message tocoordinate some network task, or when all nodes have to transmit data to a single node.If the nodes of the network have distinct labels, then agreeing on a single node means that all nodeshave to output the label of the elected leader. However, in many applications, even if nodes havedistinct identities, they may refuse to reveal them, e.g., for privacy or security reasons. Hence, itis often important to design leader election algorithms that do not depend on the knowledge ofsuch labels. Thus we model networks as anonymous graphs. Under this scenario, we formulate theleader election problem as in [24]: every node has to output a simple path (coded as a sequence ofport numbers) from it to a common node.
Model and Problem Description.
We focus on deterministic leader election algorithms fortrees. The network is modeled as a simple undirected tree with n nodes and diameter D . Nodesdo not have any identifiers. On the other hand, we assume that, at each node v , each edge incidentto v has a distinct port number from { , . . . , d − } , where d is the degree of v . Hence each edgehas two corresponding port numbers, one at each of its endpoints. Port numbering is local to eachnode, i.e., there is no relation between port numbers at the two endpoints of an edge. Initially,each node knows only its own degree. The task of leader election is formally defined as follows.Every node v of the tree must output a sequence P ( v ) = ( p , . . . , p k ) of nonnegative integers. Foreach node v , let P ∗ ( v ) be the path starting at v that results from taking the number p i from P ( v )as the outgoing port at the i th node of the path. All paths P ∗ ( v ) must be simple paths in the treethat end at a common node, called the leader.Note that, in the absence of port numbers, there would be no way to identify the elected leader bynon-leaders, as all ports, and hence all neighbors, would be indistinguishable to a node. The abovementioned security and privacy reasons for not revealing node identifiers are irrelevant in the caseof port numbers.Our aim is to establish tradeoffs between the allocated time and the amount of information that hasto be given a priori to the nodes to enable them to perform leader election. Following the frameworkof algorithms with advice , see, e.g., [10, 12, 14, 17, 22, 23, 24], this information is provided to allnodes at the start by an oracle knowing the entire tree, in the form of binary strings assigned toall nodes. There are two possible variants of formulating this advice assignment. Either the stringsprovided to all nodes are all identical [10, 14, 24], or strings assigned to different nodes may bepotentially different, i.e., advice can be customized [17, 22, 23]. As opposed to previous papers onleader election with advice [10, 24], in this paper we consider the latter option.For a given tree T = ( V, E ), the advice assigned by the oracle to nodes of T is formally defined asa function A T : V −→ S , where S is the set of finite binary strings. The string A T ( v ), given bythe oracle to node v , is an input to a leader election algorithm. Apart from A T ( v ), node v knows apriori only its own degree. The maximum of all lengths of strings A T ( v ), for v ∈ V , is called the sizeof advice . The size of the range {A T ( v ) : v ∈ V } is called the valency of advice . When valency is 1,the advice given to all nodes is identical. As mentioned above, in this paper we assume that valency1f advice is larger than 1. We consider two scenarios. In the first one, valency is unbounded, i.e.,every node can potentially get a different advice string. In the second scenario, we bound valencyof possible advice by a constant λ >
1. This may be important in some applications, as a smallnumber of binary strings may be sometimes easier to distribute among nodes.We use the well-known
LOCAL communication model [37]. Communication proceeds in syn-chronous rounds and all nodes start simultaneously. ∗ In each round, each node can exchangearbitrary messages with all of its neighbors, and perform arbitrary local computations. For anytree T , any advice A T given to the nodes of T , any node v , and any nonnegative integer τ , wedefine the labeled ball B ( v, τ ) acquired in T by v within τ communication rounds. This is all theinformation that v gets about the tree T in τ rounds. Thus the labeled ball B ( v, τ ) consists ofthe port-labeled subtree induced by all nodes at distance at most τ from v , with every node w ofthe subtree labeled by A T ( w ), together with the degrees of all nodes at distance exactly τ from v .The decisions of v in round τ in any deterministic algorithm are a function of B ( v, τ ). The time ofleader election is the minimum number of rounds sufficient to complete it by all nodes.For advice of valency larger than 1, leader election is always feasible for some advice of size 1, givensufficient time. Indeed, it is enough to give advice 1 to some node, advice 0 to all others, andallocate time D . By this time, all nodes can see the unique node with advice 1, and hence can finda simple path to it. This is in sharp contrast with the scenario of advice with valency 1 [10, 24], asfor such advice, if the tree is perfectly symmetric (e.g., the two-node tree) then symmetry cannotbe broken, and leader election is impossible to carry out, regardless of the allocated time. However,the difficulty of fast leader election (in time smaller than D/
2) with small customized advice, liesin the ability of the oracle to code the part of the path from the node v to the leader that thenode v cannot see within the allocated time τ , by appropriately assigning advice to nodes in thelabeled ball B ( v, τ ) that the node can see. This is challenging, as advice given to a node w must beused by all nodes to whose labeled balls node w belongs. Efficient coding schemes using constantsize advice are at the heart of our most involved election algorithm, the one working for constantvalency and large diameter.One may ask if leader election is possible in a very short time, provided that sufficiently large adviceof some valency larger than 1 is given to the nodes. This is, of course, the case when valency isunbounded: then leader election is possible in time 0, as every node can be simply given as advice acode of a simple path to a chosen leader. However, for bounded valency, this is not the case. Fig. 1gives an example of a tree in which leader election is impossible in time at most 1, for any 2-valentadvice, regardless of its size. Indeed, consider the labeled balls B ( v,
1) of the 5 leaves
A, B, C, D, E of this tree. For any 2-valent advice, there are 4 different possible labeled balls. Hence, at leasttwo of these 5 leaves must have identical labeled balls, and hence must output identical paths tothe leader. However, regardless of the choice of the leader in this tree, for one of these leaves thispath must be incorrect.Hence, for any tree T and any integer constant λ >
1, it is important to introduce the parameter ξ λ ( T ), called the λ - election index of T , defined as the minimum time in which leader election isfeasible in T , where the minimum is taken over all possible λ -valent advice assignments in T . Since,as observed above, given sufficient time, leader election is always possible in any tree, if λ >
1, the λ -election index is always well defined for λ > ∗ It is known that the
LOCAL model can be simulated in an asynchronous network using time stamps. A B C D E
Figure 1: An Example of a tree T with ξ ( T ) > λ -valent advice to solve leader election in time τ ismeaningful only in the class of trees T for which ξ λ ( T ) ≤ τ , because otherwise, no λ -valent advicecan help. In the light of these remarks, we are now able to precisely formulate the two centralproblems considered in this paper. • For a given time τ , what is the minimum size of advice (of unbounded valency) that permitsleader election in time τ for all trees? • For a given time τ , what is the minimum size of advice of valency λ that permits leaderelection in time τ for all trees T for which ξ λ ( T ) ≤ τ ?If the allocated time is at least (cid:100) D (cid:101) , then advice of size 1 suffices. Indeed, in every tree there is anode whose distance from any other node is at most (cid:100) D (cid:101) , and thus it is enough to give advice 1 tothis node and 0 to all others. Hence we concentrate on time smaller than (cid:100) D (cid:101) . Our results.
For advice of unbounded valency, we give tight upper and lower bounds on the mini-mum size of advice sufficient to perform leader election, for the entire spectrum of the allocated time τ . For the class of n -node trees of diameter D , the minimum size of advice is Θ( ( D/ − ττ log ( n/ − τ ( D/ − τ )for 0 < τ < (cid:100) D (cid:101) , and it is Θ( D log( n/D )), for τ = 0.For λ -valent advice, where λ is any integer constant larger than 1, we give upper and lower boundson the minimum size of advice sufficient to perform leader election, for a large part of the spectrumof the allocated time τ . Our lower bounds are again tight, except in one case, where the ratiobetween the upper and the lower bound is smaller than any polynomial. It turns out that, for λ -valent advice, the minimum size of advice obeys a dichotomy rule: it is either very large or verysmall. More precisely, we prove the following results.Consider the class of n -node trees of diameter D . • If D is small ( D ∈ ω (1) and D ∈ o (log n )), and the allocated time is τ = (cid:98) αD (cid:99) , for somepositive constant α < /
2, then the minimum size of advice is in Ω( n δ ), for any constant3 <
1. Since it is in O ( n ) by [24], the ratio between the upper and the lower bound is smallerthan O ( n (cid:15) ), for any positive constant (cid:15) . This is the only pair of bounds that are not tight. • If D is medium ( D ∈ ω (log n ) and D ∈ o ( n )), and the allocated time is τ = (cid:98) αD (cid:99) , for someconstant α < /
2, then the minimum size of advice is Θ( n ). • If D is large ( D = cn + o ( n ), for some positive constant c ) then there exist two positive reals β < β < /
2, depending only on constants c and λ , with the following properties:1. if τ = (cid:98) βD (cid:99) for any constant β < β , then the minimum size of advice is Θ( n ),2. if τ = (cid:98) β (cid:48) D (cid:99) for any constant β (cid:48) > β , then the minimum size of advice is constant,3. β − β < /
8, for all constants c and λ (the part of the time spectrum not covered byour results is small, regardless of c and λ ).The main challenge in our positive results is the design of advice and of the accompanying electionalgorithm, such that the advice given to nodes in the labeled ball B ( v, τ ) codes the part of the pathfrom node v to the leader that node v cannot see. Every node v must be able to decode this part ofthe path unambiguously, although labeled balls may heavily intersect. The main difficulty in ournegative results is the construction of trees, for which the labeled ball B ( v, τ ) is so small and thepossible paths unseen by v are so numerous, that the information that can be coded by the advicegiven to nodes of B ( v, τ ) is insufficient, for some nodes v , to compute their path to any potentialleader. Related work.
The leader election problem was introduced in [32]. Its study started for rings, inthe scenario where all nodes have distinct labels. A synchronous algorithm based on label compar-isons and using O ( n log n ) messages was given in [26]. In [18] it was proved that this complexityis optimal for comparison-based algorithms. An asynchronous algorithm using O ( n log n ) messageswas given, e.g., in [38], and the optimality of this message complexity was shown in [8]. Deter-ministic leader election in radio networks was studied, e.g., in [28, 31, 35], and randomized leaderelection, e.g., in [40]. In [25], the leader election problem was investigated in a model based onmobile agents, for networks with labeled nodes.In many papers [3, 4, 5, 6, 7, 41, 42] leader election was studied in anonymous networks. Inparticular, [6, 42] characterized anonymous message-passing networks in which leader election canbe achieved. In [41], the authors studied leader election in general networks under the assumptionthat node labels are not unique. In [13], the authors studied feasibility and message complexityof leader election in rings with possibly nonunique labels, while, in [11], the authors constructedalgorithms for a generalized leader election problem in rings with arbitrary labels, unknown (andarbitrary) size of the ring, and for both synchronous and asynchronous communication. Memoryneeded for leader election in unlabeled networks was studied in [21]. In [20], the authors investigatedthe time of leader election in anonymous networks by characterizing this time in terms of thenetwork size, the diameter of the network, and an additional parameter called the level of symmetry,which measures how deeply nodes have to inspect the network in order to notice differences in theirviews of it.The paradigm of algorithms with advice that studies how arbitrary kinds of information (coded asbinary strings provided to nodes of the network or to agents) can be used to perform network tasks4ore efficiently was previously proposed in [1, 9, 12, 14, 15, 16, 17, 21, 22, 23, 27, 29, 30, 34, 36, 39].There are two possible ways of assigning advice to nodes. Either all the binary strings provided tonodes are identical [10, 14, 24], or strings assigned to different nodes may be potentially different[17, 22, 23]. In the latter case, instead of advice, the term informative labeling schemes is sometimesused.In this paradigm, the focus is on establishing the minimum size of advice required to solve networkproblems in an efficient way. In [15], the authors compared the minimum size of advice requiredto solve two information dissemination problems using a linear number of messages. In [17], itwas shown that advice of constant size given to the nodes enables the distributed construction ofa minimum spanning tree in logarithmic time. In [12], the advice paradigm was used for onlineproblems. In [14], the authors established lower bounds on the size of advice needed to beat timeΘ(log ∗ n ) for 3-coloring cycles and to achieve time Θ(log ∗ n ) for 3-coloring unoriented trees. In thecase of [36], the issue was not efficiency but feasibility: it was shown that Θ( n log n ) is the minimumsize of advice required to perform monotone connected graph clearing. In [27], the authors studiedradio networks for which it is possible to perform centralized broadcasting in constant time. Theyproved that constant time is achievable with O ( n ) bits of advice in such networks, while o ( n ) bitsare not enough. In [22], the authors studied the problem of topology recognition with advice givento the nodes. In [9], the task of drawing an isomorphic map by an agent in a graph was considered,and the problem was to determine the minimum advice that has to be given to the agent for thetask to be feasible. In [34], the authors investigated the minimum size of advice sufficient to findthe largest-labeled node in a graph.The problem of leader election with advice was previously studied for anonymous networks in[10, 24]. The main difference between these papers and the present paper is that in [10, 24]the binary strings provided to nodes were all identical, while in the present paper they may bepotentially different. This is a significant difference: while in the former case advice cannot breaksymmetry and can be only used to extract existing asymmetries from the network more efficiently,in our case advice has double role: it can break symmetry and provide additional informationthat enables nodes to use it fast to perform leader election. For example, with the possibility ofcustomizing advice, advice of size 1 is always sufficient to perform leader election in time largerthan half of the diameter of the tree, while it was proved in [24] that large advice was sometimesneeded for such allocated time, if all advice strings had to be identical. For any rooted tree T with root r and diameter D , the depth of a node is defined as its distancefrom the root r . The height of the tree is the length of the longest path from the root to a leaf. Fortwo given nodes v and w , if v lies on the unique simple path between w and the root r , then w is a descendant of v , and v is an ancestor of w . Every tree has either a central node or a central edge,depending on whether the diameter of the tree is even or odd. If the diameter D is even, then thecentral node is the unique node in the middle of every simple path of length D , and if the diameter D is odd, then the central edge is the unique edge in the middle of every simple path of length D .Since there are 2 Θ( n ) n -node anonymous port-labeled trees (cf. [24]), λ -valent advice of size O ( n )5s sufficient to perform leader election in any tree T , in time ξ λ ( T ), for any λ ≥
1. Hence, wheneverwe prove a lower bound Ω( n ) on the size of advice, it is tight (up to multiplicative constants).Throughout the paper, by path, we mean a simple path. For a sequence s , we denote by s R thereverse sequence.We use the abbreviation 1 k for a string of k ones and 0 k for a string of k zeroes. We will need toefficiently code sequences of natural numbers in a non-ambiguous way, using binary strings. Wewill use the following coding. Let σ = ( p , . . . , p k ) be a sequence of natural numbers. Let p ∗ i be thebinary representation of p i , for i ≤ k . The binary code σ ∗ of σ is defined in three steps. Considerthe sequence ( p ∗ , . . . , p ∗ k ). The terms of this sequence are 0,1 and “,”.Step 1: replace each 0 by the string of bits 10, and replace each 1 by by the string of bits 11. Noticethat each comma is now followed by the bit 1.Step 2: remove the bit 1 after each comma.Step 3: replace each comma by the bit 0.The resulting binary sequence is σ ∗ . For example, the sequence σ = (3 ,
5) will be transformed asfollows: ( p ∗ , p ∗ ) = (11 , , , σ ∗ = (1111011011).Notice that the length of the sequence σ ∗ is 2 (cid:80) ki =1 ( (cid:98) log p i (cid:99) + 1) because (cid:80) ki =1 ( (cid:98) log p i (cid:99) + 1) isthe sum of the lengths of the binary representations p ∗ , . . . , p ∗ k . The transformation σ → σ ∗ isone-to-one because the sequence σ ∗ can be decoded as follows.Divide the sequence σ ∗ into consecutive pairs of bits, until a pair (0 , b ). Decode the obtainedpreceding pairs by replacing 10 by 0 and 11 by 1. The obtained sequence is p ∗ . Add a comma,and replace the pair (0 , b ) by (1 , b ). Repeat the above steps to find the consecutive strings p ∗ i , for2 ≤ i ≤ k . This gives the sequence ( p ∗ , . . . , p ∗ k ). Now σ = ( p , . . . , p k ), where p ∗ i is the binaryrepresentation of p i , for i ≤ k .The above coding can be easily generalized to the case when λ > c , c , . . . , c λ are used inthe coding instead of 0 and 1. Now p ∗ i is the λ -ary representation of p i . The three above codingsteps are changed as follows:Step 1: replace each color c i by c c i .Step 2: remove the color c after each comma.Step 3: replace each comma by c .The obtained code σ ∗ has length at most 2 (cid:80) ki =1 ( (cid:98) log λ p i (cid:99) + 1). In this section we give tight upper and lower bounds on the minimum size of advice (of unboundedvalency) sufficient to perform leader election in any time τ < (cid:100) D (cid:101) .6 .1 Upper bound We first present a leader election algorithm working for any tree of diameter D in time τ < (cid:100) D (cid:101) ,with advice of unbounded valency. Let T be a rooted n -node tree of diameter D . If D is even, thenthe root r is the central node, and if D is odd, the root r is one of the endpoints of the centraledge. This is the node that the algorithm will elect. The height of the tree is (cid:100) D (cid:101) .At a high level, the idea of the algorithm is to partition every branch of the tree into segments oflength (cid:98) τ (cid:99) and assign advice to the nodes of the segment in such a way that the concatenationof the advice strings in a given segment, read bottom-up, can be decoded as the sequence of portnumbers corresponding to the path from the upper endpoint of the segment to the root. Everynode can see some entire segment, and thus can output the correct path to the leader. Care shouldbe taken to indicate the upward direction in each segment, as nodes cannot recognize this directiona priori.We first give a detailed description of Algorithm Advice ( T, τ ) constructing the advice, and thenpresent the details of the leader election algorithm using this advice. If D ≤
2, it is straightforwardto elect a leader using advice of size 1. In the sequel we assume that D ≥ P ( u, v ) denotes the path from u to v , definedas the sequence of nodes including u and v . For τ ≤
1, the advice given to each node is simplythe string of port numbers corresponding to the path from it to the leader. Otherwise, Algorithm
Advice ( T, τ ) computes the advice A ( v ) = ( M ( v ) , M ( v ) , M ( v ) , C ( v )) for each node v . For everybranch ( r, v , v , v , · · · , v k ) from the leader to a leaf, we define M ( r ) = 3, M ( v ) = 0, M ( v ) = 1, M ( v ) = 2, M ( v ) = 0, M ( v ) = 1, M ( v ) = 2, and so on. The component M ( v i ) of the advicehelps a node to identify the upward direction in the following way. For any node v , if M ( v ) = x ,and if v (cid:48) is the neighbor of v with M ( v (cid:48) ) = ( x −
1) mod 3, then the node will identify v (cid:48) as itsparent, i.e., its neighbor on the path towards the leader.The component M ( v ) of the advice is used to mark every node at depth k (cid:98) τ (cid:99) , for all k ≥
1. Weset M ( v ) = 1 if the depth of v is k (cid:98) τ (cid:99) , for k ≥
1, otherwise M ( v ) = 0.The component M ( v ) of the advice is used to mark all nodes at depth at least (cid:100) D (cid:101) − τ . We set M ( v ) = 1 if the depth of v is at least (cid:100) D (cid:101) − τ , otherwise M ( v ) = 0.The component C ( v ) of the advice is assigned in the following way. Let P = ( u , u , · · · , u (cid:98) τ (cid:99) ), suchthat M ( u ) = M ( u (cid:98) τ (cid:99) ) = 1, and M ( v i +1 ) = ( M ( v i ) −
1) mod (3), for i = 0 , , · · · , (cid:98) τ (cid:99) −
1, i.e, P is a path between two nodes which are at depths multiple of (cid:98) τ (cid:99) and the path is going towardsthe root r . The binary string s ( w, r ) ∗ unambiguously coding the sequence of port numbers s ( w, r )that represents the path of length at most (cid:100) D (cid:101) − τ from some node w of the tree to the leader r ,is divided into (cid:98) τ (cid:99) segments of lengths differing by at most 1, and these segments are given as thecomponent C ( u i ) to the nodes u , · · · , u (cid:98) τ (cid:99) . If the depth of u (cid:98) τ (cid:99) is less than (cid:100) D (cid:101) − τ , then u (cid:98) τ (cid:99) ischosen as w . Otherwise, the node at depth (cid:100) D (cid:101) − τ on the path from u (cid:98) τ (cid:99) to r is chosen as w .Since the advice given to every node should be a binary string, the advice outputted by Algorithm Advice ( T, τ ) is the binary string ρ ( v ) unambiguously coding A ( v ) = ( M ( v ) , M ( v ) , M ( v ) , C ( v )).This can be done by coding M ( v ) on three bits, and all the other components without any change.Algorithm Election ( v, ρ ( v ) , τ ) using advice ρ ( v ) given by Algorithm Advice ( T, τ ) works as fol-7 lgorithm 1
Advice ( T, τ ) if τ = 0 or τ = 1 then Let s ( v, r ) be the sequence of port numbers corresponding to the simple path from v to r . A ( v ) ← (0 , , , s ( v, r ) ∗ ), for all v ∈ T . else M ( r ) ←
3. For every path P = ( r, v , v , · · · , v k ), starting from r , M ( v i ) ← ( i −
1) mod 3. For every node v ∈ T at depth k (cid:98) τ (cid:99) , for k ≥ M ( v ) ← v ∈ T , M ( v ) ← For every node v ∈ T at depth at least (cid:100) D (cid:101) − τ , M ( v ) ← v ∈ T , M ( v ) ← for every path P = ( u , u , · · · , u (cid:98) τ (cid:99) ), such that M ( u ) = M ( u (cid:98) τ (cid:99) ) = 1, and M ( v i +1 ) =( M ( v i ) −
1) mod 3, for i = 1 , , · · · , (cid:98) τ (cid:99) − do if M ( u (cid:98) τ (cid:99) ) = 0 then w ← u (cid:98) τ (cid:99) else w ← the last node on the path P (( u (cid:98) τ (cid:99) ) , r ) such that M ( w ) = 1. end if Let s ( w, r ) be the sequence of port numbers corresponding to the simple path from w to r . Let s , s , · · · , s (cid:98) τ (cid:99) be substrings of s ( w, r ) ∗ of lengths differing by at most 1, such that s ( w, r ) ∗ is the concatenation s s · · · s (cid:98) τ (cid:99) . C ( u i ) ← s i , for i = 1 , · · · , (cid:98) τ (cid:99) . end for C ( v ) ←
0, for all other nodes. A ( v ) ← ( M ( v ) , M ( v ) , M ( v ) , C ( v )), for all v ∈ T . end if Output the binary string ρ ( v ) unambiguously coding A ( v ), for all v ∈ T .8ows. Every node v decodes from its advice the terms M ( v ), M ( v ), M ( v ), and C ( v ) of thesequence A ( v ) = ( M ( v ) , M ( v ) , M ( v ) , C ( v )). If τ ≤
1, then the node decodes the sequence ofport numbers from C ( v ) (which corresponds to the path from v to r ) and outputs it.Suppose that τ >
1. If a node v can see a node u with M ( u ) = 3, then v outputs the sequence ofport numbers corresponding to the simple path from v to u . This sequence is seen in the ball B ( v, τ ).Otherwise, each node v can see in time τ a path P = ( u , u , · · · , u (cid:98) τ (cid:99) ), such that u is an ancestor of v , M ( u ) = M ( u (cid:98) τ (cid:99) ) = 1, and M ( v i +1 ) = ( M ( v i ) −
1) mod 3, for i = 0 , , · · · , (cid:98) τ (cid:99) −
1, because,for every node u at depth k (cid:98) τ (cid:99) , we have M ( u ) = 1. From the advice at nodes u , u , · · · , u (cid:98) τ (cid:99) ,node v decodes C ( u ), C ( u ), · · · , C ( u (cid:98) τ (cid:99) ). Next, node v computes the string s (cid:48) which is theconcatenation of C ( u ), C ( u ), · · · , C ( u (cid:98) τ (cid:99) ). This string s (cid:48) unambiguously codes the sequence π ( w, r ) of port numbers corresponding to the path from w to r , where w = u (cid:98) τ (cid:99) if the depth of u (cid:98) τ (cid:99) is less than (cid:100) D (cid:101) − τ , and where w is the node at depth (cid:100) D (cid:101) − τ on P ( v, r ), if the depth of u (cid:98) τ (cid:99) is at least (cid:100) D (cid:101) − τ . Let π ( v, w ) be the sequence of port numbers corresponding to the path from v to w , which can be seen in the ball B ( v, τ ). The node v outputs the concatenation of sequences π ( v, w ) and π ( w, r ). Algorithm 2
Election ( v, ρ ( v ) , τ ) Get the labeled ball B ( v, τ ) in time τ . Decode the terms M ( u ), M ( u ), M ( u ), and C ( u ) from the advice ρ ( u ) at all nodes u in B ( v, τ ). if τ = 0 or τ = 1 then decode the sequence of port numbers from C ( v ) and output it. else if there exists a node u in B ( v, τ ), such that M ( u ) = 3 then let π be the sequence of port numbers corresponding to the simple path from v to u . else Let P = ( v, v , v , · · · , v τ ) be the path in B ( v, τ ) such that M ( v ) = ( M ( v ) −
1) mod 3and M ( v i +1 ) = ( M ( v i ) −
1) mod 3, for i = 1 , , · · · , τ −
1. Let j be the smallest indexsuch that v j and v j + (cid:98) τ (cid:99) are the nodes in P satisfying M ( v j ) = M ( v j + (cid:98) τ (cid:99) ) = 1. Let s (cid:48) bethe concatenation C ( v j +1 ) C ( v j +2 ) · · · C ( v j + (cid:98) τ (cid:99) ). Let π (cid:48) be the sequence of port numberscoded by s (cid:48) . if M ( v j + (cid:98) τ (cid:99) ) = 0 then w ← v j + (cid:98) τ (cid:99) else w ← the last node on the path P such that M ( w ) = 1. end if Let π (cid:48)(cid:48) be the sequence of port numbers corresponding to the simple path from v to w (seen in the ball B ( v, τ )). π ← π (cid:48)(cid:48) π (cid:48) end if Output π . end if The following two lemmas establish an upper bound on the size of advice provided by Algorithm9 dvice ( T, τ ) .
Lemma 3.1
Let s ( v, r ) be the the sequence of port numbers corresponding to the path P from v to r . Then the length of s ( v, r ) ∗ is in O (( D − τ ) log( n − τD − τ )) for every node v ∈ T of depth at most (cid:100) D (cid:101) − τ . Proof.
Let v be a node of T of depth at most (cid:100) D (cid:101) − τ . It is enough to prove that the sum oflogarithms of degrees of nodes on the path P is in O (( D − τ ) log( n − τD − τ )). Since the depth of v in T is at most (cid:100) D (cid:101) − τ , there exist at least τ nodes in T with depth larger than (cid:100) D (cid:101) − τ . Also, sincethe diameter of T is D , there exists at least one path of length (cid:98) D (cid:99) with no common node with P other than r . Let P = ( v, u , u , · · · , u k − , r ). Let d ( u ) denote the degree of node u .Then, d ( v ) + (cid:80) k − i =1 d ( u i ) ≤ n − τ − (cid:98) D (cid:99) ≤ n − τ .The sum of logarithms of these degrees is log d ( v ) + (cid:80) k − i =1 log d ( u i ) = log (cid:16) d ( v ) (cid:81) ki =1 d ( u i ) (cid:17) . Thevalue of d ( v ) (cid:81) ki =1 d ( u i ) is maximized when d ( v ) = d ( u i ) = d ( v )+ (cid:80) ki =1 d ( u i ) k for 1 ≤ i ≤ k −
1. Hence,this sum of logarithms is at most k log( n − τk ) ≤ ( (cid:100) D (cid:101) − τ ) log( n − τ (cid:100) D (cid:101)− τ ) ∈ O (( D − τ ) log( n − τD − τ )). (cid:50) Lemma 3.2
Assume that the diameter D of the tree is at least 3. The size of the advice givento each node v in T by Algorithm Advice ( T, τ ) is in O ( D log nD ) , when τ = 0 , and it is in O ( D − ττ log( n − τD − τ )) , when τ > . Proof.
First suppose that τ ≤
1. In this case, the advice given to every node v codes the sequenceof port numbers corresponding to the path from v to r . By Lemma 3.1, the size of the advice is O ( D log nD ).In the rest of the proof we assume that τ ≥
2. Consider any path P = ( u , u , · · · , u (cid:98) τ (cid:99) ), suchthat M ( u ) = M ( u (cid:98) τ (cid:99) ) = 1, and M ( v i +1 ) = ( M ( v i ) −
1) mod 3, for i = 1 , , · · · , (cid:100) τ (cid:99) −
1. Let s be the concatenation C ( u ) C ( u ) · · · C ( u (cid:98) τ (cid:99) ). According to steps 8-13 of Algorithm 1, s is thebinary string coding the sequence of port numbers corresponding to the path from a node of depthat most (cid:100) D (cid:101) − τ to r . Hence, by Lemma 3.1, the length | s | of s is in O (( D − τ ) log( n − τD − τ )).Since C ( u i ) ≤ (cid:100) | s |(cid:98) τ (cid:99) (cid:101) , therefore, C ( u i ) ∈ O ( D − ττ log( n − τD − τ )). For all other nodes v of T , we have C ( v ) = 0. Therefore, C ( v ) ∈ O ( D − ττ log( n − τD − τ )), for all nodes v of T . The other three componentsof A ( v ) are of constant size. Hence the size of the binary string ρ ( v ) coding the advice A ( v ) is in O ( D − ττ log( n − τD − τ )). (cid:50) The following lemma proves the correctness of our election algorithm.
Lemma 3.3
Every node v of a tree T executing, in time τ , Algorithm Election ( v, ρ ( v ) , τ ) withadvice ρ ( v ) given by Algorithm Advice ( T, τ ) , chooses node r as the leader and outputs the sequenceof port numbers corresponding to the path from v to r . roof. If there exists a node u in B ( v, τ ), such that M ( u ) = 3, i.e., if a node v can see the node u = r , then v outputs the sequence of port numbers corresponding to the path from v to r , readingit from B ( v, τ ). Otherwise, consider two cases.If τ ≤
1, the advice assigned to each node codes the sequence of port numbers corresponding tothe path from this node to r . If τ >
1, then the components C ( v ) of the advice given to nodes v have the following property. Their concatenation, for nodes in a segment of length (cid:98) τ (cid:99) , betweennodes at depths which are multiples of (cid:98) τ (cid:99) , read bottom-up, can be decoded as the sequence ofport numbers corresponding to the path from node w defined in steps 11-13 to the root r . Everynode can see at least one such entire segment, recognizes the direction bottom-up, and can see thisnode w . Therefore, every node v can output the sequence of port numbers corresponding to thepath from v to r . (cid:50) Lemmas 3.2 and 3.3 imply the following theorem.
Theorem 3.4
For any n -node tree with diameter D , Algorithm Election ( v, ρ ( v ) , τ ) performselection in time τ with advice of size O ( D log nD ) , when τ = 0 , and with advice of size O ( D − ττ log( n − τD − τ )) when < τ < (cid:100) D (cid:101) . Let n (cid:48) > D ≥
3. Let L be a line of length D with nodes v , v , · · · , v D from left to right, and withport numbers 0 and 1 at each edge from left to right. Let z = (cid:100) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:101) . We construct an n -nodetree T from L as follows, see Fig. 2 and Fig. 3. For each i , such that τ ≤ i ≤ (cid:100) D (cid:101) −
1, attach z − v i and v D − i . The port numbers corresponding tothe newly added edges at the nodes on L are 2 , . . . , z .The total number of nodes in T is given by n = 2 τ + 2( (cid:100) D (cid:101) − τ ) z = 2 τ + 2( (cid:100) D (cid:101) − τ ) (cid:100) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:101) .Therefore, 2 τ + 2( (cid:100) D (cid:101) − τ ) n (cid:48) − τ (cid:100) D (cid:101) − τ ) ≤ n ≤ τ + 2( (cid:100) D (cid:101) − τ ) (cid:32) n (cid:48) − τ (cid:100) D (cid:101) − τ ) + 1 (cid:33) which implies, n (cid:48) ≤ n ≤ n (cid:48) + 2( (cid:100) D (cid:101) − τ )Since D < n (cid:48) , we have n ∈ Θ( n (cid:48) ).Let x = ( x , x , · · · , x (cid:100) D (cid:101)− τ ) and y = ( y , y , · · · , y (cid:100) D (cid:101)− τ ) be two sequences such that 0 ≤ x i ≤ z , x i (cid:54) = 1, for i = 1 , , · · · , (cid:100) D (cid:101) − τ and 1 ≤ y i ≤ z for i = 1 , , · · · , (cid:100) D (cid:101) − τ . We construct a tree T x from T by exchanging the ports 0 and x i at v τ + i − , for i = 1 , , · · · , (cid:100) D (cid:101) − τ , and we construct atree T y from T by exchanging the ports 1 and y i at v D − τ − i +1 , for i = 1 , , · · · , (cid:100) D (cid:101) − τ . Let T X v v v v D v D − v D − v τ v D − τ v d D e− v d D e +1 Figure 2: Construction of T for D even v v v v D v D − v D − v τ v D − τ v d D e− v d D e Figure 3: Construction of T for D oddbe the set of all such trees T x constructed from T and let T Y be the set of all trees T y constructedfrom T . Then |T X | = |T Y | = z ( (cid:100) D (cid:101)− τ ) . Let T = T X ∪ T Y .The following theorem gives a lower bound on the size of advice sufficient to perform election intime τ < (cid:100) D (cid:101) , using the class of trees T constructed above. This bound matches the upper boundfrom Theorem 3.4. Theorem 3.5
Consider any algorithm ELECT which solves election in ≤ τ < (cid:100) D (cid:101) rounds, forevery tree. For all integers n (cid:48) > D ≥ , there exists a tree T ∈ T with n ∈ Θ( n (cid:48) ) nodes and diameter D , for which algorithm ELECT requires advice of size Ω( D log nD ) , when τ = 0 , and advice of size Ω (cid:16) D − ττ log (cid:16) n − τD − τ (cid:17)(cid:17) , when < τ < (cid:100) D (cid:101) . Proof.
We prove the theorem by contradiction. Consider an algorithm ELECT that solves electionin τ rounds with advice of size p < (cid:18) (cid:100) D (cid:101)− ττ +1 log (cid:18) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:19)(cid:19) −
1. Consider the execution ofalgorithm ELECT for the trees in T . For any choice of the leader, at least one of the nodes v or v D must be at distance at least (cid:100) D (cid:101) from it. Without loss of generality, let the distance from v tothe leader be at least (cid:100) D (cid:101) .With the size of advice at most p , there are at most 2 ( p +1)( τ +1) possible labeled balls B ( v , τ ).Hence, the number of different pieces of information that v can get within time τ is at most2 ( p +1)( τ +1) < (cid:18) n − τ (cid:100) D (cid:101)− τ ) (cid:19) (cid:100) D (cid:101)− τ ≤ (cid:24) n − τ (cid:100) D (cid:101)− τ ) (cid:25) (cid:100) D (cid:101)− τ = |T X | . Therefore, there exist at least twotrees T , T ∈ T X such that the nodes v in T and v in T see the same labeled balls. Hence, v in T and v in T must output the same sequence of port numbers to give the path to theleader. According to the construction of the trees in T X , for every two such trees, the pathsfrom v of length at least (cid:100) D (cid:101) must correspond to different sequences of port numbers. Thiscontradicts the correctness of the algorithm ELECT. Therefore, the size of the advice must be inΩ (cid:18) (cid:100) D (cid:101)− ττ +1 log (cid:18) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:19)(cid:19) , i.e., it is in Ω( D log nD ), when τ = 0, and it is in Ω (cid:16) D − ττ log (cid:16) n − τD − τ (cid:17)(cid:17) ,when 0 < τ < (cid:100) D (cid:101) . (cid:50) Corollary 3.6
The minimum size of advice sufficient to perform leader election in time ≤ τ < (cid:100) D (cid:101) in all n -node trees of diameter D is Θ( D log nD ) , when τ = 0 , and it is Θ (cid:16) D − ττ log (cid:16) n − τD − τ (cid:17)(cid:17) ,when < τ < (cid:100) D (cid:101) . In this section we study the minimum size of advice to perform election in time τ = (cid:98) αD (cid:99) , where α < / λ >
1. The sectionis organized as follows. We first give a general construction of a class T of trees that will be usedto prove our lower bounds on the size of advice. The rest of the section is divided into three parts,corresponding, respectively, to the cases of small, medium and large diameter D of the tree, withrespect to its size n . In each part we give a lower bound, using a particular case of our generalconstruction.In all parts, the proof of the lower bound is split into two facts. The first fact gives the requirementof the minimum size of advice that any leader election algorithm for trees in T , working in time τ , has to satisfy. The second fact establishes the condition ξ λ ( T ) ≤ τ for any tree T ∈ T . Thiscondition asserts that the time τ is sufficient to elect the leader in any tree from T , if sufficientlylarge λ -valent advice is given to the nodes of the tree.As for the upper bounds, in the cases of small and of medium diameter, we use the previouslymentioned upper bound O ( n ) on the size of advice sufficient for leader election. For small diameterthis leaves a sub-polynomial gap in advice size, and for medium diameter it is tight. In the caseof large diameter, we provide an election algorithm using advice of constant size, whenever theallocated time is sufficiently large. Let α < be a positive real constant and λ > D < n (cid:48) be positiveintegers. Let τ = (cid:98) αD (cid:99) . We first suppose that D is even. Later we will address the case when D is odd.We use the variables k , k , z , z (cid:48) in the following construction of a tree T . We assume that k iseven. The values of these variables will be specified later to obtain our lower bounds for variousranges of the diameter D .Let T (cid:48) be the tree consisting of a central node r and k subtrees S , S , · · · , S k with r as acommon endpoint, see Fig. 4. For i = 1 to k , the subtree S i consists of k paths P i , P i , · · · , P k i of length D with r as a common endpoint. For i = 1 , , · · · , k and j = 1 , , · · · , k , let v ji (0), v ji (1), · · · , v ji ( D −
1) be the nodes on P ji , where v ji (0) is the endpoint of P ji other than r , and withport numbers 0 and 1 at each edge of P ji , from v ji (0) to r .A tree T is constructed from T (cid:48) by attaching some leaves to the nodes of T (cid:48) in the following way.13 S S i S k P ji r v ji (0) v ji (1) v ji (2) v ji ( D − Figure 4: The tree T (cid:48) (1) For each i, j, k , such that 1 ≤ i ≤ k , 1 ≤ j ≤ k , and τ + 1 ≤ k ≤ D − z − v ji ( k ). These nodes are called white . The port numberscorresponding to the newly added edges at the node v ji ( k ) are 2 , . . . , z .(2) For each i, j , such that 1 ≤ i ≤ k , 1 ≤ j ≤ k , attach (cid:98) log D (cid:99) additional leaves to each of thenodes v ji ( k ), for k = q ( τ −
2) + 3 for q ≥
1. These nodes are called grey . The port numberscorresponding to these additional edges at the node v ji ( k ) are z + 1 , z + 2 , · · · , z + (cid:98) log D (cid:99) .(3) For each i, j , such that 1 ≤ i ≤ k , 1 ≤ j ≤ k , attach i − v ji ( k ), for k = q ( τ −
2) + 2 for q ≥
1. These nodes are called black . The portnumbers corresponding to these additional edges are z + 1 , z + 2 , · · · , z + i − v ji ( k ), for k = q ( τ −
2) + 2 and q >
1, and the port numbers corresponding to these additional edges are2 , , · · · , i at v ji ( τ ).(4) For each i, j , such that 1 ≤ i ≤ k , 1 ≤ j ≤ k , attach z (cid:48) additional leaves to each of thenodes v ji ( k ), for k = q ( τ −
2) + 1 for q ≥
1. These nodes are called dotted . The port numberscorresponding to these additional edges are z + 1 , z + 2 , · · · , z + z (cid:48) at v ji ( k ), for k = q ( τ −
2) + 1and q >
1, and the port numbers corresponding to these additional edges are 2 , , · · · , z (cid:48) + 1 at v ji ( τ − Q ji be the subtree which is constructed by attaching the nodes as stated above to the nodes of P ji , see Fig. 5.Let γ = (cid:98) D τ − (cid:99) . The total number n of nodes in the tree T is given by n ≤ k k (cid:18) τ + 1 + z ( D − τ −
1) + ( z (cid:48) + (cid:98) log D (cid:99) + k −
12 ) γ (cid:19) . 14 v ji ( τ + 1) v ji ( τ ) v ji (0) v ji (1) z white nodes b log D c grey nodes i − z dotted nodes v ji ( τ − (a) Nodes attached in P ji to the nodes v ji ( k ), k ≤ τ + 1. r v ji ( q ( τ −
2) + 3) v ji ( q ( τ −
2) + 2) v ji (0) v ji (1) z white nodes b log D c grey nodes i − z dotted nodes v ji ( q ( τ −
2) + 1) z white nodes z white nodes (b) Nodes attached in P ji to the nodes v ji ( k ), k > τ + 1. Figure 5: The construction of the tree T Let y = D − (cid:98) αD (cid:99) −
1. Let x = ( x ji ( k ) : i = 1 , , · · · , k , j = 1 , , · · · , k , k = 1 , , · · · , y ), and w = ( w ji ( k ) : i = 1 , , · · · , k , j = 1 , , · · · , k , k = 1 , , · · · , y ) be any sequences of integers suchthat 0 ≤ x ji ( k ) , w ji ( k ) ≤ z and x ji ( k ) (cid:54) = 1, w ji ( k ) (cid:54) = 1, for i = 1 , , · · · , k , j = 1 , , · · · , k and k = 1 , , · · · , y .The tree T x is constructed from T by exchanging the port numbers x ji ( k ) and 0 at the node v ji ( τ + k )for i = 1 , , · · · , k , j = 1 , , · · · , k and k = 1 , , · · · , y .The tree T w is constructed from T by exchanging the port numbers w ji ( k ) and 0 at the node v ji ( τ + k )for i = 1 , , · · · , k , j = k + 1 , k + 2 , · · · , k and k = 1 , , · · · , y .Let T X be the set of all such trees T x and let T W be the set of all such trees T w . Then |T X | = |T W | = z k k y . Let T = T X ∪ T W .When D is odd, the tree T is obtained by the same construction for D −
1, adding an extra edgeto P in the construction of T (cid:48) . The rest is the same as above. D ∈ ω (1) and D ∈ o (log n ) Let 0 < (cid:15) < be a real constant. Let D and n (cid:48) be positive integers such that D ∈ ω (1) and D ∈ o (log n (cid:48) ). In order to prove the lower bound on the size of advice for small diameter, weuse the construction of the class T of trees from Section 4.1 for k = (cid:100) n (cid:48) (cid:15) (cid:101) , k = 2 (cid:100) n (cid:48) − (cid:15) (cid:101) , z = (cid:100) n (cid:48) − n (cid:48) − (cid:15) ) n (cid:48) − (cid:15) (1 − α ) D (cid:101) , and z (cid:48) = (cid:98) (1 − (cid:15) ) log n (cid:48) (cid:99) . 15he total number of nodes in a tree from T is n ≤ k k (cid:18) τ + 1 + zy + ( z (cid:48) + (cid:98) log D (cid:99) + k −
12 ) γ (cid:19) = 2 (cid:24) n (cid:48) − (cid:15) (cid:25) (cid:100) n (cid:48) (cid:15) (cid:101) (cid:18) τ + 1 + (cid:24) n (cid:48) − n (cid:48) − (cid:15) ) n (cid:48) − (cid:15) (1 − α ) D (cid:25) y + ( (cid:100) (1 − (cid:15) ) log n (cid:48) (cid:101) + (cid:98) log D (cid:99) ) γ + γ (cid:24) n (cid:48) (cid:15) − (cid:25)(cid:19) Since τ = (cid:98) αD (cid:99) , D ∈ o (log n (cid:48) ) and γ is constant, we have n ∈ Θ( n (cid:48) ).Before formulating our lower bound, we explain the intuitive role of each node in a tree in T . Thereare four types of nodes attached to nodes of P ji in the construction of the tree T . The nodes ofeach type have a different role in proving the lower bound in this section. The proof of our lowerbound is split into two lemmas. The first lemma gives the minimum size of advice that any leaderelection algorithm for trees in T , working in time τ , has to satisfy. The second lemma establishesthe condition ξ λ ( T ) ≤ τ for any tree T ∈ T .In the construction of the tree T , z white nodes are attached to all the nodes v ji ( k ), for i =1 , , · · · , k , j = 1 , , · · · , k and k = τ + 1 , τ + 2 , · · · , D −
1. These nodes are added, so that portnumber variation at nodes v ji ( k ) can make the class T sufficiently large. All the other three typesof nodes attached are used to prove the second lemma: every node must be able to identify itsposition in the tree T ∈ T , given sufficiently large λ -valent advice. To identify its position in T ,every node must identify the integers i , j , such that it belongs to the subtree Q ji , and must identifyits position in Q ji . The i − v ji ( k ), for k = q ( τ −
2) + 2, q ≥
1, help every node to identify the integer i . The z (cid:48) dotted nodes which are attached to thenodes v ji ( k ), for k = q ( τ −
2) + 1, q ≥
1, help every node to identify the integer j . The (cid:98) log D (cid:99) grey nodes which are attached to the nodes v ji ( k ), for k = q ( τ −
2) + 3, q ≥
1, help every node toidentify its distance from the node r , i.e., its position in Q ji .The next lemma gives the lower bound on the size of advice sufficient for leader election, using theclass T of trees. Lemma 4.1
Let α < , δ < be positive real constants and λ > an integer constant. Let D and n (cid:48) be positive integers such that D ∈ ω (1) and D ∈ o (log n (cid:48) ) . Consider any algorithm ELECTwhich solves election in τ = (cid:98) αD (cid:99) rounds with λ -valent advice, for every tree with λ -election indexat most τ . There exists a tree T ∈ T for which algorithm ELECT with λ -valent advice, working intime τ , requires advice of size Ω( n δ ) . Proof.
We prove the lemma by contradiction. It is enough to prove the lemma for sufficientlylarge n (cid:48) , and for 1 / < δ <
1. We assume that D is even. The proof for odd D is similar. Fix (cid:15) = − δ . It is enough to prove the lemma for D ≥ − (cid:15) ) log λ(cid:15) (1 − α ) . Consider an algorithm ELECT thatsolves election in τ = (cid:98) αD (cid:99) rounds with advice of size p < − δ n (cid:48) δ λ − (cid:15)n (cid:48) − (cid:15) λ − T . Algorithm ELECT chooses theleader either in some Q ji for 1 ≤ i ≤ k , 1 ≤ j ≤ k or in some Q ji , for 1 ≤ i ≤ k , k + 1 ≤ j ≤ k .Without loss of generality suppose that the leader is chosen in some Q ji for k + 1 ≤ j ≤ k .Therefore, the distance from the leader to the node v ji (0) for 1 ≤ i ≤ k , 1 ≤ j ≤ k is at least D .16ow, z = (cid:100) n (cid:48) − n (cid:48) − (cid:15) ) n (cid:48) − (cid:15) (1 − α ) D (cid:101) ≥ n (cid:48) (cid:15) (1 − α ) D − n (cid:48) (cid:15) (1 − α ) D > n (cid:48) (cid:15) (1 − α ) D .Therefore, log z > (cid:15) log n (cid:48) − log ((1 − α ) D ) > (cid:15) log n (cid:48) .We have |T X | = z k k y = z ( D − τ − k k = z ( D −(cid:98) αD (cid:99)− k k ≥ z ( D − αD − k k ≥ ( D (1 − α ) − ) n (cid:48) − (cid:15) log z > (cid:15)D (1 − α ) n (cid:48) − (cid:15) log n (cid:48) > (1 − (cid:15) ) n (cid:48) − (cid:15) log n (cid:48) log λ . Let B ( S ) = ( B ( v ji (0) , τ ) : i = 1 , , · · · , k , j = 1 , , · · · , k ) be the ordered collection of all labeledballs B ( v ji (0) , τ ), for i = 1 , , · · · , k , j = 1 , , · · · , k , in the tree S from the class T X . With thesize of advice at most p , there are at most 2 p +1 possible advice strings. Hence there are at most (cid:0) p +1 λ (cid:1) ≤ ( p +1) λ choices of λ such strings, and thus there are at most 2 ( p +1) λ λ ( τ +1+ z (cid:48) ) k k possiblesequences B ( S ) because the size of the ball B ( v ji (0) , τ ) is τ + 1 + z (cid:48) .Now, 2 ( p +1) λ λ ( τ +1+ z (cid:48) ) k k = 2 ( p +1) λ λ ( (cid:98) αD (cid:99) +1+ z (cid:48) ) k k ≤ (cid:16) (cid:15)n (cid:48) − (cid:15) +( αD +1+(1 − (cid:15) ) log n (cid:48) )( n (cid:48) − (cid:15) + n (cid:48) − (cid:15) +2 n (cid:48) (cid:15) +22 ) log λ (cid:17) < (cid:15)n (cid:48) − (cid:15) +(1 − (cid:15) ) n (cid:48) − (cid:15) log n (cid:48) log λ ) ) < (1 − (cid:15) ) n (cid:48) − (cid:15) log n (cid:48) log λ < |T X | Hence, there exist at least two trees T , T ∈ T X such that B ( T ) = B ( T ). Therefore the nodes v ji (0) in T and v ji (0) in T , for i = 1 , , · · · , k , i = 1 , , · · · , k , must output the same sequenceof port numbers to give the path to the leader. According to the construction of the trees in T X ,there exists a node v ji (0), for some 1 ≤ i ≤ k and 1 ≤ j ≤ k , such that the path to the leaderfrom v ji (0) in T and the path to the leader from v ji (0) in T correspond to different sequences ofport numbers. This is a contradiction. Therefore, the size of the advice is Ω( n δ ). (cid:50) The next lemma shows that the λ -election index of trees in T does not exceed τ . Lemma 4.2
For any tree T ∈ T , ξ λ ( T ) ≤ τ . Proof.
We assume that D is even. The proof for odd D is similar. Let τ = (cid:98) αD (cid:99) . Since D ∈ ω (1),we may assume that τ >
2. In order to prove the lemma, we present a leader election algorithmworking in time τ , if some λ -valent advice of sufficient size is available to the nodes. For any treein T , the node r is chosen as the leader.At a high level, we assign to each subtree Q ji of S i a different string of length τ − λ terms, called colors . The pieces of advice at the z (cid:48) dotted nodes attached to each node v ji ( q ( τ −
2) + 1), for q ≥
1, form such a string. Since k = (cid:98) n (cid:48) − (cid:15) (cid:99) and z (cid:48) = (cid:98) (1 − (cid:15) ) log n (cid:48) (cid:99) ,therefore, such a one-to-one assignment is possible. The degree of the node v ji ( q ( τ −
2) + 2) is z + i for q >
1, and is i + 1 for q = 1. In time τ , every node can see at least one node v ji ( q ( τ −
2) + 2),for q ≥
1. It knows z , hence it can learn i , and thus can identify the subtree S i to which it belongs.17he grey nodes attached to the nodes v ji ( k ) of P ji are used to identify the distance from v ji ( k ) to r . Knowing i , every node identifies the subtree Q ji to which it belongs, by computing the uniquestring associated with Q ji in the subtree S i , in time τ . The node identifies its position in Q ji byeither seeing the endpoint v ji (0) or by seeing two nodes of degree z + (cid:98) log D (cid:99) , together with theirneighbors.We now describe formally the advice assignment to the nodes of a tree T ∈ T . Let C = { c , c , · · · , c λ } be a set of λ colors. Let m = λ τ − and let S = { s , s , · · · , s m } be the set ofsequences of colors of length τ −
2. Let s i ( j ) be the j − th term of s i . Let V ( T ) be the set ofnodes of T . Define f : V ( T ) → C as follows. Assign f ( r ) = c . We divide all the nodes in Q ji ,for i = 1 , , · · · , k and j = 1 , , · · · , k , into the following four types, and assign colors to them asfollows. Type 1:
All nodes v ji ( k ) ∈ Q ji , 0 ≤ k ≤ D − f ( v ji ( k )) = c for0 ≤ k ≤ D − Type 2:
All grey nodes are of this type. Let w (cid:96) , for (cid:96) = 1 , . . . (cid:98) log D (cid:99) , be the grey node attachedto its only neighbor using port z + (cid:96) at this neighbor. Assign f ( w (cid:96) ) ∈ { c , c } , so that the sequence( f ( w ) f ( w ) · · · f ( w (cid:98) log D (cid:99) ) be the binary representation of the distance from r to the only neighborof w (cid:96) , with c standing for 0 and c standing for 1. Type 3:
All dotted nodes are of this type. Let u (cid:96) , for (cid:96) = 1 , . . . z (cid:48) , be the dotted node in Q ji attached to its only neighbor using port z + (cid:96) at this neighbor. Assign f ( u (cid:96) ) ∈ { c , c , · · · , c λ } , sothat s j = ( f ( u ) f ( u ) · · · f ( u z (cid:48) )). Type 4:
All white and black nodes are of this type. Assign f ( v ) = c for all these nodes.For all other nodes v ∈ Q ji , assign f ( v ) = c .Let T ( f ) be the node-colored map of T corresponding to the color assignment f . The adviceprovided to each node v in T is ( f ( v ) , T ( f )). We show that each node v in T can identify itself in T ( f ) in time τ , using advice ( f ( v ) , T ( f )). This is enough to output the sequence of port numberscorresponding to the path to the leader. Consider a node v in T .Case 1: v = r .The node r can identify itself in time 1 (without using any advice) as the unique node ofdegree larger than 2 all of whose neighbors have degree larger than 2.Case 2: v ∈ Q ji is of Type 1.If v = v ji (0), then it can identify itself as one of the endpoints of some P ji , for 1 ≤ i ≤ k and 1 ≤ j ≤ k , as every node v ji (0) can see a line of length τ − B ( v ji (0) , τ ) is a labeled subtree of diameter τ with τ + z (cid:48) + 1 nodes. v ji (0) identifies the integer i by looking at the degree of the only non-leaf at distance τ . Forexample, if the degree of this node is 5, then the node computes i as 4, because accordingto the construction of the tree T , the degree of the node v ji ( τ ) is i + 1. Therefore, the node v ji (0) identifies the subtree S i to which it belongs. The node v ji (0) computes the string oflength τ − (cid:48) + 2 in B ( v ji (0) , τ ). Since this string of length τ − Q ji in S i , node v ji (0) identifies itself as a node in Q ji .If v = v ji ( k ), for 0 < k ≤ τ , then it can identify itself as a node in some P ji , 1 ≤ i ≤ k and1 ≤ j ≤ k . The node v ji (0) is in B ( v, τ ), and hence v learns the distance to v ji (0) by seeing B ( v, τ ). Then the node v computes the integer i and the string of colors similarly as statedfor v ji (0), identifies the subtree Q ji in S i to which it belongs, and identifies its position in Q ji .If v = v ji ( k ), for τ + 1 ≤ k ≤ D −
1, then the node v can see five kinds of nodes in B ( v, τ ):nodes of degree one, nodes of degree z + 1, at least two nodes of degree z + (cid:98) log D (cid:99) , at leastone node of degree z + z (cid:48) and at least one node of degree z + i . Since the colored map T ( f ) isa part of the advice given to every node, the nodes can distinguish between the above kindsof nodes. The node identifies i and thus S i to which it belongs, since it knows z . Then itcomputes the string s of length τ − z + z (cid:48) . Hence, it identifies j , and thus identifies the subtree Q ji in the class S i to which it belongs.The node v sees at least two nodes u , u in B ( v, τ ) with degree z + (cid:98) log D (cid:99) , and all theneighbors of u and u are also in B ( v, τ ). The node v first computes the binary strings s (cid:48) and s (cid:48)(cid:48) from the advice at the leaves attached to u and u , respectively, by ports z + 1 , z +2 , · · · z + (cid:98) log D (cid:99) . Without loss of generality, let s (cid:48) represent the integer which is larger thanthe integer represented by s (cid:48)(cid:48) . Recall that these integers are the distances from the respectivenodes to r . Hence the node v can identify the direction towards r which is from u to u along P ji , and it can identify its position in Q ji .Case 3: v ∈ Q i is of Type 2 or of Type 3 or of Type 4.The node v follows similar steps as in Case 2, where v = v ji ( k ), for τ + 1 ≤ k ≤ D −
1, toidentify the subtree Q ji to which it belongs, and to identify its position in Q ji . (cid:50) Lemmas 4.1 and 4.2 imply the following result.
Theorem 4.3
Let α < and δ < be positive real constants. Let λ > be an integer constant.Let D and n (cid:48) be positive integers such that D ∈ ω (1) and D ∈ o (log n (cid:48) ) . Consider any algorithmELECT which solves election in τ = (cid:98) αD (cid:99) rounds with λ -valent advice, for every tree with λ -election index at most τ . There exists an n -node tree T , where n ∈ Θ( n (cid:48) ) , with diameter D and ξ λ ( T ) ≤ τ , for which algorithm ELECT with λ -valent advice, working in time τ , requires advice ofsize Ω( n δ ) . D ∈ ω (log n ) and D ∈ o ( n ) Let D and n (cid:48) be positive integers such that D ∈ ω (log n (cid:48) ) and D ∈ o ( n (cid:48) ). Let b be a positive realconstant, such that b > − α ) λ α )1 − α and bn (cid:48) D >
1. In order to prove our lower bound onthe size of advice, we now use the construction of the class T of trees in Section 4.1 for k = 1, k = k = 2 (cid:100) bn (cid:48) D (cid:101) , z = (cid:100) n (cid:48) − bn (cid:48) k ( D −(cid:98) αD (cid:99)− (cid:101) , and z (cid:48) = 0.19he total number of nodes in a tree from T is n ≤ k (cid:32) τ + 1 + (cid:38) n (cid:48) − bn (cid:48) k ( D − τ − (cid:39) (cid:18) D − τ − (cid:19) + (cid:98) log D (cid:99) γ (cid:33) Since τ = (cid:98) αD (cid:99) , D ∈ o ( n (cid:48) ) and γ is constant, we have n ∈ Θ( n (cid:48) ).Since k = 1, in what follows, we omit the running index ranging from 1 to k . In particular, P ji , Q ji and v ji ( l ) are replaced, respectively, by P j , Q j and v j ( l ).As in Section 4.2, we explain the role of each node in T in this case. The role of the white nodesis the same as before, i.e., these nodes are added, so that port number variation at nodes v j ( l ), for j = 1 , , · · · , k and l = τ + 1 , τ + 2 , · · · , D −
1, can make the class T sufficiently large. The nodeson P j are used to assign a different string of colors to each Q j . Since D ∈ ω (log n ) in our presentcase, there are enough such nodes, as opposed to the situation of small D , when dotted nodes hadto be added for this purpose. The (cid:98) log D (cid:99) grey nodes which are attached to the nodes v j ( l ), for l = q ( τ −
2) + 3, q ≥
1, are there to help every node to identify its distance from the node r , i.e.,its position in Q j .As before, the proof of the lower bound is split into two lemmas, concerning, respectively, the sizeof advice needed for election in trees from T , and the λ -election index of these trees. Lemma 4.4
Let α < be a positive real constant and λ > an integer constant. Let D and n (cid:48) be positive integers such that D ∈ ω (log n (cid:48) ) and D ∈ o ( n (cid:48) ) . Consider any algorithm ELECT whichsolves election in τ = (cid:98) αD (cid:99) rounds with λ -valent advice, for every tree with λ -election index atmost τ . There exists a tree T ∈ T for which algorithm ELECT with λ -valent advice, working intime τ , requires advice of size Ω( n ) . Proof.
We prove the lemma by contradiction. It is enough to prove the lemma for sufficiently large n (cid:48) . We assume that D is even. The proof for odd D is similar. Consider an algorithm ELECT thatsolves election in τ = (cid:98) αD (cid:99) rounds with advice of size p < bn (cid:48) λ −
1. Algorithm ELECT chooses theleader either in some Q j for 1 ≤ j ≤ k , or in some Q j for k + 1 ≤ j ≤ k . Without loss of generalitysuppose that the leader is chosen in some Q j for k + 1 ≤ j ≤ k . Therefore, the distance from theleader to the node v j (0) for 1 ≤ j ≤ k is at least D .Now, z = (cid:100) n (cid:48) − bn (cid:48) k ( D − (cid:98) αD (cid:99) − (cid:101) ≥ n (cid:48) − bn (cid:48) k ( D − (cid:98) αD (cid:99) − n (cid:48) − bn (cid:48) (cid:100) bn (cid:48) D (cid:101) ( D − (cid:98) αD (cid:99) − ≥ n (cid:48) − bn (cid:48) bn (cid:48) D + 1)( D − (cid:98) αD (cid:99) − ≥ n (cid:48) − bn (cid:48) bn (cid:48) D ( D − (cid:98) αD (cid:99) − ≥ n (cid:48) − bn (cid:48) bn (cid:48) D ( D − αD ) = 1 − b b (1 − α ) . Also, ky = k ( D − (cid:98) αD (cid:99) −
1) = 2 (cid:100) bn (cid:48) D (cid:101) ( D − (cid:98) αD (cid:99) ) − k ≥ bn (cid:48) D ( D − αD ) − k ≥ (1 − α ) bn (cid:48) − k .20herefore, |T X | = z ky > (cid:18) − b b (1 − α ) (cid:19) (1 − α ) bn (cid:48)− k = 2 (cid:16) (1 − α ) bn (cid:48)− k (cid:17) log (cid:16) − b b (1 − α ) (cid:17) > (cid:16) (1 − α ) bn (cid:48) (cid:17) log (cid:16) − b b (1 − α ) (cid:17) . The last inequality follows from k < (1 − α )2 bn (cid:48) (as D ∈ ω (log n (cid:48) )).Let B ( S ) = ( B ( v (0) , t ) , B ( v (0) , t ) , · · · , B ( v k (0) , t )) be the ordered collection of all labeled balls B ( v i (0) , t ), for i = 1 , , · · · , k for a tree S from the class T X . With the size of advice at most p ,there are at most 2 p +1 possible advice strings. Hence there are at most (cid:0) p +1 λ (cid:1) ≤ ( p +1) λ choices of λ such strings, and thus there are at most 2 ( p +1) λ λ ( τ +1) k possible sequences B ( S ).Since b > − α ) λ α )1 − α , then − b b (1 − α ) > λ α )1 − α . Therefore, − α log( − b b (1 − α ) ) > (1 +4 α ) log λ .We have 2 ( p +1) λ λ ( τ +1) k < bn (cid:48) λ ( (cid:98) αD (cid:99) +1) k ≤ bn (cid:48) λ ( αD +1) k < bn (cid:48) +( αbn (cid:48) + bn (cid:48) D + αD +1) log λ < bn (cid:48) +4 αbn (cid:48) log λ ≤ (1+4 α ) bn (cid:48) log λ < bn (cid:48) (1 − α )4 log( − b b (1 − α ) ) < |T X | . Hence, there exist at least two trees T , T ∈ T X such that B ( T ) = B ( T ). Therefore the nodes v j (0) in T and v j (0) in T for j = 1 , , · · · , k , must output the same sequence of port numbers togive the path to the leader. According to the construction of the trees in T X , there exists a node v l (0), 1 ≤ l ≤ k such that the path to the leader from v l (0) in T and the path to the leader from v l (0) in T correspond to different sequences of port numbers. This is a contradiction. Therefore,the size of the advice is Ω( n ). (cid:50) Lemma 4.5
For any tree T ∈ T , ξ λ ( T ) ≤ τ . Proof.
The proof of this lemma is similar to the proof of Lemma 4.2. Since k = 1, every node hasto identify the subtree Q j to which it belongs, and its position in Q j . Since D ∈ ω (log n ), we mayassume that τ >
2. In order to prove the lemma, we present a leader election algorithm workingin time τ , if some λ -valent advice of sufficient size is available to the nodes. The node r of a tree T ∈ T is chosen as the leader. At a high level, we assign to each subtree Q j a different string oflength τ − λ colors, using the nodes in P j . Since D ∈ ω (log n ) and τ = (cid:98) αD (cid:99) , then k ≤ τ . Therefore, such a one-to-one mapping is always possible. The grey nodes attached to thenodes v j ( l ) of P j are used to identify the distance from v j ( l ) to r . Every node identifies the subtree Q j to which it belongs, by computing the unique string associated with Q j , in time τ . The nodeidentifies its position in Q j by either seeing the endpoint v j (0) or by seeing two nodes of degree z + (cid:98) log D (cid:99) , together with their grey neighbors. 21s before, m = λ τ − and S = { s , s , · · · , s m } is the set of sequences of colors of length τ − s i ( l ) be the l − th term of s i . The main difference with respect to the proof of Lemma 4.2 isthe following. While in the previous proof we assigned colors c , . . . , c λ to dotted nodes in order toassign a different string of colors to each Q ji , we now assign the colors to the nodes on P j in thefollowing way. Assign f ( v j (0)) = f ( v j (1)) = f ( v j (2)) = c ; f ( v j ( l )) = s j (( l −
3) mod ( τ − ≤ l ≤ τ . For all nodes v j ( l ) ∈ P j , τ + 1 ≤ l ≤ D −
1, assign f ( v j ( l )) = s j (( l −
3) mod ( τ − τ + 1 ≤ l ≤ D −
1. The values of the function f for all other nodes are identical as in theproof of Lemma 4.2. As before, let T ( f ) be the node-colored map of T corresponding to the colorassignment f . The advice provided to each node v in T is ( f ( v ) , T ( f )).It remains to explain how a node v identifies the sequence s ∈ S corresponding to the subtree Q j to which it belongs, and its position in Q j . Node v can either see the nodes v j (0) , . . . , v j ( τ ) orit can see two nodes of degree z + (cid:98) log D (cid:99) on P j , together with their grey neighbors. In the firstcase, node v finds the sequence s of length τ − f ( v j (3)) , . . . , f ( v j ( τ )) in thisorder. Since it can see the node v j (0), it can also identify its position on the map. In the secondcase, node v decides which of the two nodes of degree z + (cid:98) log D (cid:99) is closer to r by reading advice intheir grey neighbors, similarly as in the proof of Lemma 4.2. It then finds the string s by readingthe colors assigned to nodes between these two nodes, from the farther to the closer. It identifiesits position with respect to the farther of them. (cid:50) Lemmas 4.4 and 4.5 imply the following theorem.
Theorem 4.6
Let α < be a positive real constant and λ > an integer constant. Let D and n (cid:48) be positive integers such that D ∈ ω (log n (cid:48) ) and D ∈ o ( n (cid:48) ) . Consider any algorithm ELECTwhich solves election in τ = (cid:98) αD (cid:99) rounds with λ -valent advice, for every tree with λ -election indexat most τ . There exists an n -node tree T , where n ∈ Θ( n (cid:48) ) , with diameter D and ξ λ ( T ) ≤ τ , forwhich algorithm ELECT with λ -valent advice, working in time τ , requires advice of size Ω( n ) . D ∈ Θ( n ) Let D and n (cid:48) be positive integers such that D = cn (cid:48) + o ( n (cid:48) ), for some positive constant c <
1. Let λ > < β < β < ,whose difference is small, which depend only on constants c and λ , and which satisfy the followingproperties:1. for any constant β < β , any election algorithm working in time τ = (cid:98) βD (cid:99) requires λ -valentadvice of size Ω( n ), in some trees of diameter D and size n = n (cid:48) + o ( n (cid:48) ), with λ -election indexat most τ ;2. for any constant β > β , there exists an election algorithm working in time τ = (cid:98) βD (cid:99) with λ -valent advice of constant size, for all n (cid:48) -node trees of diameter D whose λ -election index isat most τ . 22 .4.1 Lower bound The proof of the first (negative) result is split, as before, into two lemmas, concerning, respectively,the size of advice needed for election in trees from T , and the λ -election index of these trees. Lemma 4.7
Let D and n (cid:48) be positive integers such that D = cn (cid:48) + o ( n (cid:48) ) , for some positive constant c < . Let λ > be a constant integer. There exists a real β , < β < , depending only on c and λ , such that for any algorithm ELECT which solves election in τ = (cid:98) βD (cid:99) rounds with λ -valentadvice, for every tree with λ -election index at most τ , for any constant β < β , there exists a tree T ∈ T with diameter D and n = n (cid:48) + o ( n (cid:48) ) nodes, for which algorithm ELECT with λ -valent advice,working in time τ , requires advice of size Ω( n ) . Proof.
We first do the proof for D = cn (cid:48) . It is enough to prove the lemma for n (cid:48) ≥ − c . Let (cid:15) = − c . We show that if a real β satisfies the equation β = − β log λ (cid:16) − β c c − β c + (cid:15) (cid:17) , then anyalgorithm working in time τ = (cid:98) βD (cid:99) , for β < β , with λ -valent advice, requires advice of sizeΩ( n ). Consider an algorithm ELECT that solves election in τ = (cid:98) βD (cid:99) rounds with advice of size p < ( β − β ) cn (cid:48) log λ − log λ − T of trees in Section 4.1 for k = 1, k = 2, z = (cid:100) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:101) , and z (cid:48) = 0. The total number of nodes n is at most k k (cid:16) τ + 1 + z ( D − τ −
1) + ( z (cid:48) + (cid:98) log D (cid:99) + k − ) γ (cid:17) =2( τ +1+ (cid:100) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:101) ( D − τ )+ (cid:98) log D (cid:99) γ ). This implies that n = n (cid:48) + o ( n (cid:48) ). Without loss of generality,we assume that the distance from v (0) to the leader is at least (cid:100) D (cid:101) .We have z = (cid:100) n (cid:48) − τ (cid:100) D (cid:101)− τ ) (cid:101) ≥ n (cid:48) −(cid:98) βcn (cid:48) (cid:99) ( (cid:100) cn (cid:48) (cid:101)−(cid:98) βcn (cid:48) (cid:99) ) ≥ n (cid:48) − βcn (cid:48) ( (cid:100) cn (cid:48) (cid:101)− βcn (cid:48) )+1 ≥ n (cid:48) − βcn (cid:48) ( cn (cid:48) − βcn (cid:48) )+2 ≥ − βc ( c − βc )+ (cid:15) . |T X | = z (cid:100) cn (cid:48) (cid:101)−(cid:98) cβn (cid:48) (cid:99) ≥ z cn (cid:48) − cβn (cid:48) ≥ (cid:16) − βc ( c − βc )+ (cid:15) (cid:17) cn (cid:48) − cβn (cid:48) = 2 (cid:18) cn (cid:48) (1 − β )2 log( − βcc − βc + (cid:15) ) (cid:19) .With the size of advice at most p , there are at most 2 ( p +1) λ ( τ +1) possible labeled balls B ( v , τ ).Hence, the number of different pieces of information that v can get within time τ is at most2 ( p +1) λ ( τ +1) < cβ n (cid:48) log λ = 2 (cid:18) cn (cid:48) (1 − β log( − β cc − β c + (cid:15) ) (cid:19) < (cid:18) cn (cid:48) (1 − β )2 log( − βcc − βc + (cid:15) ) (cid:19) .The last inequality follows from the fact that the function f ( β ) = (cid:16) (1 − β )2 log( − βc c − βc + (cid:15) ) (cid:17) is a strictlydecreasing function for 0 < β < .Therefore, 2 ( p +1) λ ( τ +1) < (cid:18) cn (cid:48) (1 − β )2 log( − βcc − βc + (cid:15) ) (cid:19) = |T X | .Hence, there exist at least two trees T , T ∈ T X such that the node v (0) in T and v (0) in T seethe same labeled balls. Hence, v (0) in T and v (0) in T must output the same sequence of portnumbers to give the path to the leader. According to the construction of the trees in T X , for everytwo such trees, the paths of length at least (cid:100) D (cid:101) from v (0) must correspond to different sequencesof port numbers. This contradicts the correctness of the algorithm ELECT. Therefore, the size ofthe advice must be in Ω( n ). 23he generalization of the reasoning to the case D = cn (cid:48) + o ( n (cid:48) ) follows from continuity arguments.It can be observed that the real β in this case can be found arbitrarily close to that derived forthe case D = cn (cid:48) , for sufficiently large n (cid:48) . (cid:50) Lemma 4.8
For any tree T ∈ T , ξ λ ( T ) ≤ τ . Proof.
The proof of this lemma is similar to the proof of Lemma 4.2. We present a leader electionalgorithm working in time τ , if some λ -valent advice of sufficient size is available to the nodes. Thenode r of a tree T ∈ T is chosen as the leader.Since k = 1, and k = 2, every node has to identify whether it belongs to the subtree Q or Q ,and has to learn its position in the respective subtree. After doing this, it can output the path toleader, using the colored map. At a high level, each node in P is assigned the color c and eachnode in P is assigned the color c . Every node can identify the subtree to which it belongs byseeing the advice provided to the nodes in P or P . The advice at the attached (cid:98) log D (cid:99) nodes,coding the distance from r , helps to find the positions of the nodes in the respective subtree, asexplained before. (cid:50) Lemmas 4.7 and 4.8 imply the following theorem.
Theorem 4.9
Let D and n (cid:48) be positive integers such that D = cn (cid:48) + o ( n (cid:48) ) , for some positiveconstant c < . Let λ > be a constant integer. There exists a real β , < β < , dependingonly on c and λ , such that for any algorithm ELECT which solves election in τ = (cid:98) βD (cid:99) roundswith λ -valent advice, for every tree with λ -election index at most τ , for any constant β < β , thereexists a tree with λ -election index at most τ with diameter D and n = n (cid:48) + o ( n (cid:48) ) nodes, for whichalgorithm ELECT with λ -valent advice, working in time τ , requires advice of size Ω( n ) . For the second (positive) result, we propose an election algorithm, working for any n -node tree ofdiameter D , with λ -valent advice of constant size. Our algorithm works in time τ = (cid:98) βD (cid:99) , fortrees with λ -election index at most τ , for any constant β > β , where β satisfies the equation β = 2( − β + 2 (cid:15) )(log λ (cid:16) − c + (cid:15) c − β c (cid:17) + 1), with (cid:15) = − c . First, we propose an algorithm working intime τ = (cid:98) βD (cid:99) , that solves election for trees with λ -election index at most τ , using ( λ + 5)-valentadvice of constant size. Later, we show how to modify the algorithm, so that λ -valent advice ofconstant size is enough. Let τ (cid:48) = (cid:98) β D (cid:99) . Equivalently, we show an algorithm working in time τ = γτ (cid:48) , for any constant γ > T be a rooted n -node tree of diameter D with λ -election index at most τ . If D is even, thenthe root r is the central node, and if D is odd, the root r is one of the endpoints of the centraledge. This is the node that the algorithm will elect. The height of the tree is (cid:100) D (cid:101) . At a high level,the advice is assigned to each of the nodes in T in two steps. In the first step, certain nodes in T ofdifferent depths are marked using five additional markers. We will later specify how these markers24re coded. The coding will also include information about the direction from the marked node tothe root. In the second step, all the non-marked nodes are assigned advice in such a way that theadvice strings in these nodes collected in a specified way represent the sequence of port numbersfrom a marked node to the leader. In what follows, we use an integer parameter k , which will bedefined later. Let L be initialized to the set of all leaves in T . The marking of the nodes in L isdone using five markers, white , green , blue , red and black , as described below.a. Mark the root r with the marker white .b. Let v be the node in L of largest depth. If v has an ancestor u at distance at most τ with M ( u ) = white or v has an ancestor u at distance < ( k − (cid:98) τk (cid:99) with M ( u ) = green or M ( u ) = blue , then remove v from L . Otherwise, let u be the ancestor of v at distance ( k − (cid:98) τk (cid:99) . Mark u with the marker blue . If v is not a leaf, mark it with the marker green . Add u to L and remove v from L .c. If L is non-empty, go to Step b.d. For every path of length ( k − (cid:98) τk (cid:99) whose top node is green or blue, which ends with a greennode or a leaf, and does not have any blue internal node, mark every (cid:98) τk (cid:99) -th internal node inthis path, from top to bottom, with the marker red .e. For every path of length < ( k − (cid:98) τk (cid:99) whose top node is green or blue, which ends with a bluenode or a leaf, and does not have any blue internal node, mark every (cid:98) τk (cid:99) -th internal node w inthis path, from the top to bottom, with the marker black , if this node is not already marked redand the distance between w and v is at least 2 k + 10. GreenBlueBlueBlue BlueWhiteAB C D E F GF’D’B’ A’ F” r Figure 6: Marking by blue and green markersFig. 6 and Fig. 7 show an example of a tree T and the marking of the nodes of T . More precisely,Fig. 6 shows the marking of the nodes of T by the markers blue and green. Initially, the set L contains the nodes A , B , C , D , E , F , and G . First, the root is marked white. Then the nodes A (cid:48) , B (cid:48) , and F (cid:48) are marked blue and included in L . They are at distance ( k − (cid:98) τk (cid:99) from the nodes A ,25 , and F , respectively. The other leaves of T are removed from the set L because one of the nodes A (cid:48) , B (cid:48) , and F (cid:48) is an ancestor of each of these leaves, at distance less than ( k − (cid:98) τk (cid:99) . The root r is the ancestor of A (cid:48) and B (cid:48) at distance less than ( k − (cid:98) τk (cid:99) , hence these two nodes are removedfrom L . The node F (cid:48)(cid:48) is marked blue. It is an ancestor of F (cid:48) at distance ( k − (cid:98) τk (cid:99) . Hence themark of F (cid:48) is changed to green and F (cid:48) is removed from L . Finally, F (cid:48)(cid:48) is removed from L and L becomes empty. Fig. 7 shows the marking of red and black nodes on an example of two paths.Every (cid:98) τk (cid:99) -th node of the path A (cid:48) to A is marked red. Every (cid:98) τk (cid:99) -th node of the path from A (cid:48) to B , which is not marked red, gets the mark black. A A’ s s s s s s k − s k − s k − s k − Figure 7: Marking by red and black markers and the advice assignment at non-marked nodesWe give a formal description of the above marking in Algorithm 3.According to Algorithm 3, the following statements are true.1. Every node v in T at depth at least τ + 1 has a blue or green ancestor at distance at most( k − (cid:98) τk (cid:99) .2. Every non-leaf node u , which is either green or blue, has at least one green descendant u (cid:48) atdistance ( k − (cid:98) τk (cid:99) , and the path from u to u (cid:48) does not contain any blue internal node.3. The depth of every node u , which is either green or blue, is at most (cid:100) D (cid:101) − ( k − (cid:98) τk (cid:99) .According to Algorithm 3, there can be two kinds of paths whose top node is green or blue, oflength at most ( k − (cid:98) τk (cid:99) . The first kind of paths are of length exactly ( k − (cid:98) τk (cid:99) and end with a26 lgorithm 3 Marking ( T, τ ) M ( r ) ← white L ← { v | , v is a leaf of T } . while L is non-empty do v ← the node in L with largest depth. if v has an ancestor u at distance at most τ with M ( u ) = white or v has an ancestor u atdistance < ( k − (cid:98) τk (cid:99) with M ( u ) = green or M ( u ) = blue then L = L \ { v } . else u ← the ancestor of v at distance ( k − (cid:98) τk (cid:99) . M ( u ) ← blue , M ( v ) ← green . L = L ∪ { u } \ { v } . end if end while for every path P from u to v of length ( k − (cid:98) τk (cid:99) , where ( M ( u ) = blue or M ( u ) = green ) and M ( v ) = green , and v is a descendant of u do for every internal node w ∈ P at depth depth ( u ) + i (cid:98) τk (cid:99) , 1 ≤ i ≤ k − do M ( w ) ← red . end for end for for every path P from u to v of length < ( k − (cid:98) τk (cid:99) , where ( M ( u ) = blue or M ( u ) = green )and ( M ( v ) = green or v is a leaf), and there is no blue node between u and v in P , and v is adescendant of u do for every node w ∈ P at depth depth ( u ) + i (cid:98) τk (cid:99) , i > do if M ( w ) (cid:54) = red and the distance between w and v is at least 2 k + 10 then M ( w ) ← black . end if end for end for k − (cid:98) τk (cid:99) , end with a non-marked leaf or a blue node, and there is no internal blue nodeon the path. All marked internal nodes on this path are black or red.The advice C ( u ) of a node u which is not previously marked is assigned depending on whichkind of path it belongs to. Below we explain the high-level idea of the advice assignment and itsinterpretation for each type of paths.Consider a path P of the first kind, of length ( k − (cid:98) τk (cid:99) . Let P start with the top node u , M ( u ) = green or M ( u ) = blue and end with a node v , M ( v ) = green . All the nodes in P are usedto code the sequence of port numbers that represents the path from u to the root r . Every nodewhich belongs to such a path, can see the entire path in τ and thus can decode the path to theleader by collecting the advice from top to bottom.Consider a path P of the second kind, of length smaller than ( k − (cid:98) τk (cid:99) . Let P start with the topnode u , M ( u ) = green or M ( u ) = blue , end with a node v which is either blue or a non-markedleaf, and contains h black internal nodes and no blue internal nodes. Let u (cid:48) be the closest greendescendant of u . In time τ , any node v in P can see at least k − h − u to u (cid:48) . The advice given to non-marked nodes in the path from u to u (cid:48) codes the path from u to r . The node v can see all nodes between these k − h − x . The other part y of the desired stringis coded in the path P . The node v obtains the string y by collecting the advice from non-markednodes of P . Finally, the node v decodes the path from v to the leader, using the concatenation yx .Fig. 7 shows the advice assignment at the non-marked nodes of the path from A (cid:48) to A , which is apath of the first kind. The advice assignment at the non-marked nodes between the black nodes ofthe path from A (cid:48) to B , which is a path of the second kind, is also shown in this figure.Below we give the pseudocode of the Algorithm Coding ( T, τ ), used to produce the advice for eachnode. The algorithm calls one of the two procedures specified in Algorithms 5, and 6, dependingon the kind of path to which the node belongs.
Algorithm 4
Coding ( T, τ ) for every path P of the first kind from node u to v of length ( k − (cid:98) τk (cid:99) ), such that M ( u ) = green or M ( u ) = blue , M ( v ) = green or v is a leaf, v is a descendant of u , and there is no blueinternal node in P do CodingPath 1 ( T, τ ). end for for every path P of the second kind, of length less than ( k − (cid:98) τk (cid:99) , from a node u to a node v ,where M ( u ) = green or M ( u ) = blue , , M ( v ) = blue or v is a leaf, v is a descendant of u , and P does not contain any blue internal node do CodingPath 2 ( T, τ ) end for For all the nodes v , which are not assigned any advice yet, assign advice C ( v ) = c .28 lgorithm 5 CodingPath 1 ( T, τ ) Let P = ( u, u , u , · · · , u (cid:98) τk (cid:99)− , u , u , u , · · · , u (cid:98) τk (cid:99)− , u , · · · , u k − , u k − , u k − , · · · , u (cid:98) τk (cid:99)− k − , v ),such that M ( u ) = green or M ( u ) = blue , M ( v ) = green or v is a leaf, v is a descendant of u ,and, for 1 ≤ j ≤ k − M ( u j ) = red . Let s be the string of length ( k − (cid:98) τk (cid:99) −
1) of λ colors, that represents the sequence of portnumbers from u to r . Let s , s , · · · , s k − be the substrings of s of same length such that s isthe concatenation s s · · · s k − . for i = 0 to k − do for j = 1 to (cid:98) τk (cid:99) − do C ( u ji ) ← s i ( j ) end for end forAlgorithm 6 CodingPath 2 ( T, τ ) Let P (cid:48) = ( u , u , u , · · · , u (cid:98) τk (cid:99)− , u , u , u , · · · , u (cid:98) τk (cid:99)− , u , · · · , u l − , u l − , u l − , · · · , u (cid:98) τk (cid:99)− l − , u l )be the subpath of P where l < k − ≤ j ≤ l , M ( u j ) = black . for i = 0 to l − do for j = 1 to (cid:98) τk (cid:99) − do C ( u ji ) ← s k − i − ( j ) end for end for We now show how any node v can compute the path to the leader r from the advice seen in thelabeled ball B ( v, τ ). We consider the following cases, depending on what the node v sees in thelabeled ball B ( v, τ ). Case 1.
A node v sees a white node.Node v outputs the sequence of port numbers from itself to the white node. Case 2.
A node v does not see a white node but sees a path of length ( k − (cid:98) τk (cid:99) whose top node isgreen or blue, which ends with a green node or a leaf, and does not contain any blue internal node.Let P = ( u, u , u , · · · , u (cid:98) τk (cid:99)− , u , u , u , · · · , u (cid:98) τk (cid:99)− , u · · · , u k − , u k − , u k − , · · · , u (cid:98) τk (cid:99)− k − , u (cid:48) ) be apath of the first kind, seen by node v , such that M ( u ) = green or M ( u ) = blue , M ( u (cid:48) ) = green or u (cid:48) is a leaf, u is an ancestor of u (cid:48) , and, for 1 ≤ j ≤ k − M ( u j ) = red . The node v computes thesequence s which is the concatenation C ( u ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) C ( u ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) · · · C ( u k − ) · · · C ( u (cid:98) τk (cid:99)− k − ) . This string s unambiguously codes the sequence of port numbers corresponding to the path from u to r . Let π ( u, r ) be the sequence of port numbers corresponding to the path from u to r representedby s . If u is an ancestor of v , then v computes π ( v, u ) by seeing B ( v, τ ). Then it outputs the pathto the leader as π ( v, u ) followed by π ( u, r ). Otherwise, if u is a descendant of v , then let l be thedistance from u to v . Let π ( u, r ) be the sequence of port numbers corresponding to the path from u to r represented by s . The node v computes π ( v, r ) by deleting the first l port numbers from π ( u, r ) and outputs it. 29 ase 3. Case 1 and Case 2 are false.According to Algorithm 3, node v sees at least one blue or green ancestor in time τ . Let u be the closest green or blue ancestor of v . Since, M ( u ) = green or M ( u ) = blue , there ex-ists at least one descendant u (cid:48) of u at distance ( k − (cid:98) τk (cid:99) such that, M ( u (cid:48) ) is green or u (cid:48) isa leaf, and there is no blue internal node in the path from u to u (cid:48) . Let u , u , · · · , u h bethe black nodes between u and v . Let u i , u i , · · · , u (cid:98) τk (cid:99)− i be the nodes between the nodes u i and u i +1 , for 1 ≤ i ≤ h −
1. The node v sees at least the k − h − a , a , . . . a k − h − , of the path from u to u (cid:48) . Let a i , a i , · · · , a (cid:98) τk (cid:99)− i be the non-marked nodes be-tween the nodes a i and a i +1 , for 1 ≤ i ≤ k − h −
2. Let a , a , · · · , a (cid:98) τk (cid:99)− be the non-markednodes between the nodes u and a . The node v computes the string s (cid:48) which is the concate-nation ( C ( u ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) · · · C ( u h − ) · · · C ( u (cid:98) τk (cid:99)− h − )) R . Node v com-putes the string s (cid:48)(cid:48) which is the concatenation C ( a ) C ( a ) · · · C ( a (cid:98) τk (cid:99)− ) C ( a ) C ( a ) · · · C ( a (cid:98) τk (cid:99)− ) · · · C ( a k − h − ) · · · C ( u (cid:98) τk (cid:99)− k − h − ). Then node v computes s = s (cid:48)(cid:48) s (cid:48) . The string s unambiguously codesthe sequence π ( u, r ) of port numbers, corresponding to the path from u to r . The node v computesthe sequence π ( v, u ) of port numbers corresponding to the path from v to u , by seeing B ( v, τ ).Finally, v outputs the sequence π ( v, u ) followed by π ( u, r ).Below we give the pseudocode of Algorithm Decoding ( v, τ ), executed by a node v , which outputsthe path from v to the leader. The algorithm uses one of the two procedures specified in Algorithms8, 9, depending on the labeled ball B ( v, τ ). Algorithm 7
Decoding ( v, τ ) if there exists a white node in B ( v, τ ) then output the sequence of port numbers from v to the white node. else if there exists a path P in B ( v, τ ) of length ( k − (cid:98) τk (cid:99) whose top node is green or blue, whichends with a green node or a leaf, and does not have any internal blue node then DecodingPath 1 ( v, τ ). else DecodingPath 2 ( v, τ ). end if end if lgorithm 8 DecodingPath 1 ( v, τ ) Let P = ( u, u , u , · · · , u (cid:98) τk (cid:99)− u , u , u , · · · , u (cid:98) τk (cid:99)− , u · · · , u k − , u k − , u k − , · · · , u (cid:98) τk (cid:99)− k − , u (cid:48) ) bea path of length ( k − (cid:98) τk (cid:99) , seen by node v , such that M ( u ) = green or M ( u ) = blue , M ( u (cid:48) ) = green or u (cid:48) is a leaf, u is an ancestor of u (cid:48) , and, for 1 ≤ j ≤ k − M ( u j ) = red . s ← C ( u ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) · · · C ( u k − ) · · · C ( u (cid:98) τk (cid:99)− k − ) Let s = ( p , p , · · · , p q ) ∗ . if u is an ancestor of v then π ( v, u ) ← the sequence of port numbers corresponding to the path from v to u . Output π ( v, u ) followed by ( p , p , · · · , p q ). else let l be the distance from w to u . π ← ( p l +1 , p l +2 , · · · , p q ). Output the sequence π . end ifAlgorithm 9 DecodingPath 2 ( v, τ ) Let u be the closest green or blue ancestor of v . Let u , u , · · · , u h be the black nodes between u and v . Let u i , u i , · · · , u (cid:98) τk (cid:99)− i be the nodes between the nodes u i and u i +1 , for 1 ≤ i ≤ h − Let a , a , · · · , a k − h − be the k − h − u . Let a i , a i , · · · , a (cid:98) τk (cid:99)− i be the unmarked nodes between the nodes a i and a i +1 , for 1 ≤ i ≤ k − h − a , a , · · · , a (cid:98) τk (cid:99)− be the unmarked nodes between the nodes u and a . s (cid:48) ← ( C ( u ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) C ( u ) · · · C ( u (cid:98) τk (cid:99)− ) · · · C ( u h − ) · · · C ( u (cid:98) τk (cid:99)− h − )) R . s (cid:48)(cid:48) ← C ( a ) C ( a ) · · · C ( a (cid:98) τk (cid:99)− ) C ( a ) · · · C ( a (cid:98) τk (cid:99)− ) · · · C ( a k − h − ) · · · C ( u (cid:98) τk (cid:99)− k − h − ). s ← s (cid:48) s (cid:48)(cid:48) . Let s = ( p , p , · · · , p q ) ∗ . π ( v, u ) ← the sequence of port numbers corresponding to the path from v to u . Output π ( v, u ) followed by ( p , p , · · · , p q ). 31ote that the ( λ + 5)-valent advice described in Algorithms 3 and 4 has constant size: indeed, eachof the five markers can be coded in constant size, and each of the unmarked nodes gets one of the λ colors as advice, which is also of constant size, since λ is constant.We now describe how to code the five markers needed in Algorithm 7, using λ colors. Instead of asingle node, a sequence of constant length of consecutive nodes is used to code each marker in sucha way that every node seeing the advice given to nodes of this sequence can identify a marker andcan detect the direction to the root. We give the description for the case when λ = 2. In this case,every node gets a single bit as advice. For λ > τ = γτ (cid:48) , where γ > k > γ ≥ k +1 k − . We consider the time τ ≥ k ( k − k + 10) + ( k + 1) and n ≥ − c .Let s ( v, r ) ∗ be the binary string coding the sequence s ( v, r ) of port numbers, corresponding to thepath from v to r . We compute the binary sequence s (cid:48) from s ( v, r ) ∗ as follows. Let s , s , · · · , s m be the substrings of s ( v, r ) ∗ such that | s i | = k , for 1 ≤ i < m , s m ≤ k , and s ( v, r ) ∗ is theconcatenation s s . . . s m . The binary string s (cid:48) is the concatenation s s s · · · s m − s m . Notethat, the binary string 1 k +1 is never a substring of s (cid:48) . We use the substring 1 k +1 to code themarkers as follows. Each marker is formed by a sequence of 2 k + 9 consecutive nodes. We willprove that these sequences are disjoint for different markers. White marker : All the nodes of a path starting from the root r to a node of depth 2 k + 8 areused to code the white marker. Consecutive 2 k + 9 nodes, starting from the node r to a node atdepth 2 k + 8, are assigned the advice in the following way. Give the node r the advice 0. Thenext k + 1 nodes are assigned the advice 1. The next five nodes are assigned the advice 1,0,1,0,0,respectively. The next k + 1 nodes are assigned the advice 1. The last node at depth 2 k + 8 isassigned the advice 0. Green marker : Let u be a node in T that gets the marker green, if Algorithm 3 is applied on T .For all the paths P from u to a node v , of length ( k − (cid:98) τk (cid:99) ), such that v is a descendant of u , M ( v ) = green , or v is a leaf, and there is no blue internal node in the path, consecutive 2 k + 9nodes of P starting from u as the top node are used to code the green marker. Give the first node u the advice 0. The next k + 1 nodes are assigned the advice 1. The next five nodes are assignedthe advice 1,0,0,0,0, respectively. The next k + 1 nodes are assigned the advice 1. The last nodeat depth depth ( u ) + 2 k + 8 in P is assigned the advice 0. Blue marker : Let u be a node in T that gets the marker blue, if Algorithm 3 is applied on T .For all the paths P from u to a node v , of length ( k − (cid:98) τk (cid:99) ), such that v is a descendant of u , M ( v ) = green , or v is a leaf, and there is no blue internal node in the path, consecutive 2 k + 9nodes of P starting from u as the top node are used to code the blue marker. Give the first node u the advice 0. The next k + 1 nodes are assigned the advice 1. The next five nodes are assignedthe advice 1,1,0,0,0, respectively. The next k + 1 nodes are assigned the advice 1. The last nodeat depth depth ( u ) + 2 k + 8 in P is assigned the advice 0. Red marker : Let u be a node on a path P of the first kind that gets the marker red, if Algorithm3 is applied on T . Consecutive 2 k + 9 nodes of P starting from u as the top node are used to codethe red marker. Give the first node u the advice 0. The next k + 1 nodes are assigned the advice1. The next five nodes are assigned the advice 1,1,1,0,0, respectively. The next k + 1 nodes areassigned the advice 1. The last node at depth depth ( u ) + 2 k + 8 in P is assigned the advice 0.32 lack marker : Let u be a node on a path P of the second kind that gets the marker black, ifAlgorithm 3 is applied on T . Consecutive 2 k + 9 nodes of P starting from u as the top node areused to code the black marker. Give the first node u the advice 0. The next k + 1 nodes areassigned the advice 1. The next five nodes are assigned the advice 1,1,1,1,0, respectively. The next k + 1 nodes are assigned the advice 1. The last node at depth depth ( u ) + 2 k + 8 in P is assignedthe advice 0. Proposition 4.10
Sequences of nodes forming different markers are disjoint.
Proof.
Let u and v be different nodes marked by Algorithm 3. Let ( u = u , u , u , · · · , u k +8 ) be asequence of consecutive nodes with the top node u , and let ( v = v , v , v , · · · , v k +8 ) be a sequenceof consecutive nodes with the top node v . We prove that u i (cid:54) = v j , for 0 ≤ i, j ≤ k + 8.According to Algorithm 3, the distance between two red markers, two black markers, two greenmarkers, a green marker and a red marker, the white and a green marker, the white and a bluemarker, the white and a red marker, the white and a black marker, a red and a black marker, ablack and a green marker, a red and a blue marker, is at least (cid:98) τk (cid:99) . Since (cid:98) τk (cid:99) > k + 9, therefore u i (cid:54) = v j , for 0 ≤ i, j ≤ k + 8 in these cases.Let u and v be both marked blue by Algorithm 3. According to this algorithm, every blue markerhas a descendant at distance ( k − (cid:98) τk (cid:99) , which is either green or a leaf, and there is no blue markerin the path to this descendant. Let u (cid:48) be such a descendant of u and let v (cid:48) be such a descendantof v . Hence, u (respectively v ) does not belong to the path from v to v (cid:48) (respectively from u to u (cid:48) ). The sequence of 2 k + 9 consecutive nodes forming the blue marker corresponding to the node u (respectively v ), with u (respectively v ) as the top node, is a part of the path from u to u (cid:48) (respectively from v to v (cid:48) ). Since the two paths from u to u (cid:48) and from v to v (cid:48) are disjoint, therefore, u i (cid:54) = v j , for 0 ≤ i, j ≤ k + 8. If one of the nodes u and v is marked green and the other is markedblue by Algorithm 3, then the argument is similar as above.The remaining case is when one of the nodes u and v is marked black by Algorithm 3, and theother is marked blue. According to Algorithm 3, the distance between a blue marker and a blackmarker is at least 2 k + 10. Hence, u i (cid:54) = v j , for 0 ≤ i, j ≤ k + 8, if u is marked black and v ismarked blue or vice-versa. (cid:50) In view of Proposition 4.10, every node v can unambiguously identify the markers by seeing theadvice given to nodes in B ( v, τ ), as explained below. Consider a sequence of 2 k + 9 consecutivenodes, with advice 01 k +1 a . . . a k +7 at these consecutive nodes, respectively. According to themarking strategy, if this sequence forms a marker, then the string of advice bits at these nodesmust be one of the following.1. 01 k +1 k +1 k +1 k +1
0, where the first bit corresponds to a node z and thelast bit corresponds to a node z (cid:48) . The node v identifies the marker as white in this case. Ifthe node sees the first string, it identifies z (cid:48) as the root r . Otherwise, it identifies z as theroot r .2. 01 k +1 k +1 k +1 k +1
0, where the first bit corresponds to a node z and thelast bit corresponds to a node z (cid:48) . The node v identifies the marker as green in this case.33. 01 k +1 k +1 k +1 k +1
0, where the first bit corresponds to a node z and thelast bit corresponds to a node z (cid:48) . The node v identifies the marker as blue in this case.4. 01 k +1 k +1 k +1 k +1
0, where the first bit corresponds to a node z and thelast bit corresponds to a node z (cid:48) . The node v identifies the marker as red in this case.5. The node sees the string 01 k +1 k +1 k +1 k +1
0. The node v identifies themarker as black in this case.In cases 2.–5., if the node v sees the first string, it identifies the direction to the root as z (cid:48) to z .Otherwise, it identifies the direction to the root as z to z (cid:48) .Nodes that are not in a segment coding a marker are called non-marker nodes . The non-markernodes of a path of the first kind with the top node u are used to code the path from u to the root r . After the coding of the markers described above, the number of non-marker nodes in a path ofthe first kind is ( k − (cid:98) τk (cid:99) − k − k − (cid:98) τk (cid:99) − k − u to r . Lemma 4.11
Let T be an n -node tree of diameter D = cn + o ( n ) , where n ≥ − c . Let s ( v, r ) bethe sequence of port numbers corresponding to the path P from v to r . Then the length of the binarysequence ( s ( v, r )) ∗ coding s ( v, r ) with λ colors is at most τ (cid:48) + 1 for every node v ∈ T of depth atmost (cid:100) D (cid:101) − τ (cid:48) . Proof.
As before, we first do the proof for a tree with diameter D = cn . D = cn and τ (cid:48) = (cid:98) β D (cid:99) implies τ (cid:48) = (cid:98) β cn (cid:99) .We have β = 2( 12 − β + 2 (cid:15) )(log λ (cid:18) − c + (cid:15) c − β c (cid:19) + 1) , where (cid:15) = − c . β cn = 2( cn − β cn + 2 (cid:15)cn )(log λ (cid:18) n − cn + (cid:15)n cn − β cn (cid:19) + 1) . Since, (cid:15) = − c and n ≥ − c , therefore, (cid:15)n >
1. Hence, β cn ≥ cn − β cn + 2) (cid:18) log λ (cid:18) n − cn + 1 cn − β cn (cid:19) + 1 (cid:19) .β cn ≥ (cid:16) ( (cid:108) cn (cid:109) − − ( (cid:98) β cn (cid:99) + 1) + 2 (cid:17) (cid:18) log λ (cid:18) n − cn + 1 cn − β cn (cid:19) + 1 (cid:19) . ( (cid:98) β cn (cid:99) + 1) ≥ (cid:100) cn (cid:101) − (cid:98) β cn (cid:99) ) (cid:18) log λ (cid:18) n − (cid:98) cn (cid:99) − (cid:98) β cn (cid:99)(cid:100) cn (cid:101) − (cid:98) β cn (cid:99) (cid:19) + 1 (cid:19) . τ (cid:48) + 1) ≥ (cid:24) D (cid:25) − τ (cid:48) ) (cid:32) log λ (cid:32) n − (cid:98) D (cid:99) − τ (cid:48) (cid:100) D (cid:101) − τ (cid:48) (cid:33) + 1 (cid:33) . Let v be a node of T of depth at most (cid:100) D (cid:101) − τ (cid:48) . Let P = ( v, u , u , · · · , u (cid:96) − , r ) be the path from v to r . Let d ( u ) denote the degree of node u .Since the depth of v in T is at most (cid:100) D (cid:101) − τ (cid:48) , there exist at least τ (cid:48) nodes in T with depth largerthan (cid:100) D (cid:101) − τ (cid:48) . Also, since the diameter of T is D , there exists at least one path of length (cid:98) D (cid:99) with no common node with P other than r . Then d ( v ) + (cid:80) (cid:96) − i =1 d ( u i ) ≤ n − τ (cid:48) − (cid:98) D (cid:99) . The sumof logarithms of these degrees is log λ d ( v ) + (cid:80) (cid:96) − i =1 log λ d ( u i ) = log λ (cid:16) d ( v ) (cid:81) (cid:96)i =1 d ( u i ) (cid:17) . The valueof d ( v ) (cid:81) (cid:96)i =1 d ( u i ) is maximized when d ( v ) = d ( u i ) = d ( v )+ (cid:80) (cid:96)i =1 d ( u i ) (cid:96) for 1 ≤ i ≤ (cid:96) −
1. Hence, thissum of logarithms is at most (cid:96) log λ ( n − τ (cid:48) −(cid:98) D (cid:99) (cid:96) ) ≤ ( (cid:100) D (cid:101) − τ (cid:48) ) log( n − τ (cid:48) −(cid:98) D (cid:99)(cid:100) D (cid:101)− τ (cid:48) ).Let s ( v, r ) = ( p , p , · · · , p (cid:96) ) be the sequence of port numbers corresponding to the path P from v to r . Then the length of s ( v, r ) ∗ is at most 2 (cid:80) (cid:96)i =1 ( (cid:98) log λ p i (cid:99) + 1) ≤ (cid:80) (cid:96)i =1 (log λ p i + 1) ≤ (cid:100) D (cid:101) − τ (cid:48) )(log λ ( n − τ (cid:48) −(cid:98) D (cid:99)(cid:100) D (cid:101)− τ (cid:48) ) + 1) ≤ τ (cid:48) + 1.Therefore, the length of the sequence ( s ( v, r )) ∗ is at most τ (cid:48) + 1, for every node v ∈ T of depth atmost (cid:100) D (cid:101) − τ .The generalization of the reasoning to the case D = cn + o ( n ) follows from continuity arguments.It can be observed that the real β in this case can be found arbitrarily close to that derived forthe case D = cn , for sufficiently large n . (cid:50) Lemma 4.12
The length of the binary sequence s (cid:48) , computed from s ( v, r ) ∗ , where v is the highestnode of a blue or a green marker, is at most ( k − (cid:98) τk (cid:99) − k − . Proof.
According to the marking strategy, the length of the path from v to the root r is at most (cid:100) D (cid:101) − ( k − (cid:98) τk (cid:99) ≤ (cid:100) D (cid:101) − ( k − τk ≤ (cid:100) D (cid:101) − ( k − k +1) k ( k − τ (cid:48) ≤ (cid:100) D (cid:101) − τ (cid:48) .By Lemma 4.11, the length of the binary string s ( v, r ) ∗ is at most τ (cid:48) + 1. The binary string s (cid:48) iscomputed from s ( v, r ) ∗ by inserting a 0 after every k -th bit of s ( v, r ) ∗ . Hence, | s (cid:48) | ≤ k +1 k ( τ (cid:48) + 1).Now,( k − (cid:98) τk (cid:99) − k − ≥ ( k − τk − k −
10) = k − k τ − ( k − k + 10) = k +1 k ( k − k +1 τ − k ( k − k +10) k +1 ).Since τ ≥ k ( k − k + 10) + ( k + 1), we have k ( k − k +10) k +1 ≤ τk +1 −
1. Therefore,( k − (cid:98) τk (cid:99) − k − ≥ k +1 k ( k − k +1 τ − τk +1 + 1) ≥ k +1 k ( γ τ + 1) = k +1 k ( τ (cid:48) + 1) ≥ | s (cid:48) | . (cid:50) We are now ready to formulate the two final algorithms working for 2-valent advice: Algorithm
Bounded Valency Advice ( T, τ ) which assigns 2-valent advice of constant size to all nodes, andAlgorithm
Bounded Valency Election ( v, τ ), which uses this advice to perform election in time35 = γτ (cid:48) , where τ (cid:48) = (cid:98) β D (cid:99) and γ is any constant greater than 1. Let k > γ > k +1 k − . Bounded Valency Advice ( T, τ )If τ < k ( k − k + 10) + k + 1 or n < − c , then the advice is assigned to each node of the tree inthe following way. Consider a mapping f : V ( T ) → { , } . Let T ( f ) be the node-colored map of T corresponding to the mapping f . Let F = { f | f : V ( T ) → { , }} . Let f (cid:48) ∈ F be the mappingsuch that for any two nodes v , v ∈ V ( T ( f (cid:48) )), B ( v , τ ) (cid:54) = B ( v , τ ). Such a mapping exists because ξ ( T ) ≤ τ , by assumption. The mapping f (cid:48) can be found by computing B ( v, τ ) for each node v ,for all the mappings in F . (Recall that this work is done by the oracle, so exhaustive search can beused, because time does not matter here.) The advice assigned to each node v is the binary stringunambiguously coding the couple ( T ( f (cid:48) ) , f (cid:48) ( v )).For τ ≥ k ( k − k + 10) + k + 1 and n ≥ − c , the advice is assigned to each node of the tree intwo steps. In the first step, one-bit advice is assigned to some nodes of the tree to code markers offive types, as explained at the beginning of this section. In the second step, we apply Algorithms5, and 6 in the following way. Consider segments of 2 k + 9 consecutive nodes, coding the markersof various colors. Call such segments green, red etc. , if the corresponding marker is green, red etc.Contract any such segment into one node, giving it the corresponding color, and apply Algorithms5 and 6, with the following modification. The length of each subsequence s is ( k − (cid:98) τk (cid:99) − k − k − (cid:98) τk (cid:99) − s i of s is ( (cid:98) τk (cid:99) − k −
9) instead of( (cid:98) τk (cid:99) − Bounded Valency Election ( v, τ )If τ < k ( k − k + 10) + k + 1 or n < − c , then the advice provided to the node v is a binarycode of ( T ( f ) , f ( v )), for some mapping f . The node v learns B ( v, τ ) in time τ , and identifies itsunique position in T ( f ). Then it outputs the sequence of port numbers corresponding to the pathfrom v to r by seeing this path in T ( f ).Otherwise, the advice provided to each node is either 0 or 1. We apply Algorithm 7, using whichevery node performs leader election, in the following way. Consider segments of 2 k + 9 consecutivenodes, coding the markers of various colors. The node v unambiguously identifies these segmentsin B ( v, τ ), as explained above. Call such segments green, red etc., if the corresponding markeris green, red etc. Contract any such segment into one node, giving it the corresponding color,and apply Algorithm 7 to this contracted tree, with the following modification. The length of eachsubsequence s is ( k − (cid:98) τk (cid:99) − k −
9) instead of ( k − (cid:98) τk (cid:99) − s i of s is ( (cid:98) τk (cid:99) − k −
9) instead of ( (cid:98) τk (cid:99) − Bounded Va-lency Advice ( T, τ ), whenever the allocated time τ is at least γτ (cid:48) , for a constant γ > Theorem 4.13
For any real constant γ > , the advice assigned to each node v of the tree T byAlgorithm Bounded Valency Advice ( T, τ ) is of constant size. roof. First consider the case when τ < k ( k − k + 10) + k + 1 or n < − c . Since γ is constant, k is also constant and hence τ is constant in this case. Since, τ = γτ (cid:48) , τ (cid:48) = (cid:98) β D (cid:99) , and D = cn + o ( n ),therefore D and n are constant in this case. Hence, the size of the tree is constant. The adviceprovided to each node codes the colored map T ( f (cid:48) ) and the bit given to the node in the map, andhence this code is of constant size.If τ ≥ k ( k − k + 10) + k + 1 and n ≥ − c , then according to Algorithm Bounded ValencyAdvice ( T, τ ), every node gets either 0 or 1 as advice. Hence the advice provided to every node isof size 1 in this case. (cid:50)
We finally prove the correctness of Algorithm
Bounded Valency Election ( v, τ ). Theorem 4.14
Every node v of a tree T with λ -election index at most τ , executing Algorithm Bounded Valency Election ( v, τ ) in time τ , outputs the sequence of port numbers correspondingto the path from v to r . Proof.
The proof is trivial when τ < k ( k − k + 10) + k + 1 or n < − c . Suppose that τ ≥ k ( k − k + 10) + k + 1 and n ≥ − c . Case 1.
Node v sees a white marker in B ( v, τ ).It identifies the root r as one of the two extremities of this marker, as explained above, by seeingthe advice string on the nodes of the marker. The node v outputs the sequence of port numberscorresponding to the path from v to r , reading it from B ( v, τ ). Case 2.
Node v sees a path of length ( k − (cid:98) τk (cid:99) + 2 k + 9 whose top 2 k + 9 nodes form a green or ablue marker, the lowest 2 k + 9 nodes form a green marker and which does not contain any internalblue marker.Let u be the highest node of the top blue or green marker and let u (cid:48) be the highest node of thebottom green marker. According to Algorithm 5, the advice pieces at the non-marker nodes onthe path from u to u (cid:48) , read top-down, form the binary sequence s representing the sequence ofport numbers corresponding to the path from u to r . Since the node can see the entire pathbetween u and u (cid:48) , it correctly computes s by collecting the advice from the non-marker nodes topto bottom between these two markers. The node computes the correct path to the leader accordingto Algorithm 8. Case 3.
Node v sees a path of length ( k − (cid:98) τk (cid:99) whose top 2 k + 9 nodes form a green or a bluemarker, the lowest node is a leaf and which does not contain any blue marker.Let u be the highest node of the top blue or green marker and let u (cid:48) be the leaf. The path from u to u (cid:48) is of the first kind, and hence the advice pieces at the non-marker nodes on the path from u to u (cid:48) , read top-down, form the binary sequence s representing the sequence of port numberscorresponding to the path from u to r . Therefore, by a similar argument as in Case 2, the node v computes the correct path to the leader from itself. Case 4.
Case 1, Case 2, and Case 3 are not true.According to the marking strategy, in time τ the node v sees at least one green or blue marker,37hose top node u is an ancestor of v . Since u is the top node of a green or a blue marker, accordingto Algorithm 3, there exists a descendant u (cid:48) at distance ( k − (cid:98) τk (cid:99) from u , such that u (cid:48) is a topnode of a green marker or u (cid:48) is a leaf. Let there be h black markers in the path from v to u . Intime τ , v can see at least k − h − u to u (cid:48) . Then, accordingto Algorithm 6, the advice pieces at the non-marker nodes between the h black markers, read top-down, form the concatenation s k − h s k − h +1 · · · s k − . Denote this concatenation by s (cid:48) . The advicepieces at the non-marker nodes between u and these k − h − s s · · · s k − h − . Denote this concatenation by s (cid:48)(cid:48) . Therefore, the node v computes the sequence s correctly by computing s (cid:48)(cid:48) s (cid:48) . The node computes the correct path to theleader according to Algorithm 9. (cid:50) Remark.
In the case of λ -valent advice for λ >
2, no changes are needed in the solution givenabove, because markers can be coded using the first two colors among c , c , . . . , c λ , and the non-marker nodes get the advice prescribed by Algorithm 4, which was formulated for any λ ≥ β − β In the two previous sections, we proved that for an n -node tree with diameter D = cn + o ( n ),there exist two positive reals β and β , depending only on c and λ , such that any leader electionalgorithm, working in time τ = (cid:98) βD (cid:99) , for any constant β < β requires advice of size Θ( n ) andthere exists a leader election algorithm, working in time τ = (cid:98) βD (cid:99) , for any constant β > β , withadvice of constant size. Hence, the time values β D ≤ τ ≤ β D are the part of the time spectrumthat our (tight) results do not cover. In this section we show that this unchartered region is small.In particular, we show that β − β < /
8, for any c and λ . λ m a x ( β − β ) Figure 8: Maximum value of β − β for different values of λ We plot the two equations β = − β log λ (cid:16) − β c c − β c + (cid:15) (cid:17) and β = 2( − β + 2 (cid:15) )(log λ (cid:16) − c + (cid:15) c − β c (cid:17) + 1)38 β β β − β Figure 9: Curves for β , β and β − β as functions of c , for λ = 2using Matlab. We plot the maximum difference between β and β , for different values of c and fora fixed integer value of λ . Figure 8 shows that the maximum difference between β and β , over allvalues of c , is decreasing as a function of λ . Hence we concentrate on the worst case λ = 2. Figure9 shows the values of β , β and β − β , for λ = 2 as functions of c . The maximum value of β − β is 0 . < /
8, and it is taken for c approximately 0.8. While our results for advice of unbounded valency are complete, for advice of constant valency theyleave a small (sub-polynomial) gap for small diameter D . Also, there are parts of the allocated timespectrum where our results do not work (in particular, for large diameter) although, as we argued,this unchartered territory is small. Filling these gaps is a natural open problem. Also generalizingour results to arbitrary graphs remains open. As suggested by the comparison of results in [24] and[10], where the minimum size of 1-valent advice sufficient for leader election was studied for treesand for graphs respectively, results for arbitrary graphs may be very different from those for trees.Another open problem is related to the precise definition of leader election in anonymous networks.The definition adopted in this paper is the same as in [24], and requires each node to output a pathto the leader. It should be noted that, apart from this formulation of leader election in anonymousnetworks, there are two other possibilities involving weaker requirements. The weakest of all is therequirement that the leader has to learn that it is a leader, and non-leaders have to learn that theyare not, without the necessity of learning who is the leader. The latter variant was called selection in [34], and differences between election and selection were discussed there in a related context offinding the largest-labeled node in a labeled graph. Of course, in our context, selection can beachieved in time 0 with 2-valent advice of size 1.39ven if all nodes have to learn who is the leader in an anonymous network, one might argue thatit is enough for every node to learn a port corresponding to a shortest path towards the leader, asthen, e.g., for the task when all nodes have to send some data to the leader, packets could be routedto the leader from node to node, using only this local information. This is indeed true, if nodeswant to cooperate with others by revealing the local port towards the leader when retransmittingpackets. In some applications, however, such a cooperation may be uncertain, and even when itoccurs, it may slow down transmission, as the local port has to be retrieved from the memory ofthe relaying node.It should be noted that, for trees and for λ -valent advice with λ >
2, this weaker variation of leaderelection can be achieved in time 1 and with advice of size 2. It is enough to choose any node r ofthe tree as the leader, and give to every node its distance modulo 3 from the leader as advice. Intime 1, every node at distance x (mod 3) from r can see a neighbor at distance x − r (its parent in the tree rooted at r ), and output the port towards it. For λ = 2, a similar solutioncan be obtained in time 2 and with advice of size 1. References [1] S. Abiteboul, H. Kaplan, T. Milo, Compact labeling schemes for ancestor queries, Proc. 12thAnnual ACM-SIAM Symposium on Discrete Algorithms (SODA 2001), 547–556.[2] A.V. Aho, J.E. Hopcroft, J.D. Ullman, Data Structures and Algorithms, Addison-Wesley 1983.[3] D. Angluin, Local and global properties in networks of processors. Proc. 12th Annual ACMSymposium on Theory of Computing (STOC 1980), 82–93.[4] H. Attiya and M. Snir, Better Computing on the Anonymous Ring, Journal of Algorithms 12,(1991), 204-238.[5] H. Attiya, M. Snir, and M. Warmuth, Computing on an Anonymous Ring, Journal of theACM 35, (1988), 845-875.[6] P. Boldi, S. Shammah, S. Vigna, B. Codenotti, P. Gemmell, and J. Simon, Symmetry Break-ing in Anonymous Networks: Characterizations. Proc. 4th Israel Symposium on Theory ofComputing and Systems, (ISTCS 1996), 16-26.[7] P. Boldi and S. Vigna, Computing Anonymously with Arbitrary Knowledge, Proc. 18th ACMSymp. on Principles of Distributed Computing (PODC 1999), 181-188.[8] J.E. Burns, A Formal Model for Message Passing Systems, Tech. Report TR-91, ComputerScience Department, Indiana University, Bloomington, September 1980.[9] D. Dereniowski, A. Pelc, Drawing maps with advice, Journal of Parallel and Distributed Com-puting 72 (2012), 132–143.[10] Y. Dieudonn´e, A. Pelc, Impact of Knowledge on Election Time in Anonymous Networks, CoRRabs/1604.05023 (2016). 4011] S. Dobrev and A. Pelc, Leader Election in Rings with Nonunique Labels, Fundamenta Infor-maticae 59 (2004), 333-347.[12] Y. Emek, P. Fraigniaud, A. Korman, A. Rosen, Online computation with advice, TheoreticalComputer Science 412 (2011), 2642–2656.[13] P. Flocchini, E. Kranakis, D. Krizanc, F.L. Luccio and N. Santoro, Sorting and Election inAnonymous Asynchronous Rings, Journal of Parallel and Distributed Computing 64 (2004),254-265.[14] P. Fraigniaud, C. Gavoille, D. Ilcinkas, A. Pelc, Distributed computing with advice: Informa-tion sensitivity of graph coloring, Distributed Computing 21 (2009), 395–403.[15] P. Fraigniaud, D. Ilcinkas, A. Pelc, Communication algorithms with advice, Journal of Com-puter and System Sciences 76 (2010), 222–232.[16] P. Fraigniaud, D. Ilcinkas, A. Pelc, Tree exploration with advice, Information and Computation206 (2008), 1276–1287.[17] P. Fraigniaud, A. Korman, E. Lebhar, Local MST computation with short advice, Theory ofComputing Systems 47 (2010), 920–933.[18] G.N. Fredrickson and N.A. Lynch, Electing a Leader in a Synchronous Ring, Journal of theACM 34 (1987), 98-115.[19] E. Fusco, A. Pelc, How Much Memory is Needed for Leader Election, Distributed Computing24 (2011), 65–78.[20] E. Fusco, A. Pelc, Knowledge, level of symmetry, and time of leader election, DistributedComputing 28 (2015), 221–232.[21] E. Fusco, A. Pelc, Trade-offs between the size of advice and broadcasting time in trees, Algo-rithmica 60 (2011), 719–734.[22] E. Fusco, A. Pelc, R. Petreschi, Use knowledge to learn faster: Topology recognition withadvice, Information and Computation 247 (2016), 254–265.[23] C. Gavoille, D. Peleg, S. P´erennes, R. Raz. Distance labeling in graphs, Journal of Algorithms53 (2004), 85-112.[24] C. Glacet, A. Miller, A. Pelc, Time vs. information tradeoffs for leader election in anonymoustrees, Proc. 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2016), 600-609.[25] M.A. Haddar, A.H. Kacem, Y. M´etivier, M. Mosbah, and M. Jmaiel, Electing a Leader in theLocal Computation Model using Mobile Agents. Proc. 6th ACS/IEEE International Conferenceon Computer Systems and Applications (AICCSA 2008), 473-480.[26] D.S. Hirschberg, and J.B. Sinclair, Decentralized Extrema-Finding in Circular Configurationsof Processes, Communications of the ACM 23 (1980), 627-628.4127] D. Ilcinkas, D. Kowalski, A. Pelc, Fast radio broadcasting with advice, Theoretical ComputerScience, 411 (2012), 1544–1557.[28] T. Jurdzinski, M. Kutylowski, and J. Zatopianski, Efficient Algorithms for Leader Electionin Radio Networks. Proc., 21st ACM Symp. on Principles of Distributed Computing (PODC2002), 51-57.[29] M. Katz, N. Katz, A. Korman, D. Peleg, Labeling schemes for flow and connectivity, SIAMJournal of Computing 34 (2004), 23–40.[30] A. Korman, S. Kutten, D. Peleg, Proof labeling schemes, Distributed Computing 22 (2010),215–233.[31] D. Kowalski, and A. Pelc, Leader Election in Ad Hoc Radio Networks: A Keen Ear Helps,Journal of Computer and System Sciences 79 (2013), 1164-1180.[32] G. Le Lann, Distributed Systems - Towards a Formal Approach, Proc. IFIP Congress, 1977,155–160, North Holland.[33] N.L. Lynch, Distributed algorithms, Morgan Kaufmann Publ. Inc., San Francisco, USA, 1996.[34] A. Miller, A. Pelc, Election vs. selection: How much advice is needed to find the largest node ina graph?, Proc. 28th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA2016), 377–386.[35] K. Nakano and S. Olariu, Uniform Leader Election Protocols for Radio Networks, IEEE Trans-actions on Parallel and Distributed Systems 13 (2002), 516-526.[36] N. Nisse, D. Soguet, Graph searching with advice, Theoretical Computer Science 410 (2009),1307–1318.[37] D. Peleg, Distributed Computing, A Locality-Sensitive Approach, SIAM Monographs on Dis-crete Mathematics and Applications, Philadelphia 2000.[38] G.L. Peterson, An O ( n log nn