Top Banner
MST Prim MST Kruskal MST Bor˚ uvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST Distributed MST Radu Nicolescu Department of Computer Science University of Auckland 12 October 2017 1 / 28
97

Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

Mar 11, 2018

Download

Documents

TrươngTuyến
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST

Radu NicolescuDepartment of Computer Science

University of Auckland

12 October 2017

1 / 28

Page 2: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

2 / 28

Page 3: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

3 / 28

Page 4: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Spanning trees (ST)

(1)

1

1 1

3

2

(2)

1

1 1

3

2

(3)

1

1 1

3

2

For (1) and (2), consider that the top node is the root

• (1) : min-height SThere also BFS ST (cf. sync Echo)

• (2) : shortest paths ST (cf. sync/async Bellman-Ford)

• (3) : minimum ST (cf. sync/async GHS)here also DFS ST (cf. sync/async Cidon)

• (1,2,3,...) : arbitrary ST (cf. async Echo)

4 / 28

Page 5: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 6: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 7: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 8: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 9: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 10: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Minimum spanning tree (MST) algorithms

• If edges have different weights, then there is a unique MST

• Prim (1957); Jarnık (1930); Dijkstra (1959): O(M logN) orO(M + N logN)

• Kruskal (1956): O(M logN); Reverse-Kruskal: O(M logN...)

• Boruvka (1926); Choquet (1938); Florek, Lukasiewicz, Perkal,Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M logN)

• faster algorithms – almost linear: Chazelle (2000);randomization; integer weights; ...

• Distributed MST (sync,async): GHS - Gallager, Humblet andSpira (1983): O(N logN); improvements linear O(N); or evensub-linear

1“Because Sollin was the only computer scientist in this list living in anEnglish speaking country, this algorithm is frequently called Sollin’s algorithm”(Wiki)

5 / 28

Page 11: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Side-bar: Minimum spanning networks in biology

6 / 28

Page 12: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

7 / 28

Page 13: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 14: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 15: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 16: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 17: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 18: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 19: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Prim

1

5 2

6 3

7

10

9

8

4

8 / 28

Page 20: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

9 / 28

Page 21: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 22: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 23: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 24: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 25: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 26: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 27: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Kruskal

1

5 2

6 3

7

10

9

8

4

10 / 28

Page 28: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

11 / 28

Page 29: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Boruvka – red: Common MWOE (min-weight out edge)

1

5 2

6 3

7

10

9

8

4

12 / 28

Page 30: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Boruvka – red: Common MWOE (min-weight out edge)

1

5 2

6 3

7

10

9

8

4

12 / 28

Page 31: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Boruvka – red: Common MWOE (min-weight out edge)

1

5 2

6 3

7

10

9

8

4

12 / 28

Page 32: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

13 / 28

Page 33: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Based on Boruvka; see Lynch §4.4

• Nodes have unique IDs

• Nodes know their adjacent neighbours

• Nodes know the graph size, N (required for synchronisation)

• could be obtained by a preliminary phase, based on Echo

• Edges have unique weights or same weight edges can beordered

• e..g, by lexicographical comparisons, where each edge {i , j} isrepresented by an ordered triple (w , v , v ′), v < v ′, where w =edge weight, v , v ′ = ID’s of i , j

14 / 28

Page 34: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Based on Boruvka; see Lynch §4.4

• Nodes have unique IDs

• Nodes know their adjacent neighbours

• Nodes know the graph size, N (required for synchronisation)

• could be obtained by a preliminary phase, based on Echo

• Edges have unique weights or same weight edges can beordered

• e..g, by lexicographical comparisons, where each edge {i , j} isrepresented by an ordered triple (w , v , v ′), v < v ′, where w =edge weight, v , v ′ = ID’s of i , j

14 / 28

Page 35: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Based on Boruvka; see Lynch §4.4

• Nodes have unique IDs

• Nodes know their adjacent neighbours

• Nodes know the graph size, N (required for synchronisation)

• could be obtained by a preliminary phase, based on Echo

• Edges have unique weights or same weight edges can beordered

• e..g, by lexicographical comparisons, where each edge {i , j} isrepresented by an ordered triple (w , v , v ′), v < v ′, where w =edge weight, v , v ′ = ID’s of i , j

14 / 28

Page 36: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Based on Boruvka; see Lynch §4.4

• Nodes have unique IDs

• Nodes know their adjacent neighbours

• Nodes know the graph size, N (required for synchronisation)

• could be obtained by a preliminary phase, based on Echo

• Edges have unique weights or same weight edges can beordered

