Abstract
This paper focuses on studying the message complexity of implicit leader election in synchronous distributed networks of diameter two. Kutten et al. (J ACM 62(1):7:1–7:27, 2015) showed a fundamental lower bound of \(\varOmega (m)\) (m is the number of edges in the network) on the message complexity of (implicit) leader election that applied also to Monte Carlo randomized algorithms with constant success probability; this lower bound applies for graphs that have diameter at least three. On the other hand, for complete graphs (i.e., graphs with diameter one), Kutten et al. (Theor Comput Sci 561(Part B):134–143, 2015) established a tight bound of \(\tilde{\varTheta }(\sqrt{n})\) on the message complexity of randomized leader election (n is the number of nodes in the network). For graphs of diameter two, the complexity was not known. In this paper, we settle this complexity by showing a tight bound of \(\tilde{\varTheta }(n)\) on the message complexity of leader election in diametertwo networks. We first give a simple randomized MonteCarlo leader election algorithm that with high probability (i.e., probability at least \(1  n^{c}\), for some fixed positive constant c) succeeds and uses \(O(n\log ^3{n})\) messages and runs in O(1) rounds; this algorithm works without knowledge of n (and hence needs no global knowledge). We then show that any algorithm (even Monte Carlo randomized algorithms with large enough constant success probability) needs \(\varOmega (n)\) messages (even when n is known), regardless of the number of rounds. We also present an \(O(n\log {n})\) message deterministic algorithm that takes \(O(\log {n})\) rounds (but needs knowledge of n); we show that this message complexity is tight for deterministic algorithms. Together with the two previous results of Kutten et al., our results fully characterize the message complexity of leader election visàvis the graph diameter.
This is a preview of subscription content, log in to check access.
Notes
 1.
Throughout, “with high probability” means with probability at least \(1  n^{c}\), for some fixed positive constant c.
 2.
Afek and Gafni [1] show the \(\varOmega (n\log {n})\) message lower bound for complete networks under the nonsimultaneous wakeup model in synchronous networks. As we have verified in our private communications with Shay Kutten (Professor, Technion), the same message bound can be shown to hold in the simultaneous wakeup model as well under the restriction that the number of rounds is bounded by a function of n.
 3.
We point out that lower bounds for complete networks do not directly translate to diametertwo networks.
 4.
If one assumes the KT1 model, where nodes have an initial knowledge of the IDs of their neighbors, there exists a trivial algorithm for leader election in a diametertwo graph that uses only O(n) messages.
 5.
This lower bound assumes nonsimultaneous wakeup though. If nodes are assured to wake up at the same time in synchronous complete networks, there exists a trivial algorithm: if a node’s identity is some i, it waits i time before it sends any message then leader election could be solved (deterministically) in O(n) messages on complete graphs in synchronous networks. As we have verified in our private communications with Shay Kutten (Professor, Technion), the same message bound can be shown to hold in the simultaneous wakeup model as well under the restriction that the number of rounds is bounded by a function of n.
 6.
This enumeration is used only for the description of the lower bound construction and is unbeknownst to the nodes.
 7.
We note that this is the main idea borrowed from the Afek–Gafni algorithm [1]—the number of messages sent by each “active” node increases exponentially in every phase. That effect is, however, counterbalanced by the exponentially decreasing number of “active” nodes.
 8.
In contrast, we note that \(\varOmega (m)\) is a lower bound for deterministic on graphs of diameter at least three, even if n is known [10].
References
 1.
Afek, Y., Gafni, E.: Time and message bounds for election in synchronous and asynchronous complete networks. SIAM J. Comput. 20(2), 376–394 (1991). https://doi.org/10.1137/0220023
 2.
Gilbert, S., Robinson, P., Sourav, S.: Leader election in wellconnected graphs. In: Proceedings of the 2018 ACM Symposium on Principles of Distributed Computing, PODC ’18, pp. 227–236. ACM, New York, NY, USA (2018). https://doi.org/10.1145/3212734.3212754
 3.
