{'fraction_non_alphanumeric': 0.036089772556107846, 'fraction_numerical': 0.008224130140081337, 'mean_word_length': 4.3275557695394, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Randomization and quantization for average consensus

A variety of problems in distributed control involve a networked system of autonomous agents cooperating to carry out some complex task in a decentralized fashion, e.g., orienting a flock of drones, or aggregating data from a network of sensors. Many of these complex tasks reduce to the computation of a global function of values privately held by the agents, such as the maximum or the average. Distributed algorithms implementing these functions should rely on limited assumptions on the topology of the network or the information available to the agents, reflecting the decentralized nature of the problem. We present a randomized algorithm for computing the average in networks with directed, time-varying communication topologies. With high probability, the system converges to an estimate of the average in linear time in the number of agents, provided that the communication topology remains strongly connected over time. This algorithm leverages properties of exponential random variables, which allows for approximating sums by computing minima. It is completely decentralized, in the sense that it does not rely on agent identifiers, or global information of any kind. Besides, the agents do not need to know their out-degree; hence, our algorithm demonstrates how randomization can be used to circumvent the impossibility result established in [1]. Using a logarithmic rounding rule, we show that this algorithm can be used under the additional constraints of finite memory and channel capacity. We furthermore extend the algorithm with a termination test, by which the agents can decide irrevocably in finite time - rather than simply converge - on an estimate of the average. This terminating variant works under asynchronous starts and yields linear decision times while still using quantized - albeit larger - values.


Introduction
The subject of this paper is the average consensus problem. We fix a finite set V of n autonomous agents. Each agent u has a scalar input value θ u ∈ R, and all agents cooperate to estimate, within some error bound ε, the average θ := (1/n) u∈V θ u of the inputs. They do so by maintaining a local variable x u , which they drive close to the average θ by exchanging messages with neighboring agents. An algorithm achieves average consensus if, in each of its executions, each variable x u gets sufficiently close to the average θ, namely x u ∈ [θ − ε, θ + ε], after a finite number of computation steps.
The study of this problem is motivated by a wide array of practical distributed applications, which either directly reduce to computing the average of well-chosen values, like sensor fusion [2,3,4], or use average computation as a key subroutine, like load balancing [5,6]. Other examples of such applications include formation control [7], distributed optimization [5], and task assignment [8].
1.1. Contribution. In this paper, our focus is on the design of efficient algorithms for average consensus. Specifically, we are concerned with the convergence time, defined as the number of communication phases needed to get each x u within the range [θ − ε, θ + ε]. It clearly depends on various parameters, including the input values, the error bound ε, connectivity properties of the network, and the number n of agents.
The main contribution of this paper is a linear time algorithm in n that achieves average consensus in a networked system of anonymous agents, i.e., without identifiers, with a timevarying topology that is continuously strongly connected. It is a Monte Carlo algorithm in the sense that the agents make use of private random oracles and may compute a wrong estimate of the average, but with a typically small probability. We do not assume any stability or bidirectionality of the communication links, nor do we provide the agents with any global knowledge (like a bound on the size of the network) or knowledge of the number of their out-neighbors. We also show how, by adding an initial quantization phase, we can make the memory and bandwidth requirements grow with n only as log log n. This is to be considered in the light of the impossibility result stated in [1]: deterministic, anonymous agents communicating by broadcast and without knowledge of their out-neighbors cannot compute functions dependent on the multiplicity or the order of the input values. In particular, computing the average in this context requires providing the agents with knowledge of their out-degrees (or some equivalent information), or centralized control in the form of agent identifiers. In contrast, our algorithm shows that, using randomization, computing the average can be done in a purely decentralized fashion, without using the out-degrees, even on a time-varying communication topology.

Related works.
Average consensus is a specific case of the general consensus problem, where the agents only need to agree on any value in the range of the input values. Natural candidates to solve this general problem are convex combination algorithms, where each agent repeatedly broadcasts its latest estimate x u (t − 1), and then picks x u (t) in the range of its incoming values. For agent u at time t, this takes the form of the update rule where u sets the weight a uv (t) to 0 if it has not received agent v's value at round t. To specify a convex combination algorithm amounts to describing how each agent u selects the positive weights a uv (t). The evolution of the system is then determined by the initial values θ u and the stochastic weight matrices A(t) := [a uv (t)] u,v∈V .
Convex combination algorithms have been extensively studied; see e.g., [9,5,10,11,12,13,14,15,16,6]. The estimates x u (t) have been shown to converge to a common limit under various assumptions of agent influence and network connectivity [17,12]. Unfortunately, convex combination algorithms suffer from poor time complexity in general: as shown in [18,16], they may exhibit an exponentially large convergence time, even on a fixed communication topology.
However, some specific convex combination algorithms are known to converge in polynomial time, e.g., [14,5,19]. They all have in common that the Perron eigenvectors of the weight matrices are constant, which indeed is shown in [20] to guarantee convergence in O n 2 /α if there exists a positive lower bound α on all positive weights and if the network is continuously strongly connected. Polynomial bounds are essentially optimal, as no convex combination algorithm can achieve convergence at an earlier time than Ω n 2 on every topology [21].
While convex combination algorithms achieve asymptotic consensus with a positive lower bound on positive weights and high enough connectivity, the limit is only guaranteed to be in the range of the initial values and may be different from the average θ. For example, the linear-time consensus algorithm in [22] works over any dynamic topology that is continuously rooted, but it converges to a value that is not equal to θ in general. In contrast, the convex combination algorithm in [5] computes the average by selecting weights such that all the weight matrices A(t) are doubly stochastic. To ensure this condition, agents need to collect some non local informations about the network, which requires some link stability over time, namely a three-round link stability.
In [6] and subsequent works, agents enrich the update rule (1) with a second order term: The parameter β is usually a function of the spectral values of the communication graph, which are hard to compute in a distributed fashion. A notable exception is the algorithm proposed by Olshevsky in [10], where the weights are locally computable, and the second order factor only depends on a bound N on the size n of the network. Unfortunately, the latter algorithm assumes a fixed bidirectional topology and an initial consensus since all agents must agree on the bound N . Moreover, its time complexity is linear in N , which may be arbitrarily large.
Other quadratic or linear-time average consensus algorithms elaborating on the update rule (1) have been proposed in [23,24,25,26]. All of these actually solve a stronger problem, in that they achieve consensus on the exact average θ in finite time, but they are computationally intensive and highly sensitive to numerical imprecisions. Moreover, they are designed in the context of a fixed topology and some centralized control.
Average consensus algorithms built around the update rule (1) typically require bidirectional communication links with some stability and assume that agents have access to global information. This is to be expected, as they operate by broadcast and over anonymous networks, and thus have to bypass the impossibility result in [1]: they do so through the use, at least implicitly, of the out-degree of the agents.
Another example is to be found in the Push-Sum algorithm [27] in which agents make explicit use of their out-degrees in the messages they send. This method converges on fixed strongly connected graphs [28], and on continuously strongly connected dynamic graphs [29].
Another way to circumvent the impossibility result in [1] consists in assuming unique agent identifiers: by tagging each initial value θ u with u's identifier, at each step of the Flooding algorithm, the agents can compute the average of the input values that they have heard of so far, and thus compute the global average θ after n − 1 communication steps when the topology is continuously strongly connected. Unfortunately, the price to pay in this simple average consensus algorithm is messages of size in O (n log n) bits. By repeated leader election on the basis of agent identifiers and a shared bound on the network diameter, the quadratic time algorithm in [30] also achieves average consensus, using message and memory size in only O (log n) bits with a fixed, strongly connected network. Our approach is dramatically different from the above sketched ones: equipping each agent with private random oracles enables them to estimate the average with neither central control nor global information. In particular, our algorithm requires no global clock, and agents may start asynchronously. Communication links are no more assumed to be bidirectional and they may change arbitrarily over time, provided that the network remains permanently strongly connected.
Our algorithm leverages the fact that the minimum function can be easily computed in this general setting. By individually sampling exponential random distributions with adequate rates and then by computing the minimum of the so-generated random numbers, agents can estimate the sum of initial values and the size of the network, yielding an estimate of the average. This approach was first introduced in [31] for a gossip communication model, and later applied in [32] to the design of distributed counting algorithms in networked systems equipped with a global clock that delivers synchronous start signals to the agents.
The main features of some of the average consensus algorithms discussed above, including our own randomized algorithm, denoted R, are summarized in Table 1. 1.3. Quantization. Most average consensus algorithms require agents to store and transmit real numbers. This assumption is unrealistic in digital systems, where agents have finite memory and communication channels have finite capacity. These constraints entail agents to use only quantized values.
Convex combination algorithms are not, in general, robust to quantization. However, those that compute the average using doubly stochastic influence matrices have been shown to degrade gracefully under several specific rounding schemes, either deterministic [5], where the degradation induced by rounding is bounded, or randomized [33], where the expected average in the network is kept constant.
Other methods elaborating on the update rule (1) have not, in general, been shown to behave well under rounding, like the second-order algorithm in [34], or of the various protocols in [25,26,23,24]. In this context, one important feature of our algorithm is that it can be adapted to work with quantized values, following a logarithmic rounding scheme similar to the one in [35]. With this rounding rule, each quantized value can be represented using O (log log n) bits.
1.4. Irrevocable decisions. The specification of average consensus can be strengthened by requiring that agents irrevocably decide on some good estimates of the average θ in finite time. In other words, agents are required to detect when consensus on θ has been reached within a given error margin. This is desirable for many applications, e.g., when the average consensus algorithm is to be used as a subroutine that returns an estimate of θ to the calling program. Various decision strategies have been developed for fixed topologies, e.g., [36,37,38].
Here, we design a decision test that uses the approximate value of n computed on-line and that incorporates the randomized firing scheme developed in [39] to tolerate asynchronous starts. In this way, we show that the agents may still safely decide in linear time, but at the cost of larger messages. Moreover, it achieves exact consensus since all the agents decide on the same estimate of θ.
Organization. The rest of this paper is organized as follows: in Section 2, we introduce our computational model and present some preliminary technical lemmas; we present our main algorithm in Section 3, its quantized version in Section 4, and its variant with decision tests in Section 5. Finally, we present concluding remarks in Section 6.

Preliminaries
2.1. Computation model. We consider a networked system with a finite set V of n agents, and assume a distributed computational model in the spirit of the Heard-Of model [40]. Computation proceeds in rounds: in a round, each agent broadcasts a message, receives messages from some agents, and finally updates its state according to some local algorithm. Rounds are communication closed, in the sense that a message sent at round t can only be received during round t. Communications that occur in a given round t are thus modeled by a directed graph G t := (V, E t ): the edge (u, v) is in E t if agent v receives the message sent by agent u at round t. Any agent can communicate with itself instantaneously, so we assume a self-loop at each node in all of the graphs G t .
We consider randomized distributed algorithms which execute an infinite sequence of rounds, and in which agents have access to private and independent random oracles. Thus, an execution of a randomized algorithm is entirely determined by the collection of input values, the sequence of directed graphs (G t ) t≥1 , called a dynamic graph, and the outputs of the random oracles. We assume that the dynamic graph is managed by an oblivious adversary that has no access to the outcomes of the random oracles.
We design algorithms to compute the average of initial values in a dynamic network. Consider an algorithm where the local variable x u is used to estimate the average. We say that an execution of this algorithm ε-computes the average if there is a round t * such that, for all subsequent rounds t ≥ t * , all estimates are within distance ε of the average θ of the input values, namely x u (t) ∈ [θ − ε, θ + ε] for all u ∈ V . The convergence time of this execution is the smallest such round t * if it exists.
2.2. Directed graphs and dynamic graphs. Let G := (V, E) be a directed graph, with a finite set of nodes V of cardinality n and a set of edges E. There is a path from u to v in G either if (u, v) ∈ E, or if (u, w) ∈ E and there is a path from w to v. If every pair of nodes is connected by a path, then G is said to be strongly connected. The dynamic graph (G t ) t≥1 is said to be continuously strongly connected if all the directed graphs G t are strongly connected.
The product graph G•H of two directed graphs G := (V, E G ) and H : Let us recall that the product of n − 1 directed graphs on V that are all strongly connected and have self-loops at each node is the complete graph. It follows that, in every execution of the algorithm Min -given in Algorithm 1 -over a continuously strongly connected dynamic graph, all agents have computed the smallest of the input values at the end of n − 1 rounds. The algorithm Min is a fundamental building block of our average consensus algorithms, and the latter observation will drive their convergence times.
Algorithm 1 The algorithm Min, code for agent u Send x u .

5:
Receive x v 1 , . . . , x v k from neighbors. 6: x u ← min {x v 1 , . . . , x v k } 7: end for 2.3. Exponential random variables. For any positive real number λ, we denote by X ∼ Exp(λ) that X is a random variable following an exponential distribution with rate λ. One easily verifies the following property of exponential random variables. Lemma 1. Let X 1 , . . . , X k be k independent exponential random variables with rates λ 1 , . . . , λ k , respectively. Let X be the minimum of X 1 , . . . , X k . Then, X follows an exponential distribution with rate λ := k i=1 λ i . The accuracy of our algorithm depends on some parameter ℓ whose value is determined by the bound in the following lemma, which is an application of the Cramér-Chernoff method (see for instance [41], sections 2.2 and 2.4).

Randomized algorithm
In this section, we assume infinite bandwidth channels and infinite storage capabilities. For this model, we present a randomized algorithm R and prove that all agents compute the same value which, with high probability, is a good estimate of the average of the initial values.
The underlying idea is that each agent computes an estimate of s, the sum of the input values, and an estimate of n, the size of the network. They use the ratio of the two estimates as an estimate of the average θ := s/n.
The computations of the estimates of s and n are based on Lemma 1: each agent u samples two random numbers from two exponential distributions, with respective rates θ u and 1. Then, the agent u computes the two global minima of these so-generated random numbers in the variables X u and Y u with the algorithm Min. As recalled in Section 2.2, this takes at most n−1 rounds when the dynamic graph is continuously strongly connected. Then, 1/X u and 1/Y u provide estimates of respectively s and n.
The probabilistic analysis requires all the input values to be at least equal to one. To overcome this limitation, we assume that the agents know some pre-defined interval [a, b] in which all the input values lie and we apply a reduction to the case a = 1 by simple translations of the inputs.
We then elaborate on the above algorithmic scheme to decrease the probability of incorrect executions, i.e., executions with errors in the estimates that are greater than ε. We replicate each random variable ℓ times, and each node starts with the two vectors u ), instead of the sole variables X u and Y u . Using the Cramér-Chernoff bound given in Lemma 2, we choose the parameter ℓ in terms of the maximal admissible error ε, the probability η of incorrect executions, and the amplitude b − a of the input values; namely, we set ℓ := 27 ln(4/η)(b − a + 1) 2 /ε 2 .
The pseudocode of the algorithm R is given in Algorithm 2.
Proof. We first introduce some notation. If z u is any variable of node u, we denote by z u (t) the value of z u at the end of round t. We let As an immediate consequence of the connectivity assumptions, for each node u and each index i ∈ {1, . . . , ℓ}, we have X  Hence, x u (t) = a − 1 +θ whenever t ≥ n − 1.
We now show that a − 1 +θ lies in the admissible range [θ − ε, θ + ε] with probability at least 1 − η. By considering the translate initial values θ ′ u := θ u − a + 1 that all lie in [1, b − a + 1], we obtain a reduction to the case a = 1.
The convergence of the algorithm R in Theorem 1 is ensured by the assumption of continuous strong connectivity of the dynamic graph (G t ) t≥1 : the directed graph G 1 • · · · • G n−1 is complete, and thus the entries Y  u hold a global minimum at the end of round n − 1. This connectivity assumption may be dramatically reduced into eventual strong connectivity: for each round t, there exists a round t ′ such that G t • · · · • G t ′ is the complete graph. Clearly, the algorithm R converges with any dynamic graph that is eventually strongly connected, but the finite convergence time is then unbounded.
An intermediate connectivity assumption has been proposed in [39]: a dynamic graph (G t ) t≥1 is strongly connected with delay T if each product of T consecutive graphs G t • · · · • G t+T −1 is strongly connected. Then, the convergence of the algorithm R is still guaranteed, but at the price of increasing the convergence time by a factor T .
Conversely, the assumption of continuous strong connectivity can be strengthened in the following way: for any positive integer c, a dynamic graph (G t ) t≥1 is continuously c-strongly connected if each directed graph G t is c-in-connected, i.e., any non-empty subset S ⊆ V has at least min {c, |V \ S|} incoming neighbors in G t . It can be shown that the product of ⌈n/c⌉ c-in-connected directed graphs is complete [39]. Hence, the assumption of continuous c-connectivity results in a speedup by a factor c.

