Content deleted Content added
Link suggestions feature: 3 links added. |
|||
(19 intermediate revisions by 13 users not shown) | |||
Line 1:
[[Image:Minimum spanning tree.svg|thumb|400px|right|''Example of a MST:'' The minimum spanning tree of a [[planar graph]]. Each edge is labeled with its weight, which here is roughly proportional to its length.]]
The '''distributed minimum spanning tree (MST)''' problem involves the construction of a [[minimum spanning tree]] by a [[distributed algorithm]], in a network where nodes communicate by message passing.
The problem was first suggested and solved in <math>O(V \log V)</math> time in 1983 by Gallager ''et al.'',<ref name="GHS" /> where <math>V</math> is the number of vertices in the [[graph theory|graph]]. Later, the solution was improved to <math>O(V)</math><ref>[[Baruch Awerbuch]]. “Optimal Distributed Algorithms for Minimum Weight Spanning Tree, Counting, Leader Election, and Related Problems,” ''Proceedings of the 19th ACM [[Symposium on Theory of Computing]] (STOC)'', New York City, New York, May 1987.
</ref> and finally<ref>Juan Garay, Shay Kutten and [[David Peleg (scientist)|David Peleg]], “A Sub-Linear Time Distributed Algorithm for Minimum-Weight Spanning Trees (Extended Abstract),” ''Proceedings of the IEEE [[Symposium on Foundations of Computer Science]]'' (FOCS), 1993.</ref><ref>Shay Kutten and [[David Peleg (scientist)|David Peleg]], “Fast Distributed Construction of Smallk-Dominating Sets and Applications,” ''Journal of Algorithms'', Volume 28, Issue 1, July 1998, Pages 40-66.</ref>
<math>O(\sqrt V \log^* V + D)</math> where ''D'' is the network, or graph diameter.
<math>\Omega\left({\frac{\sqrt V}{\log V}+D}\right).</math>
== Overview ==
The input graph <math>G(V,E)</math> is considered to be a network, where vertices <math>V</math> are independent computing nodes and edges <math>E</math> are communication links. Links are weighted as in the classical problem.
At the beginning of the algorithm, nodes know only the weights of the links which are connected to them. (It is possible to consider models in which they know more, for example their neighbors' links.)
As the output of the algorithm, every node knows which of its links belong to the
== MST in message-passing model ==
The [[Message passing|message-passing]] model is one of the most commonly used models in [[distributed computing]]. In this model, each process is modeled as a node of a graph.
Two commonly used algorithms for the classical minimum spanning tree problem are [[Prim's
▲The [[Message passing|message-passing]] model is one of the most commonly used models in [[distributed computing]]. In this model, each process is modeled as a node of a graph. The communication channel between two processes is an edge of the graph.
* Both
* Both
Due to these difficulties, new techniques were needed for distributed MST algorithms in the message-passing model.
▲Two commonly used algorithms for the classical minimum spanning tree problem are [[Prim's algorithm|Prim’s algorithm]] and [[Kruskal's algorithm|Kruskal’s algorithm]]. However, it is difficult to apply these two algorithms in the distributed message-passing model. The main challenges are:
▲* Both [[Prim's algorithm|Prim’s algorithm]] and [[Kruskal's algorithm|Kruskal’s algorithm]] require processing one node or vertex at a time, making it difficult to make them run in parallel. (For example, Kruskal's algorithm processes edges in turn, deciding whether to include the edge in the MST based on whether it would form a cycle with all previously chosen edges.)
▲* Both [[Prim's algorithm|Prim’s algorithm]] and [[Kruskal's algorithm|Kruskal’s algorithm]] require processes to know the state of the whole graph, which is very difficult to discover in the message-passing model.
▲Due to these difficulties, new techniques were needed for distributed MST algorithms in the message-passing model. Some bear similarities to [[Borůvka's algorithm]] for the classical MST problem.
== GHS algorithm ==
The GHS algorithm<ref name="GHS" /> of [[Robert G. Gallager|Gallager]], Humblet and Spira is one of the best-known algorithms in distributed computing theory. This algorithm
=== Assumptions ===
▲The GHS algorithm of [[Robert G. Gallager|Gallager]], Humblet and Spira is one of the best-known algorithms in distributed computing theory. This algorithm can construct the MST in asynchronous [[Message passing|Message-passing]] model.
The GHS algorithm requires several assumptions.
* The input graph is connected and undirected.
* Each edge in the input graph has distinct finite weights. This assumption is not needed if there is a consistent method to break ties between edge weights.
* Initially, each node is in
▲* Each node initially knows the weight for each edge incident to that node.
▲* Initially, each node is in a quiescent state and it either spontaneously awakens or is awakened by receipt of any message from another node.
* Messages can be transmitted independently in both directions on an edge and arrive after an unpredictable but finite delay, without error.
* Each edge delivers messages in [[FIFO (computing and electronics)|FIFO]] order.
=== Properties of
Define a fragment of
# Given a fragment of
# If all the edges of a connected graph have different weights, then the MST of the graph is unique.
These two properties form the basis for proving correctness of the GHS algorithm. In general, the GHS algorithm is a bottom-up algorithm in the sense that it starts by letting each individual node be a fragment, and then joining fragments
▲Define fragment of a MST T to be a sub-tree of T, that is, a connected set of nodes and edges of T. There are two properties of MSTs:
▲# Given a fragment of a MST T, 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.<ref name="GHS" />
▲# If all the edges of a connected graph have different weights, then the MST of the graph is unique.<ref name="GHS" />
▲These two properties form the basis for proving correctness of the GHS algorithm. In general, the GHS algorithm is a bottom-up algorithm in the sense that it starts by letting each individual node be a fragment and joining fragments in a certain way to form new fragments. This process of joining fragments repeats until there is only one fragment left and property 1 and 2 imply the resulting fragment is a MST.
=== Description of the algorithm ===
The GHS algorithm assigns a ''level'' to each fragment, which is a non-decreasing [[integer]] with initial value 0.
* '''Branch''' edges are those that have
* '''Rejected''' edges are those that have
* '''Basic''' edges are all edges that are neither branch edges nor rejected edges.
# Choose its minimum-weight incident edge and
# Send a message via the branch edge to notify the node on the other side.
# Wait for a message from the other end of the edge.
The edge that is chosen by
==== Broadcast ====
Line 63 ⟶ 60:
==== Convergecast ====
In this stage, all nodes in the fragment cooperate to find the minimum weight outgoing edge of the fragment. Outgoing edges are edges connecting to other fragments. The messages sent in this stage are in the opposite direction of the broadcast stage. Initialized by all the leaves (the nodes that have only one branch edge), a message is sent through the branch edge. The message contains the minimum weight of the incident outgoing edge it found (or infinity if no such edge was found).
==== Change core ====
After the completion of the previous stage, the two nodes connected by the core can inform each other of the best edges they received. Then they can identify the minimum outgoing edge from the entire fragment. A message will be sent from the core to the minimum outgoing edge via a path of branch edges. Finally, a message will be sent out via the chosen outgoing edge to request to combine the two fragments that the edge connects. Depending on the levels of those two fragments, one of two combined operations are performed to form a new fragment;
====
As discussed above, every node needs to find its minimum weight outgoing incident edge after the receipt of a broadcast message from the core. If node <math>n</math> receives a broadcast, it will pick its minimum weight basic edge and send a message to the node
# <math>\mathit{Fragment}_\mathit{ID}(n) = \mathit{Fragment}_\mathit{ID}(n')</math>. That is, nodes <math>n</math> and <math>n'</math> belong to same fragment, so the edge is not outgoing.
# <math>\mathit{Fragment}_\mathit{ID}(n) \neq \mathit{Fragment}_\mathit{ID}(n')</math> and <math>\mathit{Level}(n) \leq \mathit{Level}(n')</math>. That is, nodes <math>n</math> and <math>n'</math> belong to the different fragments, so the edge is outgoing.
# <math>\mathit{Fragment}_\mathit{ID}(n) \neq \mathit{Fragment}_\mathit{ID}(n')</math> and <math>\mathit{Level}(n) > \mathit{Level}(n')</math>. We cannot make any conclusion. The reason is that the two nodes may belong to the same fragment already, but node
▲We cannot make any conclusion. The reason is the two nodes may belong to the same fragment already but node n’ has not discovered this fact yet due to the delay of a broadcast message. In this case, the algorithm lets node n’ postpone the response until its level becomes higher than or equal to the level it received from node n.
====
Let <math>F</math> and
* '''Merge''': This operation occurs if both <math>F</math> and
* '''Absorb''': This operation occurs if <math>\mathit{Level}(F) < \mathit{Level}(
Furthermore, when an "Absorb" operation occurs, <math>F</math> must be in the stage of changing the core, while
{{numbered list
| Node <math>n'</math> has received broadcast message but it has not sent a convergecast message back to the core. In this case, fragment <math>F</math> can simply join the broadcast process of
| Node <math>n'</math> has already sent a convergecast message back to the core. Before node
# <math>e' \neq e</math>
▲Before node n’ sent a convergecast message, it must have picked a minimum weight outgoing edge. As we discussed above, n’ does that by choosing its minimum weight basic edge, sending a test message to the other side of the chosen edge, and waiting for the response. Suppose e’ is the chosen edge, we can conclude the following:
# <math>\mathit{weight}(e') < \mathit{weight}(e)</math>
The second statement follows if the first one holds. For the first statement, suppose
}}
▲The second statement follows if the first one holds. For the first statement, suppose n’ chose the edge e and sent a test message to n via edge e. Then, node n will delay the response (according to case 3 of "How to find minimum weight incident outgoing edge?"). Then, it is impossible that n’ has already sent its convergecast message. By 1 and 2, we can conclude it is safe to absorb F into F' since e’ is still the minimum outgoing edge to report after F is absorbed.
==== Maximum number of levels ====
As mentioned above, fragments are combined by either "Merge" or "Absorb" operation. The "Absorb" operation
=== Progress property ===
== Approximation algorithms ==
An <math>O(\log n)</math>-approximation algorithm was developed by Maleq Khan and Gopal Pandurangan.<ref name="
▲An <math>O(\log n)</math>-approximation algorithm was developed by Maleq Khan and Gopal Pandurangan.<ref name="khan">Maleq Khan and Gopal Pandurangan. “A Fast Distributed Approximation Algorithm for Minimum Spanning Trees,” ''Distributed Computing'', vol. 20, no. 6, pp. 391–402, Apr. 2008.</ref> This algorithm runs in <math>O(D+L\log n)</math> time, where <math>L</math> is the local shortest path diameter<ref name=khan/> of the graph.
== References ==
<references>
<ref name="GHS">[[Robert G. Gallager]], Pierre A. Humblet, and P. M. Spira,
<ref name="Khan">Maleq Khan and Gopal Pandurangan. "A Fast Distributed Approximation Algorithm for Minimum Spanning Trees,"" ''Distributed Computing'', vol. 20, no. 6, pp. 391–402, Apr. 2008.</ref>
<ref name="Lynch">Nancy A. Lynch. Distributed Algorithms. Morgan Kaufmann, 1996.</ref>
</references>
|