Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

53
Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt- Shamir & David Peleg
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    220
  • download

    0

Transcript of Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Page 1: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Distributed MST for Constant Diameter Graphs

Zvi Lotker & Boaz Patt-Shamir & David Peleg

Page 2: 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

Page 3: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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]

Page 4: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 5: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Our results graph with diameter 2

O(log n) time units suffice to compute an MST for graphs with diameter 2

Page 6: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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)

Page 7: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=1

Page 8: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=2

Page 9: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=3

Page 10: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=4

Page 11: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=5

Page 12: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=6

Page 13: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

The mailing problem Exmpal mail(Pn,s,r,b)

TA(Pn,s,r,b)>b

s r

t=7

Page 14: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 15: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 16: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 17: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 18: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 19: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 20: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Diameter 4 graphsFrom mailing to MST

0

1,3

2

Page 21: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Diameter 4 graphsFrom mailing to MST

0

1,3

2

Page 22: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 23: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 24: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 25: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 26: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 27: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 28: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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]

Page 29: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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)}

Page 30: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 31: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Solving Segmented minima

4

3

5

62

1

7

8

Page 32: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 33: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 34: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 35: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 36: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 37: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 38: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 39: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Example

1 21 2 3 4 5 6 73 4 5 6

71010 10 10 10 10

8

Page 40: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 41: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 42: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Example

Page 43: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.
Page 44: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.
Page 45: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 46: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 47: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 48: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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.

Page 49: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

End

Page 50: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 51: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

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

Page 52: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

At the end

4

3

5

62

1

7

8

Page 53: Distributed MST for Constant Diameter Graphs Zvi Lotker & Boaz Patt-Shamir & David Peleg.

Phase 2

4

3

5

62

1

7

8

4

3