distributed coloring - bienvenue à l'irifcd/quantum/pres.pdfoutline • distributed coloring...

46
Distributed Coloring Laurent Viennot INRIA Paris Diderot University

Upload: others

Post on 17-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Distributed Coloring

Laurent Viennot

INRIA – Paris Diderot University

Outline

• Distributed coloring• Basic algorithm : First Free• LOCAL model• Deterministic O (∆ log n) coloring• Maximal Independent Set (MIS)• Randomized O (log n) coloring• Coloring the ring• Best known algorithms

⇐ ? ⇒ 1 / 1 2 / 28

Distributed Coloring

Design a distributed algorithm to color the graph of theunderlying network.

⇐ ? ⇒ 1 / 1 3 / 28

Setting

• Nodes of a network form a graph G .• n is the number of vertices in V (G ).• ∆ is the maximal degree of a node in G .• Each node has an ID in 1, . . . , n .

⇐ ? ⇒ 1 / 1 4 / 28

c-coloring problem

• We want c colors.• Each node u has to communicate with its neighbors and

finally outputs a color cu in 1, . . . , c at some time tu .• We want cu 6= cv for u and v neighbors.• We want maxu tu to be small.

⇐ ? ⇒ 1 / 3 5 / 28

c-coloring problem

• We want c colors.• Each node u has to communicate with its neighbors and

finally outputs a color cu in 1, . . . , c at some time tu .• We want cu 6= cv for u and v neighbors.• We want maxu tu to be small.

⇐ ? ⇒ 2 / 3 5 / 28

c-coloring problem

• We want c colors.• Each node u has to communicate with its neighbors and

finally outputs a color cu in 1, . . . , c at some time tu .• We want cu 6= cv for u and v neighbors.• We want maxu tu to be small.

⇐ ? ⇒ 3 / 3 5 / 28

What for ?

• Basic building block for other algorithms.• A direct application : scheduling communications in a

wireless network.• An intriguing fundamental problem.

⇐ ? ⇒ 1 / 2 6 / 28

What for ?

• Basic building block for other algorithms.• A direct application : scheduling communications in a

wireless network.• An intriguing fundamental problem.

⇐ ? ⇒ 2 / 2 6 / 28

Why is it easy ?

χ(G )-coloring is hard but ∆ + 1-coloring is easy :

Procedure FirstFree (u)Node u collects current colors cv for v ∈ N (u).Set cu to the first free color in 1, . . . ,∆.

Apply FirstFree (u) to each node in turn.

⇐ ? ⇒ 1 / 3 7 / 28

Why is it easy ?

χ(G )-coloring is hard but ∆ + 1-coloring is easy :

Procedure FirstFree (u)Node u collects current colors cv for v ∈ N (u).Set cu to the first free color in 1, . . . ,∆.

Apply FirstFree (u) to each node in turn.

⇐ ? ⇒ 2 / 3 7 / 28

Why is it easy ?

χ(G )-coloring is hard but ∆ + 1-coloring is easy :

Procedure FirstFree (u)Node u collects current colors cv for v ∈ N (u).Set cu to the first free color in 1, . . . ,∆.

Apply FirstFree (u) to each node in turn.

⇐ ? ⇒ 3 / 3 7 / 28

Why is it hard ?

FirstFree (1) ; . . . ; FirstFree (n) takes time n .

Two neighbors cannot run safely FirstFree at the sametime.

⇐ ? ⇒ 1 / 1 8 / 28

What can you do with FirstFree ?

From a c-coloring to a ∆ + 1-coloring in time c :

For i := 1 to c doIf cu = i then FirstFree (u)

⇐ ? ⇒ 1 / 2 9 / 28

What can you do with FirstFree ?

From a c-coloring to a ∆ + 1-coloring in time c :

For i := 1 to c doIf cu = i then FirstFree (u)

⇐ ? ⇒ 2 / 2 9 / 28

Fast distributed coloring

The IDs give an initial n-coloring.

How can you quickly reduce the number of colors ?

⇐ ? ⇒ 1 / 1 10 / 28

LOCAL Model

⇐ ? ⇒ 1 / 1 11 / 28

A simple model

Infinite computational power at each node but sending amessage costs 1.

⇐ ? ⇒ 1 / 1 12 / 28

A simple model

• Each node u of a graph G is given an input X (u).• Each node u has to compute an output Y (u).• Nodes work synchronously in rounds of 1 unit of time.• At each round, u computes and then sends a message to

each neighbor.• Running time is the number of rounds to obtain Y (u) for

all u .

⇐ ? ⇒ 1 / 3 13 / 28

A simple model

• Each node u of a graph G is given an input X (u).• Each node u has to compute an output Y (u).• Nodes work synchronously in rounds of 1 unit of time.• At each round, u computes and then sends a message to

each neighbor.• Running time is the number of rounds to obtain Y (u) for

