Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Similar presentations


Presentation on theme: "Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg."— Presentation transcript:

1 Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg

2 Model and Notation G(V,E) is the network Each vertex has a unique name Each edge has a weight Vertices communicate only by edges The communication is synchronous Exactly B bits are sent at each time step D is the diameter of the graph

3 Related work If B=  then O(D) [N. Linial 92] If B=O(log(n)) communication optimal required O(n log(n)) and O(n) time [GHS83] and [A87] respectively O(D+n 0.613 log * (n)), O(D+n 0.5 log * (n)) [GKP98], [KP98] respectively  (n 0.5 /(B log(n))) [PR00]

4 Our results lower bound There exists a family of graphs with diameter 4 s.t  ((n 1/3 )/B) There exists a family of graphs with diameter 3 s.t  ((n 1/4 )/(B 0.5 )) The lower bound holds for randomized algorithms

5 Our results graph with diameter 2 O(log n) time units suffice to compute an MST for graphs with diameter 2

6 The mailing problem [PR00] mail(G,s,r,b) G(V,E) s,r  V We wish to send x 1, x 2, … x b bits from s to r We denote the worst-case time complexity of algorithm A by T A (G,s,r,b)

7 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=1

8 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=2

9 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=3

10 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=4

11 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=5

12 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=6

13 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=7

14 The mailing problem Exmpal mail(P n,s,r,b) T A (P n,s,r,b)>b s r t=8 T A (P n,s,r,b)=n+b

15 Diameter 4 graphs c v 2,m 2 +1 v 3,m 2 +1 s=v 1,m 2 +1 r=v m,m 2 +1 v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 2 v 3,m 2 v m,m 2

16 Diameter 4 graphs  For all m> 2, the number of nodes is m^3+m+1 and the diameter is 4 c v 2,m 2 +1 v 3,m 2 +1 s=v 1,m 2 +1 r=v m,m 2 +1 v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 2 v 3,m 2 v m,m 2

17 Diameter 4 graphs v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 2 v 3,m 2 v m,m 2 s=v 1,m 2 +1 v 2,m 2 +1 v 3,m 2 +1 r=v m,m 2 +1 c 2 6 8 m+2

18 Diameter 4 graphs  For any time t<m the number of bits delivered at r by time t is at most t m B v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 2 v 3,m 2 v m,m 2 s=v 1,m 2 +1 v 2,m 2 +1 v 3,m 2 +1 r=v m,m 2 +1 c

19 Diameter 4 graphs  For any time t<m the number of bits delivered at r by time t is at most t m B  For any correct mailing algorithm A, any m> 2 and any m^2 bit input string X, we have T A (h m,s,r,X)> m/B.  t m B>m^2  t>m/b

20 Diameter 4 graphs From mailing to MST 0 1,3 2

21 Diameter 4 graphs From mailing to MST 0 1,3 2

22 z1z1 z2z2 z3z3 r=z m kmkm Diameter 3 graphs  For all m> 2, the number of nodes is m^4+m+1 and the diameter is 3 v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 s

23 Diameter 3 graphs v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 z1z1 z2z2 z3z3 r=z m s kmkm 2 4 m+2

24 Diameter 3 graphs v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 z1z1 z2z2 z3z3 r=z m s kmkm M4M4

25 Diameter 3 graphs v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 z1z1 z2z2 z3z3 r=z m s kmkm

26 Diameter 3 graphs v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 z1z1 z2z2 z3z3 r=z m s kmkm For any t<m, new bits that arrive at C enter only at nodes z i with 1  i  t.

27 Diameter 3 graphs For t< m, the number of bits arriving at r by time t is less than t^2mB/2. v 1,1 v 2,1 v 3,1 v m,1 v 1,2 v 2,2 v 3,2 v m,2 v 2,m 3 v 1,m 3 v 3,m 3 v m,m 3 z1z1 z2z2 z3z3 r=z m s kmkm

28 If for some probability distribution over the inputs the expected cost for all deterministic algorithms is at least C, then for any randomized algorithm there exists an input with expected complexity at least C. The minimax principle [Yao 77]

29 Segmented minima D=2 For each v  V we have segment number f(v) and value a(v) The task of segmented minima is to compute b(v)= min{ a(v):f(v)=f(u)}

