Top Banner
Distributed Coloring in                Bit Rounds Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore, MD USA
53

Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

May 22, 2020

Download

Documents

dariahiddleston
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: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Distributed Coloring in Bit Rounds

Kishore KothapalliDepartment of Computer Science

Johns Hopkins UniversityBaltimore, MD USA

Page 2: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Vertex Coloring

1

Proper coloring Not a Proper coloring

Page 3: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring a Cycle Graph

Cycle graph on n nodes Distributed algorithm: Every round, every uncolored

node chooses a color among R,G,B independently and uniformly at random. [Luby]

2

Page 4: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring a Cycle Graph

Cycle graph on n nodes Distributed algorithm: Every round, every uncolored

node chooses a color among R,G,B independently and uniformly at random.

3

Page 5: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring a Cycle Graph

Cycle graph on n nodes Algorithm: Every round, every uncolored node chooses a

color among R,G,B independently and uniformly at random.

Known: Every node gets colored in O(log n) rounds.4

Page 6: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Cycle graph on n nodes, with edges oriented. Edge u,v oriented u v, then u gets preference over v.

u v vu

5

Page 7: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Cycle graph on n nodes, with edges oriented. Algorithm: Nodes choose color ind. and u.a.r.

6

Page 8: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Cycle graph on n nodes, with edges oriented. Algorithm: Nodes choose color ind. and u.a.r.

6

Page 9: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Cycle graph on n nodes, with edges oriented. Algorithm: Nodes choose color ind. and u.a.r. Use orientation to break symmetry. Claim: Can color in O( ) rounds, w.h.p. !!

– Proof coming up...7

Page 10: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Consider situation after r = 4 rounds. Claim: Any arc P of length l = has at least one

colored node.– Pr[a given path P has no colored node after r rounds]

(1/2)lr 1/n4.

– Number of arcs of length l 2n.8

P:

Page 11: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Coloring an Oriented Cycle Graph

Claim: Can finish in a further rounds.– Key: Orientation !!

Number of rounds = O( ), with high probability.

Round 1 Round 2 Round 3 Round l

9

Page 12: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Questions

1)Can faster algorithms be designed for arbitrary oriented graphs?

2)How many bits have to be exchanged?

10

Page 13: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction Model Related Work Lower bounds Upper bound for constant degree graphs Upper bound for general graphs Experimental results Conclusion

11

Page 14: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Introduction

Distributed system– Computation done by exchange of messages.– Graph G = (V,E) representing the topology.

Vertex coloring is a fundamental problem. Applications to

– Scheduling– Routing– Clustering

12

Page 15: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Introduction

Distributed vertex coloring Number of colors

– Minimum required is called chromatic number, χ(G).– NP­hard to compute χ(G). [GJ, 1979]– Hard to approximate χ(G) to any reasonable value.

Try to color with O(∆) or ∆+1 colors.

13

Page 16: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Introduction

Deterministic algorithms– No poly­logarithmic algorithms known.– Best known runs in O(n ) rounds [PS 1996].– Cannot be solved deterministically without unique

node identification numbers [BFFS, 2003].

14

Page 17: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Introduction

Randomized algorithms– Decreases the number of rounds required

exponentially.– Known since more than a decade [Luby 1985].– O(log n) rounds to obtain a (∆+1)­coloring.

Page 18: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

IntroductionModel Related Work Lower bounds Upper bound for constant degree graphs Upper bound for general graphs Experimental results Conclusion

15

Page 19: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Model

Graph G = (V,E) modeling the topology of the distributed system.

Degree = ∆, |V| = n Edges have orientation.

– Bits can flow in both directions.

u v vu

16

Page 20: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Model

l­acyclic orientation: Minimum length of directed cycled induced by the orientation ≥l.

l = 4

17

Page 21: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Model

Nodes do not need unique labels, know only n and ∆ Synchronized rounds Local computation is not counted.

18

Page 22: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Model

Every bit round, every node can send (receive) at most 1 bit to (resp. from) its neighbors.– Bit complexity is the maximum number of bit rounds

required. One round of the algorithm contains several bit rounds.

vu1

vuvu1 0

11

0Bit Round:

Round BR BR

Page 23: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Model

How easy is it to provide orientation? Three scenarios:

1)Dynamic networks.2)Know a reference, such as distance to destination.3)Nodes are labeled distinctly.

19

Page 24: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction ModelRelated Work Lower bounds Upper bound for constant degree graphs Upper bound for general graphs Experimental results Conclusion

20

Page 25: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Related Work ­ Coloring

Luby [Luby, 1985] gave an O(log n) round algorithm to ∆+1 color a graph.

Special cases:– Cycle: O(log* n) rounds [CV 1986, GPS 1987], shown to

be optimal [Linial, 1992]– Rooted Trees: 6­coloring in O(log* n) rounds [GPS, 1987]

Unlimited local computation– ∆ coloring in O(log*(n/∆)) rounds, [De Marco and Pelc,

2001] Many more...

21

Page 26: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Related Work – Oriented Graphs

Sense of direction– Equivalent notion to that of orientation on edges.

Leader election with O(n) messages [Singh 87]. Spanning tree, depth first traversal [Flocchini, Mans,

Santoro 97].

22

Page 27: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction Model Related WorkLower bounds Upper bound for constant degree graphs Upper bound for general graphs Experimental results Conclusion

23

Page 28: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Lower bound ­1

(Unoriented) cycle graph on n nodes Any finite number of colors, any Las Vegas algorithm. Need Ω(log n) bit rounds, with high probability, to

arrive at a proper coloring.

24

Page 29: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Lower bound ­ 2

Cycle graph on n nodes, oriented in the same direction.

