Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.

Similar presentations


Presentation on theme: "CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch."— Presentation transcript:

1 CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch

2 Discrete Algs for Mobile Wireless Sys2 Lecture 12  Topic: Broadcast in General Networks  Sources: Bar-Yehuda, Goldreich, Itai. Time complexity of broadcast. Bar-Yehuda, Goldreich, Itai. Efficient emulation of single-hop radio network on multi-hop radio network. Kowalski, Pelc. Time of deterministic broadcasting. MIT 6.885 Fall 2008 slides

3 Discrete Algs for Mobile Wireless Sys3 Network-Wide Broadcast  Broadcasting a message from a known source node to all other nodes in a fixed network.  Network = connected, undirected graph, edge between neighbors iff they can communicate directly via single-hop broadcast.  Common task for sensor networks, other ad hoc networks.  Has also been studied extensively by theoreticians.  We’ll look at several theoretical papers, see whether the results have practical significance.

4 Discrete Algs for Mobile Wireless Sys4 Model Assumptions  Unknown network topology---each node knows just local information, typically its own id and sometimes those of its neighbors  Slot-based (synchronous)  Strong assumptions about collision behavior: Receiver definitely does not receive any message Receiver cannot distinguish collision vs. idle  A weaker model: Receiver might receive one of the messages correctly.  Deterministic and randomized models.  The problem: Obtain good upper and lower bounds for the amount of time required to complete a broadcast.

5 Discrete Algs for Mobile Wireless Sys5 Results  [Bar-Yehuda, Goldreich, Itai 1]: Randomized algorithm, with completion time O((D + log(n/  )) log n) slots, with probability at least 1 – .  D = max distance between source node and any other node.  n = total number of nodes in the network.   = arbitrary positive real. Deterministic lower bound,  (n) slots.  For the weaker collision model.  Claim exponential (in n) gap between randomized and deterministic complexity.

6 Discrete Algs for Mobile Wireless Sys6 Results  [Bar-Yehuda, Goldreich, Itai 2]: Simpler paper using ideas from [BGI1]. Randomized algorithm to emulate any algorithm for a single-hop network with collision detection, in a multi-hop network with no CD. Application to leader election.

7 Discrete Algs for Mobile Wireless Sys7 More Results  [Kowalski, Pelc]: Hard, carefully written paper, deals with deterministic case only. Show that [BGI1] lower bound is incorrect, with a O(log n) algorithm for the graphs in [BGI1]  Cf. errata web page by B, G and I Sublinear (in n) time algorithms for all graphs of small max distance D  time o(n) for graphs with D = o(log log n) Lower bound of  (n 1/4 ) for graphs with D = 4  again claim exponential gap between randomized and deterministic complexity.

8 Discrete Algs for Mobile Wireless Sys8 [BGI1] Randomized Algorithm  Review of communication model: In each slot, each node chooses whether to transmit, receive, or be inactive. If node u is a receiver in slot k and exactly one of u’s neighbors in the graph transmits in slot k, then u receives the message. Otherwise (if u is a receiver and 0 or >1 or its neighbors transmits, or if u is not a receiver), then u receives nothing (  ). No collision information!

9 Discrete Algs for Mobile Wireless Sys9 [BGI1] Randomized Algorithm  Knowledge of nodes: All node programs are identical. Nodes know a “close” upper bound N on n. Nodes know an upper bound  on maximum node degree.  = arbitrary positive real, known to all nodes.  Randomized model: Nodes can make random choices of what to do next.  The broadcast problem: A single message, starting at node 0, must reach all nodes (with high probability).

10 Discrete Algs for Mobile Wireless Sys10 The Decay Subroutine Decay(k,m): (k ≥ 1) repeat transmit m coin := 0 or 1, with equal probability k := k - 1 until coin = 0 or k = 0  At each slot, every node chooses whether to continue transmitting or not, with probability ½.  So the number of senders is approximately halved at each slot.  In any case, cut off the sequence of tries after k steps.