• e..g, by lexicographical comparisons, where each edge {i , j} isrepresented by an ordered triple (w , v , v ′), v < v ′, where w =edge weight, v , v ′ = ID’s of i , j

14 / 28

Page 37: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Based on Boruvka; see Lynch §4.4

• Nodes have unique IDs

• Nodes know their adjacent neighbours

• Nodes know the graph size, N (required for synchronisation)

• could be obtained by a preliminary phase, based on Echo

• Edges have unique weights or same weight edges can beordered

• e..g, by lexicographical comparisons, where each edge {i , j} isrepresented by an ordered triple (w , v , v ′), v < v ′, where w =edge weight, v , v ′ = ID’s of i , j

14 / 28

Page 38: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Comparing weights with equal weights

1

2

3

4

10

10

10

{1, 2} = (10, 1, 2) < {1, 3} = (10, 1, 3) < {4, 3} = (10, 3, 4)

15 / 28

Page 39: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 40: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 41: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 42: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 43: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 44: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 45: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Time complexity: O(N logN)Message complexity: O((N + M) logN)

• Levels: O(logN); each level defines a spanning forest

• Level 0 components are the individual nodes

• Level k + 1 builds larger components by merging 2 or morelevel k components into new components

• Thus, level k ≥ 0 has component subtrees of size 2k , at least

• Each component has a distinguished leader; the leader IDidentifies the component

• For connected graphs, the algorithm ends with a MST(unique, if edges have different weights)

16 / 28

Page 46: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Details may vary, with slightly different performance...

• The following diagrams use a set of suggestive, but notexactly necessary, messages

• initiate

• test

• accept, reject

• report

• connect (implies a change-root), connect!

• To ensure correct component identification, each level k > 1takes a predefined number of steps, O(N) – nodes may needto stay idle until this count is completed

• depending on the actual algorithm details, this may happen indifferent ways

17 / 28

Page 47: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Details may vary, with slightly different performance...

• The following diagrams use a set of suggestive, but notexactly necessary, messages

• initiate

• test

• accept, reject

• report

• connect (implies a change-root), connect!

• To ensure correct component identification, each level k > 1takes a predefined number of steps, O(N) – nodes may needto stay idle until this count is completed

• depending on the actual algorithm details, this may happen indifferent ways

17 / 28

Page 48: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Distributed MST (Sync)

• Details may vary, with slightly different performance...

• The following diagrams use a set of suggestive, but notexactly necessary, messages

• initiate

• test

• accept, reject

• report

• connect (implies a change-root), connect!

• To ensure correct component identification, each level k > 1takes a predefined number of steps, O(N) – nodes may needto stay idle until this count is completed

• depending on the actual algorithm details, this may happen indifferent ways

17 / 28

Page 49: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

18 / 28

Page 50: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 1

1

2

4

5

3

7

6

17

6

9

4 8

5

3

2

19 / 28

Page 51: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 1

1

2

4

5

3

7

6

17

6

9

4 8

5

3

2

connect!

19 / 28

Page 52: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

20 / 28

Page 53: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

21 / 28

Page 54: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

21 / 28

Page 55: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

21 / 28

Page 56: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

idle sync...

21 / 28

Page 57: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

test

21 / 28

Page 58: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2acceptreject

21 / 28

Page 59: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

21 / 28

Page 60: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

21 / 28

Page 61: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

idle synch...

21 / 28

Page 62: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

connect

21 / 28

Page 63: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

connect

21 / 28

Page 64: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

idle synch...

21 / 28

Page 65: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 2

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

connect!21 / 28

Page 66: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

22 / 28

Page 67: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

23 / 28

Page 68: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

23 / 28

Page 69: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

23 / 28

Page 70: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

23 / 28

Page 71: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

initiate

23 / 28

Page 72: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

idle synch...

23 / 28

Page 73: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

test

23 / 28

Page 74: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

reject

23 / 28

Page 75: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

23 / 28

Page 76: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

23 / 28

Page 77: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

23 / 28

Page 78: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

report

23 / 28

Page 79: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Level 3

1

2

4

5

3

7

6

1

7

6

9

4 8

5

3

2

23 / 28

Page 80: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Outline

1 Minimum spanning trees

2 Prim MST

3 Kruskal MST

4 Boruvka MST

5 Distributed MST (Sync)

6 Sync MST – Level 1

7 Sync MST – Level 2

8 Sync MST – Level 3

9 Memento

24 / 28

Page 81: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• Distributed Sync MST is based on Boruvka

• Boruvka can be viewed as extension of both Prim and Kruskal

• At each given step: Prim grows one single tree; Boruvkagrows all trees simultaneously

