Distributed Recoloring

Given two colorings of a graph, we consider the following problem: can we recolor the graph from one coloring to the other through a series of elementary changes, such that the graph is properly colored after each step? We introduce the notion of distributed recoloring: The input graph represents a network of computers that needs to be recolored. Initially, each node is aware of its own input color and target color. The nodes can exchange messages with each other, and eventually each node has to stop and output its own recoloring schedule, indicating when and how the node changes its color. The recoloring schedules have to be globally consistent so that the graph remains properly colored at each point, and we require that adjacent nodes do not change their colors simultaneously. We are interested in the following questions: How many communication rounds are needed (in the LOCAL model of distributed computing) to find a recoloring schedule? What is the length of the recoloring schedule? And how does the picture change if we can use extra colors to make recoloring easier? The main contributions of this work are related to distributed recoloring with one extra color in the following graph classes: trees, 3-regular graphs, and toroidal grids.

READ FULL TEXT VIEW PDF

Authors

page 1

page 2

page 3

page 4

05/08/2019

Target Set in Threshold Models

Consider a graph G and an initial coloring, where each node is blue or r...
02/15/2018

Distributed coloring in sparse graphs with fewer colors

This paper is concerned with efficiently coloring sparse graphs in the d...
04/11/2019

Locality of not-so-weak coloring

Many graph problems are locally checkable: a solution is globally feasib...
11/05/2018

Hardness of minimal symmetry breaking in distributed computing

A graph is weakly 2-colored if the nodes are labeled with colors black a...
12/08/2021

Improved Distributed Fractional Coloring Algorithms

We prove new bounds on the distributed fractional coloring problem in th...
11/24/2010

Distributed Graph Coloring: An Approach Based on the Calling Behavior of Japanese Tree Frogs

Graph coloring, also known as vertex coloring, considers the problem of ...
01/27/2021

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...

Code Repositories

recoloring

Distributed Recoloring


view repo
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

In classical graph problems, we are given a graph and the task is to find a feasible solution. In reconfiguration problems, we are given two feasible solutions – an input configuration and a target configuration – and the task is to find a sequence of moves that turns the input configuration into the target configuration.

Recoloring problems.

Perhaps the most natural example of a reconfiguration problem is recoloring: we are given a graph and two proper -colorings of , let us call them and , and the task is to find a way to turn into by changing the color of one node at a time, such that each intermediate step is a proper coloring. More formally, the task is to find a sequence of proper -colorings such that and , and and differ only at one node. Such problems have been studied extensively from the perspective of graph theory and classical centralized algorithms, but the problems are typically inherently global and solutions are long, i.e., is large in the worst case.

In this work we introduce recoloring problems in a distributed setting. We show that there are natural relaxations of the problem that are attractive from the perspective of distributed graph algorithms: they admit solutions that are short and that can be found locally (e.g., in sublinear number of rounds). Distributed recoloring problems are closely related to classical symmetry-breaking problems that have been extensively studied in the area of distributed graph algorithms, but as we will see, they also introduce new kinds of challenges.

[scale=0.8]3color0.pdf  [scale=0.8]3color1.pdf  [scale=0.8]3color2.pdf  [scale=0.8]3color3.pdf

Figure 1: Distributed recoloring: the input coloring can be seen on the left and the target coloring on the very right. The illustration shows one possible way to reach the target coloring in three steps by, in each step, changing the colors of an independent set of nodes.

Distributed recoloring.

We will work in the usual LOCAL model of distributed computing: Each node of the input graph is a computer, and each edge represents a communication link between two computers. Computation proceeds in synchronous rounds: each node sends a message to each of its neighbors, receives a message from each of its neighbors, and updates its local state. Eventually, all nodes have to announce their local outputs and stop; the running time of the algorithm is the number of rounds until all nodes stop. We assume that the algorithm is deterministic, and each node is labeled with a unique identifier.

In distributed recoloring, each node is given two colors, an input color and a target color . It is guaranteed that both and form a proper coloring of , that is, and for all . Each node has to output a finite recoloring schedule for some . For convenience, we define for . We say that the node changes its color at time if ; let be the set of nodes that change their color at time . Define ; we call the length of the solution. A solution is feasible if the following holds:

  1. [noitemsep]

  2. and ,

  3. is a proper coloring of for all ,

  4. is an independent set of for all .

The key differences between distributed recoloring and classical recoloring are:

  1. [noitemsep]

  2. Input and output are given in a distributed manner: no node knows everything about , , and , and no node needs to know everything about or the length of the solution .

  3. We do not require that only one node changes its color; it is sufficient that adjacent nodes do not change their colors simultaneously.

See Figure 1 for a simple example of distributed recoloring steps.

Note that a solution to distributed recoloring is locally checkable in the following sense: to check that a solution is feasible, it is enough to check independently for each edge that the recoloring sequences and are compatible with each other, and for each node that agrees with and . However, distributed recoloring is not necessarily an LCL problem [19] in the formal sense, as the length of the output per node is not a priori bounded.

We emphasize that we keep the following aspects well-separated: what is the complexity of finding the schedule, and how long the schedules are. Hence it makes sense to ask, e.g., if it is possible to find a schedule of length in rounds (note that the physical reconfiguration of the color of the node may be much slower than communication and computation).

Recoloring with extra colors.

As we will see, distributed recoloring is, in general, computationally hard, and in many cases solutions do not exist at all. It is in a sense analogous to problems such as finding an optimal node coloring of a given graph; such problems are not particularly interesting in the LOCAL model, as the complexity is trivially global. To make the problem much more interesting we slightly relax it.

We define a recoloring problem (a.k.a. -recoloring with extra colors) as follows:

  • [noitemsep]

  • We are given colorings with .

  • All intermediate solutions must satisfy .

Here we use the notation .

line.pdf

Figure 2: In the input graph, a bipartition is given. Therefore, the target coloring can be reached by using one extra color in three steps.

The problem of recoloring is meaningful also beyond the specific setting of distributed recoloring. For example, here is an example of a very simple observation:

Lemma 1.1.

Recoloring with extra color is always possible in any bipartite graph, with a distributed schedule of length .