all u .

⇐ ? ⇒ 2 / 3 13 / 28

A simple model

• Each node u of a graph G is given an input X (u).• Each node u has to compute an output Y (u).• Nodes work synchronously in rounds of 1 unit of time.• At each round, u computes and then sends a message to

each neighbor.• Running time is the number of rounds to obtain Y (u) for

all u .

⇐ ? ⇒ 3 / 3 13 / 28

A locality measure

How far do you need to communicate ?

The running time t is the distance up to which a node’scomputation depends on.

⇐ ? ⇒ 1 / 1 14 / 28

Running an algorithm A after communicating...

Send X (u) to neighbors and receive their inputs.Send X (u) and IDs of neighbors up to distance t .Receive in t rounds all information in the ball B (u , t ).Emulate A for all nodes in B (u , t ).Output the value obtained for u .

⇐ ? ⇒ 1 / 1 15 / 28

Randomized is deterministic

Consider that the random bits u is going to use are part ofX (u).

⇐ ? ⇒ 1 / 1 16 / 28

∆ + 1-coloring in O (∆ log n) time

⇐ ? ⇒ 1 / 1 17 / 28

Using FirstFree

Let b1 · · · b` be the binary representation of ID (u).Let cu := 1.For i := ` down to 1 do

If bi = 1 then cu := cu + ∆ + 1P (u) := b1 · · · bi−1Run FirstFree ignoring neighbors v with P (v) 6= P (u).

Proof : after iteration i we get a valid coloring for eachsubset V (b1 · · · bi−1) of nodes with prefix b1 · · · bi−1.

Time : log n use of FirstFree from 2(∆ + 1) to ∆ + 1 colors.

⇐ ? ⇒ 1 / 3 18 / 28

Using FirstFree

Let b1 · · · b` be the binary representation of ID (u).Let cu := 1.For i := ` down to 1 do

If bi = 1 then cu := cu + ∆ + 1P (u) := b1 · · · bi−1Run FirstFree ignoring neighbors v with P (v) 6= P (u).

Proof : after iteration i we get a valid coloring for eachsubset V (b1 · · · bi−1) of nodes with prefix b1 · · · bi−1.

Time : log n use of FirstFree from 2(∆ + 1) to ∆ + 1 colors.

⇐ ? ⇒ 2 / 3 18 / 28

Using FirstFree

Let b1 · · · b` be the binary representation of ID (u).Let cu := 1.For i := ` down to 1 do

If bi = 1 then cu := cu + ∆ + 1P (u) := b1 · · · bi−1Run FirstFree ignoring neighbors v with P (v) 6= P (u).

Proof : after iteration i we get a valid coloring for eachsubset V (b1 · · · bi−1) of nodes with prefix b1 · · · bi−1.

Time : log n use of FirstFree from 2(∆ + 1) to ∆ + 1 colors.

⇐ ? ⇒ 3 / 3 18 / 28

Maximal Independent Set (MIS)

⇐ ? ⇒ 1 / 1 19 / 28

Problem

Each node u outputs Y (u) ∈ 0, 1 such that nodes withoutput 1 form a Maximal Independent Set in G .

• Independent : two nodes in the MIS cannot beneighbors.

• Maximal : no node can be added in the MIS, i.e. eachnode not in the MIS has a neighbor in the MIS.

⇐ ? ⇒ 1 / 3 20 / 28

Problem

Each node u outputs Y (u) ∈ 0, 1 such that nodes withoutput 1 form a Maximal Independent Set in G .

• Independent : two nodes in the MIS cannot beneighbors.

• Maximal : no node can be added in the MIS, i.e. eachnode not in the MIS has a neighbor in the MIS.

⇐ ? ⇒ 2 / 3 20 / 28

Problem

Each node u outputs Y (u) ∈ 0, 1 such that nodes withoutput 1 form a Maximal Independent Set in G .

• Independent : two nodes in the MIS cannot beneighbors.

• Maximal : no node can be added in the MIS, i.e. eachnode not in the MIS has a neighbor in the MIS.

⇐ ? ⇒ 3 / 3 20 / 28

From c-coloring to MIS

A c-coloring is a partition of V (G ) into independent sets.

Run FirstFree, and color class 1 becomes a MIS.

A c-coloring algorithm in time T gives a MIS algorithm intime T + c .

⇐ ? ⇒ 1 / 3 21 / 28

From c-coloring to MIS

A c-coloring is a partition of V (G ) into independent sets.

Run FirstFree, and color class 1 becomes a MIS.

A c-coloring algorithm in time T gives a MIS algorithm intime T + c .

⇐ ? ⇒ 2 / 3 21 / 28

From c-coloring to MIS

A c-coloring is a partition of V (G ) into independent sets.

Run FirstFree, and color class 1 becomes a MIS.

A c-coloring algorithm in time T gives a MIS algorithm intime T + c .

