170 likes | 280 Views
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems. Spring 2009 Prof. Jennifer Welch. Lecture 13. Topic: More Broadcast in General Networks Sources: Bar-Yehuda, Goldreich, Itai. Time complexity of broadcast.
E N D
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch
Lecture 13 • Topic: • More 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 Discrete Algs for Mobile Wireless Sys
[BGI 2] • Use their randomized Decay and Broadcast algorithms to solve other problems: • Emulate an algorithm designed for single-hop networks with collision detection, in an arbitrary network without collision detection. • Each round expands to O( log() (D + sqrt(D log(N/)) + log(N/) ) ) rounds, succeeds with probability 1-. • So the entire emulation works with high probability. • Apply this to run a known single-hop leader election algorithm [Willard] in a multi-hop network. Discrete Algs for Mobile Wireless Sys
The Two Models • Multi-hop: Same as the [BGI1] weak collision model: • Arbitrary connected undirected graph, synchronous rounds. • In each round, processor chooses whether to send or receive. • Weak collision behavior (may receive a message). • Single-hop: • Complete graph, synchronous rounds. • Reliable collision detection, (0,m,c) Discrete Algs for Mobile Wireless Sys
Emulating a Single Round • Three synchronized phases: • Propagation: • All nodes that want to send choose random tags and Broadcast their messages. • Every node remembers first received message (initiator remembers its own). • Different nodes may remember different messages. • Collision detection: • If > 1 initiators, two neighbors end up with different tags. • Nodes compare tags with neighbors, bit by bit. • For each bit, use Decay: all nodes having 1 transmit, all with 0 receive. • If any node actually receives a message, detects a collision. • Notification: • Each node that detected a collision Broadcasts a “collision” message. Discrete Algs for Mobile Wireless Sys
Behavior of Single-Round Emulation • Properties of Decay and Broadcast imply: • If there is a single initiator, WHP everyone receives the message. • Otherwise, WHP everyone detects a conflict. Discrete Algs for Mobile Wireless Sys
Emulating an Entire Algorithm • Emulate round-by-round, using the single-round emulation. • Must choose appropriately. • Apply this to Willard’s Ethernet algorithm for leader election, to run it in a multi-hop network. Discrete Algs for Mobile Wireless Sys
[Kowalski, Pelc] • Assumes the strong collision model: • collision is indistinguishable from idle • Show that [BGI1] deterministic lower bound is incorrect, with a special case O(log n) algorithm. • Sublinear (in n) time deterministic algorithms for all graphs of small diameter D = o(log log n) • Deterministic lower bound of Ω(n1/4); again claim exponential gap between randomized and deterministic complexity. Discrete Algs for Mobile Wireless Sys
S 1 sink, n+1 2 0 n Layer 0 Layer 1 Layer 2 Graphs from [BGI1] Lower Bound • For sink to receive message, must ensure eventually exactly one node in S transmits • For weaker collision model, [BGI1] showed (n) rounds necessary • What about for stronger collision model? • Show O(log n) algorithm… Discrete Algs for Mobile Wireless Sys
High Level Idea • Emulate collision detection capability at the source • Use the "collision detection" to choose one node in S to communicate with the sink • Algorithm uses subroutine Echo(i,A) • i is the id of one node in Layer 1 • A is a set of ids of nodes in Layer 1 Discrete Algs for Mobile Wireless Sys
Echo Subroutine Code: • Step 1: Every node in A transmits its id. • Step 2: Every node in A U { i } transmits its id. Behavior: • Case 1: Message received in Step 1 but not in Step 2 • A has 1 node, and its id is known to the source. • Case 2: Message received in Step 2 but not in Step 1 • A is empty. • Case 3: No message received in either step. • A has at least 2 nodes. Discrete Algs for Mobile Wireless Sys
Binary Selection Broadcast • Phase 0: Source transmits message and the lowest id i of its neighbors (i = 1). • Phase 1: Node with id 1 transmits the source message and its degree. • If degree is 2, then 1 in S. Therefore, sink receives the message. DONE! • If degree is 1, then continue… Discrete Algs for Mobile Wireless Sys
1 1 1 1 1 1 1 1 1 Done Done Done Done Done Done Done Done Done >1 >1 >1 >1 >1 >1 0 0 0 0 0 0 1 1 1 1 1 1 Done Done 1...1 9…10 1...2 5...5 5…6 13…14 3…3 7…7 Done Done Done Done 13..13 9...9 11…11 15…15 Binary Selection Broadcast • Do binary search on the range of ids in Layer 1, looking for a segment containing exactly 1 node in S. Suppose n = 16. 1...8 >1 0 1...4 9…12 1 0 Done 16…16 Discrete Algs for Mobile Wireless Sys
Binary Selection Broadcast • Phase 3, 4, …: • Step 1: source transmits a range R = {x, …, y} of ids; initially R = {1,2, ... n/2} • Steps 2 and 3: nodes in Layer 1 execute ECHO(1, R∩S). • Case 1: R∩S has one node. DONE! • Case 2: R∩S is empty. In Step 1 of next phase source transmits R = {y+1, ... y+(y-x+1)/2}. • Case 3: R∩S has > 1 node. In Step 1 of next phase source transmits R = {x, ..., (y+x-1)/2}. Discrete Algs for Mobile Wireless Sys
o(n) Algorithm for D = o(log log n) • Complicated algorithm, uses many techniques Discrete Algs for Mobile Wireless Sys
(n1/4) Lower Bound • Similar to (n) lower bound for the weaker collision model • Uses same class of graphs (with three layers) • Given any algorithm, construct the set S (nodes in Layer 1 that are connected to the sink) so that lots of time must elapse until the sink gets the message Discrete Algs for Mobile Wireless Sys
Discussion • What is the impact of these results? Discrete Algs for Mobile Wireless Sys