Gilbert, S., Robinson, P., Sourav, S.: Slow links, fast links, and the cost of gossip. In: 2018 IEEE 38th International Conference on Distributed Computing Systems, ICDCS ’18, pp. 786–796 (2018). https://doi.org/10.1109/ICDCS.2018.00081
 4.
Humblet, P.A.: Electing a Leader in a Clique in \(O(n\log {n})\) Messages. Intern. Memo., Laboratory for Information and Decision Systems, MIT, Cambridge (1984)
 5.
Khan, M., Kuhn, F., Malkhi, D., Pandurangan, G., Talwar, K.: Efficient distributed approximation algorithms via probabilistic tree embeddings. Distrib. Comput. 25(3), 189–205 (2012). https://doi.org/10.1007/s0044601201579
 6.
Korach, E., Kutten, S., Moran, S.: A modular technique for the design of efficient distributed leader finding algorithms. ACM Trans. Program. Lang. Syst. (TOPLAS) 12(1), 84–101 (1990). https://doi.org/10.1145/77606.77610
 7.
Korach, E., Moran, S., Zaks, S.: Tight lower and upper bounds for some distributed algorithms for a complete network of processors. In: Proceedings of the Third Annual ACM Symposium on Principles of Distributed Computing, PODC ’84, pp. 199–207. ACM, New York, NY, USA (1984). https://doi.org/10.1145/800222.806747
 8.
Korach, E., Moran, S., Zaks, S.: The optimality of distributive constructions of minimum weight and degree restricted spanning trees in a complete network of processors. SIAM J. Comput. 16(2), 231–236 (1987). https://doi.org/10.1137/0216019
 9.
Korach, E., Moran, S., Zaks, S.: Optimal lower bounds for some distributed algorithms for a complete network of processors. Theor. Comput. Sci. 64(1), 125–132 (1989). https://doi.org/10.1016/03043975(89)901035
 10.
Kutten, S., Pandurangan, G., Peleg, D., Robinson, P., Trehan, A.: On the complexity of universal leader election. J. ACM 62(1), 7:1–7:27 (2015). https://doi.org/10.1145/2699440. Invited paper from ACM PODC 2013
 11.
Kutten, S., Pandurangan, G., Peleg, D., Robinson, P., Trehan, A.: Sublinear bounds for randomized leader election. Theor. Comput. Sci. 561(Part B), 134–143 (2015). https://doi.org/10.1016/j.tcs.2014.02.009. Special Issue on Distributed Computing and Networking
 12.
Le Lann, G.: Distributed systems—towards a formal approach. In: IFIP Congress, pp. 155–160 (1977)
 13.
Lynch, N.A.: Distributed Algorithms. Morgan Kaufmann Publishers Inc., San Francisco (1996)
 14.
Mitzenmacher, M., Upfal, E.: Probability and Computing: Randomized Algorithms and Probabilistic Analysis, 2nd edn. Cambridge University Press, Cambridge (2017)
 15.
Pai, S., Pandurangan, G. V., Pemmaraju, S., Riaz, T., Robinson, P.: Symmetry breaking in the congest model: Time and messageefficient algorithms for ruling sets. In: 31st International Symposium on Distributed Computing, DISC 2017, October 16–20, 2017, pp. 38:1–38:16. Vienna, Austria (2017). https://doi.org/10.4230/LIPIcs.DISC.2017.38
 16.
Peleg, D.: Timeoptimal leader election in general networks. J. Parallel Distrib. Comput. 8(1), 96–99 (1990). https://doi.org/10.1016/07437315(90)90074Y
 17.
Peleg, D.: Distributed Computing: A LocalitySensitive Approach. Society for Industrial and Applied Mathematics, Philadelphia (2000). https://doi.org/10.1137/1.9780898719772
 18.
Santoro, N.: Design and Analysis of Distributed Algorithms. Wiley Series on Parallel and Distributed Computing. Wiley, New York (2006)
 19.