Proof.

Let the bipartition be . First each node switches to , then each switches to color , and finally each switches to color . ∎

Incidentally, it is easy to extend this result to show that -recoloring with extra colors is always possible with a schedule of length in a graph with chromatic number , and in particular -recoloring with extra colors is trivial. Figure 2 gives an illustration of recoloring a bipartite graph with one extra color.

As a corollary, we can solve distributed recoloring in trees in rounds, with a schedule of length : simply find a bipartition and apply the above lemma. However, is this optimal? Clearly finding a bipartition in a tree requires rounds, but can we solve recoloring with extra color strictly faster?

These are examples of problems that we study in this work. We initiate the study of distributed complexity of recoloring, with the ultimate objective of finding a complete characterization of graph families and parameters , , and such that distributed recoloring with schedules of length can be solved efficiently in a distributed setting.

As we will see, the problem turns out to be surprisingly rich already in very restricted settings such as grids or -regular trees. Many of the standard lower bound techniques fail; in particular, known results on the hardness of graph coloring do not help here, as we are already given two proper colorings of the input graph.

graph input extra schedule communication reference
family colors colors length rounds
C/P 2 0 Lemma 4.8
C/P 2 1 Lemma 4.1
C 3 0 Lemma 4.8
P 3 0 Lemmas 4.2 and 4.9
C/P 3 1 Lemma 4.3
C/P 3 2 Lemma 4.1
C/P 4 0 Lemmas 4.3 and 4.4
C/P 4 3 Lemma 4.1
Table 1: Results: distributed recoloring in cycles (C) and paths (P).
input extra schedule communication reference
colors colors length rounds
2 0 Lemma 4.8
2 1 Lemma 4.1
3 0 Lemmas 4.2 and 4.9
3 1 Theorem 5.1
3 2 Lemma 4.1
4 0 Theorem 5.2 and Lemma 4.10
4 1 Lemma 4.5
4 3 Lemma 4.1
5 0 Lemmas 4.5 and 4.4
Table 2: Results: distributed recoloring in -regular trees.
input extra schedule communication reference
colors colors length rounds
2 0 Lemma 4.8
2 1 Lemma 4.1
3 0 Lemmas 4.2 and 4.9
3 1 Theorem 5.1
3 2 Lemma 4.1
4 0 Theorem 5.2 and Lemma 4.10
4 1 Theorem 5.1
4 3 Lemma 4.1
Table 3: Results: distributed recoloring in trees.
input extra schedule communication reference
colors colors length rounds
2 0 Lemma 4.8
2 1 Lemma 4.1
3 0 Lemma 4.8
3 1 Theorem 7.1
3 2 Lemma 4.1
4 0 Lemma 4.8
4 1 ? ?
4 2 Lemma 4.6
4 3 Lemma 4.1
5 0 Lemma 4.8
5 1 Lemma 4.7
5 4 Lemma 4.1
6 0 Lemmas 4.7 and 4.4
Table 4: Results: distributed recoloring in toroidal grids. The distributed complexity of recoloring is left as an open question. However, by prior work it is known that recoloring is always possible: grids are -regular graphs, therefore they are -recolorable with Kempe operations, and hence also with extra color.
input extra schedule communication reference
colors colors length rounds
2 0 Lemma 4.8
2 1 Lemma 4.1
3 0 Lemma 4.8
3 1 Theorem 6.1
3 2 Lemma 4.1
4 0 Lemma 4.8
4 1 Lemma 4.5
4 3 Lemma 4.1
5 0 Lemma 4.4 and Lemma 4.4
Table 5: Results: distributed recoloring in subcubic graphs.

Contributions.

Our main contribution is a comprehensive study of the complexity of distributed recoloring in various graph families; the results are summarized in Tables 15. The highlights of this work are the following results:

  1. An algorithm for recoloring on trees. On trees, -recoloring is inherently global: it is easy to see that the worst-case running time is and the worst-case schedule length is . With one extra color, we can trivially find a schedule of length in time . However, we show that we can do much better: it is possible to find a schedule of length in time .

    Here the key component is a new algorithm that solves the following sub-problem in rounds: given a tree, find an independent set such that the removal of splits the tree in components of size or . This subroutine may find applications in other contexts as well.

    These results are presented in Section 5.

  2. An algorithm for recoloring for graphs of degree at most . In general graphs, recoloring is not necessarily possible; we can construct a small -regular graph in which recoloring is not solvable. However, we will show that if the maximum degree of the graph is at most (i.e., we have a subcubic graph), recoloring is always possible. Moreover, we can find a schedule of length in time .

    This result is presented in Section 6.

  3. Complexity of recoloring on toroidal grids. We also give a complete characterization of recoloring in one particularly interesting family of -regular graphs: -dimensional toroidal grids (a.k.a. torus grid graphs, Cartesian graph products of two cycles). While the case of -dimensional grids (cycles) is easy to characterize completely, the case of -dimensional grids turns out to be much more interesting.

    Here our main contribution is the following graph-theoretic result: in an toroidal grid, recoloring is possible for any input if and only if (i) both and are even, or (ii) , or (iii) . In all other cases we can find -colorings and such that is not reachable from even if we can use extra color.

    As a simple corollary, recoloring is inherently global from the perspective of distributed computing, and it takes rounds to solve even if we have the promise that e.g.  and are even (and hence a schedule of length trivially exists).

    This result is presented in Section 7.

2 Related work

Reconfiguration and recoloring.

Recoloring, and more generally combinatorial reconfiguration has received attention over the past few years. Combinatorial reconfiguration problems consist of finding step-by-step transformations between two feasible solutions such that all intermediate results are also feasible. They model dynamic situations where a given solution is in place and has to be modified, but no disruption can be afforded. We refer the reader to the nice survey [22] for a full overview, and focus here on node coloring as a reference problem.

As mentioned earlier, we introduce distributed recoloring here, but centralized recoloring has been studied extensively before. Two main models are considered:

  1. [noitemsep]

  2. Node recoloring: at each step, we can recolor a node into a new color that does not appear on its neighborhood

  3. Kempe recoloring: at each step, we can switch the colors in a bichromatic component (we operate a Kempe change).