30 Solving Segmented minima Lemma: Segmented minima can be computed in 2 steps in the B model, 1. Send (f(v),a(v)) to all neighbors 2. Send to each neighbor u the minimal value received from u 's segment 3. Set b(v) to be the minimum of all values received in the second step

31 Solving Segmented minima 4 3 5 6 2 1 7 8

32 1,2,3,4,7 3,5,6,7,8 3,4,6,8 2,4,5,7 1,4,6 2,4,7,8 1,3,6,8 2,5,8 4 3 2 1 5 6 7 8 1. Send (f(v),a(v)) to all neighbors

33 Solving Segmented minima 2. Send to each neighbor u the minimal value received from u 's segment 1,2,3,4,7 3,4,6,8 2,4,5,7 1,4,6 3,5 4 3 2 1 5 6 7 8 1,7 2,7 1,6 2,5 3,6 2,5 1,6 3,5,6,7,8 2,4,7,8 1,3,6,8 2,5,8

34 Solving Segmented minima 3. Set b(v) to be the minimum of all values received in the second step 1,2,3,4,7 3,4,6,8 2,4,5,7 1,4,6 4 3 2 1 5 6 7 8 3,5,6,7,8,2,4,7,8 1,3,6,8 2,5,8 1,3,2,1,2 1,3,3,1 1,2,2,2 1,1,1 5,7,6,5,6 5,7,7,5 5,6,6,6 5,5,5

35 definition A fragment is a collection of nodes connected by edges already added to the MST. The leader of a fragment is the node whose ID is minimal in the fragment. At any given time step, we use f(v) to denote the leader of the fragment that contains a node v

36 Phase k 1. Each fragment adds one edge to the MST (using the leader). By doing this a new structure of fragments is created 2. Each new fragment chooses a new leader.

37 A simple O(log^2 n) time algorithm derived from Boruvka's All nodes in a fragment know the ID of their leader at the beginning of every Phase Initially, each node forms a singleton fragment with itself being the leader

38 Phase k 1. Each node v sends the ID of its current leader f(v) to all its neighbors 2. The nodes execute segmented minima, with the values being the weight of their lightest incident edge outgoing to another fragment 3. Find the leader of the fragment using pointer jumping.

39 Example 1 2 1 23 4 5 6 7 3 4 5 6 7 10 8

40 Phase 1 The problem is to select a leader 1 2 1 23 4 5 6 7 3 4 5 6 7 10 8 12345678 011234567 111123456 211111234 311111111

41 O(Log(log(n))) in K n Elan Pavlov The idea is the increase the communication bandwidth the fragment The alg work in phases each take O(1) For every fragment F, the spanning subtree T(F) is know to all the node in the graph at the end of the time the fragmen is created.

42 Example

43

44

45 Phase k 1. For every other fragmen F' do: 2. Compute the minimum-weight edge e(v,F') that connects v to (any node of) F'. 3. Send e(v,F') to every node in the fragmen F'. 4. For every other fragmen F', inspect e(w,F) for every w  F ‘ and compute the fragmen edge between F' and F, denoted e(F,F') 5. selects a set A(F) containing the N cheapest edges that go out of F to N distinct fragmen end for each edge e appointed as guardian. 6. computes the new fragmen and spanning subtree of phase k.

46 computes the new fragmen Done in two stages 1. creating a logical graph G. 2. partitions this logical graph G into superclusters and constructs a spanning subtree.

47 computes the new fragmen partitions this logical graph into superclusters and constructs a spanning subtree. 1. Inspects the edges that where selected sequentially in increasing order of weight. 2. Edge e is added to G if it does not close a cycle with edges already in G. 3. Whenever an edge e=(F 1,F 2 ) is added to G the superclusters F 1 and F 2 are merged into one supercluster

48 computes the new fragmen newly constructed super- fragmen F is declared finished if 1. e is the heaviest edge in A(F 1 ) or in A(F 2 ), 2. Either F 1 or F 2 is finished. 3. The super-cluster F is declared finished if e is the heaviest edge.

49 End

50 Example 10 1 2 1 23 4 5 6 7 3 4 5 6 7 8 7 12345678 011234567 111123444 2111112 3

51 Example 10 1 2 1 23 4 5 6 7 3 4 5 6 7 8 7 12345678 011234567 a11123444 111111222 a

52 At the end 4 3 5 6 2 1 7 8

53 Phase 2 4 3 5 6 2 1 7 8 4 3


Download ppt "Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg."

Similar presentations


Ads by Google