Docsity

Distributed Graph Algorithms: Chang-Robert's Algorithm for Constructing a Spanning Tree - , Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Distributed Graph Algorithms: Chang-Robert's Algorithm for Constructing a Spanning Tree - and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Lecture 14

distributed graph algorithms 2

distributed systems

CS425 / ECE 428 / CSE 424

sayan mitra

acknowledgment

these slides are based on ideas and material from the following sources:

  • slides from professor S. Ghosh’s course at university of Iowa

constructing a spanning tree

spanning tree construction

Chang-Robert’s algorithm

  • root is known and initiates construction
  • uses probes and echoes, and
  • keeps track of deficits
    • C number of echoes to give back to parent
    • D number of echoes expecting from neighbors

0

1 2

3 4

5 root

For a graph G=(V,E), a spanning tree is a maximally connected subgraph T=(V,E’), E’ E,such that if one more edge is added, then the subgraph is no more a tree.

Parent pointer

execution of algorithm

0, 2

0

0, 2

1, 2

0, 2

1, 2 1, 1 0

1, 2

1, 1

1, 2

0

1, 2

1, 1

1, 2

1, 2 1, 1

1, 00, 0

1, 1

1, 0

0, 0

0

1, 1

1, 0

0, 0

0, 2

0, 2 0, 2 (^) 0, 2

0, 1 0

1, 0

1, 0

0, 0

0, 1

0, 0

0, 0

Chang-Robert’s algorithm

• parent pointers define spanning tree

• message complexity?

  • 2|E|

• does it always lead to the same tree?

  • no, depends on sequence of message deliveries

• what if there is no initiator?

  • elect leader

minimum spanning tree

(MST)

Given a weighted graph G = (V, E), generate a spanning tree T = (V, E’) E’ E such that the sum of the weights of all the edges is minimum.

Applications Minimum latency brodcast 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.

Example

Gallagher-Humblet-Spira (GHS) Algorithm

  • GHS is a distributed version of Prim’s algorithm.
  • bottom-up approach
  • initially each node is a fragment
  • MST is recursively constructed by joining fragments by an edge of least cost

Fragment (^) Fragment

challenges

1

2

3

4

5

6

7

8

9

(^0) e 2

3

(^15)

4 6

T1 T

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 root/coordinator so. each fragment is a rooted tree

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 L+
  • (ABSORB) a fragment at level L is absorbed by another fragment at level L’ (L < L’). The new fragment has a level L’.

(each fragment in level L has at least 2L^ nodes)

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 n odes about eligible edges and determines the least weight outgoing edge (lwoe)

1

2

3

4

5

6

7

8

9

(^0) e 2

3

(^15)

4 6

T1 T

test

reject

accept

the major steps

repeat

1 Test edges as outgoing or not

2 Determine lwoe - it becomes a tree edge

3 Send join (or respond to join)

4 Update level & name & identify new

coordinator/root

until done

classification of edges

• Basic (initially all branches are basic)

• Branch (all tree edges)

• Rejected (not a tree edge)

Branch and rejected are stable attributes