The usual questions are of the form: Given a graph and an integer , are all its -colorings equivalent (up to node or Kempe recolorings)? What is the complexity of deciding that? What is the maximum number of operations needed to go from to the other?

All of those questions can also be asked for two specific -colorings and of . Are they equivalent (up to node or Kempe recolorings)? What is the complexity of deciding that? What is the maximum number of operations needed to go from to in ?

While the complexity of questions related to Kempe recoloring remains elusive, the problems related to node recoloring are typically PSPACE-hard [6]. The related question of deciding equivalence when a bound on the length of an eligible recoloring sequence is given as part of the input has also been considered [7]. We know that the maximum number of operations needed to go from one -coloring to another in a tree is  [11]. While -recoloring a graph with no node of degree more than is not always possible, having colors always suffices [14], and there are also meaningful results to obtain for the problem of -recoloring [12]. Two other settings have received special attention: characterizing fully when -recoloring is possible [11, 10], and guaranteeing short reconfiguration sequences in the case of sparse graphs for various notions of sparse [4, 8].

Kempe changes were introduced in 1879 by Kempe in his attempted proof of the Four Color Theorem [15]. Though this proof was fallacious, the Kempe change technique has proved useful in, for example, the proof of the Five Color Theorem and a short proof of Brooks’ Theorem. Most works on the topic initially focused on planar graphs, but significant progress was recently obtained in more general settings. We know that all -colorings of a graph with no node of degree more than are equivalent (w.r.t. Kempe changes), except in the case of one very specific graph: the -prism [5, 13, 16].

Note that some other variants have also been studied, perhaps most notably the question of how many nodes to recolor at once so that the graph can be recolored [17].

While we will not discuss Kempe recoloring in our work, we point out that recoloring with extra colors is closely connected to Kempe recoloring: Kempe recolorability implies recolorability with one extra color (while the converse is not true). Hence the negative results related to one extra color also hold for Kempe recoloring.

Distributed graph coloring.

Panconesi and Srinivasan [21] have used Kempe operations to design efficient distributed algorithms for graph coloring with colors. Other than that we are not aware of prior work on distributed recoloring. On the other hand, the literature on the standard distributed coloring is vast. The best overview on the topic is the book by Barenboim and Elkin [3]; the most important recent developments include the following results. There is a randomized -time algorithm for -coloring by Chang et al. [23]. In the case of trees, the number of colors can be reduced to with the cost of increasing the runtime to  [24]. On the deterministic side, the best known -coloring algorithm requires communication rounds [2]. In the case of trees, the rake-and-compress -method by Miller and Reif gives a -coloring in time  [18].

However, there seems to be surprisingly little technology that one can directly transfer between the coloring domain and recoloring domain. Toroidal grids are a good example: by prior work [9], -coloring is an inherently global problem, and by the present work, recoloring is an inherently global problem, but the arguments that are used in these proofs are very different (despite the fact that both of them are related to the idea that a “parity” is preserved).

3 Preliminaries

In this article, each graph is a simple undirected graph where represents its node set and its edge set. For a subset of nodes , we denote by the subgraph induced by . For a node , we denote by the open neighborhood of that is the set of all the neighbors of and by its closed neighborhood i.e. the set . For a subset , its closed neighborhood corresponds to the set .

The degree of a node is the number of neighbors. A -regular graph is a graph in which all nodes have degree , a cubic graph is the same thing as a -regular graph, and a subcubic graph is a graph in which all nodes have degree at most . A tree is a connected acyclic graph, and a -regular tree is a tree in which each node has degree or .

A maximal independent set (MIS) is an independent set (i.e. a set of pairwise non-adjacent nodes) such that for each non-MIS node .

Given a graph , a list-assignment is a function which assigns to each node a list of colors . An -coloring of is a function that assigns to each node a color such that for any two adjacent nodes , we have . A graph is -list-colorable if it admits an -coloring for every list-assignment where the list of each node is of size at least . Therefore, list-coloring generalizes node-coloring if we consider the special case where each node receives the same input list. The notion of -recoloring is the natural generalization of -recoloring: the same elementary steps are considered, and every intermediate coloring must be an -coloring.

In order to output a recoloring schedule, it is convenient to consider the question of recoloring a graph from a coloring to a coloring , rather than the more symmetric question of whether the two colorings are equivalent in the given setting. We take this opportunity to note that we can reverse time and hence recoloring schedule from to also yields a recoloring schedule from to . In the rest of the paper, we therefore address the two questions as one.

4 Warmup – simple results

We will start by presenting a number of simpler upper and lower bounds that also serve as an introduction to the topic of distributed recoloring.

4.1 Upper bounds

Lemma 4.1.

In any graph, recoloring for is possible in communication rounds, with a schedule of length .

Proof.

Generalize the idea of Lemma 1.1; note that the schedule of node depends only on and , and not on the colors of any other node around it. ∎

Lemma 4.2.

In paths and trees, -recoloring is possible in rounds, with a schedule of length .

Proof.

Every node has full knowledge of the graph. The statement can be intuited by induction on the size of the tree, but we delay a formal proof to Section 5 and more precisely Lemma 5.7. ∎

Lemma 4.3.

In cycles and paths, recoloring is possible in rounds, with a schedule of length .

Proof.

Use the input coloring to find a maximal independent set . Nodes of switch to color . Nodes of induce paths of length , apply Lemma 4.2 there to recolor each of the paths by brute force, without using the extra color . Finally, nodes of switch to their target colors. ∎

Lemma 4.4.

Let be a graph of maximum degree at most , and let . Then -recoloring with extra colors is at least as easy as -recoloring with extra colors.

Proof.

Given a -coloring , we can construct a -coloring as follows: all nodes of color pick a new color from that is not used by any of their neighbors. Note that is a valid step in distributed recoloring (nodes of color form an independent set), and by reversing the time, also is a valid step.

Hence to recolor with extra colors, it is sufficient to recolor with extra colors (color no longer appears in the input and target colorings and can be used as an auxiliary color during recoloring). Then we can put everything together to form a recoloring schedule , with only constant overhead in the running time and schedule length. ∎

