1 / 28

Locality Sensitive Distributed Computing Exercise Set 1

Locality Sensitive Distributed Computing Exercise Set 1. David Peleg Weizmann Institute. Exercises Basic complexity considerations Global function computation + pipeline Termination detection for Dijkstra’s BFS Fast DFS T gap in synchronizers a and b 3-coloring bounded-degree graphs

javier
Download Presentation

Locality Sensitive Distributed Computing Exercise Set 1

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Locality Sensitive Distributed ComputingExercise Set 1 David PelegWeizmann Institute • Exercises • Basic complexity considerations • Global function computation + pipeline • Termination detection for Dijkstra’s BFS • Fast DFS • Tgap in synchronizers a and b • 3-coloring bounded-degree graphs • MIS / coloring on unoriented rings

  2. Basic complexity issues • Prove or disprove: • In a graph G(V,E), • if there are at least k edge-disjoint paths • of length  d between the nodes v and w, • then it is possible to send m msgs • from v to w in time O(d+m/k).

  3. Exercises (cont) • Prove or disprove: • In a graph G(V,E), • ifdist(v,w)=k and there are k2 edge-disjoint paths between the nodes v and w, • then it is possible to send k2 msgs • from v to w in time O(k).

  4. Goal: Compute global function f(Xv1,...,Xvn) where each node v holds input Xv Semigroup function f: 1. Well-defined for any input subset 2. Associative and commutative  Efficiently computable on tree T by convergecast Global function computation

  5. Global function computation • During the process: • The value sent upwards by each v in T • = value of function on inputs of its subtree Tv • fv = f(Yv) where Yv = { Xw | w  Tv } • Converge(f,X) process • Leaf v sends Xv to parent • Intermediate v with k children w1,...,wk • - receives values fwi = f(Ywi) from all children • applies fv (Xv,fw1,...,fwk)

  6. Example: Addition 105 50 49 13 29 13 29

  7. Example: Maximum ? ? ? ? ? ? ?

  8. Claim: • Assume f(Y) is represented in O(p) bits • for every input set Y • On tree T: • Message(Converge(f)) = ? • Time(Converge(f)) = ? Global function computation

  9. Pipelining Separate broadcast / convergecast operations can be efficiently pipelined Example: Pipelining 3 Converge(max) operations to get Mi = max {Xi(v) | v leaf } for i=1,2,3

  10. Pipelining

  11. Pipelining Lemma: k global semi-group functions can be computed on tree in time ?

  12. Level-synchronized BFS (Dijkstra) Q. Prove the tightness of the message complexity analysis of Dijkstra's algorithm, by establishing the following: Lower bound: For integers n and 1  D  n-1, there exists n-node, D-diameter graph G=(V,E) on which the execution of Dijkstra's algorithm requires (nD+|E|) messages.

  13. Level-synchronized BFS (Dijkstra) Termination detection: Modify the Distributed Dijkstra algorithm so that the root can tell when the process is completed (and the entire graph is spanned by the constructed BFS tree)

  14. Distributed Depth-First Search DFS: Search process on G, traversing all vertices, progressing over edges, with preference to visiting new vertices

  15. Distributed Depth-First Search • DFS algorithm • Search starts at origin v0 • Whenever search reaches vertex v: • - If v has neighbors not visited so far, • then visit one of them next. • - Else return to the vertex from which visited first • - If v = v0 then end

  16. Distributed Depth First Search • Fact: DFS process visits every vertex in G. • Search defines DFS tree, with v0 as root: • v's parent = node from which v was visited first • Sequential time complexity = O(|E|)

  17. Direct distributed implementation • Completely sequential: • one activity locus at any time. • - Control carried via single message (“token”) • traversing G in depth-first fashion Note: For v to know whether neighbor w was visited or not, it must send message over edge (v,w)

  18. Direct distributed implementation  every edge must be explored  both time and message complexities = Q(|E|)

  19. Exercise • Q. • Modify the DFS algorithm to allow the traveler to complete the tour (visiting all nodes) • faster than O(|E|). • Analyze the time complexity of the modified algorithm and prove your bound.

  20. Synchronizers Consider a 15-processor asynchronous G(V,E),V={0,…,14}, constantly running a synchronizer. v, v' = nodes in G. At time t, pulse counter Pv = 27. What is the range of possible pulse numbers at Pv' in following cases:

  21. Synchronizers (cont) • G = ring (with nodes arranged in order), v=11, v'=2, synchronizer used = a. • G = full balanced binary tree (4 levels), v = root, v' = one of the leaves, synchronizer used = b. • The same as in (2), except both v and v' are leaves.

  22. Synchronizers (cont) • Synchronizer used = g. • Clusters, spanning tree of each cluster, inter-cluster edges and locations of v, v' are as follows:

  23. Synchronizer gaps Gap of synchronizer n: Tgap(n) = maxv,p {t(v,p+1)-t(v,p)} (max length of period t(v,p) that some processor v stays in some pulsep) Tgap(n)

  24. Synchronizer gaps (cont) • How large could Tgap be for : • synchronizer a • synchronizer b • synchronizer g • For synchronizer a, design a scenario realizing the worst-case waiting time, Tgap(a)

  25. 3-coloring bounded-degree graphs Goal: Color arbitrary bounded degree G (D(G)=O(1)) with D+1 colors in time O(log*n)

  26. Consistent orientation and MIS Consistent orientation: the ring edges are oriented in a consistent manner (each node identifies its “left” and “right” neighbors, and each edge e = (v,w) is marked as going “left” by one of its endpoints and as going “right” by the other. We have seen: Given an MIS on the ring, the nodes can be colored with 3 colors in a single round.

  27. Show that algorithm might fail if the ring does not enjoy consistent orientation • Prove that on an anonymous ring (no ID’s) without a consistent orientation, • it is impossible to deterministically 3-color the nodes, even given an MIS. • Prove that on a non-anonymous ring • without a consistent orientation, • it is still possible to deterministically 3-color the vertices in a constant number of rounds given an MIS. (Try to use the smallest number of rounds.) Consistent orientation and MIS

  28. What lower bound can be proved for the number of rounds required for computing MIS on a ring without consistent orientation? Specify precise constants (not only asymptotic lower bound). • What is the smallest n for which the lower bound you got in the previous question is greater than 1? What is the smallest n for which the lower bound on 3-coloring is greater than 1? Consistent orientation and MIS

More Related