Loading in 5 sec....

CPSC 689: Discrete Algorithms for Mobile and Wireless SystemsPowerPoint Presentation

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

- By
**gen** - Follow User

- 70 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' CPSC 689: Discrete Algorithms for Mobile and Wireless Systems' - gen

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Lecture 12 Systems

- 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

Discrete Algs for Mobile Wireless Sys

Network-Wide Broadcast Systems

- 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.

Discrete Algs for Mobile Wireless Sys

Model Assumptions Systems

- 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.

Discrete Algs for Mobile Wireless Sys

Results Systems

- [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.

- Randomized algorithm, with completion time O((D + log(n/)) log n) slots, with probability at least 1 – .

Discrete Algs for Mobile Wireless Sys

Results Systems

- [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.

Discrete Algs for Mobile Wireless Sys

More Results Systems

- [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 (n1/4) for graphs with D = 4
- again claim exponential gap between randomized and deterministic complexity.

- Show that [BGI1] lower bound is incorrect, with a O(log n) algorithm for the graphs in [BGI1]

Discrete Algs for Mobile Wireless Sys

[BGI1] Systems 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!

Discrete Algs for Mobile Wireless Sys

[BGI1] Systems 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).

Discrete Algs for Mobile Wireless Sys

The Decay Subroutine Systems

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.

Discrete Algs for Mobile Wireless Sys

Properties of Decay Systems

- 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) = limkP(k,d) = probability that one of the nodes transmits alone, if attempts continue forever.

- Then P(k,0) = 0 and P(k,1) = 1.

Discrete Algs for Mobile Wireless Sys

Properties of Decay Systems

- Theorem 1 (a): For d 2, P(,d) 2/3.
- Proof:
- Recurrence: P(,d) = i=0d 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.

- Recurrence: P(,d) = i=0d C(d,i)2–d P(,i).

Discrete Algs for Mobile Wireless Sys

Properties of Decay Systems

- 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)).

Discrete Algs for Mobile Wireless Sys

[BGI1] Systems 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.

Discrete Algs for Mobile Wireless Sys

start Systems

Decay(k,m)

start

Decay(k,m)

start

Decay(k,m)

m arrives

start

Decay(k,m)

[BGI1] Broadcast Algorithm(i+t)*k

(i+2)*k

i*k

(i+1)*k

(i+2)*k

(i+3)*k

…..

execute Decay(k,m) t times

Discrete Algs for Mobile Wireless Sys

[BGI1] Systems 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)

Discrete Algs for Mobile Wireless Sys

1 Systems

3

4

0

2

5

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.

Discrete Algs for Mobile Wireless Sys

Algorithm Analysis Systems

- 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.

Discrete Algs for Mobile Wireless Sys

Algorithm Analysis Systems

- 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/))

Discrete Algs for Mobile Wireless Sys

Additional Properties of Systems[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

Discrete Algs for Mobile Wireless Sys

[BGI1] Systems 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).

Discrete Algs for Mobile Wireless Sys

Overview of Lower Bound Proof Systems

- Define a special class of graphs Cn
- 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 Cn graph takes (n) rounds
- reduce to a combinatorial problem called "hitting game"

Discrete Algs for Mobile Wireless Sys

S Systems

1

sink,

n+1

2

0

n

Layer 0

Layer 1

Layer 2

Special Graphs Cn- Source connected to all Layer 1 nodes.
- Sink connected to just the nodes in a set S {1,…,n}.
- Let GS denote Cn 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.

Discrete Algs for Mobile Wireless Sys

Abstract Broadcast Protocols Systems

- 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.

Discrete Algs for Mobile Wireless Sys

Relationship Between Abstract and General Broadcast Protocols

- Lemma 6: If there is a general protocol that terminates within k slots, on every graph in Cn, 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.

Discrete Algs for Mobile Wireless Sys

Execution of an Abstract Protocol Protocols

- Hk = P1,…,Pk, history through k slots.
- Each Pi 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:
- Ti = transmitters in slot i.
- Ti1 = Layer 1 nodes that would transmit in slot i if they were in S (for the given history), = nodes u for which (u,1,Hi-1) = 1.
- Ti0 = Layer 1 nodes that would transmit in slot i if they were not in S, = nodes for which (u,0,Hi-1) = 1.

Discrete Algs for Mobile Wireless Sys

The Hitting Game Protocols

- Game n, played on graphs in Cn, Explorer vs. Referee.
- Referee picks a subset S {1,…,n}.
- Explorer chooses query sets (moves) M1, M2,…
- Explorer tries to “hit” (isolate) an element of S.
- Explorer’s subsequent Mi may depend on results of prior moves.

- What happens at move i:
- If | Mi S | = 1, the game is over, Explorer wins.
- Otherwise, if | Mi Sc | = 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).

Discrete Algs for Mobile Wireless Sys

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 Cn, 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 Cn

Discrete Algs for Mobile Wireless Sys

Lemma 7, Proof and Error Protocol

- Lemma 7: If there is an Abstract Protocol that terminates within k slots, on every graph in Cn, 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:…

Discrete Algs for Mobile Wireless Sys

Reduction from Abstract Broadcast Protocol to Hitting Game Strategy

- Show (existentially but not constructively) that if there is a k-round ABP for Cn, then there is a 2k-move winning strategy for the hitting game.
- Fix any S (subset of nodes in Layer 1 of Cn).
- 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

Discrete Algs for Mobile Wireless Sys

More on the Reduction Strategy

- 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 T1, set of nodes in S that are supposed to transmit in round i, be move 2i
- Let T0, set of nodes in Sc that are supposed to transmit in round i, be move 2i+1
- Specify outcome of the round (which nodes receive which messages)…

Discrete Algs for Mobile Wireless Sys

Specifying Outcome of the Round Strategy

- Must conform to the model of computation
- If T1 S is a singleton, say node p, then deliver the message from p to all recipients (ABP terminates)
- If T0 Sc 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.

Discrete Algs for Mobile Wireless Sys

Finishing Up Reduction Strategy

- 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…

Discrete Algs for Mobile Wireless Sys

(n) StrategyLower Bound on Hitting Game

- Define an “adversary” that constructs a set S that “fools” a given sequence M1,M2,…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.

Discrete Algs for Mobile Wireless Sys

Download Presentation

Connecting to Server..