You are on page 1of 21

Distributed Tree Construction

Haimonti Dutta
haimonti@buffalo.edu

September 29, 2014

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Recap: Breadth First Tree Construction

BFS
The Breadth First Spanning (BFS) Tree of G with respect to a
given root r0 is a spanning tree TB with the property that for every
other vertex v , the path leading from root to v in the tree is of the
minimum length possible.

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Some Facts

BFS
In a synchronous network, by flooding, BFS can be generated with
Message(Flood)=(E ) and Time(Flood)=(Diam(G )).
In aynchronous network, tree generated may not be a BFS!

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Sequential Algorithms

Algorithms
Dijkstra
Bellman-Ford
Review Dijkstra from
https://www.youtube.com/watch?v=WN3Rb9wVYDY

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm

Begin developing the BFS tree layer-by-layer


At each stage, next layer is built by adding all the vertices
that are adjacent to some vertex in the tree but are not yet in
the tree themselves

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm

r0 vertex initiating the construction

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm

r0 vertex initiating the construction


Originates synchronous phases by adding one new layer in
each phase

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm

r0 vertex initiating the construction


Originates synchronous phases by adding one new layer in
each phase
Phases signaled by a PULSE message generated and
broadcast by r0

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm

r0 vertex initiating the construction


Originates synchronous phases by adding one new layer in
each phase
Phases signaled by a PULSE message generated and
broadcast by r0
Let Tp be tree rooted at r0 . BFS obtained p (r0 )

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp
Upon receiving the broadcast message PULSE, each leaf of
Tp sends an exploration message LAYER to all neighbors.

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp
Upon receiving the broadcast message PULSE, each leaf of
Tp sends an exploration message LAYER to all neighbors.
Vertex on receiving LAYER, marks a parent and informs
neighbors of choice of parent

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp
Upon receiving the broadcast message PULSE, each leaf of
Tp sends an exploration message LAYER to all neighbors.
Vertex on receiving LAYER, marks a parent and informs
neighbors of choice of parent
Tp collects acknowledgments of its exploration messages

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp
Upon receiving the broadcast message PULSE, each leaf of
Tp sends an exploration message LAYER to all neighbors.
Vertex on receiving LAYER, marks a parent and informs
neighbors of choice of parent
Tp collects acknowledgments of its exploration messages
On receipt of all exploration messages, leaf upcasts ack to
parent. Ack from leaves are converge cast to root r0

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Dijkstras Algorithm: Contd

Root r0 generates the message PULSE and broadcasts it on


Tp
Upon receiving the broadcast message PULSE, each leaf of
Tp sends an exploration message LAYER to all neighbors.
Vertex on receiving LAYER, marks a parent and informs
neighbors of choice of parent
Tp collects acknowledgments of its exploration messages
On receipt of all exploration messages, leaf upcasts ack to
parent. Ack from leaves are converge cast to root r0
Once covergecast terminates, start next phase.

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Sequential Bellman-Ford Review

Watch this video:


https://www.youtube.com/watch?v=iTW2yFYd1Nc

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Bellman-Ford

Root sets L(r0 ) 0; other vertices L(r0 )

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Bellman-Ford

Root sets L(r0 ) 0; other vertices L(r0 )


Root sends LAYER(0) to all neighbors

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Bellman-Ford

Root sets L(r0 ) 0; other vertices L(r0 )


Root sends LAYER(0) to all neighbors
Every other vertex reacts to incoming messages as follows:

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Bellman-Ford

Root sets L(r0 ) 0; other vertices L(r0 )


Root sends LAYER(0) to all neighbors
Every other vertex reacts to incoming messages as follows:
If d + 1 < L(v ), then do

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

Distributed Bellman-Ford

Root sets L(r0 ) 0; other vertices L(r0 )


Root sends LAYER(0) to all neighbors
Every other vertex reacts to incoming messages as follows:
If d + 1 < L(v ), then do
(a) parent(v ) v
(b) L(v ) d + 1
(c) Send Layer(d+1) to all neighbors except w

Haimonti Dutta haimonti@buffalo.edu

Distributed Tree Construction

You might also like