Lemma 4.5.

In subcubic graphs, recoloring is possible in rounds, with a schedule of length .

Proof.

Use the input coloring to find a maximal independent set in constant time. Nodes of switch to color . Delete ; we are left with a graph that consists of paths and isolated nodes. Apply Lemmas 4.4 and 4.3 to solve recoloring in each connected component of . Finally nodes of can switch to their target colors. ∎

Lemma 4.6.

In toroidal grids, recoloring is possible in rounds, with a schedule of length .

Proof.

Pick a maximal independent set , color it with color , and delete; we have a graph of degree at most and extra color. Apply Lemma 4.5 to recolor it, and finally nodes of can switch to their target colors. ∎

Lemma 4.7.

In toroidal grids, recoloring is possible in rounds, with a schedule of length .

Proof.

Pick a maximal independent set , color it with color , and delete; we have a graph of degree at most and colors remaining. Apply Lemma 4.4 to reduce to the case of colors, and then use Lemma 4.5. ∎

4.2 Lower bounds

Lemma 4.8.

Recoloring without any extra colors is not possible in the following settings for some pairs of input and target colorings:

  1. [label=(),noitemsep]

  2. -recoloring paths or trees.

  3. -recoloring cycles.

  4. -recoloring cycles.

  5. -recoloring toroidal grids.

  6. -recoloring toroidal grids.

  7. -recoloring toroidal grids.

  8. -recoloring toroidal grids.

  9. -recoloring cubic graphs.

  10. -recoloring cubic graphs.

  11. -recoloring cubic graphs.

Proof.

We can construct a source coloring in which no node can make a move, and a target coloring different from the input coloring. Here we show examples of the source coloring ; the target coloring can be constructed by :

  1. [label=()]

  2. A path with nodes, .

  3. A -cycle, .

  4. A -cycle, .

  5. A grid, .

  6. A grid, .

  7. A grid, .

  8. A grid, .

  9. Complete bipartite graph , with constructed from the bipartition.

  10. Prism graph: connect the nodes of a -cycle colored with to another -cycle colored with , in this order.

  11. Complete graph . ∎

Lemma 4.9.

In paths and trees, -recoloring without extra colors requires rounds and produces schedules of length in the worst case. This holds also in the case of -regular trees.

Proof.

Consider a long path with the input coloring and observe that a node of degree can change its color only after at least one neighbor has changed colors. We can embed such a path also in a -regular tree. ∎

Lemma 4.10.

In trees, -recoloring without extra colors requires time and produces schedules of length in the worst case.

Proof.

It is sufficient to construct a -regular tree in which each node is surrounded by nodes of all other colors: color the root with color and its neighbors with colors , , and . Then recursively for each leaf node of color that is already adjacent to a node of color , add two new neighbors with the colors , etc., and continue in a balanced manner such that the distance between the root and the nearest leaf is logarithmic. Now a non-leaf node can change its color only once its neighbor has changed its color. ∎

5 Recoloring algorithm for trees

In this section, we provide two efficient algorithms for recoloring and list-recoloring trees. Note that Theorem 5.2 is tight; see Lemma 4.10.

Theorem 5.1.

For any , for every tree on nodes, for any two -colorings of , we can compute in rounds how to recolor from to with extra color and a schedule of length .

Theorem 5.2.

For every tree on nodes and any list assignment of at least colors to every node of , for any two -colorings of , we can compute in rounds how to -recolor from to with schedule of length .

5.1 Recoloring with 1 extra color

We first discuss how to compute efficiently an independent set with some desirable properties. For this, we use a simple modification of the rake and compress method by Reif and Miller [18]. More precisely, we iterate rake and compress operations, and label nodes based on the step at which they are reached. We then use the labels to compute an independent set satisfying given properties. We finally explain how to make use of the special independent set to obtain an efficient recoloring algorithm, in each case.

Definition 5.3.

A light -labeling is a labeling such that for any :

  1. [noitemsep]

  2. Any node labeled has at most two neighbors with label , at most one of which with label .

  3. No two adjacent nodes labeled both have a neighbor with label .

Lemma 5.4.

There is an -round algorithm that finds a light -labeling of a tree.

Proof.

As discussed above, we merely use a small variant of the rake and compress method. At step , we remove all nodes of degree and all nodes of degree that belong to a chain of at least three nodes of degree , and assign them label .

One can check that this yields a light labeling. It remains to discuss how many different labels are used, i.e. how many steps it takes to delete the whole tree. Let us argue that no node remains after rounds. Let be a tree, let (resp. , ) be the number of nodes of degree (resp. , ) in the tree, and let be the tree obtained from by replacing any maximal path of nodes of degree with an edge. Note that . Let be the set of nodes in that have degree with both neighbors of degree . Note that . Note also that , simply by the fact that there are fewer edges than nodes in a tree. It follows that . Consequently, we obtain . In other words, at every step, we remove in particular , hence at least a sixth of the nodes. It follows that at after steps, the number of remaining nodes is at most . Note that this is less than once . ∎

We now discuss how to make use of light -labelings.

Lemma 5.5.

For any graph , any -coloring of , and any integer , let be a light -labeling of . There is an -round algorithm that finds a maximal independent set such that only has connected components on or nodes.

Proof.

In brief, we proceed as follows: at step , we first add all nodes of label which have a neighbor of label that is not in (they form an independent set by definition of a light label), then use the -coloring to obtain a fast greedy algorithm to make maximal on the nodes of label . See Algorithm 1 for details.

0:  A tree , a 3-coloring and a light -label of .
0:  A set of such that is an independent set and every connected component of has size at most .
1:  for  from down to 1 do
2:     for  with label (in parallel) do
3:        If has a neighbor of higher label that is not in , add to
4:     end for
5:     for  from to 3 do
6:        for  with label and color (in parallel) do
7:           If , add to
8:        end for
9:     end for
10:  end for
Algorithm 1 Decomposing into an independent set and components of size

The fact that the output is an independent set follows directly from the construction, as does the fact that the running time in rounds. We note that no connected component of contains nodes of different labels, due to the first operation at step .

