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 28  Topic: Token Circulation  Sources: Malpani, Chen, Vaidya, & Welch MIT 6.885 Fall 2008 slides

3 Discrete Algs for Mobile Wireless Sys3 Token Circulation  Circulate a token through all the nodes of a mobile ad hoc network  Application: ensure totally ordered broadcast in a group communication service

4 Discrete Algs for Mobile Wireless Sys4 Group Communication  Maintain information about group membership (which nodes are in which group)  Allowing nodes within a group to communicate usually multicast with some ordering properties, notably total order  Originally developed for wired networks

5 Discrete Algs for Mobile Wireless Sys5 Achieving Total Order  Circulate a token through all the nodes in the network along a virtual ring token carries a sequence number  when token visits a node that wants to bcast a message, it increments the sequence number in the token and tags its message with that sequence number  Unique sequence numbers are used to sort out the proper ordering Or: token carries the messages themselves  append new message to the end of the list  deliver messages in order they appear in the token

6 Discrete Algs for Mobile Wireless Sys6 Getting a Virtual Ring  How to find an efficient embedding of a ring in an arbitrary network, especially one that changes dynamically?  In fact, what does "efficient" mean? What should be measured?

7 Discrete Algs for Mobile Wireless Sys7 Performance Measures  Distinguish between the token being routed to a node (message is received and forwarded w/o the node "using" the token) and the token visiting a node (node "uses" the token)  Round: minimal length execution fragment in which the token visits each node at least once  Performance measures: round length: number of node visits in a round message overhead: number of bytes sent per round time overhead: time required to complete a round

8 Discrete Algs for Mobile Wireless Sys8 Bad Virtual Ring  Use visit order 1, 2, 3, 4, 5, 6, 1, 2, 3, … in the following physical network:  Msgs are routed as 1, 3, 5, 2, 5, 3, 1, 4, 6, 2, 5, 2, 6, …  Better order for virtual ring: 1, 3, 5, 2, 6, 4, 1, … 13 5 26 4

9 Discrete Algs for Mobile Wireless Sys9 Lesson  Take network topology into account when determining visit order  But global knowledge is expensive to achieve, and needs constant updating  Instead, have token make decision dynamically, based only on local information, as to where to travel next  Assume nodes know who their neighbors are (e.g., "hello" protocol)

10 Discrete Algs for Mobile Wireless Sys10 Algorithm Classification  Global ("G") vs. Local ("L"): local: token is forwarded to a neighbor global: token is forwarded to any node in the network  Recency ("R") vs. Frequency ("F"): next recipient is decided based on how recently nodes have had the token next recipient is decided based on how frequently nodes have had the token  For global algorithms, whether or not token visits nodes through which the token is routed on its way to current destination (denoted "N" if so)

11 Discrete Algs for Mobile Wireless Sys11 Algorithm Schema  Token carries some information for each node in the network (either recency or frequency info)  When a node receives the token, it chooses next recipient using the info in the token, updates info appropriately, and forwards token to appropriate neighbor

12 Discrete Algs for Mobile Wireless Sys12 Algorithm LF (Local-Frequency)  Claim: In a static connected graph, LF ensures that every node is visited infinitely often.  Proof: Suppose not. Let S be the set of starved nodes (visited finitely often). Then there exists a node x that is visited i.o. but has at least one neighbor in S. Eventually, after all of x's neighbors in S have visited for the last time, the frequency count for some y in S will be the smallest among all of x's neighbors, and the token will be forwarded to y. Contradiction.

13 Discrete Algs for Mobile Wireless Sys13 Algorithm LF  Claim: Round length of LF is unbounded.  Length of even rounds: 6, 12, 20, 48, 96, …  Length of odd rounds: 6, 7, 19, 43, 91, … 1 35 2 4

14 Discrete Algs for Mobile Wireless Sys14 Algorithm LR  Claim: In a static connected graph, LR ensures that every node is visited i.o.  Proof is same as for LF.  What about round length? In a static graph, one can traverse a spanning tree to get a round length of 2n LR tries to improve by avoiding backtracking Simulation results often achieves round length of n But there exist graphs on which round length is exponential

15 Discrete Algs for Mobile Wireless Sys15 Algorithms GR and GF  Initially, when all nodes have been visited least recently/frequently, ties need to be broken somehow (say, by ID).  GR subsequently has no ties; for GF, break ties somehow (say, by ID)  Round length is obviously n. remember, we are just counting number of node visits in the round length message and time overhead take into account the relaying that may be necessary

16 Discrete Algs for Mobile Wireless Sys16 Algorithms GFN and GRN  For G*N, first determine node (in entire network) with smallest frequency/recency count  Then forward token to neighbor on route toward that node; token is to visit that neighbor  GFN performed very poorly in simulations some node x is visited very often, racking up a large frequency count, causing subsequent rounds to be very long

