distributed algorithms
play

Distributed Algorithms Tutorial Roger Wattenhofer ETH Zurich - PowerPoint PPT Presentation

Distributed Algorithms Tutorial Roger Wattenhofer ETH Zurich Distributed Computing www.disco.ethz.ch Distributed Algorithms Message Shared Passing Memory Example: Maximal Independent Set (MIS) Given a network with n nodes, nodes


  1. Distributed Algorithms Tutorial Roger Wattenhofer ETH Zurich – Distributed Computing – www.disco.ethz.ch

  2. Distributed Algorithms Message Shared Passing Memory

  3. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes 17 11 69 10 7

  4. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes 17 11 69 10 7

  5. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes 17 11 69 10 7

  6. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes  11  10 7

  7. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes 17 11 69 10 7

  8. Example: Maximal Independent Set (MIS) • Given a network with n nodes, nodes have unique IDs. • Find a Maximal Independent Set (MIS) – a non-extendable set of pair-wise non-adjacent nodes 17 11 69 10 7 • Traditional (sequential) computation: The simple greedy algorithm finds MIS (in linear time)

  9. What about a Distributed Algorithm? • Nodes are agents with unique ID’s that can communicate with neighbors by sending messages. In each synchronous round, every node can send a (different) message to each neighbor. 17 11 69 10 7

  10. What about a Distributed Algorithm? • Nodes are agents with unique ID’s that can communicate with neighbors by sending messages. In each synchronous round, every node can send a (different) message to each neighbor. 17 11 69 10 7

  11. A Simple Distributed Algorithm • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 17 11 69 10 7

  12. A Simple Distributed Algorithm • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 17 11 69 10 7

  13. A Simple Distributed Algorithm • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 17 11 69 10 7 • What’s the problem with this distributed algorithm?

  14. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1

  15. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1

  16. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1

  17. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1

  18. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1

  19. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1

  20. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1

  21. Example • Wait until all neighbors with higher ID decided If no higher ID neighbor is in MIS  join MIS • 69 17 11 10 7 4 3 1 • What if we have minor changes? 69 17 11 10 7 4 3 1 • Proof by animation: In the worst case, the algorithm is slow (linear in the number of nodes). In addition, we have a terrible „ butterfly effect “ .

  22. What about a Fast Distributed Algorithm? • Can you find a distributed algorithm that is polylogarithmic in the number of nodes n , for any graph? 69 17 11 10 7 4 3 1 17 11 69 7 10

  23. What about a Fast Distributed Algorithm? • Surprisingly, for deterministic distributed algorithms, this is an open problem! • However, randomization helps! In each synchronous round, nodes should choose a random value. If your value is larger than the value of your neighbors, join MIS!

  24. What about a Fast Distributed Algorithm? • Surprisingly, for deterministic distributed algorithms, this is an open problem! • However, randomization helps! In each synchronous round, nodes should choose a random value. If your value is larger than the value of your neighbors, join MIS! 17 21 69 7 10

  25. What about a Fast Distributed Algorithm? • Surprisingly, for deterministic distributed algorithms, this is an open problem! • However, randomization helps! In each synchronous round, nodes should choose a random value. If your value is larger than the value of your neighbors, join MIS! 17 21 69 7 10

  26. What about a Fast Distributed Algorithm? • Surprisingly, for deterministic distributed algorithms, this is an open problem! • However, randomization helps! In each synchronous round, nodes should choose a random value. If your value is larger than the value of your neighbors, join MIS! 17 21 69 7 10 • How many synchronous rounds does this take in expectation (or whp)?

  27. Analysis Event (𝑣 → 𝑤) : node 𝑣 got largest random value • in combined neighborhood 𝑂 𝑣 ∪ 𝑂 𝑤 . We only count edges of 𝑤 as deleted. • 𝑣 𝑤 Similarly event (𝑤 → 𝑣) deletes edges of 𝑣 . • • We only double-counted edges. • Using linearity of expectation, in expectation at least half of the edges are removed in each round. In other words, whp it takes 𝑃(log 𝑜) rounds to compute an MIS. •

  28. Results: MIS Decomposition, Determ. General Graphs, Randomized [Awerbuch et al., 1989] [Alon, Babai, and Itai, 1986] [Panconesi et al., 1996] [Israeli and Itai, 1986] [Luby, 1986] [Métivier et al., 2009] Naïve Algo log ∗ 𝑜 𝑜 𝜗 𝑜 1 log 𝑜

  29. Local Algorithms • Each node can exchange a message with all neighbors, for t communication rounds, and must then decide. • Or: Given a graph, each node must determine its decision as a function of the information available within radius t of the node. • Or: Change can only affect nodes up to distance t . • Or: … v

  30. Locality Local Algorithms Sublinear Algorithms

  31. Locality is Everywhere! Applications Self- e.g. Multicore Assembling Robots Self- Local Stabilization Algorithms Dynamics Sublinear Algorithms

  32. Locality is Everywhere! Applications Self- e.g. Multicore Assembling Robots Self- Local Stabilization Algorithms Dynamics Sublinear Algorithms

  33. [Afek, Alon, Barad, et al., 2011]

  34. What about an Even Faster Distributed Algorithm? • Since the 1980s, nobody was able to improve this simple algorithm. • What about lower bounds? • There is an interesting lower bound, essentially using a Ramsey theory argument, that proves that an MIS needs at least Ω( log* n ) time. – log* is the so-called iterated logarithm – how often you need to take the logarithm until you end up with a value smaller than 1. – This lower bound already works on simple networks such as the linked list

  35. Coloring Lower Bound on Oriented Ring Build graph 𝐻 𝑢 , where nodes are possible views of nodes for distributed • algorithms of time 𝑢 . Connect views that could be neighbors in ring. Here is for instance of 𝐻 1 : • 1 2 3 4 2 3 2 3 6 3 6 7 3 6 9 Chromatic number of 𝐻 𝑢 is exactly minimum possible colors in time 𝑢 . •

  36. Coloring Lower Bound on Oriented Ring Build graph 𝐻 𝑢 , where nodes are possible views of nodes for distributed • algorithms of time 𝑢 . Connect views that could be neighbors in ring. Here is for instance of 𝐻 1 : • 1 2 3 2 3 6 3 6 7 3 6 9 Chromatic number of 𝐻 𝑢 is exactly minimum possible colors in time 𝑢 . •

  37. Results: MIS Decomposition, Determ. General Graphs, Randomized [Awerbuch et al., 1989] [Alon, Babai, and Itai, 1986] [Panconesi et al., 1996] [Israeli and Itai, 1986] [Luby, 1986] [Métivier et al., 2009] Naïve Algo log ∗ 𝑜 𝑜 𝜗 𝑜 1 log 𝑜 Linked List [Linial, 1992]

  38. Results: MIS Decomposition, Determ. General Graphs, Randomized [Awerbuch et al., 1989] [Alon, Babai, and Itai, 1986] [Panconesi et al., 1996] [Israeli and Itai, 1986] [Luby, 1986] Linked List, Deterministic [Métivier et al., 2009] Naïve Algo [Cole and Vishkin, 1986] log ∗ 𝑜 𝑜 𝜗 𝑜 1 log 𝑜 Linked List [Linial, 1992]

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend