Distance-2 Coloring in the CONGEST Model

by   Magnus M. Halldorsson, et al.

We give efficient randomized and deterministic distributed algorithms for computing a distance-2 vertex coloring of a graph G in the CONGEST model. In particular, if Δ is the maximum degree of G, we show that there is a randomized CONGEST model algorithm to compute a distance-2 coloring of G with Δ^2+1 colors in O(logΔ·log n) rounds. Further if the number of colors is slightly increased to (1+ϵ)Δ^2 for some ϵ>1/ polylog(n), we show that it is even possible to compute a distance-2 coloring deterministically in polylog(n) time in the CONGEST model. Finally, we give a O(Δ^2 + log^* n)-round deterministic CONGEST algorithm to compute distance-2 coloring with Δ^2+1 colors.



page 1

page 2

page 3

page 4


Coloring Fast Without Learning Your Neighbors' Colors

We give an improved randomized CONGEST algorithm for distance-2 coloring...

Distributed Graph Coloring Made Easy

In this paper we present a deterministic CONGEST algorithm to compute an...

Near-Optimal Distributed Degree+1 Coloring

We present a new approach to randomized distributed graph coloring that ...

Improved Distributed Fractional Coloring Algorithms

We prove new bounds on the distributed fractional coloring problem in th...

Harvest: A Reliable and Energy Efficient Bulk Data Collection Service for Large Scale Wireless Sensor Networks

We present a bulk data collection service, Harvest, for energy constrain...

Superfast Coloring in CONGEST via Efficient Color Sampling

We present a procedure for efficiently sampling colors in the model. It...

Locality of not-so-weak coloring

Many graph problems are locally checkable: a solution is globally feasib...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

We study the distance- coloring problem in the standard distributed model. Given a graph , in the distance- coloring problem on (in the following just called d2-coloring), the objective is to assign a color to each node such that any two nodes and at distance at most in are assigned different colors . Equivalently, d2-coloring asks for a coloring of the nodes of such that for every , all the nodes in the set (where denotes the set of neighbors of ) are assigned distinct colors. Further note that d2-coloring on is also equivalent to the usual vertex coloring problem on the graph , where and there is an edge whenever .

The model is a standard synchronous message passing model [26]. The graph on which we want to compute a coloring is also assumed to form the network topology. Each node has a unique -bit identifier , where is the number of nodes of . Time is divided into synchronous rounds and in each round, every node of can do some arbitrary internal computation, send a (potentially different) message to each of its neighbors , and receive the messages sent by its neighbors in the current round. If the content of the messages is not restricted, the model is known as the model [24, 26]. In the model, it is further assumed that each message consists of at most bits.

As our main result, we give an efficient -time randomized algorithm for d2-coloring with at most colors, where is the maximum degree of . Further, we show that with slightly more colors, a similar result can also be achieved deterministically: We give a deterministic -time algorithm to d2-color with colors for any . Before discussing our results in more detail, we first discuss what is known for the corresponding coloring problems on and why it is challenging to transform algorithms to color into algorithms for d2-coloring.

The distributed coloring problem is arguably the most intensively studied problem in the area of distributed graph algorithms and certainly also one of the most intensively studied problems in distributed computing more generally. The standard variant of the distributed coloring problem on asks for computing a vertex coloring with at most colors. Note that such a coloring can be computed by a simple sequential greedy algorithm. In the following, we only discuss the work that is most relevant in the context of this paper, for a more detailed discussion of related work on distributed coloring, we refer to [6, 11, 22].

The -coloring problem was first studied in the parallel setting in the mid 1980s, where it was shown that the problem admits -time parallel solutions [1, 25]. These algorithms immediately also lead to -round distributed algorithms, which even work in the model. In fact, even the following most simple algorithm -colors a graph in rounds in the model: Initially all nodes are uncolored. The algorithm runs in synchronous phases, where in each phase, each still uncolored node chooses a uniform random color among its available colors (i.e., among the colors that have not already been picked by a neighbor) and keeps the color if no of its uncolored neighbors tries the same color at the same time [19, 9].

Generally, the main focus in the literature on distributed coloring has been on the model, where by now the problem is understood relatively well. It was an important problem for a long time if there are similarly efficient deterministic algorithms for the distributed coloring problem (see, e.g., [24, 6, 18, 16]). This question was very recently resolved in a breakthrough paper by Rozhoň and Ghaffari [28], who showed that -coloring and many other important distributed graph problems have polylogarithmic-time deterministic algorithms in the model. The best randomized -coloring algorithm known in the model is by Chang, Li, and Pettie [11], who show that the problem can be solved in time .222In [11], the complexity is given as . The improvement to immediately follows from the recent paper by Rozhoň and Ghaffari [28]. The same is true for the -dependency in the model paper by Ghaffari [15], which is discussed below. If the maximum degree is small, the best known (deterministic) algorithm has a complexity of  [14, 7]. We note that the term is known to be necessary due to a classic lower bound by Linial [24].

From coloring to d2-coloring.

While most existing distributed coloring algorithms were primarily developed for the model, several of them directly also work in the model (e.g., the ones in [1, 25, 24, 19, 23, 5, 8, 4, 7, 22]). There is also some recent work, which explicitly studies distributed coloring in the model. In [15], Ghaffari gives a randomized -coloring algorithm that runs in rounds in the model. For the model, this is the first improvement over the simple randomized -round algorithms from the 1980s. Further, in another recent paper [3], by building on the recent breakthrough in the model [28], it is shown that it is also possible to deterministically compute a -coloring in time in the model.

In the model, a single communication round on can be simulated in rounds on and therefore the distributed coloring problem on is at most as hard as the corresponding problem on .333Note that not every graph is the square of some graph and thus, the coloring problem on might be easier than the coloring problem on . In the model, the situation changes drastically and it is no longer generally true that a algorithm on can be run at a small additional cost on the underlying graph . In general, simulating a single round on requires rounds on . Note that even the very simple algorithm where each node picks a random available color cannot be efficiently used for d2-coloring as it is in general not possible to keep track of the set of colors chosen by some -hop neighbor in time . In some sense, our main technical contribution is an efficient randomized algorithm (on ) that implements this basic idea of iteratively trying a random color until all nodes are colored.

Why d2-coloring?

Distributed d2-coloring is an interesting and important problem for several reasons. It is fundamental in wireless networking, where nodes with common neighbors interfere with each other. Computing a frequency assignment such that nodes with the same frequency do not interfere with each other therefore corresponds to computing a d2-coloring of the communication graph [21]. Computing a coloring in a more powerful model () than it would be used in (wireless channels) is in line with current trends towards separation of control plane and data plane in networking. The d2-coloring problem also occurs naturally when single-round randomized algorithms are derandomized using the method of conditional expectation [16]. Further, d2-coloring forms the essential part of strong coloring hypergraphs, where nodes contained in the same hyperedge must be colored differently. One natural setting is when the nodes form a bipartite graph, with, say, “task” nodes on one side and “resource” nodes on the other side. We want to color the task nodes so that nodes using the same resource receive different colors.

Finally, we can also view d2-coloring and other problems on as a way of studying communication capacity constraints on nodes, where communication must go through intermediate relays. In fact, d2-coloring in is of special interest as it appears to lie at the edge of what is computable efficiently, i.e., in polylogarithmic time. Many closely related problems are either very easy or quite hard. The distance- maximal independent set problem can easily be solved in time using Luby’s algorithm [1, 25]. The distance-3 coloring problem, however, appears to be hard. There is a simple reduction from the hardness of the -party set disjointness problem [20, 27] to show that the closely related problem of verifying whether a given distance- coloring is valid requires rounds, even on graphs where (just think of a tree consisting of an edge and with leaf nodes attached to both and ). In fact, the classic set disjointness lower bound proof of Razborov [27] implies that even verifying validity of a uniformly random coloring is hard.

1.1 Contributions

We provide different model algorithms to compute a d2-coloring of a given -node graph . If is the maximum degree of , the maximum degree of any node in is at most . As a natural analog to studying -coloring on , we therefore study the problem of computing a d2-coloring with colors. Although, there are extremely simple -time randomized algorithms for -coloring , transforming similar ideas to d2-coloring turns out to be quite challenging. Our main technical contribution is an efficient randomized algorithm to d2-color with colors.

Theorem 1.1.

There is a randomized algorithm that d2-colors a graph with colors in

rounds, with high probability.

We outline the key ideas and challenges involved at the start of Sec. 2.

In addition to the randomized algorithm for computing a d2-coloring, we also provide two deterministic algorithms for the problem. The first one is obtained by a relatively simple adaptation of an -time -coloring algorithm on to the d2-coloring setting [7].

Theorem 1.2.

There is a deterministic algorithm that d2-colors a graph with colors in rounds.

Our second deterministic algorithm is more involved. From a high-level view, it uses ideas similar to several recent results  [3, 10, 12, 17]: With the algorithm of [28], one decomposes the graph into clusters of diameter that the problem can essentially be solved separately on each cluster (incurring a polylogarithmic overhead). On each cluster, one then uses the method of conditional expectation to efficiently derandomize a simple zero-round randomized algorithm. Unlike the algorithms in [3, 10, 12, 17], we do not use this general strategy to directly solve (a part of) the problem at hand (d2-coloring in our case). Instead, we apply the above strategy to implement a variant of the splitting problem discussed in [2, 18]. By applying the splitting problem recursively, we partition the nodes into parts such that a) we can use disjoint color palettes for the different parts, and b) we can efficiently simulate algorithms on on each of the parts (and these simulations can also efficiently be run in parallel on all the parts). By using slightly more colors, we can then also compute a d2-coloring in time deterministically.

Theorem 1.3 (Simplified).

For any fixed constant , there is a deterministic algorithm that d2-colors a graph with colors in rounds.

The remainder of the paper is structured as follows. In Section 2, we present our randomized algorithm and prove Theorem 1.1, our main technical result. In Section 3, we present our deterministic algorithms, proving Theorems 1.3 and 1.2. Note that because of space restrictions, many of the proofs appear in an appendix.

2 Randomized Algorithm

We give randomized algorithms that form a d2-coloring using colors. We use the prominent space at the beginning of the section to introduce notation that we use frequently throughout the proofs in this section.


The palette of available colors is . The neighbors in of a node are called immediate neighbors, while the neighbors in are d2-neighbors. For a (sub)graph , let denote the set of neighbors of in , and let denote the subgraph induced by these neighbors. A node is live until it becomes colored.

A node has slack if the number of colors of d2-neighbors plus the number of live d2-neighbors is . In other words, a node has slack if its palette size is an additive larger than the number of its uncolored -neighbors. The leeway of a node is its slack plus the number of live d2-neighbors; i.e., it is the number of colors from the palette that are not used among its d2-neighbors. During our algorithms nodes do not know their leeway and we only use the notion for the analysis.

When we state that an event holds w.h.p. (with high probability), we mean that for any , we can choose the constants involved so that the event holds with probability .

2.1 Overview : Coloring ’With a Little Help From My Friends’

As explained in the introduction, the simple approach for coloring – for each node to guess a random color that is currently not used among any of its neighbors – fails for d2-coloring because the nodes do not have enough bandwidth to learn the colors of their d2-neighbors.

Instead, nodes can certainly try a random color from the whole palette. The node’s immediate neighbors can maintain their immediate neighbors colors, and thus can answer if a certain color conflicts with the current coloring (or other colors being tried). This works well in the beginning, until most of the node’s neighbors are colored. If the palette has colors, then this approach alone succeeds in rounds, but for a -coloring, we must be more parsimonious. If each neighborhood is sparse, then the first round will result in many d2-neighbors successfully using the same color. This offers us then the same slack as if we had a larger palette in advance, as proved formally by Elkin, Pettie and Su [13], resulting in the same logarithmic time complexity. The challenge is then to deal with dense neighborhoods, of varying degrees of sparsity, defined formally for each node as the average non-degree of the subgraph induced by its neighborhood in . We tackle this with the algorithm Reduce, that successfully colors all nodes in a given range of color slack (and by extension, sparsity range).

The basic idea behind the Reduce algorithm is to have the colored nodes ”help” the live (i.e., yet uncolored) nodes by checking random colors on their neighborhoods. We can obtain some intuition from the densest case: a -clique (in ). We can recruit the colored nodes to help the live nodes guess a color: if it succeeds for the colored node, it will also succeed for the live node. Each of the live nodes can be allocated approximately colored node helpers, and in each round, with constant probability, one of them successfully guesses a valid color. This reduces the number of live nodes by a constant factor, leading to a time complexity.

The challenge in more general settings is that the nodes no longer have identical (closed) d2-neighborhoods, so a successful guess for one node does not immediately translate to a successful color for another node. To this end, we must deal with two types of errors. A false positive is a color that works for a colored node but not for its live d2-neighbor , while a false negative is a color that fails for the colored node but succeeds for the live node. It is not hard to conceive of instances where there are no true positives.

The key to resolving this is to use only advice from nodes that have highly similar d2-neighborhoods. This is captured as a relationship on the nodes: the similarity graph . We also use another similarity graph , with a higher threshold for similarity (in terms of number of common d2-neighbors). To combat false negatives, we also try colors of similar nodes that are not d2-neighbors of the live node but have a common (and similar) -neighbor with the live node, i.e., we try the colors of nodes in .

Additional challenges and pitfalls abound. We must carefully balance the need for progress with the load constraints on each node or edge. Especially, the efforts of the live nodes are a precious resource, but we must allow for their distribution to be decidedly non-random. In addition, there are differences between working on 2-paths in and on edges in : there can be multiple 2-paths between d2-neighbors. This can confound seemingly simple tasks such as picking a random d2-neighbor.

Once bounds on sparsity and slack drop below logarithmic, concentration results fail to hold. Finishing up becomes the bottleneck of the whole algorithm. For this, we introduce an improved algorithm. The key is that there is now sufficient bandwidth for the remaining live nodes to learn the complement of the set of colors of their d2-neighbors: the colors that they don’t use. Though there is no obvious way for them to discover that alone, they can again get help from the colored node in tallying the colors used. This becomes a different problem of outsourcing and load-balancing, but one that is aided by the extreme denseness of the parts of the graph that are not yet fully colored. We explain this in more detail in Sec. 2.6. Once the palette is known, the rest of the algorithm is like for the basic randomized algorithm for coloring , since the nodes can maintain an up-to-date view of the colors of their d2-neighbors.

2.2 Algorithm Description

We now outline our top-level algorithm, followed by the main routine, Reduce and details on the implementation.

Recall that a node trying a color means that it sends the color to all its immediate neighbors, who then report back if they or any of their neighbors were using (or proposing) that color. If all answers are negative, then adopts the color.

In what follows, , are constants satisfying , . Also, is a sufficiently large constant needed for concentration.

Algorithm d2-Color
0. If then Deterministic-d2Color(); halt
1. Form the similarity graphs and          // Initial Phase
2. repeat times:
       Each live node picks a random color and tries it.
3. for (; ; )                           // Main Phase
       Reduce(, )
4. Reduce(, 1)                                                  // Final Phase

For low-degree graphs, we use in Step 0 the deterministic algorithm from Sec. 3.1. The similarity graphs and that are constructed in Step 1 are used later (in Reduce) to decide which nodes assists whom. The point of Step 2 is to reduce the initial number of live nodes down to a small fraction of each neighborhood. We can then apply the main algorithm, Reduce, to progressively reduce the leeway of live nodes (by coloring them or their neighbors).

We let be a sufficiently large constant to be determined.

Algorithm Reduce(, )

Precondition: Live nodes have leeway less than , where

Postcondition: Live nodes have leeway less than

Each node selects a multiset of random -neighbors (with replacement)
Repeat times:
       Each live node is active independently with probability

The selection of random -neighbors needs care and is treated in the following subsection. Reduce() ensures that all nodes with a certain range of leeway get colored, which implicitly ensures that the number of live nodes in each neighborhood goes down as well. To avoid too much competition between live nodes, only a fraction of them participate in any given phase.

Algorithm Reduce-Phase(, )

  1. Each active live node sends a query across each 2-path to -neighbors independently with probability .

  2. The recipient of a query verifies that there is only a single 2-path from , and otherwise drops the message.

  3. picks a random color different from its own and checks if it is used by any of its -neighbors. If not, it sends the color back to as a proposal.

  4. also forwards the query to the next uniformly random -neighbor from its list , with appended to the query.

  5. Upon receipt of query , node checks if is a d2-neighbor; if not, the color of is sent to (through ).

  6. The active live node tries a color chosen uniformly random among the proposed colors (if any).

At each step along the way, a node receiving multiple queries selects one of them at random and drops the others. This can only occur after both rounds of Step 1, first round of Step 2, or second round of Step 4.

Reduce-Phase ensures that all active live nodes (with leeway between and ) get colored with a ”constant” probability (i.e., a constant times ). This is achieved by each live node recruiting a large subset of its similar d2-neighbors to try random colors (in Step 3). This is a probabilistic filter that reduces the workload of the live nodes. These neighbors also check the colors of their neighbors (in Step 5) to see if those might be suitable for the live node. The key idea is that one of these forms of assistance is likely to be successful, and that it is possible to share the load effectively.


Additional details for specific steps of Reduce-Phase:

Step 1: When sending a query along 2-paths in Step 1, the node simply asks its immediate neighbors to send the queries to all of their immediate neighbors that are -neighbors of , with the given probability.

Step 2: Verifying that there is only a single path from is achieved by asking ’s immediate neighbors how many are neighbors of .

Step 3: Checking if a color is used by an -neighbor is identical to trying a color, but having the immediate neighbors only taking into account the colors of ’s -neighbors.

We detail in the following subsection how , the collection of random -neighbors, is generated in Step 4 in time proportional to its size. Steps 5 and 6 of Reduce-Phase are straightforward to implement. We note that a query from a live node maintains a full routing path to , so getting a proposal back to is simple.


For low-degree graphs (), we use the deterministic algorithm of Theorem 1.2, which runs in rounds. We show in the next subsection that the first step of d2-Color takes rounds, w.h.p. The second step clearly takes rounds.

The procedure Reduce-Phase takes 23 rounds, or 2 (Step 1), 4 (Step 2), 4 (Step 3), 2 (Step 4), 6 (Step 5), and 5 (Step 6, including the notification of a new color). Thus, the round complexity of Reduce (including the time to generate ) is proportional to the number of iterations of the loop, or . It follows that all the steps of d2-Color run in time, except the last step, i.e., , that requires time. Since we also show that at the end every vertex is colored, w.h.p., we obtain the following result.

Corollary 2.1.

There is a randomized algorithm to d2-color with color in rounds, w.h.p.

Outline of the rest of this section: In Sec. 2.3 we describe the remaining supporting steps of the algorithms, in Sec. 2.4 we derive key structural properties of non-sparse graphs, and in Sec. 2.5 we prove the correctness of the algorithms. Then, in Sec. 2.6, we present an improved algorithm that replaces the last step of d2Color to reduce the overall time complexity to , giving our main result, Thm. 1.1.

2.3 Support Functions : Similarity Graphs and Random Neighbor Selection

We describe here in more details the support tools and property used in our algorithm. This includes the formation of the similarity graph, and the selection of random d2-neighbors.

Forming the similarity graphs

We form the similarity graph on the nodes of , where nodes are adjacent only if they are d2-neighbors and have at least d2-neighbors in common. This is implemented in the sense that each node knows: a) whether it is a node in , and b) which of its immediate neighbors are adjacent in . If a node has no neighbor in , we consider it to be not contained in .

When , each node can gather its set of d2-neighbors and forward it to its immediate neighbors in rounds. The immediate neighbors can then determine which of its immediate neighbors share at least common d2-neighbors, which defines . We focus from now on the case that , for appropriate constant .

To form , each node chooses independently with probability whether to enter a set . Nodes in inform their d2-neighbors of that fact. For each node , let be the set of d2-neighbors in . W.h.p., (by Prop. C.1). Each node informs its immediate neighbors of , by pipelining in steps. Note that a node can now determine the intersection , for its immediate neighbors and . Now, d2-neighbors , are -neighbors iff .

Theorem 2.2.

Let . Let be d2-neighbors. If (i.e., if ), then they share at least common d2-neighbors, w.h.p., while if , then they share fewer than common d2-neighbors, w.h.p.

The proof uses Chernoff bounds and is deferred to the appendix.

We also form the graph in an equivalent manner. For , the condition used by the algorithm becomes and the case of when is when they share fewer than common neighbors.

Selecting random -neighbors

We detail how the multiset of uniformly random -neighbors is form, at the start of Reduce. We repeat the following procedure times, to create a list of random -neighbors at each node: Each node that receives a query creates a -bit random string , and transmits it to all its immediate neighbors. Each node also picks a -bit random string and sends to immediate neighbors. Now, each immediate node computes the bitwise XOR of each string and each string that it receives, where and are -neighbors. It forwards to if and only if the first bits of are zero. The node then selects the -neighbor with the smallest XORed string .

Lemma 2.3.

A multiset of independent uniformly random -neighbors of node can be generated in rounds.

2.4 Properties of Dense Subgraphs

The example of the clique at the start of this subsection shows that dense subgraphs have the advantage that the views of the nodes are homogeneous. The advantage of sparse subgraphs is that they will invariable have slack, as shown by the following result of [13].

We frequently work with nodes that are both sparse enough and of small enough leeway.

Definition 2.4.

A node is -sparse (or has sparsity ) if contains edges. is solid if it has leeway and sparsity .

Sparsity is a rational number in the range to that is fixed throughout. Leeway is a decreasing property of the current partial coloring. Thus, once a node becomes solid, it stays solid throughout the algorithm. Elkin, Pettie and Su [13] formalized the connection between the two properties.

Proposition 2.5 ([13], Lemma 3.1).

Let be a vertex of sparsity and let be the slack of after the first round of d2-Color. Then, .

We require the constant to be such that if , then the contraposition of Prop. 2.5 yields that , w.h.p.

We derive some of the essential features of low-sparsity neighborhoods: almost all d2-neighbors are also -neighbors, and almost all neighbors in are also d2-neighbors. The first part applies both to and .

Lemma 2.6.

Let be a node of sparsity . Then,

  1. has at least neighbors in , and

  2. The number of nodes that are within distance 2 of in but are not d2-neighbors of is .

Observation 1.

Every live node is solid after Step 1 of d2-Color, w.h.p.

Let denote the subgraph of induced by nodes with a single 2-path to . Let denote the number of -neighbors of node . Solid nodes have many neighbors in , and its neighbors have many -neighbors.

Lemma 2.7.

Let be a solid node. Then,

  1. has at least -neighbors.

  2. Every -neighbor of has at least -neighbors.

  3. The degree sum in is bounded below by

    for constant .

2.5 Correctness of Reduce

Recall that the leeway of a node counts the number of colors of the palette that are not used among its neighbors. It counts both the number of uncolored nodes and the color slack that follows from the node being solid (by Obs. 1). During this whole section we assume that all nodes are solid, and that the precondition of Reduce is satisfied, i.e., live node’s leeway is at most with for a large enough constant . We also assume that similarity graphs and are correctly constructed, in the sense of Thm. 2.2. All statements in this section are conditioned on these events.

The algorithm is based on each live node sending out a host of queries, to random neighbors in , and through them to random -neighbors. We argue that each query has a non-trivial probability of leading to the live node becoming colored. We say that a given (randomly generated) query survives if it is not dropped in any of Steps 1 - 5 due to congestion. This does not account for the outcome of the color tries of Steps 3 and 5.

Missing proofs are given in Sec. D.4

Lemma 2.8.

Let be an active live node. Any given query sent from towards a node via a node survives with constant probability at least , independent of the path that the query takes.

The following progress lemma is the core of our correctness argument. A color is -good if it is not used among the d2-neighbors of at the start of Reduce-Phase.

Lemma 2.9.

Let be an active live node at the start of Reduce-Phase() and let be a -good color. The probability that is proposed to is at least .


We first analyze a hypothetical situation where no queries are dropped.

Suppose generates a query towards a -neighbor . We consider two cases, depending on whether the color appears on an -neighbor of (at the start of Reduce-Phase). We claim that in either case, gets proposed to with probability at least .

Case 1, is used by an -neighbor of : Let be an -neighbor of with color . Then is not a d2-neighbor of , since is -good. With probability at least , forwards the query to , who then sends it as proposal to .

Case 2, does not appear among ’s -neighbors: Then with probability , will pick as , try it successfully, and propose it to .

Thus, in both cases the probability that a query leads to being proposed to is at least , given that was generated and that it survives. The probability that is generated is , and it is independent of it leading to a particular color. Thus, the probability that a query leads to being proposed to is at least , given that survives.

We now consider the event that none of ’s queries result in a proposal of . Since we are in the setting where no queries are dropped, the events for different intermediate nodes are independent. Recall that by Lemma 2.7(1), . Thus, the probability that none of ’s queries result in a proposal of is at most

using the inequality , for . That is, the probability that there is a query in which is proposed to is at least , under our assumption that no queries are dropped.

By Lemma 2.8, a query survives with probability at least , independent of the path it takes, and thus independent of the color it leads to. Thus, the probability that gets proposed to (via some ) is at least . ∎

Lemma 2.10.

An active live node receives at most one proposal in expectation. This holds even in the setting where no queries are dropped.

Lemma 2.11.

Let be an active live node. Conditioned on the event that a particular color is proposed to , the probability that tries the color is at least .

Lemma 2.12.

An active live node with leeway at least at the start of Reduce-Phase() becomes colored with probability , for some constant .


Let denote the active live node and let denote the set of -good colors. By the leeway bound, . Let be the multiset of colors proposed to (active) live d2-neighbors of . There are at most live d2-neighbors, and the expected fraction of them that are active is . Each active live node receives expected at most 1 proposals. Hence, the expected size of is at most . Let be the event that is of size at most . By Markov’s inequality, holds with probability at least .

For a color , let be the probability that is proposed to some active live d2-neighbor of . This dominates the probability that a d2-neighbor of actually tries . Let . Note that , assuming holds. On the other hand, the sum is at least . Thus, , or , assuming .

Let and let . Let be the event that tries while no d2-neighbor of receives a proposal of . Observe that the events for different are independent. By Lemma 2.9 that is proposed to is at least and by Lemma 2.11, the probability that it gets tried is at least . Assuming holds, . For , the probability that no d2-neighbor of receives a proposal of is at least , assuming . Thus, for ,

Since tries only one color, the events are disjoint. Let . Then, . Assuming , . Now, if holds, then becomes colored. This happens with probability at least . ∎

Since the algorithm performs phases, and each node of leeway at least is colored in each phase with a constant probability, the algorithm either properly colors the node or decreases its leeway below .

Theorem 2.13.

All live nodes are of leeway less than after the call to Reduce(), w.h.p.


Set . Let be a live node of leeway at least at the start of Reduce. With probability , is active in a given phase, and with probability at least , becomes colored in a given phase where it is active, by Lemma 2.12. Thus, the probability that it remains live after all phases is at most . The probability that some such node remains uncolored is at most . ∎

Observe that after Reduce(,1), all nodes are colored, w.h.p., since a live node always has leeway at least 1. Corollary 2.1 follows.

2.6 Algorithm with Improved Final Phase

We now give an improved algorithm for d2-coloring that uses colors and runs in rounds. We assume is known to the nodes. This is achieved by replacing the final phase of d2-color (i.e., the last step) with a different approach.

In the final phase of the improved algorithm, the nodes cooperate to track the colors used by the d2-neighbors of each live node. Thus, they learn the remaining palette: the set of colors of not used by d2-neighbors. Gathering the information about a single live node is too much for a single node to accumulate, given the bandwidth limitation. Instead, each live node chooses a set of handlers, each handling a subrange of its color spectrum. The colored nodes then need to forward their color to the appropriate handler of each live d2-neighbor. After learning about the colors used, each of the multiple handlers choose an unused color at random and forward it to the live node. The live node selects among the proposed colors at random and tries it (which works with constant probability).

Since no routing information is directly available, we need to be careful how the coloring information is gathered at the handlers. We use here a meet-in-the-middle approach. Each handler informs a random subset of its d2-neighbors about itself and each colored node sends out its message along a host of short random walks. In most cases, if the numbers are chosen correctly, a random walk will find an informed node, which gets the message to the handler.

Once the unused palette is available, the coloring can be finished up in rounds in the same fashion as the basic randomized algorithm for ordinary coloring.

Algorithm Improved-d2-Color
If then
       repeat times:
             Each live node picks a random color and tries it.
       Form the similarity graphs and
       for (; ; )
             Reduce(, )

The main effort of this section is showing how to learn the remaining palette in steps. We first show how that information makes it easy to color the remaining nodes.

Finishing the coloring

Suppose each node has live d2-neighbors and knows the remaining palette. This includes the case when , in which case no d2-neighbors are yet colored. We can then simulate the basic randomized algorithm for ordinary colorings with constant overhead, to complete the coloring in rounds.

This algorithm, FinishColoring, proceeds as follows: Each node repeats the following two-round procedure until it is successfully colored. Flipping a random coin, is quiet or tries a random color from , with equal probability . If it succeeds, it forwards that information to immediate neighbors. They promptly forward it to each of their immediate neighbors , who promptly updated their remaining palette . If a node has a backlog of color notifications to forward, it sends out a Busy message. A node with a Busy neighbor then waits (stays quiet) until all notifications have been forwarded (and all Busy signals have been lifted from its immediate neighbors).

Lemma 2.14.

FinishColoring completes in rounds, w.h.p.


A node waits for a busy neighbor for at most rounds, since it has that many live d2-neighbors. Consider then a non-waiting round. Since it is not waiting, it knows its palette exactly. With probability 1/2, at least half of the live d2-neighbors of are quiet. In this case, at least half of the colors of ’s palette are not tried by d2-neighbors, and hence, succeeds with probability at least . The expected number of non-waiting rounds is therefore , and by Chernoff (15), this holds also w.h.p. ∎

Learning the Available Palette

Let be an upper-bound on the leeway of live nodes. Let and be quantities to be determined. We call each set , , a block of colors. The last block additionally contains the last color, . There are then blocks that partition the whole color space .

Algorithm LearnPalette()

Precondition: Live nodes have leeway at most .

Postcondition: Live nodes know their remaining palette

  1. If , then the nodes learn the remaining palette in rounds by flooding, and halt.

  2. Each node learns of its live d2-neighbors by flooding.

  3. For each live node and each block of colors, a random -neighbor of is chosen.

  4. Each node picks a random subset of d2-neighbors (formed as a set of random 2-hop paths). It informs them that it ”handles” block of the palette of live node (which indirectly tells them also the 2-path back to ).

  5. Each colored node with color attempts to forward its color to some node in , where , for each live d2-neighbor . This is done by sending the color along different random 2-paths. The node in then forwards it directly to . Let denote the set of colors that learns of.

  6. Each node informs by pipelining of the set of colors missing within its range.

  7. informs its immediate neighbors by pipelining of , the colors that it has not learned of being in its neighborhood. Each such node returns the set , consisting of the colors in used among ’s immediate neighbors. removes those colors from to produce , which yields the true remaining palette .

We first detail how a node selects a set of random d2-neighbors, as done in Steps 3, 4, and 5. It picks edges (with replacement) to its immediate neighbors at random and informs each node of the number of paths it is involved in. Each immediate neighbor then picks immediate neighbors. This way, does not directly learn the identity of the d2-neighbors it selects, but knows how to forward messages to each of them. Broadcasting or converge-casting individual messages then takes time , which is , w.h.p. (by (15)).

The key property of this phase is the following.

Lemma 2.15.

, for every live node , w.h.p.


By assumption, live node has leeway at the start of the algorithm, and thus it has slack . By the contrapositive of Prop. 2.5, it is -sparse, for . Thus, the -degree of is at least , by Lemma 2.6(1). For all -neighbors of , a random 2-hop walk has probability at least of landing in . Thus, w.h.p., one of the random walks ends there, resulting in the color being recorded in . Hence, w.h.p., . ∎

A careful accounting of the time spent yields that the dominant terms of the complexity are: (Steps 2, 6-7), (Step 4), (first half of Step 5), and (second half of Step 5). To optimize, we set and , for time complexity of , which is when .

Theorem 2.16.

The time complexity of LearnPalette() with is , when .

Combining Thm. 2.16 and Lemma 2.14 with Thm. 2.13 of the previous subsection, we obtain our main result.

Theorem 1.1. There is a randomized algorithm that d2-colors a graph with colors in rounds, with high probability.

3 Deterministic -Coloring

Completely independent of the rest of this section we use Section 3.1 to summarize our results on efficient deterministic algorithms when the dependence on is limited, i.e., algorithms with a runtime of . The goal of the current section is to color the square of the network graph with colors in polylogarithmic time for some and some globally known upper bound on the maximum degree of the graph .

Coloring with colors in rounds:

If we were to compute a coloring of instead of , we could recursively split into two graphs with roughly half the maximum degree. If we could halve the maximum degree precisely enough such that after recursion levels, we would have graphs each with maximum degree . We could then simply color each of them in rounds with a distinct color palette with colors each (e.g. using the algorithm in [7]) and obtain a coloring of . In Appendix A we show that one can indeed deterministically split the original network graph with the necessary precision efficiently in the model, and we use that in this section to color . We obtain the deterministic splitting algorithm from derandomizing a simple randomized algorithm with the method of conditional expectation. For more details on the derandomization we refer to Appendix A; here, we only want to point out that most care is needed when formally reasoning that vertices can compute certain conditional expectations. When computing splittings of the original network graph , this only depends on information that can easily learn, e.g., because it is contained in ’s immediate neighborhood.

Coloring with colors in rounds:

