MST GALLAGER HUMBLET SPIRA ALGORITHM - PowerPoint PPT Presentation

About This Presentation
Title:

MST GALLAGER HUMBLET SPIRA ALGORITHM

Description:

... IDs of neighbors takes 2 ... Two L-1 level fragments are combined to L-level fragment over a ... to L-1 level fragments that are waiting to be connected (the ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 21
Provided by: JJ164
Category:

less

Transcript and Presenter's Notes

Title: MST GALLAGER HUMBLET SPIRA ALGORITHM


1
MSTGALLAGER HUMBLET SPIRA ALGORITHM
2
MST
  • Undirected graph, length weight of edge is
    unique (IDs)
  • A node knows weight of the incident edges
  • The algorithm is initiated in one or more nodes
  • Get IDs of neighbors takes 2E messages
  • Symmetry problem could be solved by probabilistic
    algorithms
  • Applications
  • Multicast
  • Leader election
  • Dynamic changes of topology

3
Definiitons
  • Fragment subtree of a MST
  • Outgoing edge of the fragment (i, j)
    i is in the fragment,
    j is not in the fragment
  • Lemma
  • Given a fragment of an MST, let e be a
    minimum-weight outgoing edge of the fragment.
    Then joining e and its adjacent nonfragment node
    to the fragment yields another fragment of an
    MST.
  • Proof
  • assume e does not belong MST ( F ?e is not a
    fragment)
  • Then we get a cycle
  • By replacing x by e we get a lighter ST
  • ? original MST was not minimum
  • ? wrong assumption

w(x)gtw(e)
4
GHS
  • Lemma
  • If all edges of a connected graph have different
    wieghts then the MST is unique
  • Algorithms
  • fragments may grow in an arbitrary order
  • If two fragments have a common node, union of the
    two fragments is also a fragment
  • GHS each fragment finds a minimum edge and
    tries to connect to the fragment incident to the
    edge
  • Fragment levels
  • One node level 0
  • Fragment F level L ? 0
  • Fragment F level L

5
GHS ALGORITHM
  • If L lt L then F (ready to join) becomes a part
    of F level L
  • If L L and F, F have the same minimum-weight
    outgoing edge (core) the new level is L1
  • If L gt L F waits, until F reaches a high
    enough level

fragment F level 1 1.1 core of F
node 4 is absorbed by F or later on by F
1
2
3.1
1.7
4
2.6
3
2.1 core of F fragment F level 1
3.7
3.8
edge 1-5 is a core of F, level 2
6
5
6
OUTLINE OF THE ALGORITHM
  • Join fragments
  • Relabel all nodes in the new fragment with the
    same label
  • Notify them about the change of state
  • Make them start a new round
  • Find the minimum outgoing edge of the fragment
  • Find the minimum outgoing edge of a node
  • Find the minimum over all nodes
  • If no min outgoing edge is found, the algorithm
    ends
  • Otherwise

7
CONNECTING FRAGMENTS
  • 0-level fragments
  • A node is in the state
  • Sleeping
  • Find sends Connect over the minimum edge, goes
    to the state
  • Found waits for a response
  • Non-zero level fragments
  • Two L-1 level fragments are combined to L-level
    fragment over a core (assume the core is found)
  • The weight of the core defines an ID of the new
    fragment
  • Nodes incident to a core send Initiate (level,
    fragment_id)
  • The Initiate message is propagated also to L-1
    level fragments that are waiting to be connected
    (the same level, different ID, found)
  • The message sets a new level, id and Find state
    in each node in the fragment (continue by Test
    message)

core
Initiate
8
FINDING A MINIMUM-WEIGHT OUTGOING EDGE IN ONE
NODE
  • Edge
  • branch
  • rejected back edge
  • basic
  • Messages
  • In the state Find a node sends Test (level, id
    _fragment) on a basic min.-weight edge
  • If id_fragment(i) id_fragment(j)
  • node j sends Reject to node i
  • The edge ij gets to state rejected
  • A node tests another basic edge

Test
i
j
9
FINDING . . .
  • If id_fragment(i) ? id_fragment(j)
  • If fragment_level(i) ? fragment_level(j)
  • j sends Accept to i
  • If fragment_level(i) gt fragment_level(j)
  • j postpones the reply until it reaches a
    higher level
  • Reason synchronization the low-level fragment
    may be in an inconsistent state (might be even
    the same fragment that is slow with changing its
    id (if it is the same level, and it is the same
    fragment, then the IDs must be the same and ID
    is used only once)
  • No node found an outgoing edge gt MST was found,
    termination
  • Each node finnaly finds a min-weight ougoing edge
    if it exists

10
FINDING A MINIMUM-WEIGHT OUTGOING EDGE FOR THE
WHOLE FRAGMENT
  • Leaves of the fragment send Report (min_weight)
  • min_weight ? if min. edge does not exist
  • Internal nodes pick the minimum weight message,
    mark the edge as a best-edge and send Report (w)
    to their father-node
  • Nodes change state to Found
  • Report messages meet at the original core

11
CONNECTING FRAGMENTS
Report(w)
Report(w)
Change_core
min outgoing edge
Connect(L)
  • Change_core is sent over the best-edges and
    edges change their direction
  • The tree is now rooted in a node incident with
    the core
  • Connect(L) is sent over the min. outgoing edge of
    fragment

12
CONNECTING FRAGMENTS contd
Connect(L)
Connect(L)
F L
F L
  • New fragment has level L 1
  • Nodes incident to the core will send Initiate
  • L 1 level fragment contains always at least 2
    fragments of level L
  • Fragment of level L contains at least 2L nodes
    gt L ? log2 N

13
CONNECTING FRAGMENTS contd
Connect(L)
Lower level fragment can always join the higher
level one But not vice versa LgtL does not
apply Test would be waiting
j F L
i F L
L lt L
  • Node j sends Initiate(L, F) to i
  • j is in state Find, has not sent Report yetgt
  • F joins fragment F
  • nodes in F send Test message
  • j is in state Found, already has sent Report gt
  • fragment F has found an edge with a lower weight
    that (i,j) gt
  • Test message will not be sent in fragment F

14
CORRECTNESS
  • Follows from Lemma 1, 2 assuming that
  • 1. the algorithm finds correctly the
    minimum-weight outgoing edge
  • 2. waiting for a response will not cause a
    deadlock
  • Ad 1
  • Connect(L) is sent over a minimum-weight outgoing
    edge of fragment of level L
  • Fragment is composed of all nodes that accepted
    Initiate(L, id_fragment)
  • Fragment can grow by absorbing fragments of a
    lower level if the lower level fragment already
    sent Connect over its min. edge

15
Contd
  • Ad 2
  • Let us consider a set of fragments created during
    the algorithm run
  • For the min.-weight outgoing edge of fragment of
    a minimal level L
  • Test message
  • the lowest level fragments
  • will will either wake
    0-level fragment
  • or a response is immediately
    sent back
  • Connect message
  • will wake 0-level
    fragment
  • is accepted by a
    fragment of a higher level and Initiate

  • message is sent back
    immediately
  • it is accepted by a
    fragment of the same level and L1 level

  • fragment is created
  • the above holds for any state gt there is no
    deadlock

16
MESSAGE COMPLEXITY
  • Message length O(log N)
  • 1. Every edge is rejected at most once Test,
    Reject 2E
  • 2. A node in a fragment of level L (except zero
    and highest .

    level)
  • accepts at most one message Initiate

  • Accept
  • sends at most one message Test (not rejected)

  • Report

  • Change_root or Connect

  • -------------------------------------

  • 5N messages
  • number of levels L ? log2 N
  • L 2 ?
    log2 N
  • 5N ( log2 N)

17
Contd
  • 3. A node in fragment of zero-level
  • Accepts at most one message Initiate
  • Sends out at most one message Connect
  • A node in fragment of highest level
  • Sends out at most one message Report
  • Accepts at most one message Initiate

  • ------------------

  • 4N lt 5N log2 N

  • ------------------------

  • 5N log2 N E

18
TIME COMPLEXITY
  • In the case of a sequential activation of nodes
  • N(N-1) messages will be
    sent sequentially
  • Initialization phase
  • waking up all nodes N
    1 time units
  • each node sends Connect 1
  • sending out Initiate messages N
  • every node in a fragment of level 1 2N
  • In time 5lN 3N all nodes will be in a fragment
    of level l

19
Contd
  • Proof
  • 1. l 1 T 2N
  • 2. Holds for l
  • on level l every node sends at most N messages
    Test and gets a response
    in time 5lN N
  • sending out messages Report
  • Change_root,
    Connect 3N
  • Initiate
  • --------------------------------------------------
    -------------------

  • 5lN 2N 5(l 1) N 3N
  • On the last level only messages Test, Reject,
    Report are sent .

    3N
  • levels ? log N gt T ? 5N logN

20
Epilogue
  • Awerbuch 1987 Optimal algorithm
  • Faloutsos Molle 1995 small fixes of Awerbuchs
    algorithm
Write a Comment
User Comments (0)
About PowerShow.com