11 Discrete Algs for Mobile Wireless Sys11 Properties of Decay  Suppose d nodes (say, neighbors of a fixed node y) execute Decay(k,m) in synch, starting with slot 1. Define: P(k,d) = probability that, at some slot ≤ k, one of the d nodes transmits alone (and thus y receives a msg). P( ,d) = lim k  P(k,d) = probability that one of the nodes transmits alone, if attempts continue forever.  Then P(k,0) = 0 and P(k,1) = 1.

12 Discrete Algs for Mobile Wireless Sys12 Properties of Decay  Theorem 1 (a): For d  2, P( ,d)  2/3.  Proof: Recurrence: P( ,d) =  i=0 d C(d,i)2 –d P( ,i).  Sums, over all i, the probability that exactly i remain after one Decay step, multiplied by the probability of success if i remain. Solve the recurrence.

13 Discrete Algs for Mobile Wireless Sys13 Properties of Decay  Theorem 1 (b): For d  2, for k  2 log d, P(k,d)  ½.  Proof: Consider some small cases (d ≤ 5) “by inspection”. For d  6, note that P( ,i) ≤ P(k,d) + d 2 -k.  Probability of success ever ≤ probability of success within the first k slots plus probability that someone performs more than k slots.  Final term overestimates the probability that someone performs more than k slots. Solve the recurrence (relies on part (a)).

14 Discrete Algs for Mobile Wireless Sys14 [BGI1] Broadcast Algorithm  Decay guarantees that one competitor out of d is isolated within 2 log d slots, with at least a constant probability.  Now use Decay in a network broadcast protocol.  Need to guarantee success probability  1– , not just ½ or 2/3, so use it repeatedly.  Define: k = 2 log ,  an upper bound on degree, which will be a bound on the number of competitors in uses of Decay within Broadcast. t = log ( N /  ), N a bound on number of nodes.  Idea: Group slots into size k batches. Upon first receiving m, each node waits for the beginning of the next batch of slots, then runs Decay(k,m), t times.

15 Discrete Algs for Mobile Wireless Sys15 [BGI1] Broadcast Algorithm m arrives i*k(i+1)*k(i+2)*k(i+3)*k (i+t)*k(i+2)*k start Decay(k,m) start Decay(k,m) start Decay(k,m) start Decay(k,m) ….. execute Decay(k,m) t times

16 Discrete Algs for Mobile Wireless Sys16 [BGI1] Broadcast Algorithm k = 2 log , t = log (N /  ) Broadcast(m), for node 0: do t times: wait until time  0 mod k run Decay(k,m) Broadcast(m), for node u  0: wait to receive a message, say m; do t times: wait until time  0 mod k run Decay(k,m)

17 Discrete Algs for Mobile Wireless Sys17 A Scenario  Node 0 broadcasts successfully to both its neighbors, 1 and 2.  Then 1 and 2 broadcast simultaneously.  Message reaches nodes 3 and 5 successfully, but a conflict occurs at node 4. 0 1 2 3 4 5

18 Discrete Algs for Mobile Wireless Sys18 Algorithm Analysis  Claim: With probability at least 1– , all nodes receive m within O(D*k*t) = O(D*log(  )*log(N/  )) slots.  Proof idea (from proof of Lemma 2): For each node v, once a neighbor u receives the message, with probability at least ½, v will receive the message within one Decay execution by u. So with probability at most (1/2) t = (1/2) log(N/  ) =  / N, v will fail to receive it within t Decay executions by u. So with probability at most N (  / N) = , some node will fail to receive it within D*t sequential Decay execution times, or D*k*t slots.