Tel, G.: Introduction to Distributed Algorithms, 2nd edn. Cambridge University Press, New York (2001)
Author information
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A preliminary version of this work was nominated for the best paper award at the 19th International Conference on Distributed Computing and Networking (ICDCN 2018).
Gopal Pandurangan was supported, in part, by NSF Grants CCF1527867, CCF1540512, IIS1633720, and CCF1717075 and by USIsrael BSF Grant 2016419.
Peter Robinson was supported, in part, by the Natural Sciences and Engineering Research Council of Canada (NSERC), RGPIN201806322.
Appendix
Appendix
Proof for function minima in Lemma 1
Proof
We define the Lagrangian as
where \(\lambda \) is the Lagrange multiplier. We can find the critical points of the Lagrangian by solving the set of equations
and
Simplifying Eq. (8), we get
One possible (feasible) solution of Eqs. (9) and (10) is,
and
Let \(X^*\) be a vector of dimension n defined by \(X^* {\mathop {=}\limits ^{{\mathsf {def}}}}(\frac{C}{n}, \frac{C}{n}, \ldots , \frac{C}{n})\). Then we have already shown that \(X^*\) and \(\lambda ^*\) are a critical point for the Lagrange function \(\mathscr {L}\). We claim that \(X^*\) is also a local minima for f(x) under the constraint of Eq. (9).
We show that by constructing the Bordered Hessian matrix \(H^B\) of the Lagrange function. Let \(L^*_{ij} {\mathop {=}\limits ^{{\mathsf {def}}}}\frac{\partial }{\partial x_j} (\frac{\partial \mathscr {L}}{\partial x_i})\big _{X^*}\), where \(\mathscr {L}\) is the Lagrange function as defined in Eq. (7). Then
We note that \(L^*_{ii} = \frac{2\log {(\frac{C}{n})}  1}{(\frac{C}{n})^3}  \lambda ^*\) for all \(1 \le i \le n\), and \(L^*_{ij} = 0\) for all (i, j) such that \(i \ne j\). Hence
We show that \(H^B\) is positive definite (which is a sufficient condition for \(X^*\) to be a local minima) by checking the signs of the leading principal minors. For any \(1 \le i \le n\), \(H^B_i\) is the determinant of a square matrix of dimension \(i+1\), and is given by
Hence
\(\square \)
Detailed proof of Lemma 10
Proof
Consider any \(u \in V\) such that \(u \ne v^{\text {max}}\).

Case 1 (\(v^{\text {max}}\)anduare connected via an edge): Since \(v^{\text {max}}\) has the highest ID in G, the ifclause of Line 15 of Algorithm 2 is never satisfied for \(v^{\text {max}}\). Therefore \(v^{\text {max}}\) becomes inactive only if it has already sent probemessages to all its neighbors (or \(v^{\text {max}}\) never becomes inactive). In particular, u always receives a probemessage from \(v^{\text {max}}\) containing \(ID_{v^{\text {max}}}\). Since \(ID_{v^{\text {max}}} > ID_u\), u becomes a noncandidate at that point (if u was still a candidate until that point) and therefore does not become a leader.

Case 2 (\(v^{\text {max}}\)andudo not have an edge between them): By Observation 1, there is some \(x \in V\) such that both \(v^{\text {max}}\) and u have edges going to x. And we have already established that \(v^{\text {max}}\) will always send a probemessage to x at some point of time or another.

Case 2(a) (udoes not send a probemessage to x): This implies that u became inactive before it could send a probemessage to x. But then u could have become inactive only if the ifclause of Line 15 of Algorithm 2 got satisfied at some point. Then u became a noncandidate too at the same time and therefore would not become a leader.

