Minimum Spanning Tree - PowerPoint PPT Presentation

About This Presentation
Title:

Minimum Spanning Tree

Description:

Title: Concurrent Reading and Writing using Mobile Agents Author: Sukumar Ghosh Last modified by: Sukumar Ghosh Created Date: 11/1/2002 2:53:35 AM – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 20
Provided by: Sukuma6
Category:

less

Transcript and Presenter's Notes

Title: Minimum Spanning Tree


1
Minimum Spanning Tree
  • Given a weighted graph G (V, E), generate a
    spanning tree T (V, E) such that the sum of
    the weights of all the edges is minimum.
  • Applications
  • On Euclidean plane, approximate solutions to the
    traveling salesman problem,
  • Lease phone lines to connect the different
    offices with a minimum cost,
  • Visualizing multidimensional data (how entities
    are related to each other)
  • We are interested in distributed algorithms only

The traveling salesman problem asks for the
shortest route to visit a collection of cities
and return to the starting point.
2
Example
3
Sequential algorithms for MST
  • Review (1) Prims algorithm and (2) Kruskals
    algorithm.
  • Theorem. If the weight of every edge is
    distinct, then the MST is unique.

4
Gallagher-Humblet-Spira (GHS) Algorithm
  • GHS is a distributed version of Prims algorithm.
  • Bottom-up approach. MST is recursively
    constructed by fragments joined by an edge of
    least cost.

3
7
5
Fragment
Fragment
5
Challenges
Challenge 1. How will the nodes in a given
fragment identify the edge to be used to connect
with a different fragment? A root node in each
fragment is the coordinator
6
Challenges
Challenge 2. How will a node in T1 determine if
a given edge connects to a node of a different
tree T2 or the same tree T1? Why will node 0
choose the edge e with weight 8, and not the edge
with weight 4? Nodes in a fragment acquire the
same name before augmentation.
7
Two main steps
  • Each fragment has a level. Initially each node is
    a fragment at level 0.
  • (MERGE) Two fragments at the same level L combine
    to form a fragment of level L1
  • (ABSORB) A fragment at level L is absorbed by
    another fragment at level L (L lt L)

8
Least weight outgoing edge
  • To test if an edge is outgoing, each node sends
    a test message through a candidate edge. The
    receiving node may send accept or reject.
  • Root broadcasts initiate in its own fragment,
    collects the report from other nodes about
    eligible edges using a convergecast, and
    determines the least weight outgoing edge.

test
accept
reject
9
Accept of reject?
  • Let i send test to j
  • Case 1. If name (i) name (j) then send reject
  • Case 2. If name (i)?name (j)?level (i) ? level
    (j) then send accept
  • Case 3. If name (i) ? name (j) ? level (i) gt
    level (j) then wait until level (j) level (i).
    WHY?
  • Levels can only increase.
  • Question Can fragments wait for ever and lead to
    a deadlock?

reject
test
test
10
Delayed response
test
A
B
join
initiate
Level 3
Level 5
B is about to change its level to 5. So B does
not send an accept reponse to A in response to
test
11
The major steps
  • repeat
  • Test edges as outgoing or not
  • Determine lwoe - it becomes a tree edge
  • Send join (or respond to join)
  • Update level name identify new coordinator
  • until done

12
Classification of edges
  • Basic (initially all branches are basic)
  • Branch (all tree edges)
  • Rejected (not a tree edge)
  • Branch and rejected are stable attributes

13
Wrapping it up
Example of merge
  • Merge
  • The edge through which the join
  • message is sent, changes its status to
  • branch, and becomes a tree edge.
  • Each root broadcasts an
  • (initiate, L1, name) message
  • to the nodes in its own fragment.

14
Wrapping it up
  • Absorb
  • T receives an initiate message.
  • This indicates that the fragment at
  • level L has been absorbed by the
  • other fragment at level L. They
  • collectively search for the lwoe.
  • The edge through which the
  • join message was sent, changes
  • its status to branch.

initiate
Example of absorb
15
Example
8
0
2
1
5
1
3
7
4
5
4
6
2
6
3
9
16
Example
8
merge
merge
0
2
1
5
1
3
7
4
5
4
6
2
merge
6
3
9
17
Example
8
0
2
1
5
1
7
4
merge
3
5
4
6
absorb
2
6
3
9
18
Example
absorb
8
0
2
1
5
1
7
4
3
5
4
6
2
6
3
9
19
Message complexity
At least two messages (test reject) must pass
through each rejected edge. The upper bound is
2E messages. At each of the log N levels, a
node can receive at most (1) one initiate message
and (2) one accept message (3) one join message
(4) one test message not leading to a rejection,
and (5) one changeroot message. So, the total
number of messages has an upper bound of 2E
5N logN
Write a Comment
User Comments (0)
About PowerShow.com