Any finite number of colors, any Las Vegas algorithm. Need Ω( ) bit rounds, with high probability, to

arrive at a proper coloring.26

Page 30: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction Model Related Work Lower boundsUpper bound for constant degree graphs Upper bound for general graphs Experimental results Conclusion

28

Page 31: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound for constant degree oriented graphs

G = (V,E), ∆ = O(1) G is provided with a ­acyclic orientation. Algorithm:

– Uncolored nodes choose color independently and u.a.r. among 2∆ colors

– Conflicts resolved using orientation. Two phase analysis

29

Page 32: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper Bound – constant degree graphs

Phase I Claim: After r = 4 rounds, every oriented path

P of length l = has at least one colored node, w.h.p.

Can be shown using union bound.– Number of paths of length l ≤ nl

P:

30

Page 33: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound – constant degree graphs

Situation at the end of Phase I– Connected components of uncolored nodes– Diameter of any such component <

Phase II: Same algorithm

31

Page 34: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound – constant degree graphs

Consider the following layering process– Layer 0 = u: no uncolored node u with u v – Remove nodes in layer 0.– Continue until no nodes are left.

0 41

2

1 2

3

0

4

32

Page 35: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound – constant degree graphs

Claim: The layering process terminates in less than rounds

Phase II requires less than rounds.– Each round, at least one node gets colored.

0 41

2

1 2

3

0

4

33

Page 36: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound – constant degree graphs

Claim: label (v) for any node. Phase II requires less than rounds.

– Each round, at least one node gets colored.

0 41

2

1 2

3

0

4

34

Page 37: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound – constant degree graphs

Claim: label (v) for any node. Phase II requires less than rounds.

– Each round, at least one node gets colored. Nodes do not have to explicitly compute the labels.

0 41

2

1 2

3

0

4

34

Page 38: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Constant degree oriented graphs

Summary– Lower bound of Ω( ) on bit complexity.– Our algorithm achieves an upper bound of O( ).– Nodes need to know only their local degree.– With known techniques, can reduce number of colors

to ∆+1.– Simple algorithm. – Can arrive at local coloring: node u with degree du gets

a color between 1 and du+1.

35

Page 39: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction Model Related Work Lower bounds Upper bound for constant degree graphsUpper bound for general graphs Experimental results Conclusion

36

Page 40: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Upper bound ­ Arbitrary graphs

G = (V,E), degree = ∆. G is provided with a ­acyclic orientation Problems:

1) High degree graphs: Too many paths2) Low degree also poses a problem

Have to extend our algorithm and analysis. Goal: Arrive at a (1+ε)∆­coloring with O( ) bits

for any constant ε > 0.

37

Page 41: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary Graphs

3­phase algorithm– Phase I: Reduce degree to c.log n– Phase II: Break into connected components of

uncolored nodes with diameter less than – Phase III: Finish using orientation.

Bit rounds:– Phase I: O(log ∆ (log log n))– Phase II : – Phase III: O( )

38

Page 42: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary Graphs

Phase I Algorithm:

– Uncolored nodes choose a color between 1 and c'∆.– Conflicts resolved using orientation.

Using ideas from:– A particular balls­and­bins game.

39

Page 43: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary Graphs

Phase II Reduced palette. Algorithm:

– Uncolored nodes choose a color between 1 and min 22c log n

– Conflicts resolved using orientation. Goal: Reduce degree of any node to Key Ideas:

– Orientation– Union bound

40

Page 44: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary Graphs

End of Phase II– Graph broken into connected components of

uncolored nodes.– Diameter of any connected component less than

44

Page 45: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary Graphs

Phase III: Key idea– Use a layering process as in Phase II of constant

degree oriented graphs.– Phase III takes less than rounds.

0 41

2

1 2

3

0

4

46

Page 46: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Few Improvements

Can reduce complexity of Phase I to O(log ). Can reduce complexity of Phase II and Phase III

to O( ).

Page 47: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Arbitrary oriented graphs

Summary:– Need ­acyclicity of the orientation– Bit complexity = O(log ∆) +

– For graphs with ∆ > 2 , best possible in general.– If every node has degree > log n, then can also arrive

at a local coloring.– With known techniques, can reduce the number of

colors to (1+ε)∆ for any constant ε > 0.

47

Page 48: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Outline

Introduction Model Related Work Lower bounds Upper bound for constant degree graphs Upper bound for general graphsExperimental Results Conclusions

48

Page 49: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Experimental results

Methodology– ANSI C implementation– SHA­1 hash function used as random number generator– Multiple runs and average value.

Input: Oriented cycle graph49

Page 50: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Experimental results

Cycle output picture

50

8 10 12 14 16 18 200

1

2

3

4

5

6

7

8

9

10

11LubyOriented

log(Size)

Roun

ds

Page 51: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Conclusions

Orientation helps in symmetry breaking. Tight results. Further work:

– any ''good'' orientations?– any graph parameter?– In preparation: O(1)­coloring trees and planar graphs.

51

Page 52: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Acknowledgements

Joint work with:– Christian Scheideler, Johns Hopkins University

(presently at Technische Universität München, Germany).

– Melih Onus, Arizona State University– Christian Schindelhauer, University of Paderborn,

Germany. Preliminary results are to appear as ''Distributed

Coloring in bit rounds'', in Proc. of the IEEE Intl. Parallel and Distributed Processing Symposium (IPDPS), 2006.

52

Page 53: Kishore Kothapalli Department of Computer Science Johns Hopkins University Baltimore ...kishore/slides-coloring.pdf · 2006-03-24 · Kishore Kothapalli Department of Computer Science

Thank You.