It remains to argue that for any , the nodes of label that do not belong to only form connected components of size or . Assume for a contradiction that there is a node of label which has two neighbors and , also of label , such that none of belongs to . By definition of a light label, the node has no other neighbor of label , a contradiction to the fact that we build to be an MIS among the nodes of label . ∎

Combining Lemmas 5.4 and 5.5, and observing that a -coloring of a tree can be obtained in rounds, we immediately obtain the following.

Lemma 5.6.

There is an -round algorithm that finds an MIS in a tree, such that every component induced by non-MIS nodes is of size one or two.

We are now ready to prove Theorem 5.1.

Proof of Theorem 5.1.

First, we use Lemma 5.6 to obtain in rounds an MIS such that only has connected components of size or . We recolor each node in with the extra color. Remove , and recolor each component from to without using any extra colors; this can be done in recoloring rounds. Each node in can then go directly to its color in . ∎

5.2 List recoloring

Moving on to the list setting, we have to use a more convoluted approach since there is no global extra color that we can use. Before discussing -list-recoloring, we discuss -list-recoloring. For the sake of intuition, we start by presenting an algorithm for -recoloring trees, and explain afterwards how to adapt it for the list setting.

Lemma 5.7.

For every tree with radius at most and for any two 3-colorings of , we can compute in rounds how to -recolor from to with a schedule of length .

Proof.

Let be a -coloring of . We introduce an identification operation: Given a leaf and a node such that and have a common neighbor , we recolor with , and from then on we pretend that and are a single node. In other words, we delete from the tree we are considering, and reflect any recoloring of to the node . Note that these operations can stack up: the recoloring of a single node might be reflected on an arbitrarily large independent set in the initial tree.

We now briefly describe an algorithm to recolor a -coloring into a -coloring in rounds, with schedule . First, root on a node which is at distance at most of any node of . Any node of which is not adjacent to the root has a grandparent, which is defined as its parent’s parent.

Then, at each step, we consider the set of leaves of which have a grandparent, if any. We identify each leaf in with its grandparent (note that the notion of grandparent guarantees that this operation is well-defined, and that the operation results in being deleted).

This process stops when consists only of the root and its children. We select one of the children arbitrarily and identify the others with it. This results in being a single edge. Note that the color partition of is compatible with the identification operations, as we only ever identify nodes at even distance of each other.

We then recolor into : this is straightforward in the realm of -recoloring.

We can now choose a -coloring of (this can be done in rounds), and apply the above algorithm to -recolor both and to that -coloring. This results in a -recoloring between and with schedule . ∎

The same idea can be adapted to list coloring:

Lemma 5.8.

For every tree with radius at most , for any list assignment of at least colors to each node, for any two -colorings of , we can compute in rounds how to -recolor from to with schedule .

Proof.

We adapt the identification operation introduced in the proof of Lemma 5.7, merely by adapting the notion of having the same color. Let and be two nodes with a common neighbor . We say has the same color as with respect to in the following cases:

  • [noitemsep]

  • If , then is colored with the smallest element of

  • If and the color of belongs to , then is colored the same as

  • If and the color of does not belong to , then is colored with the smallest element of that differs from the color of

Therefore, when we identify a leaf with a node that has a common neighbor with , we first assign to the same color as with respect to , and from then on we pretend that and are a single node. In other words, any recoloring of is mirrored on so that at each step, the node has the same color as with respect to . Note that in some cases it may be that the color of does not actually change when the color of does.

When the operations stack up, i.e. a node is identified with a node which is identified with a node , we do not claim transitivity of the relation. In particular, and have no common neighbor, hence them having the same color is not well-defined. We merely enforce that has the same color as with respect to their common neighbor, and that has the same color as with respect to their common neighbor.

We insist on the fact that the definition of having the same color only depends on the list assignment. In particular, let us consider the situation once no more identification operation can be operated, i.e. the tree has been identified into an edge (see the proof of Lemma 5.7). The coloring of the edge characterizes entirely the coloring of the whole tree, regardless of the initial coloring. Therefore, we can pick an arbitrary -coloring of the edge, and recolor both and into the corresponding -coloring of the tree in rounds with schedule .

This results in computing in rounds an -recoloring between and with a schedule of length . ∎

To prove Theorem 5.2, we first split the tree in small components. We slightly adapt the proof of Lemma 5.5:

Lemma 5.9.

For any tree , any -coloring of , and any integer , let be a light -label of . There is a -round algorithm that finds a maximal independent set such that no node has two neighbors in and only has connected components of radius .

Proof.

The algorithm is far simpler than Algorithm 1. We compute the set of nodes with no neighbor of higher label. We note that is a collection of paths and cycles. We compute an independent set that is maximal subject to the property that no node in has two neighbors in . Note that by definition of light label, no node outside of may have two neighbors in (hence in ). It remains to argue that only has connected components of radius . We point out that every connected component of contains an element of . Therefore, any connected subset of nodes of has at most one neighbor of higher label, since is a tree. Together with the fact that any connected component of has at most nodes, we derive the conclusion. ∎

Now we are ready to prove Theorem 5.2.

Proof of Theorem 5.2.

Compute (in rounds) an independent set such any two elements of are at distance at least of each other and every connected component of has radius . By Lemmas 5.4 and 5.9 and the fact that a -coloring of a tree can be computed in rounds, we compute (in rounds) an -coloring of such that every node adjacent to an element has a color different from and . Note that this coloring exists since any tree is -list-colorable. Use Lemma 5.8 to recolor each connected component of from to . Recolor every element of with its color in . Use Lemma 5.8 to recolor each connected component from to . Note that this yields an -recoloring of from to with schedule . ∎

6 Recoloring algorithm for subcubic graphs

In this section we study recoloring in subcubic graphs (graphs of maximum degree at most ); our main result is summarized in the following theorem:

Theorem 6.1.

For every subcubic graph on nodes, for any two -colorings of , we can compute in rounds how to recolor from to with extra color and a schedule of length .