To color instead of we would like to mimic the same approach. However, now the respective conditional expectations depends on information in the -hop neighborhood of a node and in most graphs vertices cannot learn this information efficiently. Instead we proceed as follows: We split into graphs of maximum degree . Then, for each we consider the subgraph of that is induced by the vertices of . As has maximum degree we obtain that has maximum degree and furthermore we show that the graphs are such that any algorithm on each of the subgraphs can be executed in in parallel with a multiplicative overhead in the runtime—this step needs additional care and a more involved definition of the splitting problem that we call local refinement splitting. Then we use this property to apply the algorithm mentioned in the previous paragraph to color each in parallel with colors using a distinct color palette. The induced coloring is a coloring of with colors.

We now formally define the splitting problem that we need to solve.

Definition 3.1 (Local Refinement Splitting).

Let be a graph whose vertices are partitioned into groups , let be a parameter and for let be the number of neighbors of in . An (improper) -coloring of the vertices of with two colors (red/blue) is called a -local refinement splitting if each vertex with has at most neighbors of each color in set for all .

One can show that the local refinement splitting problem is solved w.h.p. if each vertex picks one of the two colors uniformly at random and one can show that this holds even if nodes only use random coins with limited independence. We obtain the following result by derandomizing this zero-round algorithm with the help of a suitable network decomposition of which can computed efficiently with the results in [28].

Theorem 3.2 (Deterministic Local Refinement Splitting).

For any there is a round deterministic algorithm to compute a -local refinement splitting.

Due to its length the formal proof of Theorem 3.2 (including the aforementioned claim about the randomized algorithm with limited independence) is deferred to Appendix A.

We now show how to use Theorem 3.2 to recursively split the graph deterministically into graphs with smaller maximum degree and further any vertex has a small number of neighbors in each such subgraph. Then, in Theorem 3.4, we use the former property of this partitioning result to compute a coloring of and in Theorem 1.3 we use both properties to compute a coloring of .

Lemma 3.3.

For any there is a -round deterministic algorithm to partition a graph into parts such that every vertex has at most neighbors in each where is the smallest integer such that holds.


Let and let be the smallest integer such that


Then recursively apply Theorem 3.2 with where we begin with the trivial partition and with each recursion level each part of the partition is naturally split into two parts according to the two colors of the local refinement splitting. The output partition of recursion level serves as the input partition for recursion level . Due to the choice of we have that the guaranteed maximum degree after recursion level is at least at least and thus it decreases by a factor with each iteration, that is, after iteration we have subgraphs , each with maximum degree at most


At we used that and we used for . Further, with the same calculation—recall that we solve a local refinement splitting in each recursion level—any vertex has at most neighbors in each . Further, by the definition of , we obtain  .

We obtain a runtime of rounds by applications of Theorem 3.2. The runtime in the proof of Theorem 3.2 is dominated by the computation of a so called network decomposition. If we reuse the same network decomposition in each call of Theorem 3.2 the runtime can be reduced to rounds. ∎

We now use Lemma 3.3 to compute a -coloring of .

Theorem 3.4.

For any constant there is a deterministic algorithm that computes a coloring of in rounds.


If use, e.g., the algorithm of [7] to color the graph with the desired number of colors in rounds. Otherwise, apply Lemma 3.3 with to obtain a partition of the vertices where (where is chosen as in Lemma 3.3) and the maximum degree of is at most . Then color each of the subgraphs in parallel (no vertex nor an edge is used in more than one subgraph) with a distinct set of colors in rounds using e.g. the algorithm of [7]. The induced coloring is a proper coloring of as we use disjoint color palettes for distinct subgraphs and the total number of colors is


In the very last inequality we used that is the smallest integer with the aforementioned property from which one can deduce that . As a runtime we obtain rounds from the application of Lemma 3.3 and rounds from coloring the subgraphs or the whole graph if the maximum degree is in to begin with. ∎

To color we first show that a partition obtained by recursively applying a local refinement splitting is helpful to run algorithms on the induced subgraphs of in parallel.

Lemma 3.5.

Let be a partition of the graph such that every vertex has at most -neighbors in for each and let be algorithms where algorithm runs on . Then, we can execute one round of each of the algorithms in parallel in rounds in .


We first let all vertices in all send messages to their neighbors that are also neighbors in . Now, if a vertex needs to send a message to a neighbor in that is not an immediate neighbor in , that is, and are only connected in through a node , then sends the message to and forwards it to . By the construction of for each each vertex of has at most neighbors that are vertices of . Each of these neighbors can have at most message for any vertex in . Thus has to forward at most messages to a single vertex which it can do in rounds by pipelining. ∎

With the simulation result from Lemma 3.5 we can run Theorem 3.4 on the parts of a partition that we computed Lemma 3.3 to obtain the main result of this section.

Theorem 1.3 (Full). For any there is a deterministic algorithm that computes a coloring of in rounds. For constant the runtime is .


Let and apply Lemma 3.3 with to obtain subgraphs