1 / 83

A Distributed Algorithm for Minimum-Weight Spanning Trees

A Distributed Algorithm for Minimum-Weight Spanning Trees. by R. G. Gallager, P.A. Humblet, and P. M. Spira ACM, Transactions on Programming Language and systems,1983. Outline. Introduction. The idea of Distributed MST. The algorithm. Outline. Introduction.

debbiehart
Download Presentation

A Distributed Algorithm for Minimum-Weight Spanning Trees

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. A Distributed Algorithm for Minimum-Weight Spanning Trees by R. G. Gallager, P.A. Humblet, and P. M. Spira ACM, Transactions on Programming Language and systems,1983

  2. Outline • Introduction • The idea of Distributed MST • The algorithm

  3. Outline • Introduction • The idea of Distributed MST • The algorithm

  4. Problem • A graph • Every edge has a weight 8 3 1 4 5 2 6 7 Introduction

  5. Solution • A spanning tree • So that the sum is minimized 8 3 1 4 5 2 6 7 Introduction

  6. Solution • A spanning tree • So that the sum is minimized Introduction 8 3 1 4 5 2 6 7

  7. 8 3 1 4 5 2 6 7 Introduction • Definition – MST fragment • A connected sub-tree of MST Example of possible fragments:

  8. 8 3 e 1 4 5 2 6 7 Introduction • MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST.

  9. 8 3 e 1 4 5 2 6 7 Introduction • MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST. • Proof:

  10. e’ 8 3 e 1 4 5 2 6 7 Introduction • MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST. • Proof: Suppose e is not in MST, but some e’ instead.

  11. e’ e Introduction • MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST. • Proof: 8 3 Suppose e is not in MST, but some e’ instead. 1 4 5 MST with e forms a cycle. 2 6 7

  12. e’ e Introduction • MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST. • Proof: 8 3 Suppose e is not in MST, but some e’ instead. 1 4 5 MST with e forms a cycle. 2 6 We obtain a cheaper MST with e instead of e’. 7

  13. 8 3 1 4 5 2 6 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique.

  14. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof:

  15. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof: Suppose existence of two MSTs. T T’

  16. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof: Suppose existence of two MSTs. e Let e be the minimal-weight edge not in both MSTs (wlog e in T). T T’

  17. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof: Suppose existence of two MSTs. e Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle T T’

  18. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof: Suppose existence of two MSTs. e’ e Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle At least cycle edge e’ is not in T. T T’

  19. 8 8 3 3 1 1 4 4 5 5 2 2 6 6 7 7 Introduction • MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. • Proof: Suppose existence of two MSTs. e’ e Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle At least cycle edge e’ is not in T. Since w(e) < w(e’) we conclude that T’ with e and without e’ is a smaller MST than T’. T T’

  20. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Start with fragments of one node.

  21. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  22. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  23. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  24. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  25. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  26. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  27. 8 3 1 4 5 2 6 7 Introduction • Idea of MST based on properties 1 & 2 • Enlarge fragments in any order (property 1) • Combine fragments with a common node • (property 2)

  28. Outline • Introduction • The idea of Distributed MST • The algorithm

  29. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Fragments • Every node starts as a single fragment.

  30. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Fragments • Each fragment finds its minimum outgoing edge.

  31. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Fragments • Each fragment finds its minimum outgoing edge. • Then it tries to combine with the adjacent fragment.

  32. The idea of Distributed MST • Levels • Every fragment has an associated level that • has impact on combining fragments. • A fragment with a single node is defined to • to be at level 0.

  33. 8 3 F 1 4 5 F’ 2 6 7 The idea of Distributed MST • Levels • The combination of two fragments depends on • the levels of fragments.

  34. 8 3 F L=1 1 4 5 F’ 2 6 L’=2 7 The idea of Distributed MST • Levels • The combination of two fragments depends on • the levels of fragments. If a fragment F wishes to connect to a fragment F’ and L < L’ then:

  35. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Levels • The combination of two fragments depends on • the levels of fragments. If a fragment F wishes to connect to a fragment F’ and L < L’ then: F L=1 F is absorbed in F’ and the resulting fragment is at level L’. F’ L’=2

  36. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Levels • The combination of two fragments depends on • the levels of fragments. If fragments F and F’ have the same minimum outgoing edge and L = L’ then: F F’ L=1 L’=1

  37. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Levels • The combination of two fragments depends on • the levels of fragments. If fragments F and F’ have the same minimum outgoing edge and L = L’ then: F F’’ F’ L=1 L’’=2 L’=1 The fragments combine into a new fragment F’’ at level L’’ = L+1.

  38. 8 3 1 4 5 2 6 7 The idea of Distributed MST • Levels • The identity of a fragment is the weight of its • core. If fragments F and F’ with same level were combined, the combining edge is called the core of the new segment. F’’ L’’=2 core

  39. The idea of Distributed MST • State • Each node has a state Sleeping - initial state Find - during fragment’s search for a minimal outgoing edge Found - otherwise (when a minimal outgoing edge was found

  40. Outline • Introduction • The idea of Distributed MST • The algorithm

  41. 8 3 1 4 5 2 6 7 The Algorithm • Fragment minimum outgoing edge discovery • Special case of zero-level fragment (Sleeping).

  42. 8 3 1 4 5 2 6 7 The Algorithm • Fragment minimum outgoing edge discovery • Special case of zero-level fragment (Sleeping). When a node awakes from the state Sleeping, it finds a minimum edge connected.

  43. 8 3 1 4 5 2 6 7 The Algorithm • Minimum outgoing edge discovery • Special case of zero-level fragment (Sleeping). When a node awakes from the state Sleeping, it finds a minimum edge connected. Marks it as a branch of MST and sends a Connect message over this edge.

  44. 8 3 1 4 5 2 6 7 The Algorithm • Minimum outgoing edge discovery • Special case of zero-level fragment (Sleeping). When a node awakes from a state Sleeping, it finds a minimum edge connected. Marks it as a branch of MST and sends a Connect message over this edge. Goes into a Found state.

  45. 8 3 1 4 5 2 6 7 The Algorithm • Minimum outgoing edge discovery • Take a fragment at level L that was just combined • out of two level L-1 fragments. F’’ L’’=2 F L=1 F’ L’=1

  46. 8 3 1 4 5 2 6 7 The Algorithm • Minimum outgoing edge discovery • Take a fragment at level L that was just combined • out of two level L-1 fragments. The weight of the core is the identity of the fragment. ID’’ = 2 F’’ It acts as a root of a fragment tree. L’’=2 F L=1 F’ L’=1 core

  47. 8 3 1 4 5 2 6 7 The Algorithm • Minimum outgoing edge discovery • Take a fragment at level L that was just combined • out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders.

  48. The Algorithm • Minimum outgoing edge discovery • Take a fragment at level L that was just combined • out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders. 8 3 Relayed by the intermediate nodes in the fragment. 1 4 5 2 6 7

  49. The Algorithm • Minimum outgoing edge discovery • Take a fragment at level L that was just combined • out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders. 8 3 Relayed by the intermediate nodes in the fragment. 1 4 5 2 6 Puts the nodes in the Find state. 7

  50. The Algorithm • Minimum outgoing edge discovery • Edge classification/ Basic - yet to be classified, can be inside fragment or outgoing edges 8 3 1 4 5 2 6 7

More Related