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
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.
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.
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:
is a proper coloring of for all ,
is an independent set of for all .
The key differences between distributed recoloring and classical recoloring are:
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 .
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  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).
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:
We are given colorings with .
All intermediate solutions must satisfy .
Here we use the notation .
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:
Recoloring with extra color is always possible in any bipartite graph, with a distributed schedule of length .
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.
|P||3||0||Lemmas 4.2 and 4.9|
|C/P||4||0||Lemmas 4.3 and 4.4|
|3||0||Lemmas 4.2 and 4.9|
|4||0||Theorem 5.2 and Lemma 4.10|
|5||0||Lemmas 4.5 and 4.4|
|3||0||Lemmas 4.2 and 4.9|
|4||0||Theorem 5.2 and Lemma 4.10|
|6||0||Lemmas 4.7 and 4.4|
Our main contribution is a comprehensive study of the complexity of distributed recoloring in various graph families; the results are summarized in Tables 1–5. The highlights of this work are the following results:
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.
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.
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.
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  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:
Node recoloring: at each step, we can recolor a node into a new color that does not appear on its neighborhood
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 . 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 . We know that the maximum number of operations needed to go from one -coloring to another in a tree is . While -recoloring a graph with no node of degree more than is not always possible, having colors always suffices , and there are also meaningful results to obtain for the problem of -recoloring . 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 . 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 .
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.
Panconesi and Srinivasan  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 ; the most important recent developments include the following results. There is a randomized -time algorithm for -coloring by Chang et al. . In the case of trees, the number of colors can be reduced to with the cost of increasing the runtime to . On the deterministic side, the best known -coloring algorithm requires communication rounds . In the case of trees, the rake-and-compress -method by Miller and Reif gives a -coloring in time .
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 , -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).
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.
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.
In any graph, recoloring for is possible in communication rounds, with a schedule of length .
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. ∎
In paths and trees, -recoloring is possible in rounds, with a schedule of length .
In cycles and paths, recoloring is possible in rounds, with a schedule of length .
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. ∎
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.
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. ∎
In subcubic graphs, recoloring is possible in rounds, with a schedule of length .
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. ∎
In toroidal grids, recoloring is possible in rounds, with a schedule of length .
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. ∎
In toroidal grids, recoloring is possible in rounds, with a schedule of length .
Recoloring without any extra colors is not possible in the following settings for some pairs of input and target colorings:
-recoloring paths or trees.
-recoloring toroidal grids.
-recoloring toroidal grids.
-recoloring toroidal grids.
-recoloring toroidal grids.
-recoloring cubic graphs.
-recoloring cubic graphs.
-recoloring cubic graphs.
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 :
A path with nodes, .
A -cycle, .
A -cycle, .
A grid, .
A grid, .
A grid, .
A grid, .
Complete bipartite graph , with constructed from the bipartition.
Prism graph: connect the nodes of a -cycle colored with to another -cycle colored with , in this order.
Complete graph . ∎
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.
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. ∎
In trees, -recoloring without extra colors requires time and produces schedules of length in the worst case.
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. ∎
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 .
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 .
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 . 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.
A light -labeling is a labeling such that for any :
Any node labeled has at most two neighbors with label , at most one of which with label .
No two adjacent nodes labeled both have a neighbor with label .
There is an -round algorithm that finds a light -labeling of a tree.
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.
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.
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.
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 . ∎
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.
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 . ∎
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.
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 .
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:
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 .
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:
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 . ∎
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 .
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.
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 . ∎
In this section we study recoloring in subcubic graphs (graphs of maximum degree at most ); our main result is summarized in the following theorem:
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 .
For every subcubic graph on nodes, for every node , there is a node with degree at most or a theta that is contained in .
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:
Every node in has at least one useful edge.
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. ∎
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 .
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 . ∎
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 .
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:
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.
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.
Let be a toroidal grid for any , and let and be any -colorings. Then there exists a recoloring from to with one extra color.
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. ∎
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:
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 .
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.
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):
, we can take the above construction and pad it by duplicating the two leftmost columnstimes. 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.
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.
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.
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.
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).
A very simple algorithm for estimating the number of-colorings of a low-degree graph. Random Structures & Algorithms, 7(2):157–165, 1995.
Proceedings of the twenty-fourth annual ACM symposium on Theory of computing, pages 581–592. ACM, 1992.
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.
For any , there exists and two -colorings and such that, to recolor from to , we need at least extra colors.
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. ∎
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.