Quantization
In this section, we present a variant of the algorithm R that, as opposed to the former, works under the additional constraint that agents can only store and transmit quantized values. This model is intended for networked systems with communication bandwidth and storage limitations. We incorporate this constraint in our randomized algorithm by requiring each agent u firstly to quantize the random numbers it generates, and secondly to broadcast only one entry of each of the two vectors X u and Y u in each round.
The quantization scheme consists in rounding values down along a logarithmic scale, to the previous integer power of some pre-defined number greater than one. Exponential random variables, when rounded in this way, continue to follow concentration inequalities similar to those of Lemma 2. This makes logarithmic rounding appealing to use in conjunction with the algorithm R, as we retain control over incorrect executions simply by increasing the number ℓ of samples by a constant factor. This quantization method does not offer an absolute bound over the space and bandwidth potentially required in the algorithm: the generated random numbers may be arbitrarily large or small, and therefore the number of quantization levels used in all executions is unbounded. Instead, we provide a probabilistic bound over the number of quantization levels required -that is, a bound that holds with high probability. All the random numbers that are generated lie in some pre-defined interval I with high probability, and hence most executions of our algorithm require a pre-defined number Q of quantization levels. In each of these "good" executions, random numbers can be represented efficiently, as Q grows with log n.
This probabilistic guarantee for quantization could be turned into an absolute one by providing the agents with a bound N ≥ n. This is indeed the rounding scheme developed in [35], where each agent starts with normalizing the random numbers that it generates before rounding. Our quantization method provides a weaker guarantee, but it does not use any global information about the network.
In the following, our quantized algorithm is denoted R; its pseudocode is given in Algorithm 3. It uses the rounding function r β : x ∈ R >0 → r β (x) := (1 + β) ⌊log 1+β x⌋ , where β is any positive number.

