Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building MST with Õ(n) bits of communication in a Distributed Network Building MST with Õ(n) bits of communication in a Distributed Network 1 Valerie King,

Similar presentations


Presentation on theme: "Building MST with Õ(n) bits of communication in a Distributed Network Building MST with Õ(n) bits of communication in a Distributed Network 1 Valerie King,"— Presentation transcript:

1 Building MST with Õ(n) bits of communication in a Distributed Network Building MST with Õ(n) bits of communication in a Distributed Network 1 Valerie King, University of Victoria Joint work with Mikkel Thorup and Shay Kutten

2 Network with n nodes, m edges Each node has local info: incident edges, wts, neighbors’ IDs Nodes have distinct IDs in [1,…,n c ] G F C D E A CONGEST model

3 Communication: Each node may send (different) messages of size O(log n ) to all its neighbors in a single step. Synchronous vs. Asynchronous F C D E A

4 A network maintains a subgraph if its edges are marked by their endpoints J H G F C D E A

5 ST (or MST) Problem: Build a tree or MST G F C D E A

6 Classic Result: 1983: MST with O(m + nlogn) messages Gallager, Humblet and Spira (JACM) asychronous works if starting with any number of nodes wake time O(n 2 ), or O(n log n) if all nodes wake at start

7 “Folk Theorem” Auerbuch, Goldreich, Peleg, Vainish( JACM 1990) “If each proc knows only its ID and the IDs of its neighbors, then flooding is the best that can be done”

8 Auerbuch, Goldreich, Peleg, Vainish( JACM 1990) show: Constructing a spanning tree requires Ω(m) messages Even if synchronous nodes are all awake at the start alg is Monte Carlo nodes know the IDs of their immediate neighbour nodes know n, size of the network

9 Provided… Constructing a spanning tree requires Ω(m) messages Even if synchronous nodes are all awake at the start alg is Monte Carlo nodes know the IDs of their immediate neighbour nodes know the size of the network Provided IDs can only be compared

10 Without proviso, they show Constructing a spanning tree requires Ω(m) messages Even if synchronous nodes are all awake at the start alg is deterministic the nodes know the IDs of their immediate neighbour nodes know the size of the network ID space is super poly

11 Another Lower Bound Kutten, Pandurangan, Peleg, Robinson, Trehan (PODC2013) Constructing a tree requires Ω(m) messages Even if synchronous nodes are all initialized at the start alg is Monte Carlo nodes do not know the IDs of their immediate neighbours nodes know the size of the network

12 This work An MST can be constructed in Õ(n) bits of communication and time (and O(log n) bits space per node) if synchronous the nodes are all initialized at the start the alg is Monte Carlo nodes know the IDs of their immediate neighbours nodes know n ? Using operations which combine IDs.

13 The algorithm Boruvka style parallel alg with lg n phases: In each phase, w.h.p. each component finds the lightest edge incident to it and merges. Communications, Time of phase ~Õ(n) Start a new phase only after time to finish processing the largest cluster has passed. End when no progress after log n tries

14 Basic problem: find edge leaving a marked tree in a marked forest G F C D E A

15 Also solves MST updating problem Previous method requires lots of memory O(n) amortized messages per update Awerbuch, Cidon, Kutten:1990, 2008 Local memory= O(n* degree of node*logn) (Each node stores a belief about each neighbor’s version of the forest (!)) Here we use only O(log n) local memory

16 Ideas came from Dynamic Connectivity data structure Kapron, King, Mountjoy 2013 Graph Sketching Ahn, Guha, McGregor 2012 Sitting in Simons Institute

17 ideas from that work 1. Σ v in C deg(v) mod 2 = Σ e in ( C, V\C) deg(v) mod 2 because edges with both endpoints in C contribute 0. 2. If edges randomly sampled Pr( Σ deg(v) mod 2 =1) = ½ iff (C,V\C) is nonempty Else it’s always 0. 3. XOR of edge names = name of edge leaving if there is exactly 1 (Note: Edge name {u,v}=(u,v) iff u<v)