Case 2(b) (usends a probemessage toxbefore \(v^{\text {max}}\)does): Suppose u sends a probemessage to x at round i and \(v^{\text {max}}\) sends a probemessage to x at round \(i'\), where \(1 \le i < i' \le \log {n}\). If x had seen an ID higher than \(ID_u\) up until round i, then x immediately informs u and u becomes a noncandidate.
So suppose not. Then, after round i, x sets its local variables \(L_x\) and \(N_x\) to \(ID_u\) and u respectively. Let \(j > i\) be the smallest integer such that x receives a probemessage from a neighbor \(u'\) at round j, where \(ID_{u'} > ID_u\). Note that \(v^{\text {max}}\) will always send a probemessage to x, therefore such a \(u'\) exists. Then, after round j, x sets its local variables \(L_x\) and \(N_x\) to \(ID_{u'}\) and \(u'\) respectively, and informs u of this change (please see Line 17 of Algorithm 2). u becomes a noncandidate at that point of time.

Case 2(c) (uand\(v^{\text {max}}\)each sends a probemessage toxat the same time): Since \(ID_{v^{\text {max}}}\) is the highest ID in the network, \(L_x\) is assigned the value \(ID_{v^{\text {max}}}\) at this point, and x tells u about \(L_x = ID_{v^{\text {max}}} > ID_u\), causing u to become a noncandidate.

Case 2(d) (usends a probemessage to xafter \(v^{\text {max}}\)does): Suppose \(v^{\text {max}}\) sends a probemessage to x at round i and u sends a probemessage to x at round \(i'\), where \(1 \le i < i' \le \log {n}\). Then x sets its local variables \(L_x\) and \(N_x\) to \(ID_{v^{\text {max}}}\) and \(v^{\text {max}}\), respectively, after round i. So when u comes probing at round \(i' > i\), x tells u about \(L_x = ID_{v^{\text {max}}} > ID_u\), causing u to become a noncandidate. \(\square \)

Detailed proof of Lemma 11
Proof
Consider a node v that is active at the end of round i. This implies that the ifclause of Line 15 of Algorithm 2 has not so far been satisfied for v, which in turn implies that \(ID_v > ID_{w_{v, j}}\) for \(1 \le j \le 2^i  1\), therefore none of
is active after round i. Thus for every active node at the end of round i, there are at least \(2^i  1\) inactive nodes. We call this set of inactive nodes, together with v itself, the “kingdom” of v after round i, i.e.,
If we can show that these kingdoms are disjoint for two different active nodes, then we are done.
Proof by contradiction. Suppose not. Suppose there are two active nodes u and v such that
(after some round i, \(1 \le i \le \log {n}\)). Let x be such that \(x \in {\textit{KINGDOM}}_i(u) \cap {\textit{KINGDOM}}_i(v)\). Since an active node obviously cannot belong to the kingdom of another active node, this x equals neither u nor v, and therefore
that is, both u and v have sent their respective probemessages to x. Without loss of generality, let \(ID_v > ID_u\).

Case 1 (usends a probemessage to xbeforevdoes): Suppose u sends a probemessage to x at round j and v sends a probemessage to x at round \(j'\), where \(1 \le j < j' \le i\). If x had seen an ID higher than \(ID_u\) up until round j, then x immediately informs u and u becomes inactive. Contradiction.
So suppose not. Then, after round j, x sets its local variables \(L_x\) and \(N_x\) to \(ID_u\) and u respectively. Let \(k > j\) be the smallest integer such that x receives a probemessage from a neighbor \(u'\) at round k, where \(ID_{u'} > ID_u\). Note that v sends a probemessage to x at round \(j'\), where \(j < j' \le i\), and \(ID_v > ID_u\). Therefore such a \(u'\) exists. Then, after round k, x sets its local variables \(L_x\) and \(N_x\) to \(ID_{u'}\) and \(u'\) respectively, and informs u of this change (please see Line 17 of Algorithm 2). u becomes inactive at that point of time, i.e., after round k, where \(k \le j' \le i\). Contradiction.

Case 2 (uandveach sends a probemessage to xat the same time): Suppose that u and v each sends a probemessage to x at the same round j, where \(1 \le j \le i\). Since \(ID_v > ID_u\), x has at least one neighbor \(u'\) such that \(ID_{u'} > ID_u\). Therefore x would not set \(L_x\) to \(ID_u\) (or \(N_x\) to u), and x would inform u about that after round j, causing u to then become inactive. Contradiction.

