Distributed MST for Constant Diameter Graphs
Zvi Lotker & Boaz Patt-Shamir & David Peleg
Model and Notation G(V,E) is the network Each vertex has a unique name Each edge has a weight Vertices communicate only by edges The communication is synchronous Exactly B bits are sent at each time
step D is the diameter of the graph
Related work If B= then O(D) [N. Linial 92] If B=O(log(n)) communication optimal
required O(n•log(n)) and O(n) time [GHS83] and [A87] respectively
O(D+n0.613 • log*(n)), O(D+n0.5 • log*(n)) [GKP98], [KP98] respectively
(n0.5/(B•log(n))) [PR00]
Our results lower bound There exists a family of graphs
with diameter 4 s.t ((n1/3)/B) There exists a family of graphs
with diameter 3 s.t ((n1/4)/(B0.5)) The lower bound holds for
randomized algorithms
Our results graph with diameter 2
O(log n) time units suffice to compute an MST for graphs with diameter 2
The mailing problem [PR00] mail(G,s,r,b)
G(V,E) s,rV We wish to send x1, x2,… xb bits
from s to r We denote the worst-case time
complexity of algorithm A by TA(G,s,r,b)
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=1
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=2
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=3
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=4
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=5
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=6
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=7
The mailing problem Exmpal mail(Pn,s,r,b)
TA(Pn,s,r,b)>b
s r
t=8
TA(Pn,s,r,b)=n+b
Diameter 4 graphs
c
v2,m2+1 v3,m2+1
s=v1,m2+1 r=vm,m2+1
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m2 v3,m2 vm,m2
Diameter 4 graphs For all m> 2, the number of nodes is
m^3+m+1 and the diameter is 4c
v2,m2+1 v3,m2+1
s=v1,m2+1 r=vm,m2+1
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m2 v3,m2 vm,m2
Diameter 4 graphs
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m2 v3,m2 vm,m2
s=v1,m2+1
v2,m2+1 v3,m2+1
r=vm,m2+1
c
268
m+2
Diameter 4 graphs For any time t<m the number of
bits delivered at r by time t is at most t•m•B
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m2 v3,m2 vm,m2
s=v1,m2+1
v2,m2+1 v3,m2+1
r=vm,m2+1
c
Diameter 4 graphs For any time t<m the number of
bits delivered at r by time t is at most t•m•B
For any correct mailing algorithm A, any m> 2 and any m^2 bit input string X, we have TA(hm,s,r,X)> m/B. t•m•B>m^2t>m/b
Diameter 4 graphsFrom mailing to MST
0
1,3
2
Diameter 4 graphsFrom mailing to MST
0
1,3
2
z1
z2z3
r=zm
km
Diameter 3 graphs For all m> 2, the number of nodes
is m^4+m+1 and the diameter is 3
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
s
Diameter 3 graphs
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
z1
z2z3
r=zms
km
24
m+2
Diameter 3 graphs
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
z1
z2z3
r=zms
kmM4
Diameter 3 graphs
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
z1
z2z3
r=zms
km
Diameter 3 graphs
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
z1
z2z3
r=zms
km
For any t<m, new bits that arrive at C enter only at nodes zi with 1 i t.
Diameter 3 graphs For t< m, the number of bits arriving at
r by time t is less than t^2mB/2.
v1,1 v2,1 v3,1 vm,1
v1,2 v2,2 v3,2 vm,2
v2,m3
v1,m3
v3,m3
vm,m3
z1
z2z3
r=zms
km
If for some probability distribution over the inputs the expected cost for all deterministic algorithms is at least C,
then for any randomized algorithm there exists an input with expected complexity at least C.
The minimax principle [Yao 77]
Segmented minima D=2 For each vV we have segment
number f(v) and value a(v) The task of segmented minima is
to compute b(v)= min{ a(v):f(v)=f(u)}
Solving Segmented minima Lemma: Segmented minima can be
computed in 2 steps in the B model,1. Send (f(v),a(v)) to all neighbors2. Send to each neighbor u the minimal
value received from u 's segment3. Set b(v) to be the minimum of all
values received in the second step
Solving Segmented minima
4
3
5
62
1
7
8
Solving Segmented minima
1,2,3,4,73,5,6,7,8
3,4,6,8
2,4,5,7
1,4,6
2,4,7,8
1,3,6,8
2,5,8
4
3
2
1 5
6
7
8
1. Send (f(v),a(v)) to all neighbors
Solving Segmented minima
2. Send to each neighbor u the minimal value received from u 's segment
1,2,3,4,7
3,4,6,8
2,4,5,7
1,4,6
3,5 4
3
2
1 5
6
7
8 1,7
2,7
1,6
2,5
3,6
2,5
1,6
3,5,6,7,8
2,4,7,8
1,3,6,8
2,5,8
Solving Segmented minima
3. Set b(v) to be the minimum of all values received in the second step
1,2,3,4,7
3,4,6,8
2,4,5,7
1,4,6
4
3
2
1 5
6
7
83,5,6,7,8
,2,4,7,8
1,3,6,8
2,5,8
1,3,2,1,2
1,3,3,1
1,2,2,2
1,1,1
5,7,6,5,6
5,7,7,5
5,6,6,6
5,5,5
definition A fragment is a collection of nodes
connected by edges already added to the MST.
The leader of a fragment is the node whose ID is minimal in the fragment.
At any given time step, we use f(v) to denote the leader of the fragment that contains a node v
Phase k
1. Each fragment adds one edge to the MST (using the leader). By doing this a new structure of fragments is created
2. Each new fragment chooses a new leader.
A simple O(log^2 n) time algorithm derived from
Boruvka's
All nodes in a fragment know the ID of their leader at the beginning of every Phase
Initially, each node forms a singleton fragment with itself being the leader
Phase k
1. Each node v sends the ID of its current leader f(v) to all its neighbors
2. The nodes execute segmented minima, with the values being the weight of their lightest incident edge outgoing to another fragment
3. Find the leader of the fragment using pointer jumping.
Example
1 21 2 3 4 5 6 73 4 5 6
71010 10 10 10 10
8
Phase 1The problem is to select a leader
1 21 2 3 4 5 6 73 4 5 6
71010 10 10 10 10
8
1 2 3 4 5 6 7 8
0 1 1 2 3 4 5 6 7
1 1 1 1 2 3 4 5 6
2 1 1 1 1 1 2 3 4
3 1 1 1 1 1 1 1 1
O(Log(log(n))) in KnElan Pavlov The idea is the increase the
communication bandwidth the fragment
The alg work in phases each take O(1) For every fragment F, the spanning
subtree T(F) is know to all the node in the graph at the end of the time the fragmen is created.
Example
Phase k
1. For every other fragmen F' do:2. Compute the minimum-weight edge e(v,F') that
connects v to (any node of) F'.3. Send e(v,F') to every node in the fragmen F'.4. For every other fragmen F', inspect e(w,F) for
every wF‘ and compute the fragmen edge between F' and F, denoted e(F,F')
5. selects a set A(F) containing the N cheapest edges that go out of F to N distinct fragmen end for each edge e appointed as guardian.
6. computes the new fragmen and spanning subtree of phase k.
computes the new fragmen
Done in two stages1. creating a logical graph G.2. partitions this logical graph G into
superclusters and constructs a spanning subtree.
computes the new fragmen
partitions this logical graph into superclusters and constructs a spanning subtree.
1. Inspects the edges that where selected sequentially in increasing order of weight.
2. Edge e is added to G if it does not close a cycle with edges already in G.
3. Whenever an edge e=(F1,F2) is added to G the superclusters F1 and F2 are merged into one supercluster
computes the new fragmen
newly constructed super- fragmen F is declared finished if
1. e is the heaviest edge in A(F1) or in A(F2),
2. Either F1 or F2 is finished.
3. The super-cluster F is declared finished if e is the heaviest edge.
End
Example
10 10 10
10
1 21 2 3 4 5 6 73 4 5 6
71010 10 10
8
7
1 2 3 4 5 6 7 8
0 1 1 2 3 4 5 6 7
1 1 1 1 2 3 4 4 4
2 1 1 1 1 1 2
3
Example
10 10 10
10
1 21 2 3 4 5 6 73 4 5 6
71010 10 10
8
7
1 2 3 4 5 6 7 8
0 1 1 2 3 4 5 6 7
a 1 1 1 2 3 4 4 4
1 1 1 1 1 1 2 2 2
a
At the end
4
3
5
62
1
7
8
Phase 2
4
3
5
62
1
7
8
4
3