A theta is formed of three node-disjoint paths between two nodes. Note that in particular if a graph contains two cycles sharing at least one edge, then it contains a theta. We note the set of nodes at distance at most to .

We show here, roughly, that there is around every node a nice structure that we can use to design a valid greedy algorithm for the whole graph. This proof is loosely inspired by one in [1].

Lemma 6.2.

For every subcubic graph on nodes, for every node , there is a node with degree at most or a theta that is contained in .

Proof.

Assume for a contradiction that there is a subcubic graph on nodes with a node such that contains no node of degree nor any theta. Let be the set of nodes at distance at most from , and the set of nodes at distance at most from . Let be the set of cycles of contained in . Note that cycles in are edge-disjoint by assumption on and thus node-disjoint since is cubic. We select a set by picking for every an arbitrary edge in among those with both endpoints farthest from . Note that , and that by choice of , every edge in with both endpoints at the same distance of is selected in . Therefore, the distance to yields a natural orientation of the edges in , orientation from closer node to toward further node. We also note that by choice of , for any edge in such that is farther away from than , the node has another neighbor at the same distance of as . In that case, note that the edge does not belong to . We claim as a consequence that the distance from is the same in as in .

For any node , we say an outgoing edge is useful if it does not belong to . In addition to the above remarks, we make two observations:

  1. [noitemsep]

  2. Every node in has at least one useful edge.

  3. If a node in has only one useful edge , then has two outgoing useful edges.

Let us consider the graph obtained from by removing all edges in . We claim that every node in has degree at least in , and that no two adjacent nodes in have degree : this is immediate from the observations and remarks above. We also observe that is a tree. Let be the graph obtained from by replacing every node of degree two with an edge. We note that is a -regular tree of root and with no leaf at distance less than of . It follows that contains at least nodes, a contradiction. ∎

Lemma 6.3.

Let be a subcubic graph, let be an integer, and let be a collection of thetas and nodes of degree in each at distance at least of each other. Let be such that no element of has diameter more than . If the nodes of can be partitioned into and such that is an independent set and is a forest of radius at most , then there is a partition of such that is an independent set and is a forest of radius at most .

Proof.