⇐ ? ⇒ 3 / 3 21 / 28

From MIS to ∆ + 1-coloring

A MIS of the cartesian product G × K∆+1 gives a∆ + 1-coloring.

A T (n ,∆) MIS algorithm gives a ∆ + 1-coloring algorithm intime T (n(∆ + 1), 2∆).

⇐ ? ⇒ 1 / 2 22 / 28

From MIS to ∆ + 1-coloring

A MIS of the cartesian product G × K∆+1 gives a∆ + 1-coloring.

A T (n ,∆) MIS algorithm gives a ∆ + 1-coloring algorithm intime T (n(∆ + 1), 2∆).

⇐ ? ⇒ 2 / 2 22 / 28

Randomized O (log n) MIS [Luby’86, Alon&B.&I.’86]

Y := ∅ /* candidate MIS solution */A := V (G ) /* set of active nodes */While A 6= ∅ do

I := IndependentSet (G|A )Y := Y ∪ IA := A \ (I ∪ N (I ))

Procedure IndependentSet (u)I := ∅ /* candidate independent set */Add u to I with probability 1

2 deg(u)If ∃v ∈ N (u) ∩ I s.t. (deg(v), ID (v)) < (deg(u), ID (u))then

remove u from I .Return I

⇐ ? ⇒ 1 / 1 23 / 28

Coloring the Ring

⇐ ? ⇒ 1 / 1 24 / 28

Best Known Algorithms

⇐ ? ⇒ 1 / 1 25 / 28

Unbounded degree

• Deterministic : 2O (√

log n) MIS [Panconesi&S.’96]• Randomized : O (log n) MIS [Luby’86, Alon&B.&I.’86]

Bounded degree (deterministic)

• O (∆ + log∗ n) time ∆ + 1-coloring [Kuhn’09, Bar.&E.’09]

Bounded arboricity (deterministic)

• O (a√

log n + a log a) MIS [Bar.&E.’08]• O (log a log n) time O (a1+ε)-coloring [Bar.&E.’10]• O (aε log n) time O (a)-coloring [Bar.&E.’10]

⇐ ? ⇒ 1 / 1 26 / 28

Best lower bounds

O (∆)-coloring

• (Ring) Ω(log∗ n) [Linial’92]• Reduce colors algorithms Ω(∆/ log2 ∆ + log∗ n)

[Kuhn&W.’06]

MIS

• Ω(√

log nlog log n

)[Kuhn&M.&W.’04]

⇐ ? ⇒ 1 / 1 27 / 28

Bibliography

Distributed computing : a locality-sensitive approach, byDavid Peleg.

⇐ ? ⇒ 1 / 1 28 / 28

Noga Alon, László Babai, and Alon Itai.A fast and simple randomized parallel algorithm for themaximal independent set problem.J. Algorithms, 7(4) :567–583, 1986.

Leonid Barenboim and Michael Elkin.Sublogarithmic distributed mis algorithm for sparsegraphs using nash-williams decomposition.In Proceedings of the Twenty-Seventh Annual ACMSymposium on Principles of Distributed Computing(PODC), pages 25–34, 2008.

Leonid Barenboim and Michael Elkin.Distributed (delta+1)-coloring in linear (in delta) time.In Proceedings of the 41st Annual ACM Symposium onTheory of Computing (STOC), pages 111–120, 2009.

Leonid Barenboim and Michael Elkin.Deterministic distributed vertex coloring inpolylogarithmic time.

⇐ ? ⇒ 2 / 1 28 / 28

In Proceedings of the 29th Annual ACM Symposium onPrinciples of Distributed Computing (PODC), pages410–419, 2010.

Fabian Kuhn.Weak graph colorings : distributed algorithms andapplications.In Proceedings of the 21st Annual ACM Symposium onParallel Algorithms and Architectures (SPAA), pages138–144, 2009.

Fabian Kuhn, Thomas Moscibroda, and RogerWattenhofer.What cannot be computed locally !In Proceedings of the Twenty-Third Annual ACMSymposium on Principles of Distributed Computing(PODC), pages 300–309, 2004.

Fabian Kuhn and Roger Wattenhofer.On the complexity of distributed graph coloring.

⇐ ? ⇒ 3 / 1 28 / 28

In Proceedings of the Twenty-Fifth Annual ACMSymposium on Principles of Distributed Computing(PODC), pages 7–15, 2006.

Nathan Linial.Locality in distributed graph algorithms.SIAM J. Comput., 21(1) :193–201, 1992.

Michael Luby.A simple parallel algorithm for the maximal independentset problem.SIAM J. Comput., 15(4) :1036–1053, 1986.

Alessandro Panconesi and Aravind Srinivasan.On the complexity of distributed networkdecomposition.J. Algorithms, 20(2) :356–374, 1996.

⇐ ? ⇒ 4 / 1 28 / 28