18 We use: basic communication step: broadcast-and-echo over known tree edges J H G F C D E A

19 We use: basic communication step: broadcast-and-echo over tree edges J H G F C D E A Leader node sends to whole tree, Response composed from leaves back up to leader

20 Find any edge leaving a component uses O(1) expected broadcast-and echoes Find min-weight edge leaving a component uses O(log n/loglog n) expected broadcast-and-echoes

21 Find Any: Parallel search packed in one word U ={edges} Leader randomly chooses h, a 2-wise indep hash h : U  U Each node v computes b(v)= b 1 b 2 … b log n b i (v) =| {(u,v) s. t. h(u,v) ≤ 2 i }| mod 2 e.g. parity of hashed values in each range. Hashed values 1 2 4

22 Find Any (cont’d): 1.XOR the b(v) over nodes v in tree 2.min  first i ≠0 3.XOR names of edges incident to all v in tree with h(edge) ≤ 2 min 4. With constant prob, there is exactly one such edge which is leaving.  XOR =Name of edge leaving

23 Findmin weight edge leaving Two Tests to see if there is an edge leaving a comp: 1.Constant prob. Test out: 1 broadcast, 1 1-bit echo 2.High prob. HP-Test out: 1 broadcast, 1 log n-bit echo

24 Findmin weight edge leaving 1. In parallel, with 1 Broadcast-and-echo do log n-wise search on weights with TestOut ‘s to find smallest wt interval 2. Verify its minimality with HP TestOut 3. Repeat if wrong or recurse on that interval

25 Testout randomly choose a function F: edges  {0,1} s.t. for a nonempty set S, w. constant prob. >0, an ODD number of S’s elements map to 1.

26 Simple F (Thorup) F has two parts, a 2-wise indep.hash function h: U  U t, a random element of U F(s)=1 iff h(s) < t F can be described in O(log |U|) bits.

27 Why it works h hashes U  U, S subset of U Imagine 2|S| equal sized intervals. Exactly one x in I, in middle third t lands in some I, in top third or bottom third

28 HP TestOut Repeat Testout in parallel O(log n) times to get prob error 1/n c ? Would need to send clog n hash functions Or use deterministic amplification Or…

29 Test 2: Set equality method to get HP-TestOut A tree T is maximal iff the set Out(T) of edges leaving all nodes in T = the set In(T) of edges entering all nodes in T

30 Test equality of two sets using polynomial ID-testing O(log n) bits of communication f(x)=Π a in Out (x-a) g(x)=Π b in In (x-b) Does f(x)=g(x)? (Schwartz-Zippel): Set x=random α in Z p, p be a prime, p > n c+2 compute over Z p : Pr(f(α)-g(α))=0 if In ≠ Out = Pr [α= root] = #roots/p< n 2 / p = 1/n c

31 Implementation (1 broadcast-and-echo) Leader broadcasts α Each node v computes f v (α) and g v (α) for its incident edges Starting at the leaves, pass to parent f v (α) * π c f c (α), c child of v g is computed similarly Leader (root) computes f-g. – If 0, Testout is true, else false.

32 In short build an MST in O(n log 2 n/loglog n) messages and time. Can we build a ST in O(n log n) messages and time? repair an ST in O(n) expected message repair an MST in O(n log/log log n) messages w.h.p. All using local memory O(log n)

33 Open problem and discussion Is Ω(m) communication required for building MST in asynchronous model? Lower bound for findmin Time v. communication tradeoffs Applications to map reduce etc. Thank you

34 Open problem and discussion Is Ω(m) communication required for building MST in asynchronous model? Lower bound for findmin Time v. communication tradeoffs Applications to map reduce etc. Thank you

35 “Impromptu”= Only local info maintained by node betw updates J H G F C D E A


Download ppt "Building MST with Õ(n) bits of communication in a Distributed Network Building MST with Õ(n) bits of communication in a Distributed Network 1 Valerie King,"

Similar presentations


Ads by Google