19 Discrete Algs for Mobile Wireless Sys19 Algorithm Analysis  Theorem 4: Improved bound on slots: O( (log  ) (D + max{sqrt(D), sqrt(log(N/  )}*log(N/  )) = O((log N) (D + log(N/  )) = O((log n) (D + log(n/  ))

20 Discrete Algs for Mobile Wireless Sys20 Additional Properties of [BGI1] Broadcast Protocol  Only requires a loose bound on n  Doesn't require knowledge of neighbors  Constant local computation per time slot for each node  Expected number of message transmissions is at most 2n log (N/  )  Tolerates some topology changes / crash failures, as long as network remains connected  No acks are used so links need not be bidirectional  Decay subroutine can be used to compute a breadth- first search

21 Discrete Algs for Mobile Wireless Sys21 [BGI1] Lower Bound for Deterministic Algorithms   (n) slots. For the weaker collision model, in which a node may receive one of the actual messages sent. Choice of message vs.  is not under control of the algorithm, but of an “adversary”.  Algorithm would have to cope with either possibility.  Lower bound could take advantage of either.  Claim exponential (in n) gap between randomized and deterministic complexity. Seems valid for the weaker collision model, because their algorithm seems to work in the weaker model (LTTR).

22 Discrete Algs for Mobile Wireless Sys22 Overview of Lower Bound Proof  Define a special class of graphs C n  Define a class of "abstract" broadcast protocols Argue that any time lower bound for abstract broadcast protocols implies an asymptotically equal lower bound for general broadcast protocols  Show that any abstract broadcast protocol on some C n graph takes  (n) rounds reduce to a combinatorial problem called "hitting game"

23 Discrete Algs for Mobile Wireless Sys23 Special Graphs C n  Source connected to all Layer 1 nodes.  Sink connected to just the nodes in a set S  {1,…,n}.  Let G S denote C n graph based on S.  Problem: Message from 0 should reach all nodes. Since initial broadcast by 0 will reach all nodes in Layer 1, the real problem is simply to reach the sink. Algorithm must ensure that, at some time, only one node in S should send. In a lower bound proof, an adversary will try to prevent this from occurring. 0 sink, n+1 1 2 n Layer 1Layer 2Layer 0 S

24 Discrete Algs for Mobile Wireless Sys24 Abstract Broadcast Protocols  In every time slot, all nodes in Layer 1 are transmitters, and either the source or sink is a receiver (but not both).  Messages consist of (m, transmitter’s id, S-indicator). S-indicator = Boolean saying whether the transmitter is in S.  After each slot, all nodes in Layer 1 know whether someone in Layer 1 has transmitted alone; if so, they know the contents of the message. Immediate feedback. Strong assumption. OK for lower bound---strengthens the result.  Broadcast completed once a node in S manages to transmit alone. Optimistic---this doesn’t imply that the message has reached the sink, since this could be a slot where the source is a receiver. Weakens the requirements. OK for lower bound.

25 Discrete Algs for Mobile Wireless Sys25 Relationship Between Abstract and General Broadcast Protocols  Lemma 6: If there is a general protocol that terminates within k slots, on every graph in C n, then there is an Abstract Protocol that terminates within 2k slots.  I.e., if no abstract protocol can terminate within m slots, then no general protocol can terminate within m/2 slots.

26 Discrete Algs for Mobile Wireless Sys26 Execution of an Abstract Protocol  H k = P 1,…,P k, history through k slots.  Each P i is just the id of the unique node that transmitted alone at slot i, if any, else .  Each node’s decision about whether to transmit is a function of: its own id, its S-indicator, and the history so far.  Gives the node a lot of information, OK for a lower bound.  Express decision as a predicate .  Notation: T i = transmitters in slot i. T i 1 = Layer 1 nodes that would transmit in slot i if they were in S (for the given history), = nodes u for which  (u,1,H i-1 ) = 1. T i 0 = Layer 1 nodes that would transmit in slot i if they were not in S, = nodes for which  (u,0,H i-1 ) = 1.

27 Discrete Algs for Mobile Wireless Sys27 The Hitting Game  Game n, played on graphs in C n, Explorer vs. Referee. Referee picks a subset S  {1,…,n}. Explorer chooses query sets (moves) M 1, M 2,… Explorer tries to “hit” (isolate) an element of S. Explorer’s subsequent M i may depend on results of prior moves.  What happens at move i: If | M i  S | = 1, the game is over, Explorer wins. Otherwise, if | M i  S c | = 1, the Referee reveals the unique element in the intersection to the Explorer and the game continues. Otherwise, the Referee reveals nothing and the game continues.  Roughly like what happens in the Abstract Protocol: First condition corresponds to one member of S transmitting, which means the sink should receive the message. Second condition corresponds to the possibility that only one node broadcast (but someone in S could also broadcast).

28 Discrete Algs for Mobile Wireless Sys28 Relationship Between Hitting Game and Abstract Broadcast Protocol  Lemma 7: If there is an Abstract Protocol that terminates within k slots, on every graph in C n, then there is a 2k-move winning strategy for the Hitting Game.  I.e., if there is no m-move winning strategy for the Hitting Game, then there is no m/2- slot Abstract Broadcast Protocol for graphs in C n

29 Discrete Algs for Mobile Wireless Sys29 Lemma 7, Proof and Error  Lemma 7: If there is an Abstract Protocol that terminates within k slots, on every graph in C n, then there is a 2k-move winning strategy for the Hitting Game.  Error occurs here; see [BGI] errata sheet.  Need the weaker collision model, in which a node may receive a message.  Proof sketch: From any (worst-case) k-slot Abstract Broadcast Protocol, construct a 2k-move Hitting Game query sequence. Referee answers used to determine outcome of the slot (who receives what messages). Issue: Outcomes must be consistent with what is allowed in the Abstract Protocol model.  Requires the weaker model.  More detail:…

30 Discrete Algs for Mobile Wireless Sys30 Reduction from Abstract Broadcast Protocol to Hitting Game Strategy  Show (existentially but not constructively) that if there is a k-round ABP for C n, then there is a 2k-move winning strategy for the hitting game.  Fix any S (subset of nodes in Layer 1 of C n ).  Use an execution of the k-round ABP on the graph to construct hitting game strategy.  Each round of execution produces 2 moves of the hitting game  Because of nondeterminism in how collisions are detected, there can be many executions of same protocol on same network, so iteratvely specify execution of the protocol as we construct the strategy

31 Discrete Algs for Mobile Wireless Sys31 More on the Reduction  Let H be the first i-1 rounds of the execution of the ABP constructed so far  Use round i to determine moves 2i and 2i+1  Let T 1, set of nodes in S that are supposed to transmit in round i, be move 2i  Let T 0, set of nodes in S c that are supposed to transmit in round i, be move 2i+1  Specify outcome of the round (which nodes receive which messages)…

32 Discrete Algs for Mobile Wireless Sys32 Specifying Outcome of the Round  Must conform to the model of computation  If T 1  S is a singleton, say node p, then deliver the message from p to all recipients (ABP terminates)  If T 0  S c is a singleton, say node p, then deliver message from p to all recipients ==> not consistent with stronger model, since it could be that there are nodes in T1 also transmitting and thus colliding!  Otherwise, deliver no messages.

33 Discrete Algs for Mobile Wireless Sys33 Finishing Up Reduction  So execution constructed is "legal" (conforms to model of execution)  By assumption, it terminates within k rounds, i.e., exactly one node in S is chosen to transmit in a round  Thus within 2k moves the hitting game has won.  Now we can turn our attention solely to the hitting game…

34 Discrete Algs for Mobile Wireless Sys34  (n) Lower Bound on Hitting Game  Define an “adversary” that constructs a set S that “fools” a given sequence M 1,M 2,…of queries.  Issue: The Hitting Game allows an adaptive sequence of query sets, whereas the lower bound is proved only for an oblivious sequence of query sets.  They argue (in errata note) that the particular adversaries they construct, which beat all oblivious strategies, will also beat all adaptive strategies: Referee responses give no information to the Explorer. Suppose we had an adaptive strategy that did well against uninformative Referees. Then the particular sequence of moves it makes with the uninformative Referees is an oblivious strategy that does well against the same Referees.  Details omitted.


Download ppt "CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch."

Similar presentations


Ads by Google