• At each given step: Kruskal merges exactly two trees; Boruvkamerges all trees simultaneously (2-way or n-way unions)

• The steps of sequential Boruvka correspond to more complexlevels (phases) in distributed Sync MST

25 / 28

Page 82: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• Distributed Sync MST is based on Boruvka

• Boruvka can be viewed as extension of both Prim and Kruskal

• At each given step: Prim grows one single tree; Boruvkagrows all trees simultaneously

• At each given step: Kruskal merges exactly two trees; Boruvkamerges all trees simultaneously (2-way or n-way unions)

• The steps of sequential Boruvka correspond to more complexlevels (phases) in distributed Sync MST

25 / 28

Page 83: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• Distributed Sync MST is based on Boruvka

• Boruvka can be viewed as extension of both Prim and Kruskal

• At each given step: Prim grows one single tree; Boruvkagrows all trees simultaneously

• At each given step: Kruskal merges exactly two trees; Boruvkamerges all trees simultaneously (2-way or n-way unions)

• The steps of sequential Boruvka correspond to more complexlevels (phases) in distributed Sync MST

25 / 28

Page 84: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• Distributed Sync MST is based on Boruvka

• Boruvka can be viewed as extension of both Prim and Kruskal

• At each given step: Prim grows one single tree; Boruvkagrows all trees simultaneously

• At each given step: Kruskal merges exactly two trees; Boruvkamerges all trees simultaneously (2-way or n-way unions)

• The steps of sequential Boruvka correspond to more complexlevels (phases) in distributed Sync MST

25 / 28

Page 85: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• Distributed Sync MST is based on Boruvka

• Boruvka can be viewed as extension of both Prim and Kruskal

• At each given step: Prim grows one single tree; Boruvkagrows all trees simultaneously

• At each given step: Kruskal merges exactly two trees; Boruvkamerges all trees simultaneously (2-way or n-way unions)

• The steps of sequential Boruvka correspond to more complexlevels (phases) in distributed Sync MST

25 / 28

Page 86: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The MST is unique, if weights are pairwise distinct (but thiscan always be arranged, e.g. by lexicographic comparisons)

• There is one single common MWOE, aka the core, in all treeunions in the algorithm (obvious for 2-way unions, but needsproof for more)

• The leader of a union of trees is one of the two endpoints ofthe core, i.e. of the single common MWOE (this also ensuresthat the root stays reasonably close to the leaves)

• A level k union tree has size ≥ 2k , thus tree sizes growexponentially and there are at most logN phases

• To ensure required synchronicity, each level requires O(N)steps (this is ok, as there are only few levels)

26 / 28

Page 87: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The MST is unique, if weights are pairwise distinct (but thiscan always be arranged, e.g. by lexicographic comparisons)

• There is one single common MWOE, aka the core, in all treeunions in the algorithm (obvious for 2-way unions, but needsproof for more)

• The leader of a union of trees is one of the two endpoints ofthe core, i.e. of the single common MWOE (this also ensuresthat the root stays reasonably close to the leaves)

• A level k union tree has size ≥ 2k , thus tree sizes growexponentially and there are at most logN phases

• To ensure required synchronicity, each level requires O(N)steps (this is ok, as there are only few levels)

26 / 28

Page 88: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The MST is unique, if weights are pairwise distinct (but thiscan always be arranged, e.g. by lexicographic comparisons)

• There is one single common MWOE, aka the core, in all treeunions in the algorithm (obvious for 2-way unions, but needsproof for more)

• The leader of a union of trees is one of the two endpoints ofthe core, i.e. of the single common MWOE (this also ensuresthat the root stays reasonably close to the leaves)

• A level k union tree has size ≥ 2k , thus tree sizes growexponentially and there are at most logN phases

• To ensure required synchronicity, each level requires O(N)steps (this is ok, as there are only few levels)

26 / 28

Page 89: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The MST is unique, if weights are pairwise distinct (but thiscan always be arranged, e.g. by lexicographic comparisons)

• There is one single common MWOE, aka the core, in all treeunions in the algorithm (obvious for 2-way unions, but needsproof for more)

• The leader of a union of trees is one of the two endpoints ofthe core, i.e. of the single common MWOE (this also ensuresthat the root stays reasonably close to the leaves)

• A level k union tree has size ≥ 2k , thus tree sizes growexponentially and there are at most logN phases

• To ensure required synchronicity, each level requires O(N)steps (this is ok, as there are only few levels)

26 / 28

Page 90: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The MST is unique, if weights are pairwise distinct (but thiscan always be arranged, e.g. by lexicographic comparisons)