Our construction ensures that any pair of nodes that are not connected in are not connected in neither. Hence, it suffices to prove that the statement holds for a single element of , since the elements of are by hypothesis non-adjacent. Let be an element of . We consider two cases depending on whether is a node of degree at most or is a theta.

  • If consists of a node of degree , or , we set to be in if it has a neighbor in , in otherwise. Note that since has at most one neighbor in , the radius of is at most one more than that of .

  • If consists of a theta with endpoints and and three node-disjoint paths , we prove independently that each admits a partition that is compatible with being set to and to , in such a way that the connected component of that contains is contained in . We do this by induction on the number of nodes in . If has no internal node, the conclusion immediately follows. If all the neighbors of at distance of through are in , we set all of to . Otherwise, let be the neighbor of in that with smallest distance ( to through . Let be the neighbor of in . We apply induction on , with in the role of . Note that is distinct from and not adjacent to , by construction. The nodes between and on are added to . Note that this nodes are connected to at most one component of , on the first node of . We extend the resulting decomposition to the rest of by setting all corresponding nodes to . ∎

Lemma 6.4.

Let be a subcubic graph on nodes. We can compute in rounds a partition of the nodes of that is an independent set and is a forest of radius .

Proof.

To that purpose, we combine the previous lemmas in Algorithm 2. The algorithm computes a decomposition as desired and runs in rounds, where is the number of rounds necessary to compute a -ruling set in a subcubic graph. We derive from [20] that , hence the conclusion. ∎

0:  A subcubic graph .
0:  A decomposition of such that is an independent set and every connected component of has radius at most .
1:  for  in (in parallel) do
2:     Acquire knowledge on
3:     Select in the node set of a configuration that is a minimal theta or a node of degree or
4:  end for
5:  Compute a -ruling set in
6:  Define
7:  Compute the distance of every node in to an element of
8:  Let
9:  for  downto  do
10:     Extend the partition to the nodes at distance from , more precisely:
11:     Each connected component is a path or cycle where no internal node has an already assigned neighbor, let be the set of the internal nodes
12:     Assuming a pre-computed MIS on each layer for the sets , assign that MIS to
13:     Extend greedily on the remaining nodes (which form bounded-size components), assigning nodes to when possible, to when not
14:  end for
15:  Extend the partition to the nodes belonging to an element of using Lemma 6.3
Algorithm 2 Decomposing into a small forest and an independent set

We are now ready to prove Theorem 6.1, which we do in a similar fashion as Theorem 5.1.

Proof.

Use Lemma 6.4, and obtain a decomposition as stated. Recolor all of to the extra color, then use Lemma 5.8 on each connected component of so that all nodes of reach their target color (remember that each connected component of has radius ). Finally recolor each node of with its target color. ∎

7 Recoloring in toroidal grids

In this section we study toroidal grids (torus grid graphs). Throughout this section, an toroidal grid is the Cartesian graph product of cycles of lengths and ; we assume and . A toroidal grid can be constructed from an grid by wrapping both boundaries around into a torus. Lemma 4.8 shows that e.g. , , and recoloring is not always possible, and by Lemma 4.1 e.g. , , and recoloring is trivial. The first nontrivial case is recoloring; in this section we give a complete characterization of recolorability in toroidal grids:

Theorem 7.1.

Let be the toroidal grid graph. Then recoloring is possible for any source and target coloring in the following cases: (i) both and are even, or (ii) , or (iii) . For all other cases it is possible to construct -colorings and such that is not reachable from by valid recoloring operations using extra color.

This also shows that recoloring is an inherently global problem in toroidal grids, even if we have a promise that recoloring is possible. For example, if there was a sublinear-time distributed recoloring algorithm for grids for an even , we could apply the same algorithm in a

grid with an odd

(the algorithm cannot tell the difference between these two cases in time ), and hence we could solve recoloring in grids for all , which contradicts Theorem 7.1. By a similar argument, distributed recoloring in non-toroidal grids is also an inherently global problem.

7.1 Existence

To prove Theorem 7.1, let us start with the positive results. If and are even, the graph is bipartite and recoloring is always possible by Lemma 1.1. The remaining cases are covered by the following lemma.

Lemma 7.2.

Let be a toroidal grid for any , and let and be any -colorings. Then there exists a recoloring from to with one extra color.

Proof.

We first take an MIS over pairs of consecutive columns, i.e. a set of indices of the form such that every column is such that at least one of and belongs to , every column is such that precisely one of and is in . Note that indices are taken modulo . For every pair in , we select a maximum independent set of the corresponding columns. The resulting union yields an independent set . We then greedily make maximal using . We recolor with the extra color. It remains to argue that can reach its targeted coloring. We note that since leaves are not problematic, removing essentially boils down to removing the columns with index in . Note that the remaining connected components are of constant size. It is not hard to check that, having maximal degree and containing nodes of degree , they can indeed be -recolored. Note that the above proof yields in fact an rounds algorithm that outputs an schedule. We can improve it into an -round algorithm, simply by pointing out that there is only a finite number of possible colorings for a column, and two adjacent columns cannot have the same coloring. This allows us to compute in constant time. ∎

7.2 Non-existence

Let us now prove the negative result. Our high-level plan is as follows. Let be an toroidal grid. We will look at all tiles of size . If is properly colored with colors, so is each tile. The following two tiles are of special importance to us; we call these tiles of type A:

We are interested in the number of type-A tiles. For example, consider the following colorings of the toroidal grid:

Here contains tiles of type A (recall that we wrap around at the boundaries), while does not have any tiles of type A. In particular, has an odd number of type-A tiles and has an even number of type-A tiles. In brief, we say that the A-parity of is odd and the A-parity of is even. It turns out that this is sufficient to show that recoloring from to with one extra color is not possible – we will prove the following lemma in Section 7.3:

Lemma 7.3.

Let be a toroidal grid, and let and be two -colorings. If and have different A-parities, then it is not possible to recolor from to with extra color.

Hence the A-parity of a coloring partitions the space of colorings in two components that are not connected by recoloring operations. To complete the proof of Theorem 7.1, it now suffices to construct a pair of -colorings with different A-parities for each relevant combination of and .

Odd , odd .

First assume that both and are odd. The simplest case is . In that case we can simply have s on the anti-diagonal and color all remaining areas with colors and ; this gives a coloring with type-A tiles (odd type-A parity). If we put s on the diagonal, we can construct a coloring with type-A tiles (even type-A parity). Here are examples for :

If , assume w.l.o.g. that , and in particular, for some . Then we can take the diagonal construction for and add copies of the two rightmost columns. For example, for and (and hence ) we get

Note that each additional pair of columns results in one new tile of type A in both and ; hence overall we will have type-A tiles in and type-A tiles in , and as was odd, the parity differs.

Odd , even .

The case that remains to be considered is that exactly one of and is odd; w.l.o.g., assume that is odd and is even. Also recall that , and hence we can focus on the case and .

For the base case of and we can use the following configuration; here in there is a sequence of s that wraps around vertically twice, while in there is a sequence of s that does not wrap around vertically. Here has got type-A tiles (even), while has got type-A tiles (odd):

If and

, we can take the above construction and pad it by duplicating the two leftmost columns

times. Each such duplication results in one new type-A tile in both configurations, maintaining the difference in parities. For example, for and we get

Finally, if , we can take the above construction for and take copies of the top row, shifting it back and forth to preserve the coloring. For example, for and we get

This way we preserve the basic topological structure, with a sequence of s wrapping around vertically twice in and zero times in . Note that in we will get new type-A tiles (as there are nodes of color in the top row) and in we will get new type-A tiles, again preserving the parity difference. This concludes the proof of Theorem 7.1.

7.3 Proof of Lemma 7.3

Let us now return to the last missing ingredient: the proof of Lemma 7.3, which says that recoloring from to is not possible if we have different A-parities.

Intuitively, we would like to prove that recoloring operations preserve the A-parity. Unfortunately, this is not the case, as we can use the extra color. For example, if you take a proper -coloring with an odd A-parity and replace all nodes of color with color , you will have a proper -coloring with an even A-parity.

It turns out that recoloring operations do preserve a certain kind of parity of tiles, but it is much more involved than merely preserving type-A parity. We introduce a new set of tiles that we call type-B tiles; the parity of the number of type-B tiles is called B-parity:

The collection of type-B tiles looks indeed somewhat arbitrary, but the following property is easy to verify: there is exactly one node of color in each type-A tile. Therefore if is a proper -coloring, then B-parity of is even. In particular, in recoloring, the initial coloring and the target coloring both have even B-parities.

The magic behind the choice of type-B tiles is that it happens to satisfy the following property.

Lemma 7.4.

If you change the color of one node in a properly -colored grid so that the result is also a proper -coloring, A-parity changes if and only if B-parity changes.

Proof.

Enumerate all neighborhoods and all possible ways to change the middle node, and check that the claim holds. We have made a computer program that verifies the claim and a human-readable list of all cases available online.111https://github.com/suomela/recoloring

Now any recoloring from to can be serialized so that we change the color of one node at a time. We start with an even B-parity (no type-B tiles in ), apply Lemma 7.4 at each step, and eventually we arrive at even B-parity (no type-B tiles in ). As B-parity did not change between and , also A-parity cannot change between and . This concludes the proof of Lemma 7.3.

Acknowledgments

The authors would like to thank Nicolas Bousquet for helpful discussions regarding the proof of Lemma 6.2. This work was supported in part by ERC Grant No. 336495 (ACDC) and ANR project DISTANCIA (ANR-17-CE40-0015).

References

  • [1] Pierre Aboulker, Marthe Bonamy, Nicolas Bousquet, and Louis Esperet. Distributed coloring in sparse graphs with fewer colours. arXiv preprint arXiv:1802.05582, 2018.
  • [2] Leonid Barenboim. Deterministic -coloring in sublinear (in ) time in static, dynamic and faulty networks. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing (PODC), pages 345–354, 2015.
  • [3] Leonid Barenboim and Michael Elkin. Distributed graph coloring: Fundamentals and recent developments. Synthesis Lectures on Distributed Computing Theory, 4(1):1–171, 2013.
  • [4] Marthe Bonamy and Nicolas Bousquet. Recoloring graphs via tree decompositions. European Journal of Combinatorics, 69:200–213, 2018.
  • [5] Marthe Bonamy, Nicolas Bousquet, Carl Feghali, and Matthew Johnson. On a conjecture of Mohar concerning kempe equivalence of regular graphs. arXiv preprint arXiv:1510.06964, 2015.
  • [6] Paul Bonsma and Luis Cereceda. Finding paths between graph colourings: Pspace-completeness and superpolynomial distances. Theoretical Computer Science, 410(50):5215–5226, 2009.
  • [7] Paul Bonsma, Amer E Mouawad, Naomi Nishimura, and Venkatesh Raman. The complexity of bounded length graph recoloring and csp reconfiguration. In International Symposium on Parameterized and Exact Computation, pages 110–121. Springer, 2014.
  • [8] Nicolas Bousquet and Guillem Perarnau. Fast recoloring of sparse graphs. European Journal of Combinatorics, 52:1–11, 2016.
  • [9] Sebastian Brandt, Juho Hirvonen, Janne H Korhonen, Tuomo Lempiäinen, Patric RJ Östergård, Christopher Purcell, Joel Rybicki, Jukka Suomela, and Przemysław Uznański. Lcl problems on grids. In Proceedings of the ACM Symposium on Principles of Distributed Computing, pages 101–110. ACM, 2017.
  • [10] Luis Cereceda, Jan Van den Heuvel, and Matthew Johnson. Mixing 3-colourings in bipartite graphs. European Journal of Combinatorics, 30(7):1593–1606, 2009.
  • [11] Luis Cereceda, Jan Van Den Heuvel, and Matthew Johnson. Finding paths between 3-colorings. Journal of graph theory, 67(1):69–82, 2011.
  • [12] Carl Feghali, Matthew Johnson, and Daniël Paulusma. A reconfigurations analogue of brooks’ theorem and its consequences. Journal of Graph Theory, 83(4):340–358, 2016.
  • [13] Carl Feghali, Matthew Johnson, and Daniël Paulusma. Kempe equivalence of colourings of cubic graphs. European Journal of Combinatorics, 59:1–10, 2017.
  • [14] Mark Jerrum.

    A very simple algorithm for estimating the number of

    -colorings of a low-degree graph.
    Random Structures & Algorithms, 7(2):157–165, 1995.
  • [15] Alfred B Kempe. On the geographical problem of the four colours. American Journal of Mathematics, 2(3):193–200, 1879.
  • [16] Michel Las Vergnas and Henri Meyniel. Kempe classes and the hadwiger conjecture. Journal of Combinatorial Theory, Series B, 31(1):95–104, 1981.
  • [17] Daniel C McDonald. Connectedness and hamiltonicity of graphs on vertex colorings. arXiv preprint arXiv:1507.05344, 2015.
  • [18] Gary L. Miller and John H. Reif. Parallel tree contraction part 1: Fundamentals. Advances in Computing Research, 5:47–72, 1989.
  • [19] Moni Naor and Larry Stockmeyer. What can be computed locally? SIAM Journal on Computing, 24(6):1259–1277, 1995.
  • [20] Alessandro Panconesi and Aravind Srinivasan. Improved distributed algorithms for coloring and network decomposition problems. In

    Proceedings of the twenty-fourth annual ACM symposium on Theory of computing

    , pages 581–592. ACM, 1992.
  • [21] Alessandro Panconesi and Aravind Srinivasan. The local nature of -coloring and its algorithmic applications. Combinatorica, 15(2):255–280, 1995.
  • [22] Jan van den Heuvel. The complexity of change. Surveys in combinatorics, 409(2013):127–160, 2013.
  • [23] Seth Pettie Yi-Jun Chang, Wenzheng Li. An optimal distributed -coloring algorithm? In Proceedings of the 50th ACM Symposium on Theory of Computing (STOC), 2018.
  • [24] Seth Pettie Yi-Jung Chang, Tsvi Kopelowitz. An exponential separation between randomized and deterministic complexity in the local model. In Foundations of Computer Science (FOCS), pages 615–624, 2016.

Appendix A Appendix

a.1 Number of extra colors

We have seen that additional colors are trivially sufficient for -recoloring. Theorem 7.1 shows that this is tight for : some toroidal grids require extra colors for -recoloring. Now we show that this is tight for any . Incidentally, in the following construction case results in a graph that is isomorphic to a toroidal grid, so this can be seen as a generalization of the result about toroidal grids.

Theorem A.1.

For any , there exists and two -colorings and such that, to recolor from to , we need at least extra colors.

Proof.

Construct a graph with

and define two -colorings by and . The set is called row , and the set is called column .

Let us assume that we can go from to with extra colors. Let be a coloring reached from . Let and be two nodes with the same color. We must have or , as otherwise the two nodes would be connected. Let be the nodes of color ; there exists such that is entirely contained in row or column .

Let be a valid sequence of recoloring from to , where a single color gets recolored after each step. Let be the first index such that in there exists a row in which all nodes have different color. We know that exists as has this property, and does not.

Let focus on the coloring . There on row we have we have exactly different colors. Let be the set of colors on row . For any row , we have a color that occurs twice in row (otherwise would not be minimal). It follows that is entirely contained in row . In particular, color does not occur in row .

Overall, we have got colors in , and colors in , and these sets are disjoint. Hence we are using here all colors of our color palette.

Let be the node that changes its color from to ; let be the new color of this node. If we had , we would not produce a row with different colors. On the other hand, if we had , there would be a row with , and hence there would be two nodes on row with color , at least one of them adjacent to . But there is no color . Hence a recoloring sequence cannot exist. ∎

Edge recoloring.

Note that the line graph of the complete bipartite graph is isomorphic to the graph that we construct in the proof of Theorem A.1 for . Hence we obtain the following result about edge recoloring: there is a graph and two edge colorings and with colors such that it is not possible to recolor from to with one extra color.