SIAM J. DISCRETE MATH. Vol. 18, No. 2, pp. 332–346
c 2004 Society for Industrial and Applied Mathematics
FASTER DETERMINISTIC BROADCASTING IN AD HOC RADIO NETWORKS∗ DARIUSZ R. KOWALSKI† AND ANDRZEJ PELC‡ Abstract. We consider radio networks modeled as directed graphs. In ad hoc radio networks, every node knows only its own label and a linear bound on the size of the network but is unaware of the topology of the network or even of its own neighborhood. The fastest currently known deterministic broadcasting algorithm working for arbitrary n-node ad hoc radio networks has running time O(n log2 n). Our main result is a broadcasting algorithm working in time O(n log n log D) for arbitrary n-node ad hoc radio networks of radius D. The best currently known lower bound on broadcasting time in ad hoc radio networks is Ω(n log D); hence our algorithm is the first to shrink the gap between bounds on broadcasting time in radio networks of arbitrary radius to a logarithmic factor. We also show a broadcasting algorithm working in time O(n log D) for complete layered n-node ad hoc radio networks of radius D. The latter complexity is optimal. Key words. distributed algorithms, radio networks, broadcasting AMS subject classifications. 68W15, 68W40, 68R10 DOI. 10.1137/S089548010342464X
1. Introduction. 1.1. The model. A radio network is a collection of transmitter-receiver stations. It is modeled as a directed graph on the set of these stations, referred to as nodes. A directed edge e = (u, v) means that the transmitter of u can reach v. Nodes send messages in synchronous steps (time slots). In every step, every node acts either as a transmitter or as a receiver. A node acting as a transmitter sends a message which can potentially reach all of its out-neighbors. A node acting as a receiver in a given step gets a message if and only if exactly one of its in-neighbors transmits in this step. The message received in this case is the one that was transmitted. If at least two in-neighbors v and v of u transmit simultaneously in a given step, none of the messages is received by u in this step. In this case we say that a collision occurred at u. It is assumed that the effect at node u of more than one of its in-neighbors transmitting is the same as that of no in-neighbor transmitting; i.e., a node cannot distinguish a collision from silence. The goal of broadcasting is to transmit a message from one node of the network, called the source, to all other nodes. Remote nodes get the source message via intermediate nodes along paths in the network. In order to make broadcasting feasible, we ∗ Received by the editors March 25, 2003; accepted for publication (in revised form) February 3, 2004; published electronically November 9, 2004. A preliminary version of this paper appeared in Proceedings of the 20th Annual Symposium on Theoretical Aspects of Computer Science (STACS 2003), Berlin, Germany, 2003, Lecture Notes in Comput. Sci. 2607, H. Alt and M. Habib, eds., Springer-Verlag, Berlin, 2003, pp. 109–120. http://www.siam.org/journals/sidma/18-2/42464.html † Instytut Informatyki, Uniwersytet Warszawski, Banacha 2, 02-097 Warszawa, Poland (darek@ mimuw.edu.pl), and Max-Planck-Institut f¨ ur Informatik, Stuhlsatzenhausweg 85, Saarbr¨ ucken, 66123 Germany. This work was done in part during this author’s stay at the Research Chair in Distributed Computing of the Universit´e du Qu´ ebec en Outaouais as a postdoctoral fellow. This author’s research was supported in part by KBN grant 4T11C04425. ‡ D´ epartement d’informatique, Universit´e du Qu´ ebec en Outaouais, Hull, Qu´ebec J8X 3X7, Canada (
[email protected]). This author’s research was supported in part by NSERC grant OGP 0008136 and by the Research Chair in Distributed Computing of the Universit´e du Qu´ ebec en Outaouais.
332
BROADCASTING IN AD HOC RADIO NETWORKS
333
assume that there is a directed path from the source to any node of the network. We study one of the most important and widely investigated performance parameters of a broadcasting algorithm, which is the total time, i.e., the number of steps it uses to inform all the nodes of the network. We consider deterministic distributed broadcasting in ad hoc radio networks. In such networks, a node does not have any a priori knowledge of the topology of the network, its maximum degree, its radius, nor even of its immediate neighborhood: the only a priori knowledge of a node is its own label and a linear upper bound r on the number of nodes. Labels of all nodes are distinct integers from the interval [0, . . . , r]. Broadcasting in ad hoc radio networks was investigated, e.g., in [3, 5, 6, 7, 9, 10, 12, 13, 15]. We use the same definition of running time of a broadcasting algorithm working for ad hoc radio networks as, e.g., in [12]. We say that the algorithm works in time t for networks of a given class if t is the smallest integer such that the algorithm informs all nodes of any network of this class in at most t steps. We do not suppose the possibility of spontaneous transmissions; i.e., only nodes which have already gotten the source message are allowed to send messages. Of course, since we are only concerned with upper bounds on broadcasting time, all our results remain valid if spontaneous transmissions are allowed. The format of all messages is the same: a node transmits the source message and the current step number. We denote by n the number of nodes in the network, by r an upper bound on label values, by D the radius of the network (the maximum length of a shortest directed path from the source to any other node), and by ∆ the maximum in-degree of a node in the network. We assume that r is linear in n (r = cn for some constant c). Among these parameters, only r is known to nodes of the network. 1.2. Related work. In many papers on broadcasting in radio networks (e.g., [1, 2, 16, 19, 17]), the network is modeled as an undirected graph, which is equivalent to the assumption that the directed graph, which models the network in our scenario, is symmetric. A lot of effort has been devoted to finding good upper and lower bounds on deterministic broadcast time in such radio networks under the assumption that nodes have full knowledge of the network. In [1] the authors proved the existence of a family of n-node networks of radius 2 for which any broadcast requires time Ω(log2 n), while in [16] it was proved that broadcasting can be done in time O(D + log5 n) for any n-node network of diameter D. (Note that for symmetric networks, diameter is of the order of the radius.) As for broadcasting in ad hoc symmetric radio networks, an O(n) algorithm assuming spontaneous transmissions was constructed in [9]. If spontaneous transmissions are precluded, the best currently known results on broadcasting in such networks are those from [18]: an algorithm with running time O(n log n) and a lower bound log n Ω(n log(n/D) ). Deterministic broadcasting in arbitrary directed radio networks was studied, e.g., in [6, 7, 8, 9, 10, 12, 13, 15]. In [8], a O(D log2 n)-time broadcasting algorithm was given for all n-node networks of radius D, assuming that nodes know the topology of the network. (The later algorithm from [16], giving upper bound O(D + log5 n) on broadcasting time, works only for undirected radio networks.) Other above-cited papers studied broadcasting time in ad hoc directed radio networks. The best known lower bound on this time is Ω(n log D), proved in [13]. As for the upper bounds, a series of papers presented increasingly faster algorithms, starting with time O(n11/6 ), in [9], then O(n5/3 log1/3 n) in [15], then O(n3/2 ) in [10], and finally O(n log2 n) in [12], which corresponds to the fastest algorithm, working
334
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
for ad hoc networks of arbitrary maximum degree, known before the present paper. In another approach, broadcasting time is studied for ad hoc radio networks of maximum degree ∆. This work was initiated in [6], where the authors con2 structed a broadcasting scheme working in time O(D log∆2 ∆ log2 n) for arbitrary nnode networks with radius D and maximum degree ∆. (While the result was stated only for undirected graphs, it is clear that it holds for arbitrary directed graphs, not just symmetric ones.) This result was further investigated, both theoretically and using simulations, in [7, 4]. On the other hand, a protocol working in time O(D∆ loglog ∆ n) was constructed in [3]. Finally, an O(D∆ log n log(n/∆)) protocol was described in [13] (for the case when nodes know n but not ∆). If n is also unknown, the algorithm from [13] works in time O(D∆ loga n log(n/∆)) for any a > 1. Finally, randomized broadcasting in ad hoc radio networks was studied, e.g., in [2, 19, 18, 14]. In [2], the authors give a simple randomized protocol running in expected time O(D log n+log2 n). We later improved this upper bound to O(D log(n/D) + log2 n) in [18] (see also [14]). In [19] it was shown that, for any randomized broadcast protocol and parameters D and n, there exists an n-node network of radius D, requiring expected time Ω(D log(n/D)) to execute this protocol. 1.3. Our results. Our main result is a deterministic broadcasting algorithm working in time O(n log n log D) for arbitrary n-node ad hoc radio networks of radius D. This improves the best currently known broadcasting time O(n log2 n) from [12], e.g., for networks of radius polylogarithmic in size. Also, for D∆ ∈ ω(n), this improves the upper bound O(D∆ log n log(n/∆)) from [13]. The best currently known lower bound on broadcasting time in ad hoc radio networks is Ω(n log D) [13]; hence our algorithm is the first to shrink the gap between bounds on deterministic broadcasting time for radio networks of arbitrary radius to a logarithmic factor. Our algorithm is nonconstructive in the same sense as the one from [12]. Using the probabilistic method, we prove the existence of a combinatorial object, which all nodes use in the execution of the deterministic broadcasting algorithm. (Since we do not count local computations in our time measure, such an object—the same for all nodes—could be found by an exhaustive search performed locally by all nodes without changing our result.) We also show a broadcasting algorithm working in time O(n log D) for complete layered n-node ad hoc radio networks of radius D. The latter complexity is optimal, due to the matching lower bound Ω(n log D), which was proved in [13] for this class of networks, even assuming that nodes know parameters n and D. The best previous upper bound on broadcasting time in complete layered n-node ad hoc radio networks of radius D was O(n log n) [12]. Hence we obtain a gain for the same range of values of D as before. If nodes do not know any upper bound on the size of the network, the upper bound O(n log2 n) from [12] remains valid, using a simple doubling technique, which probes possible values of n. In our case, the doubling technique cannot be used directly, since we deal with two unknown parameters, n and D. However, we can modify our algorithm in this case, obtaining running time O(n log n log log n log D), which still beats the time from [12], e.g., for networks of radius polylogarithmic in size. For D∆ ∈ Ω(n), this also improves the upper bound O(D∆ loga n log(n/∆)), for any a > 1, proved in [13] for the case of unknown n and ∆. Note added in proof. Recently, our upper bound O(n log n log D) on deterministic broadcasting time in arbitrary n-node ad hoc radio networks of radius D
BROADCASTING IN AD HOC RADIO NETWORKS
335
has been improved in [14] to O(n log2 D). As in our case, the algorithm in [14] is nonconstructive. 2. The broadcasting algorithm. In this section we show a deterministic broadcasting algorithm working in time O(n log n log D) for arbitrary n-node ad hoc radio networks of radius D. Recall that r is a linear upper bound on the number of nodes and that labels of all nodes are distinct integers from the interval [0, . . . , r]. Taking 2log r instead of r, we can assume that log r is a positive integer. The parameter r is known to all nodes. We first show our upper bound under the additional assumption that D is known to all nodes. At the end of this section, we show how this assumption can be removed without changing the result. We will use the Procedure Fast-Broadcasting, formally defined below, which intuitively works as follows. Communication is divided into stages of length 1 + log r. Current time is appended to all messages. Upon receiving a message, a node updates time and waits until the end of the current stage. This is the only adaptive part of the procedure. Then a sequence of transmissions is performed by any node v, based on a predefined vector T (v) of length O(r log r log D). This sequence of steps is interleaved with round-robin transmissions according to global time computed by every node which already got a message. (The role of round-robin transmissions is purely technical: the procedure could be modified by incorporating them in the description of vectors T (v), but separating these substeps improves clarity of analysis for bounded D and does not change asymptotic complexity of the procedure.) Given a 0-1 matrix T = [Ti (v)]i≤t;v≤r , where t = 3600 · (1 + log r) · r log D, we formally define the above-described procedure in the following way. Procedure Fast-Broadcasting(T ). After receiving the source message and the current step number a(1 + log r) + b for some parameters a, b such that 0 ≤ b ≤ log r and 0 < a(1 + log r) + b ≤ t, node v waits until step tv = (a + 1)(1 + log r) − 1. for i = tv + 1, . . . , t do Substep A. if Ti (v) = 1 then v transmits in step i. Substep B. if i ≡ v mod r then v transmits in step i. We now define the following random 0-1 matrix Tˆ = [Tˆi (v)]i≤t;v≤r . For all parameters a, b such that 0 ≤ b ≤ log r and 0 < a(1 + log r) + b ≤ t, we have Pr [Ta(1+log r)+b (v) = 1] = 1/2b , and all events Tˆi (v) = 1 are independent. The period consisting of steps a(1 + log r), . . . , (a + 1)(1 + log r) − 1 is called stage a. Algorithm Fast-Broadcasting consists of executing Procedure Fast-Broadcasting(Tˆ) for the above-defined random matrix Tˆ. Path-graphs and simple-path-graphs. In what follows, v0 denotes the source. In order to analyze Algorithm Fast-Broadcasting, we define the following classes of directed graphs. A path-graph consists of a directed path v0 , . . . , vk , where k ≤ D, possibly with some additional edges (vl , vl ), for l > l , and with some additional nodes v, whose only out-neighbors are among v1 , . . . , vk . The path v0 , . . . , vk is called the main path. A simple-path-graph consists of a directed path v0 , . . . , vk , where k ≤ D, with some additional nodes v, each of which has exactly one outneighbor, and this out-neighbor is among v1 , . . . , vk . For any path-graph G = (V, E), ¯ is the subgraph of G on the same set of nodes containing the main the graph G path and satisfying the condition that for every node v outside the main path, v has ¯ where l = max{l : (v, vl ) ∈ E}. By definition, for every exactly one neighbor vl in G, ¯ path-graph G, the graph G is a simple-path-graph. See Figure 1.
336
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
Intuitively, a path-graph corresponds to a directed path in a graph, together with all neighboring nodes that can influence transmissions from the source to the target. There can be as many as Θ(2nD ) such graphs. A simple-path-graph can be obtained from a path-graph by deleting all “backward edges” leading to the main path. Since every node in such a graph has only one out-neighbor, the number of simple-pathgraphs is much smaller, at most Θ(Dn ). We show that deleting all “backward edges” does not influence the speed of transmission from the source to the target.
G
v0
vl
vl+1
vl+2
vk = v
v0
vl
vl+1
vl+2
vk = v
G
¯ Fig. 1. Path-graph G and corresponding simple-path-graph G.
Adversarial models. In general, path-graphs do not satisfy our assumption that there is a directed path from the source v0 to any other node. Hence, for path-graphs, we modify our model of broadcasting as follows and call it the adversarial wake-up model. In this model the goal is not to wake up all processors, since the network may not be strongly connected, but to wake up the last node on the main path. We assume that nodes outside the main path also get the source message but are woken up by an adaptive adversary in various time steps not exceeding t. More precisely, the adversary can wake up any node v in the main path in any step tv ≤ t, providing v with the source message and step number tv . The adversary acts according to some wake-up pattern Wm from the family {Wm }m≤M of all possible wake-up patterns. A wake-up pattern is a function assigning to every vertex v a step number tv ≤ t. The analysis of the progress of the algorithm working on path-graphs is relatively easy to extend to arbitrary graphs (see the proof of Theorem 5). This is not the case with simple-pathgraphs, which may be too “trimmed” compared to an arbitrary graph. To overcome this obstacle we introduce a slightly stronger notion of the adversarial model, called the simple-adversarial model, which is the adversarial model with the following rule: If node vl in the main path is not the rightmost node in the main path having woken-up in-neighbors, then vl may be woken up only according to the adversarial wake-up pattern (not by some of its transmitting neighbors!).
337
BROADCASTING IN AD HOC RADIO NETWORKS
Broadcasting under the simple-adversarial model in the simple-path-graph introduces similar “effects” to the presence of “backward edges” (we prove it in Lemma 4). For other applications of adversarial models and path-graphs, see also [11]. For every wake-up pattern Wm and stage a of Procedure Fast-Broadcasting(T ), we define an integer fa (m) as follows (independently of the presence of an adversary or simple adversary). If node vk has the source message after stage a, we fix fa (m) = k. Otherwise, fa (m) = l, where vl+1 is the last node on the main path which does not have the source message after stage a but has an in-neighbor having the source message after stage a, assuming that the pattern Wm is used. See Figure 2.
v0
vl
vl+1
vl+2
-
nodes having the source message
-
nodes not having the source message
vk = v
Fig. 2. Definition of fa (m). Illustration for fa (m) = l.
We now describe a high-level outline of the proof of our upper bound. First, using the probabilistic method, we show the existence of a matrix T such that Procedure Fast-Broadcasting(T ), applied to any simple-path-graph and to any wake-up pattern under the simple-adversarial model, delivers the source message to the last node of the main path in time O(n log n log D). Next, we show that the same is true for any path-graph under the adversarial model. Finally, we show that Procedure FastBroadcasting(T ) completes broadcasting in all graphs in time O(n log n log D). Fix an integer a and consider the simple-adversarial model. Suppose that Tˆi (v) are fixed for all i < (a + 1)(1 + log r). Our first goal is to show that, for a fixed simplepath-graph G under the simple-adversarial model, the set {m : fa (m) < fa+1 (m) ≤ k} contains a constant fraction of values {m : fa (m) < k}, for any stage a, with high probability. More precisely, we call stage a+1 successful if either {m : fa (m) < k} = ∅ 1 or |{m : fa (m) < fa+1 (m) ≤ k}| ≥ 36 · |{m : fa (m) < k}| in the execution of Algorithm Fast-Broadcasting. Lemma 1. With probability at least 0.1, stage a + 1 is successful. Proof. We consider only substeps of type A. Let X = {m : fa (m) < k}. Let Xl = {m : fa (m) = l} for l = 1, . . . , k − 1. Observe that {Xl }k−1 l=1 is a partition
338
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
of X. Consider the set Xl for a fixed l < k. For each m ∈ Xl , let Hm be the set of all in-neighbors of vl having the source message at the end of stage a. By the definition of fa (m), which is equal to l, we have Hm = ∅ for all m ∈ Xl . Let Xlj , for j = 0, . . . , log r, be the set of all m ∈ Xl such that 2j−1 < |Hm | ≤ 2j . Consider step (a + 1)(1 + log r) + j in stage a + 1. In this step, every in-neighbor v ∈ Hm of vl transmits with probability 1/2j . If j = 0, then |Hm | = 1 for all Xl0 . Hence, with probability 1, node vl receives the source message in step (a + 1)(1 + log r), and consequently fa+1 (m) ≥ l > fa (m). If j > 0, then the probability that exactly one node in Hm transmits in step (a + 1)(1 + log r) + j, for a fixed m ∈ Xlj , is at least |Hm |−1 2 j 1 1 1 1 1 1 1 1− j > ≥ · = . |Hm | · j · 1 − j 2 2 2 2 2 4 8 Using the Markov inequality applied to the number of sets Hm (for m ∈ Xlj ) for which exactly one node transmits in step (a + 1)(1 + log r) + j, we obtain that, with 1 probability at least 0.1, |Xlj ∩ {m : fa (m) < fa+1 (m) ≤ k}| ≥ 36 |Xlj |. Indeed, for any m ∈ Xlj , define the random binary variable χm as follows: χm = 0 if andonly if vl receives the source message by step (a + 1)(1 + log r) + j. Define χ = m∈X j χm . Since Pr (χm = 1) < 7/8, the expected value of χ is smaller than j 7 8 |Xl |,
l
and consequently
Pr
35 j 10 7 j 10 χ≥ |X | = Pr χ ≥ · |X | ≤ Pr χ ≥ · E(χ) ≤ 0.9 . 36 l 9 8 l 9
j Hence Pr (χ < 35 36 |Xl |) ≥ 0.1. Observe that, for different values j, the inequalities |Xlj ∩{m : fa (m) < fa+1 (m) ≤ 1 k}| ≥ 36 |Xlj | can be proved using disjoint steps and therefore disjoint sets of random 1 |Xl | independent trials. Consequently, |Xl ∩ {m : fa (m) < fa+1 (m) ≤ k}| ≥ 36 with probability at least 0.1, and, for the same reason, we have |X ∩ {m : fa (m) < 1 |X| with probability at least 0.1, which completes the proof. fa+1 (m) ≤ k}| ≥ 36 Note that in Lemma 1 we used the rule of radio broadcasting only to transmit to node vl+1 , which is the rightmost node in the main path having some active in-neighbor, so the assumptions of the simple-adversarial wake-up model are satisfied. The next lemma implies that in Algorithm Fast-Broadcasting under the simpleadversarial model the last node of the main path of a simple-path-graph gets the source message by step O(n log n log D) with probability at least 1 − (0.45)n log D . Lemma 2. Fix a simple-path-graph G and consider all wake-up patterns under the simple-adversarial wake-up model. By stage 3600 · n log D, the number of successful stages is at least 72D log n with probability at least 1 − (0.45)n log D . This number of successful stages is sufficient to deliver the source message to node vk . Proof. We consider only substeps of type A. Consider 3600 · n log D consecutive stages since the beginning of Algorithm Fast-Broadcasting. By Lemma 1, stage a is successful with probability at least 0.1; moreover, this probability is at least 0.1 independently of successes in other stages. Note, however, that such events are not independent; only conditional probabilities of success are at least 0.1. Hence the commonly used probabilistic inequalities, such as Chernoff-type bounds, cannot be used in our case. We present short and simple calculations to avoid using more advanced probabilistic bounds for conditional probabilities.
BROADCASTING IN AD HOC RADIO NETWORKS
339
The probability that among 3600n log D consecutive stages at most 72D log n are successful is at most 3600n log D−k 72D log n 3600n log D 9 · 10 k k=0 3600n log D 3600n log D−1 3600n log D 9 3600n log D 9 ≤ · + · 10 10 0 1 72D log n 3600n log D−k 3600n log D+1 (3600n log D) 9 · + k k (3600n log D − k)3600n log D−k 10 k=2 3600n log D 9 ≤ 4001n log D · 10 3600n log D−k k 72D log n k 9 3600n log D · 1+ + 3600n log D · 10 3600n log D − k k k=2 3600n log D 9 ≤ 4001n log D · 10 72n log D 49·72n log D 9 50 3600n log D + 72D log n · 3600n log D · · 72n log D 10 49 3600n log D n log D 9 ≤ 4001n log D · + 72D log n · 3600n log D · 5072 · (0.92)49·72 , 10 b
which is at most (0.45)n log D , for sufficiently large n. We used the inequalities ebb ≤ x b+1 is increasing for 0 < x ≤ Ce for b! ≤ b eb for b ≥ 2 and the fact that function Cx positive constant C. We also used the inequality logDD ≤ logn n . In order to complete the proof, we show that if there are at least 72D log n successful stages by stage a, then {m : fa (m) < k} = ∅. Let ax , for x = 1, . . . , log n, be the first stage after 72D · x successful stages. It is enough to prove, by induction on x, that |{m : fax (m) < k}| < n/2x . For x = 1 this is straightforward. Assume that this inequality is true for x. We show it for x + 1. Suppose the contrary: |{m : fax+1 (m) < k}| ≥ n/2x+1 . It follows that during each successful stage b, where x+1
ax ≤ b < ax+1 , at least n/236 values fb (m) are smaller than fb+1 (m). Since in stage ax there were fewer than n/2x such values and each of them may increase at most D times, we obtain that in stage ax+1 the set {m : fax+1 (m) < k} would have fewer than n 2x · D =1 n 36·2x+1 · 72D elements, which contradicts the assumption that |{m : fax+1 (m) < k}| > n/2x+1 . Lemma 3. There exists a matrix T of format r × 3600r(1 + log r) log D such that, for any n-node simple-path-graph G of radius at most D and any wake-up pattern, Procedure Fast-Broadcasting(T ) delivers the source message to the last node of the main path of G in 3600n log D stages for sufficiently large n. Proof. Since r is linear in n, we have r = cn for some constant c. Knowledge of c is not necessary in the analysis, but, since we do not know this constant, the proof has to be split into two cases.
340
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
First, consider D such that log D > 20(1 + c). In this case we consider only substeps of type A. There are at most D r n · · k! · k n−k ≤ Dαn n k
k=1
different simple-path-graphs G with n nodes and radius at most D for some positive constant α < 1.1. This is because r n · · k! · k n−k ≤ 2r · 2n · k n = 2n(1+c)+n log k ≤ 2n(1+c)+n log D < D1.05·n n k for any k ≤ D, and consequently D r n · · k! · k n−k ≤ D · D1.05·n < D1.1·n n k
k=1
for sufficiently large n (n > 20). Let Tˆ be the random matrix defined previously. By Lemma 2, the probability that Algorithm Fast-Broadcasting working on Tˆ delivers the source message to the last node of the main path of G by stage 3600n log D, for all simple-path-graphs G and all wake-up patterns Wm , is at least 1− (0.45)n log D ≥ 1 − Dαn · (0.45)n log D > 1 − D1.1n · (0.45)n log D > 0 , G
where the sum is taken over all simple-path-graphs G with n nodes chosen from r labels, and of radius at most D. Using the probabilistic method we obtain that there is a matrix T satisfying the lemma. Next, consider D such that log D ≤ 20(1 + c). In this case we consider only substeps of type B. Since D is constant by step D · r ∈ O(n), every node of the main path will receive the source message by the round-robin argument. This concludes the proof. For every wake-up pattern Wm and every step i of Procedure Fast-Broadcasting(T ), we define an integer fi (m) as follows by analogy to fa (m). If node vk has the source message after step i, we fix fi (m) = k. Otherwise, fi (m) = l, where vl+1 is the last node on the main path which does not have the source message after step i but has a neighbor having the source message after step i, assuming that pattern Wm is used. Obviously fa (m) = f(a+1)(1+log r)−1 (m). Note that the above definition, similar to the definition of fi , may be applied to the case without adversary or under simple adversary or normal adversary. Lemma 4. Fix a path-graph G and a matrix T . For any wake-up pattern Wm and any step i, values fi (m) are the same for network G under the adversarial model and ¯ under the simple-adversarial model. Consequently, for any stage a, valfor network G ¯ ues fa (m) are the same for network G under the adversarial model and for network G under the simple-adversarial model. Proof. We consider two executions of Procedure Fast-Broadcasting(T ): the first ¯ under the simpleon graph G under the adversarial model and the second on graph G adversarial model. The idea of the proof is to overcome two major differences between the two executions: additional (“backward”) edges in graph G and the additional communication rule in the second execution under the simple adversary. We have to
BROADCASTING IN AD HOC RADIO NETWORKS
341
show that these two differences do not influence the “front” (rightmost active layer) ¯ we adopt the of computation in these two executions. For H equal to G or to G, following notation: • Nl [H] is the set of in-neighbors of vl in H; • Mj [H] is the set of nodes in H which have the source message after step j; • fi (m)[H] has the meaning defined before for Procedure Fast-Broadcasting(T ) working on H. In order to prove the lemma, it is enough to prove the following invariant after step i of Procedure Fast-Broadcasting(T ): ¯ = l, Ai : fi (m)[G] = fi (m)[G] ¯ ∩ Mi [G]. ¯ Bi : Nl [G] ∩ Mi [G] = Nl [G] We prove the invariant by induction on i. For i = 1 it is straightforward. Assume Ai and Bi hold. We prove Ai+1 and Bi+1 . ¯ = l. Proof of Ai+1 . Let fi (m)[G] = l. By assumption Ai , we get also fi (m)[G] In view of the adversarial and simple-adversarial models of the algorithm description and of assumption Bi , node vl gets the source message after step i in G under the ¯ under the adversarial model if and only if it gets the source message after step i in G simple-adversarial model. Since, for all l > l, vl does not have an in-neighbor which holds the source message after step i, for both executions, in view of Ai , we conclude ¯ that vl does not have the source message after step i + 1 in either G or in G. ¯ Suppose that fi+1 (m)[G] > fi+1 (m)[G]. Hence there exists a node v outside the main path, which is woken up after step i + 1, that is an in-neighbor of vfi+1 (m)[G] ¯ in G but is not an in-neighbor of vfi+1 (m)[G] in G. This is a contradiction because, ¯ for some l > f (m)[G]; hence ¯ v has an out-neighbor vl in G by definition of G, i+1 ¯ fi+1 (m)[G] ≥ l > fi+1 (m)[G]. ¯ Hence there exists a node v outside the (m)[G] < fi+1 (m)[G]. Suppose that fi+1 main path, which is woken up after step i + 1, that is an in-neighbor of vfi+1 ¯ in (m)[G] ¯ ¯ G but is not an in-neighbor of vfi+1 ¯ in G. This contradicts the fact that G is a (m)[G] subgraph of G. ¯ = l for some Proof of Bi+1 . We have proved that fi+1 (m)[G] = fi+1 (m)[G] ¯ ¯ l ≥ l. We show that Nl [G] ∩ Mi+1 [G] = Nl [G] ∩ Mi+1 [G]. Notice that for l > l , ¯ by definitions of f (m)[G] and f (m)[G]. ¯ vl ∈ / Mi+1 [G] and vl ∈ / Mi+1 [G] i+1 i+1 If vl −1 ∈ Nl [G] ∩ Mi+1 [G], then from the proof of invariant Ai+1 we get l − 1 = l ¯ ∩ Mi+1 [G] ¯ because this node got the source message in but also vl −1 = vl ∈ Nl [G] step i + 1 (in view of the adversarial and simple-adversarial models of the algorithm description and of assumption Bi ). ¯ If v is outside the main path and v ∈ Nl [G] ∩ Mi+1 [G], then v ∈ Mi+1 [G] ¯ because the same wake-up pattern is used. Also v ∈ Nl [G] because otherwise there ¯ which contradicts the inequality would exist an index l > l such that v ∈ Nl [G], ¯ fi+1 (m)[G] = l < l . ¯ ∩ Mi+1 [G], ¯ then from the proof of invariant Ai+1 we get l − 1 = l If vl −1 ∈ Nl [G] and vl −1 = vl ∈ Nl [G] ∩ Mi+1 [G], similar to the above argument for the dual case ¯ (where G is interchanged with G). ¯ ∩ Mi+1 [G], ¯ then, since G ¯ is a If v is outside the main path and v ∈ Nl [G] subgraph of G, we have v ∈ Nl [G]. Since the same wake-up pattern is used in G, we have v ∈ Mi+1 [G]. Theorem 5. There is a matrix T of format r × 3600r(1 + log r) log D such that, for every n-node graph G of radius D, Procedure Fast-Broadcasting(T ) performs broadcasting on G in time O(n log n log D).
342
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
Proof. Take the matrix T from Lemma 3. Suppose the contrary: after step 3600n(1 + log r) log D, there is a node v without the source message. Consider the subgraph H of G, which contains a shortest directed path v0 , . . . , vk = v from the source to node v, with all induced edges between nodes of this path, and all those inneighbors v of nodes v1 , . . . , vk which received the source message by step 3600n(1 + log r) log D, together with the corresponding arcs (v , vl ). By definition, H is a path¯ is a simple-path-graph. By Lemma 3 we obtain that v received graph, and hence H ¯ by step 3600n(1 + log r) log D. (We need to apply Lemma 3, the source message in H under the simple-adversarial model, to the wake-up pattern “generated” by Procedure ¯ is woken up, under the simpleFast-Broadcasting(T ) working on G: every node in H adversarial wake-up model, in the time step in which it gets the source message for the first time when Procedure Fast-Broadcasting(T ) is executed on G.) From Lemma 4, we obtain that the same is true in H under the adversarial model. Since the considered wake-up pattern is generated by Procedure Fast-Broadcasting(T ) working on G, we conclude that v received the source message by step 3600n(1 + log r) log D when Procedure Fast-Broadcasting(T ) is executed on G. This is a contradiction, which concludes the proof. We conclude this section by observing that the assumption that radius D is known to all nodes can be removed without changing our result. It is enough to i apply Algorithm Fast-Broadcasting for parameter r and for eccentricities 22 for i = 1, . . . , log log r . Broadcasting will be completed after the execution of Algorithm Fast-Broadcasting for i = log log D . The total time will be at most four times larger than the running time of Algorithm Fast-Broadcasting when D is known. Observe that using only substeps of type B in Procedure Fast-Broadcasting(T ) we can trivially get the estimate O(nD) on broadcasting time. Hence the upper bound from Theorem 5 can be refined to O(n · min{log n log D, D}). 3. Broadcasting with unknown bound on network size. In this section we show how our estimate of broadcasting time changes if the nodes do not know any parameters of the network: neither its radius D nor any upper bound r on the number of nodes. Denote by AF B(x, y) the execution of Algorithm Fast-Broadcasting for the upper bound x on the size of the network and for radius y, running in time 3600x(1 + log x) log y (it exists by Theorem 5). We construct the following. Algorithm Modified-Fast-Broadcasting. i := 1 repeat forever i := i + 1, l := 1 l while 22 < 2i−l do l AF B(2i−l , 22 ) (1) l := l + 1 AF B(2i−l , 2i−l ) (2) The above algorithm uses a doubling technique to estimate unknown parameters D and r. Since the running time of AF B(x, y) depends superlinearly on the upper bound x on the size of the network and logarithmically on radius y, we increase the estimate of the size exponentially and the estimate of the radius doubly exponentially. Of course, since we know neither r nor D, the loop repeat is executed without termination. As defined in the introduction, time of broadcasting for a given network is the smallest integer t such that all nodes of the network are informed after step t.
BROADCASTING IN AD HOC RADIO NETWORKS
343
The following observations hold. 1. For every n-node graph G with parameters r and D, broadcasting on G log log D is completed by the time when algorithm AF B(2log r , min{2log r , 22 }) is executed. This happens for i = log r + log log D and l = log log D , either in (1) if log r > 2log log D or in (2) otherwise. l 2. ABF (2i−l , 22 ) performs broadcasting in 3600 · 2i−l · (i − l + 1) · 2l steps. ABF (2i−l , 2i−l ) performs broadcasting in 3600 · 2i−l · (i − l + 1) · (i − l) steps. l 3. Fix i. Let l0 be the largest index l for which AF B(2i−l , 22 ) is executed in (1). The execution of loop “while” lasts at most l0
log i
3600 · 2i−l · (i − l + 1) · 2l ≤
l=1
3600 · 2i−l · (i − l + 1) · 2l ≤ 3600 · log i · 2i · i
l=1
steps. The execution of (2) lasts 3600 · 2i−l0 −1 · (i − l0 − 1 + 1) · (i − l0 − 1) ≤ 3600 · 2i−l0 −1 · (i − l0 + 1) · 2l0 +1 steps. The latter inequality follows from the condition 22 have
l0
≥ 2i−l0 −1 . We further
3600 · 2i−l0 −1 · (i − l0 + 1) · 2l0 +1 = 3600 · 2i−l0 (i − l0 + 1) · 2l0 ≤ 3600log i · 2j · i . 4. The total number of steps until the execution of “repeat” for i = i0 is at most i0
2 · 3600 · log i · 2i · i ≤ 7200 · 2i0 +1 · i0 · log i0 ,
i=2
since (2) lasts at most the same time as the last preceding execution of (1). 5. For any r and D, the total running time of Algorithm Modified-Fast-Broadcasting is at most 7200 · 2log r+log log D+1 · (log r + log log D ) · log(log r + log log D ) , which is of order O(r log r log log r log D) = O(n log n log log n log D). This proves the following theorem. Theorem 6. Algorithm Modified-Fast-Broadcasting completes broadcasting on any n-node network of radius D in time O(n log n log log n log D), even when nodes do not know any parameters of the network or any bound on its size. Similar to section 2, the above upper bound on broadcasting time can be refined to O(n · min{log n log log n log D, D}). 4. Optimal broadcasting in complete layered networks. In [13] the authors prove a lower bound Ω(n log D) on deterministic broadcasting time on any n-node network of radius D. This is done using complete layered networks. All nodes of such networks can be partitioned into layers L0 , L1 , . . . , LD where L0 consists of the source and the set of directed edges is {(v, w) : v ∈ Li , w ∈ Li+1 , i = 0, 1, . . . , D − 1}. More precisely, it is shown in [13] that for every deterministic broadcasting algorithm there is a complete layered n-node network of radius D, such that this algorithm requires time Ω(n log D) to perform broadcast on this network. This result holds even when n and D are known to all nodes.
344
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
In this section we present a deterministic broadcasting algorithm which works on every complete layered n-node network of radius D in time O(n log D), and thus it is optimal. Hence, any lower bound sharper than Ω(n log D), on broadcasting time in arbitrary radio networks, would have to be established for graphs more complicated than complete layered networks. Our result is also an improvement of the upper bound O(n log n), proved in [12] for n-node complete layered networks. We use the following definition of an (r, k)-selective family. A family F of subsets of R is called (r, k)-selective, for k ≤ r, if, for every subset Z of {1, . . . , r}, such that |Z| ≤ k, there is a set F ∈ F and element z ∈ Z such that Z ∩ F = {z}. Lemma 7 (see [13]). For every r ≥ 2 and k ≤ r, there exists an (r, k)-selective family F of size O(k log((r + 1)/k)). Let Fi denote an (r, 2i )-selective family for i = 1, . . . , log r. By Lemma 7, we can assume that φi = |Fi | ≤ α2i log((r + 1)/2i ) for some constant α > 0 and for all i = 1, . . . , log r. Let Fi = {Fi (1), . . . , Fi (φi )}. Algorithm Complete-Layered. for i = 1, . . . , log r do for j = 1, . . . , φi do if v ∈ Fi (j) and v got the source message then v transmits for j = 1, . . . , r do if v = j and v got the source message then v transmits. Theorem 8. Algorithm Complete-Layered completes broadcasting in O(n log D) time for any n-node complete layered network of radius D. Proof. For D = 1 the proof is obvious. Assume D ≥ 2. Fix an n-node complete layered network G of radius D. Let Ll denote the lth layer of G, and let dl = |Ll |, for l = 0, . . . , D. Let tl denote the step in which all nodes in Ll received the source message for the first time. Claim. tl+1 − tl ≤ 4αdl log 2(r + 1)/dl for every l = 0, . . . , D − 1. In step tl + 1 all nodes in Ll start transmitting. After at most log dl
i=1
log dl
fi ≤ α
2i log((r + 1)/2i )
i=1
⎡
log dl
≤ α⎣
log dl
2i log(r + 1) −
i=1 log dl +1
≤α 2
⎤ i · 2i ⎦
i=1
log(r + 1) − (2log dl +1 log dl − 2log dl +1 + 1)
2(r + 1) dl 2(r + 1) ≤ 4αdl log dl ≤ α2log dl +1 log
steps, all nodes in Ll complete transmissions according to the selective family Flog dl . By definition of Flog dl , there is a step among tl + 1, . . . , tl + 4αdl log 2(r+1) dl such that exactly one node in Ll transmits in this step. Consequently all nodes in Ll+1 get the source message by step tl + 4αdl log 2(r+1) dl . This completes the proof of the claim.
345
BROADCASTING IN AD HOC RADIO NETWORKS
Since
D l=0
tD =
dl = n and t0 = 0, we have
D−1
(tl+1 − tl )
l=0
= 4α
D−1
≤
4α
D−1
dl log
2(r + 1) dl
≤
4α log
l=0
dl
log
(r + 1) ddl l
l=0
≤ 4α(n − dD ) log
+ dl
(r + 1)n−dD dl ΠD−1 l=0 dl
+ 4αn
r+1 + 4αn . (n − dD )/D
We used the fact that D−1 l=0
ddl l
≥
n−dD
n − dD
D−1 l=0
dl ·
1 dl
=
n − dD D
n−dD ,
which follows from the inequality between geometric and harmonic averages. Since, for D ≥ 2, the function x · log D(r+1) is increasing for x ≤ r + 1, we have x 4α(n − dD ) log
r+1 r+1 + 4αn ∈ O(n log D) . + 4αn ≤ 4αn log (n − dD )/D n/D
5. Conclusion. We presented a deterministic broadcasting algorithm working in time O(n log n log D) for arbitrary n-node ad hoc radio networks of radius D, thus shrinking the gap between the upper bound and the best currently known lower bound Ω(n log D) [13] on broadcasting time in ad hoc radio networks to a logarithmic factor. While our upper bound has been recently improved to O(n log2 D) in [14], a logarithmic gap between the bounds still remains. Closing this gap is a challenging open problem. REFERENCES [1] N. Alon, A. Bar-Noy, N. Linial, and D. Peleg, A lower bound for radio broadcast, J. Comput. System Sci., 43 (1991), pp. 290–298. [2] R. Bar-Yehuda, O. Goldreich, and A. Itai, On the time complexity of broadcast in radio networks: An exponential gap between determinism and randomization, J. Comput. System Sci., 45 (1992), pp. 104–126. [3] S. Basagni, D. Bruschi, and I. Chlamtac, A mobility-transparent deterministic broadcast mechanism for ad hoc networks, IEEE/ACM Trans. Networking, 7 (1999), pp. 799–807. [4] S. Basagni, A. D. Myers, and V.R. Syrotiuk, Mobility-independent flooding for real-time multimedia applications in ad hoc networks, in Proceedings of the IEEE Emerging Technologies Symposium on Wireless Communications & Systems, Richardson, TX, 1999. [5] D. Bruschi and M. Del Pinto, Lower bounds for the broadcast problem in mobile radio networks, Distrib. Comput., 10 (1997), pp. 129–135. ´ , Making transmission schedules immune to topology changes in [6] I. Chlamtac and A. Farago multi-hop packet radio networks, IEEE/ACM Trans. Networking, 2 (1994), pp. 23–29. ´ , and H. Zhang, Time-spread multiple access (TSMA) protocols for [7] I. Chlamtac, A. Farago multihop mobile radio networks, IEEE/ACM Trans. Networking, 5 (1997), pp. 804–812. [8] I. Chlamtac and O. Weinstein, The wave expansion approach to broadcasting in multihop radio networks, IEEE Trans. Communications, 39 (1991), pp. 426–433. [9] B.S. Chlebus, L. Gasieniec, A. Gibbons, A. Pelc, and W. Rytter, Deterministic broadcasting in unknown radio networks, Distrib. Comput., 15 (2002), pp. 27–38. ¨ [10] B.S. Chlebus, L. Ga ¸ sieniec, A. Ostlin, and J.M. Robson, Deterministic radio broadcasting, in Proceedings of the 27th International Colloquium on Automata, Languages and Programming (ICALP’2000), Geneva, Switzerland, 2000, Lecture Notes in Comput. Sci. 1853, U. Montanari, J.D.P. Rolim, and E. Welzl, eds., Springer-Verlag, Berlin, 2000, pp. 717–728.
346
DARIUSZ R. KOWALSKI AND ANDRZEJ PELC
[11] M. Chrobak, L. Ga ¸ sieniec, and D. Kowalski, The wake-up problem in multi-hop radio networks, in Proceedings of the Fifteenth Annual ACM-SIAM Symposium on Discrete Algorithms, New Orleans, LA, 2004, pp. 985–993. [12] M. Chrobak, L. Ga ¸ sieniec, and W. Rytter, Fast broadcasting and gossiping in radio networks, in Proceedings of the 41st Symposium on Foundations of Computer Science (FOCS’2000), Redondo Beach, CA, pp. 575–581. [13] A.E.F. Clementi, A. Monti, and R. Silvestri, Selective families, superimposed codes, and broadcasting on unknown radio networks, in Proceedings of the Twelfth Annual ACMSIAM Symposium on Discrete Algorithms, Washington, DC, 2001, pp. 709–718. [14] A. Czumaj and W. Rytter, Broadcasting algorithms in radio networks with unknown topology, in Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science (FOCS’2003), Cambridge, MA, pp. 492–501. [15] G. De Marco and A. Pelc, Faster broadcasting in unknown radio networks, Inform. Process. Lett., 79 (2001), pp. 53–56. [16] I. Gaber and Y. Mansour, Centralized broadcast in multihop radio networks, J. Algorithms, 46 (2003), pp. 1–20. [17] D. Kowalski and A. Pelc, Deterministic broadcasting time in radio networks of unknown topology, in Proceedings of the 43rd Annual IEEE Symposium on Foundations of Computer Science (FOCS’2002), Vancouver, BC, Canada, pp. 63–72. [18] D. Kowalski and A. Pelc, Broadcasting in undirected ad hoc radio networks, in Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (PODC’2003), Boston, MA, pp. 73–82. [19] E. Kushilevitz and Y. Mansour, An Ω(D log(N/D)) lower bound for broadcast in radio networks, SIAM J. Comput., 27 (1998), pp. 702–712.