• There is one single common MWOE, aka the core, in all treeunions in the algorithm (obvious for 2-way unions, but needsproof for more)

• The leader of a union of trees is one of the two endpoints ofthe core, i.e. of the single common MWOE (this also ensuresthat the root stays reasonably close to the leaves)

• A level k union tree has size ≥ 2k , thus tree sizes growexponentially and there are at most logN phases

• To ensure required synchronicity, each level requires O(N)steps (this is ok, as there are only few levels)

26 / 28

Page 91: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The accept and reject messages are not really needed; i.e. thetest messages may hold enough info for this decision

• The report messages are evaluated on-the fly, at each node,and only the best MWOE’s details are forwarded up, towardsthe leader

• The report messages leave behind a route to the node holdingthe best MWOE of that subtree

• The connect messages are routed on the tree path which goesfrom the leader to the node holding the overall best MWOE

• The connect messages reshape the tree, by transporting theleadership, i.e. resetting parent and child pointers along theirpath

27 / 28

Page 92: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The accept and reject messages are not really needed; i.e. thetest messages may hold enough info for this decision

• The report messages are evaluated on-the fly, at each node,and only the best MWOE’s details are forwarded up, towardsthe leader

• The report messages leave behind a route to the node holdingthe best MWOE of that subtree

• The connect messages are routed on the tree path which goesfrom the leader to the node holding the overall best MWOE

• The connect messages reshape the tree, by transporting theleadership, i.e. resetting parent and child pointers along theirpath

27 / 28

Page 93: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The accept and reject messages are not really needed; i.e. thetest messages may hold enough info for this decision

• The report messages are evaluated on-the fly, at each node,and only the best MWOE’s details are forwarded up, towardsthe leader

• The report messages leave behind a route to the node holdingthe best MWOE of that subtree

• The connect messages are routed on the tree path which goesfrom the leader to the node holding the overall best MWOE

• The connect messages reshape the tree, by transporting theleadership, i.e. resetting parent and child pointers along theirpath

27 / 28

Page 94: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The accept and reject messages are not really needed; i.e. thetest messages may hold enough info for this decision

• The report messages are evaluated on-the fly, at each node,and only the best MWOE’s details are forwarded up, towardsthe leader

• The report messages leave behind a route to the node holdingthe best MWOE of that subtree

• The connect messages are routed on the tree path which goesfrom the leader to the node holding the overall best MWOE

• The connect messages reshape the tree, by transporting theleadership, i.e. resetting parent and child pointers along theirpath

27 / 28

Page 95: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Sync MST – Memento

• The accept and reject messages are not really needed; i.e. thetest messages may hold enough info for this decision

• The report messages are evaluated on-the fly, at each node,and only the best MWOE’s details are forwarded up, towardsthe leader

• The report messages leave behind a route to the node holdingthe best MWOE of that subtree

• The connect messages are routed on the tree path which goesfrom the leader to the node holding the overall best MWOE

• The connect messages reshape the tree, by transporting theleadership, i.e. resetting parent and child pointers along theirpath

27 / 28

Page 96: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Async MST – GHS and variants

Specific difficulties of the async version - not present in the syncversion:

• Two neighbours may pe part of the same component tree, butthey have not learned this yet (logical error)

• Not all component trees may have a guaranteed size > 2k ;some may grow much faster than others (complexity issue)

• More generally, component trees may be at different levels...(logical and complexity issues)

Read more in Lynch’s textbook:

• §4.4 : sync GHS

• §15.5 : async GHS, plus summary revision of sync GHS

• §15.3 : async STtoLeader (on unrooted STs)

28 / 28

Page 97: Distributed MST - cs. · PDF fileBor uvka(1926); Choquet (1938); Florek, Luk asiewicz, Perkal, Steinhaus, and Zubrzycki (1951); Sollin (1965)1: O(M log N) faster algorithms { almost

MST Prim MST Kruskal MST Boruvka MST Sync MST Sync MST 1 Sync MST 2 Sync MST 3 Sync MST

Async MST – GHS and variants

Specific difficulties of the async version - not present in the syncversion:

• Two neighbours may pe part of the same component tree, butthey have not learned this yet (logical error)

• Not all component trees may have a guaranteed size > 2k ;some may grow much faster than others (complexity issue)

• More generally, component trees may be at different levels...(logical and complexity issues)

Read more in Lynch’s textbook:

• §4.4 : sync GHS

• §15.5 : async GHS, plus summary revision of sync GHS

• §15.3 : async STtoLeader (on unrooted STs)

28 / 28