Algorithm 3
The algorithm R, code for agent u u from an exponential distribution of rate θ u − a + 1. 6: X u ← (r β (σ Proposition 1. For any real numbers ε ∈ (0, 1/2) and η ∈ (0, 1/2), in any continuously strongly connected network, the algorithm R ε-computes the average of initial values that all lie in [a, b] with probability at least 1 − η/2 in at most ℓn rounds.
Proof. We letσ The main loop of the algorithm R consists in running many instances of the algorithm Min, interleaving their executions so that the variables X Now we show that a − 1 +θ lies in the admissible range [θ − ε, θ + ε] with probability at least 1 − η/2. For that, we proceed as in Theorem 1: we reduce the general case to the case a = 1 by translation.
Since the function r β is non-decreasing, min and r β commute. Therefore, by Lemma 1, σ (i) andν (i) are the quantized values of two exponential random variables with respective rates s and n.
As above sketched, the algorithm R differs from R in several respects. First, the length ℓ of the random vectors is larger. This is due to the fact that the concentration inequality in Lemma 3 is looser than in Lemma 2. Moreover, we retain a safety margin of η/2 for controlling executions in which some of the random numbers generated by the agents lie outside of the admissible interval for quantization.
Another discrepancy is that the agents send only one entry of each of the two vectors X u and Y u in each round of R while they send the complete vectors in the algorithm R. This sequentialization implemented in the algorithm R, results in reducing the size of messages by a factor ℓ, but at the price of augmenting the convergence time by the same factor ℓ.
The use of this strategy also entails a stronger sensitivity on network connectivity than when broadcasting entire vectors at each round. Indeed, the convergence of X u for j = i. Global convergence requires that for each index i, the graph products of the form G i •G i+ℓ •· · ·•G i+k.ℓ are all complete from some integer k. This condition is not implied, for instance, by continuous strong connectivity with delay T , and indeed an adversary with knowledge of ℓ can pick a dynamic graph that is 2-delayed continuously strongly connected, and for which no progress is ever made for some entries of the vectors X u and Y u .

Decision
So far, we have been concerned only with the convergence of each estimate x u (t) to the average θ. However, when used as a subroutine, an average consensus algorithm may have to return an estimate of the average θ to the calling program. In other words, the agents have to decide irrevocably on an estimate of θ.
Formally, we equip each agent with a decision variable d u , initialized to ⊥. Agent u is said to decide the first time it writes in d u . The corresponding problem is specified as follows: In this section, we seek to augment the algorithms R and R to solve the above problem with high probability. Our approach relies on the fact that in both algorithms, each agent converges in finite time.
A simple solution consists in providing the agents with a bound N ≥ n: each agent u stops executing R and decides at round N . From Theorem 1, it follows that termination, irrevocability, and validity hold with probability at least 1 − η. A similar scheme can be applied to the algorithm R and decisions at round ℓN .
Unfortunately, this approach suffers from two major drawbacks. First, the time complexity of the resulting algorithms is arbitrarily large, as it depends on the quality of the bound N . Second, the decision tests involve the current round number t, and hence require that the agents have access to this value, or at least start executing their code simultaneously. Charron-Bost and Moran [39] recently showed that synchronous starts can be emulated in continuously strongly connected networks, but at the price of a firing phase of n additional rounds.
To circumvent the above two problems, we propose another approach that consists in using the estimate of n computed by the algorithms R and R in the decision tests, and in incorporating the randomized firing scheme developed in [39] to tolerate asynchronous starts.
Let us briefly recall their model and techniques. Each agent is initially passive, i.e., it does nothing and emits only null messages (heartbeats). Eventually it becomes active, i.e., it starts executing the algorithm. An active agent u maintains a local virtual clock C u with the following property: under the assumption of a dynamic network that is continuously strongly connected, the local clocks remain smaller than n as long as some agents are passive, and when all the agents are active, they get synchronized to some value at most equal to n. Let s max denote the last round with passive agents. At the end of round s max + n − 1, all agents have the same estimate n * of n, which lies in [2n/3, 3n/2] with high probability. Hence, C u ≥ 3n * /2 guarantees that C u ≥ n, and thus agent u can safely decide.
The algorithm R D , given in Algorithm 4, integrates this decision mechanism in the algorithm R, with the rounding of algorithm R.
Proof. We first observe that all the variables X (i) u , Y (i) u , and n u are stationary. Since the dynamic graph is continuously strongly connected, their final values do not depend on agent u. Let t c u be the first round from which all these variables are constant. Section 2.2 shows that (2) t c u < s max + n . We let d * u = d u t c u and n * = n u t c u . From [39], we know that the counters C u satisfy the following: (i) ∀t ≤ s max , C u (t) < n; (ii) ∃t 0 ∈ {s max + 1, . . . , s max + n − 1} , ∀u ∈ V, ∀t ≥ t 0 , C u (t) = t − s max . Since n u is upper bounded by n * , the property (ii) entails that the agent u eventually decides. Hence, the termination property is ensured. Let t d u denote the first round at which the agent u decides, i.e., the first round such that Observing that deciding in R D coincides with firing in the randomized algorithm in [39], the first part of the correctness proof of the latter algorithm shows that (3) Pr ∀u ∈ V, t d u ≥ s max + n ≥ 1 − η/3 since ℓ ≥ 243 ln 6N 2 /η . Combined with (2), we obtain Because of the definition of t c u , decisions in R D are thus irrevocable with probability at least 1 − η/3.
In other words, all the agents decide by round s max + 2n with probability at least 1 − η/3. Moreover, we observe that the computation of the estimate of θ in R D corresponds to the algorithm R. Then, Proposition 1 shows that since ℓ ≥ 108 ln(24/η)(b − a + 1) 2 /ε 2 . It follows that the validity property holds with probability at least 1 − η/6. As opposed to R, each agent u sends all the entries of X u and Y u in the messages of the algorithm R D . Moreover, the above argument shows that the agent u can stop sending C u when it has decided. Hence, in correct executions where the agents decide in linear time in n, the counters C u can be represented over O (log N ) bits.
Reasoning as in Proposition 2, each entry of the vectors X u and Y u can be represented over Q = O 1 ε log ℓn η quantization levels with probability 1 − η/6, where ℓ = O log N − log η/ε 2 . Therefore, each message of R D uses O (ℓ log Q) bits with probability 1 − η/6. By the union bound over the latter four events, we obtain that all the agents in the algorithm R D decide on values in the range [θ−ε, θ+ε] by round s max +2n using messages of size in O log N − log η/ε 2 (log (log N − log η) − log ε) bits, with probability at least 1 − η.

Conclusion
The design of average consensus algorithms is constrained by fundamental limitations on computable functions. In a networked system of deterministic agents that communicate by broadcast without knowledge of their out-degrees, average consensus essentially requires central coordination or global information on the network. Indeed, although much progress has been made over the past decades, average consensus algorithms generally continue to rely on assumptions such as bidirectional links, an upper bound on the number of agents known to all agents, knowledge of the agent the out-degrees. . . Furthermore, most average consensus algorithms are proved correct under the condition that agents are able to store and transmit real numbers, which is a highly idealized situation.
We have proposed a Monte Carlo algorithm that achieves average consensus with high probability, in linear time, and performs well under limited assumptions on the network. This algorithm can be coupled with a rounding procedure that allows for working with quantized values, with a space complexity growing with log log n asymptotically. In this form, the algorithm only computes the average in the sense that every agent converges towards an estimate of the average in finite time. However, if we provide the agents with an upper bound on the size of the network, the algorithm can be augmented in a way that allows the agents to eventually decide irrevocably on their estimate. This method has its own shortcomings: specifically, the restitution of the quantized values requires an infinite computing precision. Nonetheless, the comparison with existing average algorithms is favorable in many respects. In particular, our algorithm converges in linear time in the size of the network, tolerates communication channels with finite capacity, and can be augmented with irrevocable decisions on the same estimate of the average. As such, it offers an example of using randomization to circumvent fundamental limitations in distributed computing.