17 Discrete Algs for Mobile Wireless Sys17 Bonus Algorithm  The best path for the token would be a Hamiltonian path of the network path in the network that includes every node exactly once => round length n not every graph has one determining if a graph has one is NP-complete  Algorithm Iterative Search ("IS") uses heuristics to try to find an HP.  Simulation results: worked well if nodes have exact neighbor knowledge othewise not so good

18 Discrete Algs for Mobile Wireless Sys18 Simulations  Performance measures: Round length Round time Message overhead  Random networks with 20 nodes MAC layer: 802.11 Routing: DSR Network layer: TCP (to avoid token loss)

19 Simulation: Static Network LF GRN LR, GF, GR

20 Simulation: Dynamic Network GR LF,LR,GF,GRN LR Round timeRound length

21 Discrete Algs for Mobile Wireless Sys21 Worst-Case Analysis of LR  In simulation: average round length ~n  Matching worst-case upper bound?  Unfortunately, no Exponential upper bound: O(n  D ),  is max degree, D is diameter Exponential lower bound:  (n3 (7/27)n+5 ) (confusing typo in paper)

22 Discrete Algs for Mobile Wireless Sys22 LR Worst-Case Upper-Bound  We want to bound the number of nodes visited in a round  p is visited only once.  What about p ’s neighbors? p Last node p not visited

23 Discrete Algs for Mobile Wireless Sys23 LR Worst-Case Upper-Bound  Lemma: a.If node q is visited degree(q) + 1 times in an execution segment, then all of q ’s neighbors are visited in the segment. p p not visited No neighbor q of p visited more than degree(q) times

24 Discrete Algs for Mobile Wireless Sys24 LR Worst-Case Upper-Bound  Lemma: a.If node q is visited degree(q) + 1 times in an execution segment, then all of q ’s neighbors are visited in the segment.  Proof: qqqq … Execution segment: x1x1 x2x2 α1α1 x 1 is more recent than any neighbor that was not visited in α 1

25 Discrete Algs for Mobile Wireless Sys25 LR Worst-Case Upper-Bound  Lemma: a.If node q is visited degree(q) + 1 times in an execution segment, then all of q ’s neighbors are visited in the segment.  Proof: qqqq … Execution segment: x1x1 x2x2 α1α1 α2α2 x3x3 degree(q) + 1 visits x 1, x 2 are more recent than any neighbor that was not visited in α 1,α 2

26 Discrete Algs for Mobile Wireless Sys26 LR Worst-Case Upper-Bound  Lemma: b.If q is visited at most k times in an execution, then no neighbor q’ of q is visited more than (k+1) ·degree(q’) times in the execution. p p not visited No neighbor q of p visited more than degree(q) times Neighbors of neighbors of p ?

27 Discrete Algs for Mobile Wireless Sys27 LR Worst-Case Upper-Bound  Lemma: b.If q is visited at most k times in an execution, then no neighbor q’ of q is visited more than (k+1) ·degree(q’) times in the execution.  Proof: qqq … Execution segment: q ≤ k + 1 segments q is not visited ⇒ no neighbor q’ visited ≥ degree(q’) times Part (a)

28 Discrete Algs for Mobile Wireless Sys28 LR Worst-Case Upper-Bound  Lemma (b): if q is visited at most k times in an execution, then no neighbor q’ of q is visited more than (k+1) ·degree(q’) times in the execution.  Δ = maximum degree, D = diameter of the graph  N(A) = neighborhood of A p p not visited No neighbor q of p visited more than degree(q) times Neighbors of neighbors of p ? Nodes # visits p 1 N(p) ≤ Δ N(N(p)) ≤ Δ(Δ + 1) = Δ 2 + Δ … N D (p) ≤ Δ D +Δ D-1 +…+Δ

29 Discrete Algs for Mobile Wireless Sys29 LR Worst-Case Upper-Bound  Lemma (b): if q is visited at most k times in an execution, then no neighbor q’ of q is visited more than (k+1) ·degree(q’) times in the execution.  Δ = maximum degree, D = diameter of the graph  N(A) = neighborhood of A Nodes # visits p 1 N(p) ≤ Δ N(N(p)) ≤ Δ(Δ + 1) = Δ 2 + Δ … N D (p) ≤ Δ D +Δ D-1 +…+Δ Round length is bounded by 1 + |N(p)| · Δ + |N 2 (p)| · (Δ + Δ 2 ) + + … + |N D (p)| · (Δ D +Δ D-1 +…+Δ ) = = n · O( Δ D )


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

Similar presentations


Ads by Google