Case 3 (usends a probemessage toxaftervdoes): Suppose v sends a probemessage to x at round j and u sends a probemessage to x at round \(j'\), where \(1 \le j < j' \le i\). Then x sets its local variables \(L_x\) and \(N_x\) to \(ID_v\) and v, respectively, after round j. So when u comes probing at round \(j' > j\), x tells u about \(L_x \ge ID_v > ID_u\), causing u to become inactive. Contradiction. \(\square \)
Detailed proof of Lemma 13
Proof
We consider the two cases separately—when n is even and when n is odd—in order to make the presentation simpler.

Case 1: \(n = 2k\)for some integer\(k \ge 2\).
Proof by contradiction. Suppose that there are three or more nodes that have had \(\lceil \frac{n}{2}\rceil = k\) or more edges removed each (either by themselves or by their neighbors). Let u, v, and w be three such nodes. Since an edge is removed only if one of the incident nodes has a higher ID than the other, all of (u, v), (v, w), and (w, u) cannot have been removed. Thus by a simple counting argument (by the “principle of inclusion–exclusion”), the total number of edges removed is at least \((3k  3) + 1 = 3k  2 > 2k  1 = n  1\), which contradicts Observation 4.

Case 2: \(n = 2k + 1\)for some integer\(k \ge 1\).
Proof by contradiction Suppose that there are three or more nodes that have had \(\lceil \frac{n}{2}\rceil = k + 1\) or more edges removed each (either by themselves or by their neighbors). Let u, v, and w be three such nodes. Since an edge is removed only if one of the incident nodes has a higher ID than the other, all of (u, v), (v, w), and (w, u) cannot have been removed. Thus by a simple counting argument (by the “principle of inclusion–exclusion”), the total number of edges removed is at least \((3(k + 1)  3) + 1 = 3k + 1 > 2k = n  1\), which contradicts Observation 4. \(\square \)
Detailed proof of Lemma 14
Proof
Clearly \(G'\) is not of diameter one since the node with the smallest ID in V always drops at least one edge. Now let us consider any pair of nodes u and v, say. We show that the distance between u and v cannot be greater than 2.
If \((u, v) \in E'\), then we are already done. So suppose \((u, v) \notin E'\). Next we show that for any \(u, v \in V\), either u and v are directly connected in \(G'\) or \(\exists w \in V\) such that \((u, w) \in E'\) and \((w, v) \in E'\).
We consider the two cases—when n is even and when n is odd—separately, in order to make the presentation simpler.

Case 1: \(n = 2k\)for some integer\(k \ge 2\).
Since no node exists in \(G'\) which has had \(\lceil \frac{n}{2}\rceil = k\) or more edges removed, every node in \(G'\) has degree at least \((n  1)  (k  1) = k\). Thus for any \(u, v \in V\), if \((u, v) \notin E'\), then there are at least \(k + k  (n  2) = 2\) nodes in \(V {\setminus } \left\{ u, v\right\} \) that are common neighbors to both u and v.

Case 2: \(n = 2k + 1\)for some integer\(k \ge 1\).
Since no node exists in \(G'\) which has had \(\lceil \frac{n}{2}\rceil = k + 1\) or more edges removed, that implies that every node in \(G'\) has degree at least \((n  1)  k = k\). Thus for any \(u, v \in V\), if \((u, v) \notin E'\), then there is at least \(k + k  (n  2) = 1\) node in \(V {\setminus } \left\{ u, v\right\} \), which is a common neighbor to both u and v. \(\square \)
Rights and permissions
About this article
Cite this article
Chatterjee, S., Pandurangan, G. & Robinson, P. The complexity of leader election in diametertwo networks. Distrib. Comput. (2019). https://doi.org/10.1007/s00446019003542
Received:
Accepted:
Published:
Keywords
 Distributed algorithm
 Leader election
 Randomized algorithm
 Message complexity
 Time complexity
 Lower bound