Abstract 1 Introduction 2 Preliminaries 3 PSPACE-completeness 4 Polynomial-time Algorithms 5 Concluding Remarks References

Coloring Reconfiguration Under Color Swapping

Janosch Fuchs ORCID IT Center, RWTH Aachen University, Germany Rin Saito ORCID Graduate School of Information Sciences, Tohoku University, Japan Tatsuhiro Suga ORCID Graduate School of Information Sciences, Tohoku University, Japan Takahiro Suzuki ORCID Graduate School of Information Sciences, Tohoku University, Japan Yuma Tamura ORCID Graduate School of Information Sciences, Tohoku University, Japan
Abstract

In the Coloring Reconfiguration problem, we are given two proper k-colorings of a graph and asked to decide whether one can be transformed into the other by repeatedly applying a specified recoloring rule, while maintaining a proper coloring throughout. For this problem, two recoloring rules have been widely studied: single-vertex recoloring and Kempe chain recoloring. In this paper, we introduce a new rule, called color swapping, where two adjacent vertices may exchange their colors, so that the resulting coloring remains proper, and study the computational complexity of the problem under this rule. We first establish a complexity dichotomy with respect to k: the problem is solvable in polynomial time for k2, and is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for k3. We further show that the problem remains 𝖯𝖲𝖯𝖠𝖢𝖤-complete even on restricted graph classes, including bipartite graphs, split graphs, and planar graphs of bounded degree. In contrast, we present polynomial-time algorithms for several graph classes: for paths when k=3, for split graphs when k is fixed, and for cographs when k is arbitrary.

Keywords and phrases:
Combinatorial reconfiguration, graph coloring, PSPACE-complete, graph algorithm
Funding:
Rin Saito: Supported by JST SPRING Grant Number JPMJSP2114.
Yuma Tamura: Supported by JSPS KAKENHI Grant Number JP25K21148.
Copyright and License:
[Uncaptioned image] © Janosch Fuchs, Rin Saito, Tatsuhiro Suga, Takahiro Suzuki, and Yuma Tamura; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis
Related Version:
Full Version: https://arxiv.org/abs/2511.06473
Editors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai

1 Introduction

1.1 Reconfiguring of Colorings

The field of combinatorial reconfiguration investigates reachability and connectivity in the solution space of combinatorial problems. A combinatorial reconfiguration problem is defined with respect to a combinatorial problem Π and a reconfiguration rule R, which specifies how one feasible solution of Π can be transformed into another. Given an instance of Π and two feasible solutions, the reconfiguration problem asks whether it is possible to transform one into the other through a sequence of solutions, each obtained by a single application of R, such that all intermediate solutions are also feasible. Combinatorial reconfiguration problems naturally arise in applications involving dynamic systems, where solutions must be updated while maintaining feasibility at every step. In addition, studying such problems provides deeper insights into the structural properties of the solution spaces of classical combinatorial problems. We refer the reader to the surveys by van den Heuvel [20] and Nishimura [31] for comprehensive overviews of this growing area.

Among the various reconfiguration problems, one of the most fundamental and extensively studied is the reconfiguration of graph colorings. Let k be a positive integer. For a fixed reconfiguration rule R, the Coloring Reconfiguration problem under R is defined as follows: given a k-colorable graph G and two proper k-colorings f and f, determine whether there exists a sequence of proper k-colorings of G starting at f and ending at f, where each coloring in the sequence is obtained from the previous one by a single application of R. The k-Coloring Reconfiguration is a special case where k is fixed. The computational complexity of k-Coloring Reconfiguration has been the subject of extensive algorithmic study; see Section 3 of the survey by Mynhardt and Nasserasr [30].

Two reconfiguration rules have been widely studied for k-Coloring Reconfiguration: single-vertex recoloring and Kempe chain recoloring. In the single-vertex recoloring rule, a new proper k-coloring is obtained by recoloring a single vertex so that the resulting k-coloring remains proper. Under this rule, k-Coloring Reconfiguration is solvable in polynomial time when k3 [14], while it becomes 𝖯𝖲𝖯𝖠𝖢𝖤-complete for every fixed k4 [8]. Notably, this rule is closely related to Glauber dynamics in statistical physics, where a Markov chain is defined over the space of proper k-colorings of a graph G: at each step, a vertex is selected uniformly at random and recolored with a randomly chosen color such that the resulting coloring remains proper. See Sokal [33] for an introduction to the Potts model and its connections to graph coloring.

The second widely studied rule is Kempe chain recoloring. A new proper k-coloring is obtained by selecting a connected component C of the subgraph of G induced by two color classes (i.e., a Kempe chain) and swapping the two colors within C. Note that when C consists of a single vertex, this operation is equivalent to single-vertex recoloring. While k-Coloring Reconfiguration under this rule is solvable in polynomial time when k2 [27] (in fact, the answer is always “Yes”), it becomes 𝖯𝖲𝖯𝖠𝖢𝖤-complete for every fixed k3 [6]. Kempe chain recoloring was originally introduced by Kempe in 1879 in an attempt to prove the Four Color Theorem [24]. Although his proof was later found to be flawed, the technique has continued to play a central role in graph coloring theory [5, 27], statistical physics [28, 29], and the study of mixing times of Markov chains [36].

These results highlight a key aspect of reconfiguration problems: even when the definition of feasible solutions remains the same, the computational complexity of finding a reconfiguration sequence can vary greatly depending on the selected reconfiguration rule.

Figure 1: A reconfiguration sequence between two proper 3-colorings fs and ft under color swapping.

1.2 Our Contribution

Figure 2: Our results for graph classes. Each arrow represents the inclusion relationship between classes: AB means that the graph class B is a proper subclass of the graph class A.

In this paper, we introduce a new reconfiguration rule, called color swapping (𝖢𝖲) for Coloring Reconfiguration. A new proper k-coloring is obtained from a given one by swapping the colors of the endpoints of a single edge uv in G, so that the resulting coloring remains proper. For example, Figure 1 shows a reconfiguration sequence between fs and ft under 𝖢𝖲, hence it is a yes-instance. We refer to Coloring Reconfiguration and k-Coloring Reconfiguration under 𝖢𝖲 as CRCS and k-CRCS, respectively. The color swapping rule can be seen as a restricted variant of Kempe chain recoloring, where each Kempe chain is limited to exactly two vertices. Interestingly, this rule is also studied in statistical physics as (local) Kawasaki dynamics, which models dynamics in the fixed-magnetization Ising model [12, 23, 25].

The contribution of this paper is an analysis of the computational complexity of CRCS and k-CRCS; for an overview of our results, we refer to Figure 2. First, we prove that CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete even when the input graph is restricted to bipartite or split graphs. Furthermore, we show that there exists a positive integer k0 such that for every fixed kk0, k-CRCS becomes 𝖯𝖲𝖯𝖠𝖢𝖤-complete even when the input graph is restricted to chordal graphs, which is a superclass of split graphs.

We also establish a complexity dichotomy with respect to the number k of colors: k-CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for any fixed k3, whereas for k2, the problem can be solved in polynomial time. In particular, we show that 3-CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete even when restricted to planar graphs with maximum degree 3 and bounded bandwidth.

Complementing these hardness results, we also present several positive results. We first show that 3-CRCS can be solved in linear time on path graphs. To this end, we introduce an invariant for proper 3-colorings of paths, and design a linear-time algorithm that checks whether two input colorings have the identical invariants. While the algorithm is simple, its correctness requires a non-trivial argument.

Next, we show that CRCS can be solved in polynomial time on cographs. Our algorithm is based on a recursive procedure over the cotree of the input cograph, inspired by prior work [22] for Independent Set Reconfiguration on cographs. To adapt this approach to our problem, we introduce a new notion called extended k-colorings as a generalization of k-colorings.

Finally, we show that k-CRCS on split graphs is polynomial-time solvable for any fixed k. This contrasts with the 𝖯𝖲𝖯𝖠𝖢𝖤-hardness of CRCS on split graphs when k is unbounded.

Due to the space limitation, we omit the proofs of statements with the symbol marks, which can be found in the full version of this paper.

1.3 Related Work

As mentioned in Section 1.1, the complexity of k-Coloring Reconfiguration has been extensively investigated with respect to various graph classes. Under both the single-vertex recoloring and Kempe chain recoloring rules, the problem is known to be 𝖯𝖲𝖯𝖠𝖢𝖤-complete in general. Moreover, stronger hardness results and polynomial-time algorithms have been established for specific graph classes.

Under the single-vertex recoloring rule, the problem remains 𝖯𝖲𝖯𝖠𝖢𝖤-complete even on bipartite planar graphs [8] and chordal graphs [17]. On the positive side, it is solvable in polynomial time for 2-degenerate graphs, q-trees (for fixed q), trivially perfect graphs, and split graphs [17]. Under the Kempe chain recoloring rule, the problem is 𝖯𝖲𝖯𝖠𝖢𝖤-complete even on planar graphs with maximum degree 6 [6]; however, it is polynomial-time solvable on chordal graphs, bipartite graphs, and cographs [6]. Several other algorithmic and structural aspects of k-Coloring Reconfiguration have also been studied, including finding a shortest reconfiguration sequence [9, 21] and bounding its length [1, 3, 10, 13].

The term color swapping is inspired by the Colored Token Swapping problem [7, 38], a reconfiguration problem involving token placements. In that problem, one is given a graph with an initial and a target coloring, which need not be proper, and the goal is to transform the initial coloring into the target one using the minimum number of swaps between tokens on adjacent vertices. Since feasibility is not restricted to proper colorings, this can be viewed as a variant of our reconfiguration problem in which the feasibility condition is relaxed. Yamanaka et al. [38] showed that Colored Token Swapping is 𝖭𝖯-hard even when the number of colors is exactly three.

2 Preliminaries

For a positive integer k, we write [k]={1,2,,k}. For sets X and Y, the symmetric difference of X and Y is defined as XY(XY)(YX). For a map f:XY and an element yY, the preimage of y under f is defined as f1(y){xXf(x)=y}.

Let G=(V,E) be an undirected graph. We use V(G) and E(G) to denote the vertex set and edge set of G, respectively. For a vertex v of G, NG(v) and NG[v] denote the open neighborhood and the closed neighborhood of v in G, respectively; that is, NG(v)={uVuvE} and NG[v]=NG(v){v}. For a vertex set XV, we define NG(X)={vVXuX,uvE(G)} and NG[X]=NG(X)X.

For a positive integer k, a (proper) k-coloring of a graph G is a map f:V(G)[k] that assigns different colors to adjacent vertices; in other words, f(u)f(v) for every edge uvE(G). An independent set of a graph G is a subset IV(G) such that for all u,vI, uvE(G) holds. A clique of a graph G is a subset CV(G) such that for all u,vC with uv, uvE(G) holds.

2.1 Our Problems

For two proper colorings f and f of a graph G, we say that f and f are adjacent under Color Swapping (denoted by 𝖢𝖲) if and only if the following two conditions hold:

  1. 1.

    There exists exactly one edge uvE(G) such that f(u)=f(v) and f(v)=f(u), and

  2. 2.

    For all other vertices wV(G){u,v}, we have f(w)=f(w).

Intuitively, f can be obtained from f by swapping the colors of two adjacent vertices.

A sequence f0,f1,,f of proper k-colorings of G with f0=f and f=f is called a reconfiguration sequence between f and f if fi1 and fi are adjacent under 𝖢𝖲 for all i[]. We say that f and f are reconfigurable if such a sequence exists. We now define the Coloring Reconfiguration under Color Swapping problem (CRCS for short). In CRCS, we are given a graph G, a positive integer k, and two proper k-colorings fs and ft of G. The goal is to determine whether there exists a reconfiguration sequence between fs and ft. For a fixed positive integer k, the k-CRCS problem is the special case of CRCS in which the two input colorings are k-colorings.

An instance (G,k,fs,ft) of CRCS is said to be valid if, for each color i[k], the number of vertices assigned color i is the same in fs and ft; that is, |fs1(i)|=|ft1(i)|. Note that if fs and ft are reconfigurable, then (G,k,fs,ft) must be valid. This observation implies that if an instance (G,k,fs,ft) of CRCS is not valid, we can immediately return “NO.” Therefore, throughout this paper, we assume that all instances of CRCS are valid.

It is easy to see that k-CRCS for k2 can be solved in polynomial time.

Observation 1 ().

k-CRCS can be solved in polynomial time for k2.

3 PSPACE-completeness

We first observe that CRCS is solvable using polynomial space, i.e., CRCS belongs to the class 𝖯𝖲𝖯𝖠𝖢𝖤. This follows from the equivalence 𝖯𝖲𝖯𝖠𝖢𝖤=𝖭𝖯𝖲𝖯𝖠𝖢𝖤, which is a consequence of Savitch’s theorem [32]. To see the membership of 𝖯𝖲𝖯𝖠𝖢𝖤, consider a reconfiguration sequence for CRCS as a certificate. Our polynomial-space algorithm reads each k-coloring in the sequence one by one and verifies that (i) each coloring is proper and (ii) each pair of consecutive colorings is adjacent under 𝖢𝖲. Since each of these checks can be performed using polynomial space, this implies that CRCS can be solved in nondeterministic polynomial space. Therefore, by 𝖯𝖲𝖯𝖠𝖢𝖤=𝖭𝖯𝖲𝖯𝖠𝖢𝖤, we conclude that CRCS is in 𝖯𝖲𝖯𝖠𝖢𝖤.

In this section, we present polynomial-time reductions from three different problems to establish the 𝖯𝖲𝖯𝖠𝖢𝖤-completeness of our problem for several graph classes. Specifically, we reduce from the following problems: the Token Sliding problem in Section 3.1, the Coloring Reconfiguration problem in Section 3.2, and the Nondeterministic Constraint Logic problem in Section 3.3.

3.1 Reduction from Token Sliding

In this subsection, we present a polynomial-time reduction from the Token Sliding problem to CRCS. Token Sliding is also known as the Independent Set Reconfiguration under Token Sliding [18, 22].

Let G be a graph, and let IV(G) be a vertex subset of G. Recall that I is an independent set of G if no two vertices in I are adjacent; that is, uvE(G) for all u,vI. Two independent sets I and J of the same size are said to be adjacent under token sliding if and only if |IJ|=2 and the two vertices in IJ are joined by an edge in G.

In the Token Sliding problem, we are given a graph G and two independent sets Is,ItV(G) of the same size. The goal is to determine whether there exists a sequence I0,I1,,I of independent sets of G such that Is=I0 and It=I, and for every i[], Ii1 and Ii are adjacent.

Token Sliding is known to be 𝖯𝖲𝖯𝖠𝖢𝖤-complete even when restricted to split graphs [2] or bipartite graphs [26]. A graph is split if its vertices can be partitioned into a clique and an independent set, and bipartite if its vertices can be partitioned into two independent sets.

We first show the following theorem for split graphs.

Theorem 2.

CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for split graphs.

Proof.

We have already observed that the problem is in 𝖯𝖲𝖯𝖠𝖢𝖤. To show the 𝖯𝖲𝖯𝖠𝖢𝖤-hardness, we give a polynomial-time reduction from Token Sliding on split graphs to CRCS.

Let (G,Is,It) be an instance of Token Sliding such that |Is|=|It| and G=(V,E) is a split graph with vertex partition (C,S), where C is a clique of G and S is an independent set of G. Assume that |Is|=|It|2. Note that Token Sliding remains 𝖯𝖲𝖯𝖠𝖢𝖤-complete under this assumption since the problem is trivial when |Is|=|It|=1.

We construct an instance (G,k,fs,ft) of CRCS as follows. Let G be the graph obtained from G by adding a new vertex u that is adjacent to all vertices in V(G). That is, let G=(V,E) with V=V{u} and E=E{uvvV}. Since u is adjacent to all vertices in C, the set C{u} is a clique of G, and S is an independent set of G. Thus, G is also a split graph.

Let k=|V||Is|+1=|V||It|+1. We now define proper k-colorings fs and ft of G. For each vIs, set fs(v)=1. Then, assign a distinct color from [k]{1} arbitrarily to each vertex in VIs so that fs is a proper k-coloring. Similarly, define ft by setting ft(v)=1 for each vIt, and assigning a distinct color from [k]{1} arbitrarily to each vertex in VIt so that ft is also a proper k-coloring. Since |VIs|=k1 and |VIt|=k1, such proper k-colorings fs and ft exist.

This completes the construction of the instance (G,k,fs,ft). We claim that (G,Is,It) is a yes-instance of Token Sliding if and only if (G,k,fs,ft) is a yes-instance of CRCS.

We first show the “only if” direction. Suppose that (G,Is,It) is a yes-instance of Token Sliding. Then, there exists a sequence of independent sets I0,I1,,I of G, with I0=Is and I=It, and for each i[], Ii1 and Ii are adjacent under token sliding. For each i{0,1,,}, we construct a proper k-coloring fi of G from Ii, following the same construction as for fs and ft: for each vIi, set fi(v)=1, and assign a distinct color from [k]{1} arbitrarily to each vertex in VIi so that fi is a proper k-coloring of G.

We claim that for all i[], fi1 and fi are reconfigurable under 𝖢𝖲. Let f be the coloring obtained from fi1 by exchanging the colors assigned to the vertices vIi1Ii and wIiIi1. Since each vertex in Ii1 is assigned the color 1 in fi1, and all other vertices are assigned distinct colors from [k]{1}, the modified coloring f remains a proper k-coloring of G. Moreover, since Ii1 and Ii are adjacent under token sliding, we have vwE(G). Thus, fi1 and f are adjacent under 𝖢𝖲.

We now show that f and fi are reconfigurable under 𝖢𝖲. Recall that f(v)=fi(v)=1 for all vIi. Thus, f and fi may differ only on the vertices in V(G)Ii. Note that the restrictions of f and fi to V(G)Ii are both bijective.

By construction, G[V(G)Ii] is connected, since it contains a universal vertex u adjacent to all others. It is known that for any connected n-vertex graph and two bijective n-colorings, there exists a reconfiguration sequence of length O(n2) between them under 𝖢𝖲 [37]. Applying this result, we can reconfigure f into fi using color swaps only within V(G)Ii. Thus, fi1 and fi are reconfigurable under 𝖢𝖲. This implies that we can construct a reconfiguration sequence between fs and ft under 𝖢𝖲. Therefore, (G,k,fs,ft) is a yes-instance of CRCS.

We now prove the “if” direction. Suppose that there exists a reconfiguration sequence between fs and ft under 𝖢𝖲. Let f0,f1,,f be the reconfiguration sequence, where f0=fs and f=ft. For each i{0,1,,}, define Ii=fi1(1). Since the number of vertices colored 1 remains constant throughout the sequence, it follows that |Ii|=|Is|=|It|2 for all i. By construction, the vertex u is adjacent to all other vertices in G, and thus cannot be assigned color 1 in any fi; hence, IiV(G). Moreover, since fi is a proper k-coloring of G, the set Ii forms an independent set of G, and consequently also an independent set of G.

For each i[], since two consecutive proper k-colorings fi1 and fi are adjacent under 𝖢𝖲, we can observe that Ii1 and Ii are either identical or adjacent under token sliding. By deleting any consecutive duplicate independent sets from the I0,I1,,I, we obtain the desired sequence between Is and It. Therefore, (G,Is,It) is a yes-instance of Token Sliding.

This completes the proof of Theorem 2.

The similar result holds for bipartite graphs.

Theorem 3.

CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for bipartite graphs.

Proof.

We have already observed that the problem is in 𝖯𝖲𝖯𝖠𝖢𝖤. To show the 𝖯𝖲𝖯𝖠𝖢𝖤-hardness, we give a polynomial-time reduction from Token Sliding on bipartite graphs to CRCS.

Let (G,Is,It) be an instance of Token Sliding, where G is a bipartite graph with a bipartition (S,T), and both S and T are independent sets of G. We construct an instance (G,k,fs,ft) of CRCS as follows (see also Figure 3).

First, we construct G by adding three new vertices x1,x2,x3 to S, and three new vertices y1,y2,y3 to T. We then make x1 adjacent to all vertices in T{y1,y2,y3}, and y1 adjacent to all vertices in S{x1,x2,x3}. Since S{x1,x2,x3} and T{y1,y2,y3} are independent sets of G, the resulting graph G is also bipartite.

We set k=|V(G)||Is|3, and define proper k-colorings fs and ft of G as follows. For the initial coloring fs, assign color 1 to every vertex in Is{x2,x3,y2,y3}. Then, assign a distinct color from [k]{1} arbitrarily to each vertex in V(G)(Is{x2,x3,y2,y3}) so that fs is a proper k-coloring of G. Similarly, for the target coloring ft, assign color 1 to every vertex in It{x2,x3,y2,y3}. Then, assign a distinct color from [k]{1} arbitrarily to each vertex in V(G)(It{x2,x3,y2,y3}) such that ft is also a proper k-coloring of G. Note that both V(G)(Is{x2,x3,y2,y3}) and V(G)(It{x2,x3,y2,y3}) contain exactly (k1) vertices. Moreover, both (Is{x2,x3,y2,y3}) and (It{x2,x3,y2,y3}) form independent sets of G. Thus, it is always possible to assign the remaining (k1) colors so that both fs and ft are proper k-colorings of G.

This completes the construction of the instance (G,k,fs,ft). We then claim that (G,Is,It) is a yes-instance of Token Sliding if and only if (G,k,fs,ft) is a yes-instance of CRCS.

We first show the “only if” direction. Suppose that (G,Is,It) is a yes-instance of Token Sliding. Then, there exists a sequence of independent sets I0,I1,,I of G, with I0=Is and I=It, and for each i[], Ii1 and Ii are adjacent under token sliding. For each i{0,1,,}, we construct a proper k-coloring fi of G from Ii, following the same construction as for fs and ft. for the coloring fi, assign color 1 to every vertex in Ii{x2,x3,y2,y3}. Then, assign a distinct color from [k]{1} arbitrarily to each vertex in V(G)(Ii{x2,x3,y2,y3}) such that fi is also a proper k-coloring.

We claim that fi1 and fi are reconfigurable under 𝖢𝖲. Let f be the coloring obtained from fi1 by exchanging the colors assigned to the vertices vIi1Ii and wIiIi1. Since each vertex in Ii{x2,x3,y2,y3} is assigned the color 1, and all other vertices are assigned distinct colors from [k]{1} by f, the modified coloring f remains a proper k-coloring of G. Moreover, since Ii1 and Ii are adjacent under token sliding, we have vwE(G). Hence, fi and f are adjacent under 𝖢𝖲.

Figure 3: (a) The bipartite graph G for an instance of the Token Sliding problem, along with its initial independent set I, where the vertices in I are marked in black. The vertex set of the graph G is partitioned into independent sets S and T. (b) The bipartite graph G, constructed from G, has a bipartition V(G)=(S{x1,x2,x3})(T{y1,y2,y3}), where both parts are independent sets. Each vertex is labeled with its color in the initial proper k-coloring fs derived from I.

We now prove that f and fi are reconfigurable under 𝖢𝖲. Recall that f(v)=fi(v)=1 for all vIi{x2,x3,y2,y3} Thus, f and fi may differ only on the vertices in [k]{1}. Note that the restrictions of f and fi to V(G)Ii are both bijective.

Recall that x1 is adjacent to every vertex in T{y1,y2,y3} and y1 is adjacent to every vertex in S{x1,x2,x3}, so the subgraph induced by V(G)(Ii{x2,x3,y2,y3}) is connected. As shown in the proof of Theorem 2 and using the result from [37], we see that f and fi are reconfigurable under 𝖢𝖲, and thus so are fi1 and fi. By repeating this process for all i[], we obtain a reconfiguration sequence from fs to ft under 𝖢𝖲. Therefore, (G,k,fs,ft) is a yes-instance of CRCS.

We now prove the “if” direction. Suppose that there exists a reconfiguration sequence between fs and ft under 𝖢𝖲. Let f0,f1,,f be the reconfiguration sequence, where f0=fs and f=ft.

Since x2 and x3 share the same neighbor y1 and are both assigned color 1 in fs, no color swap involving x2 or x3 is allowed throughout the sequence; that is, fi(x2)=fi(x3)=1 for all i{0,1,,}. By symmetry, we also have fi(y2)=fi(y3)=1, which implies that x1 and y1 are never assigned color 1. For each i{0,1,,}, define Ii=fi1(1) and Ii=Ii{x2,x3,y2,y3}. Then, |Ii|=|Is|=|It|, and since Ii is an independent set in G, it follows that Ii is also an independent set in G.

Furthermore, since fi1 and fi are adjacent under 𝖢𝖲 for each i[], the sets Ii1 and Ii are either adjacent under token sliding or identical. By removing consecutive duplicates from the sequence I0,I1,,I, we obtain a reconfiguration sequence of independent sets from Is to It under token sliding. Therefore, (G,Is,It) is a yes-instance of Token Sliding.

This completes the proof of Theorem 2.

3.2 Reduction from Coloring Reconfiguration

In this subsection, we give a polynomial-time reduction from the k-Coloring Reconfiguration problem under single-vertex recoloring to k-CRCS.

Let k be a positive integer. In k-Coloring Reconfiguration under single-vertex recoloring, we are given a graph G and two k-colorings g and g of G. The goal is to determine whether there exists a sequence of k-colorings g0,g1,,g with g0=g and g=g such that for each i[], the colorings gi1 and gi differ at exactly one vertex; that is, |{vV(G)gi1(v)gi(v)}|=1. We simply call the problem k-Coloring Reconfiguration. It is known that there exists a positive integer k0 such that, for any fixed kk0, k-Coloring Reconfiguration is 𝖯𝖲𝖯𝖠𝖢𝖤-complete on chordal graphs [17]. Recall that a graph is chordal if it contains no induced cycle of length at least 4.

We claim the following theorem.

Theorem 4.

There exists a positive integer k0 such that, for any fixed kk0, k-CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete on chordal graphs.

Proof.

We have already observed that the problem is in 𝖯𝖲𝖯𝖠𝖢𝖤. To show the 𝖯𝖲𝖯𝖠𝖢𝖤-hardness, we give a polynomial-time reduction from k-Coloring Reconfiguration on chordal graphs to k-CRCS.

Let (G,gs,gt) be an instance of k-Coloring Reconfiguration, where G is a chordal graph. We construct an instance (G,fs,ft) of k-CRCS as follows (see also Figure 4). For each vertex vV(G), we add (k1) new vertices v1,v2,,vk1 and make {v,v1,v2,,vk1} a clique in G. Let Cv={v,v1,v2,,vk1}. Note that the resulting graph G is also chordal. We then define the k-coloring fs as follows: for each vV(G), set fs(v)=gs(v), and for each vertex in Cv{v}, assign an arbitrary color distinct from fs(v) so that fs is a proper k-coloring of G (which is always possible since |Cv|=k). Similarly, define ft(v)=gt(v) for each vV(G), and for each vertex in Cv{v}, assign an arbitrary color distinct from gt(v) so that ft is a proper k-coloring of G.

This completes the construction of the instance (G,fs,ft). We then claim that (G,gs,gt) is a yes-instance of k-Coloring Reconfiguration if and only if (G,fs,ft) is a yes-instance of k-CRCS.

We first prove the “only if” direction. Suppose that (G,gs,gt) is a yes-instance of k-Coloring Reconfiguration. Then there exists a reconfiguration sequence g0,g1,,g of proper k-colorings of G such that g0=gs, g=gt, and for each i[], gi1 and gi differ at exactly one vertex. For each i{0,1,,}, we construct a proper k-coloring fi of G from gi, following the same construction as for fs and ft: for every vV(G), set fi(v)=gi(v), and for each uCv{v}, assign an arbitrary color distinct from fi(v) so that fi is a proper k-coloring of G.

We claim that for all i[], fi1 and fi are reconfigurable under 𝖢𝖲. Indeed, let uV(G) be the unique vertex such that gi1(u)gi(u). By construction, we have fi1(u)fi(u), while fi1(v)=fi(v) for all vV(G){u}. Let wCu be the unique vertex such that fi1(w)=fi(u). We construct a k-coloring f from fi1 by swapping the colors of u and w. Note that f(v)=fi(v) for all vV(G){u}.

Recall that for each vV(G), the clique Cv in G contains exactly k vertices, and in both colorings fi and f, the vertices of Cv receive pairwise distinct colors. Since vertices in Cv{v} are adjacent only to those in Cv, we can freely perform color swaps within Cv without affecting outside Cv. Thus, we can reconfigure f into fi by performing a sequence of color swaps only within cliques Cv for vV(G). This implies that fi1 and fi are reconfigurable under 𝖢𝖲. Applying this argument for each i[] yields a reconfiguration sequence from fs to ft in G under 𝖢𝖲. Therefore, (G,fs,ft) is a yes-instance of k-CRCS.

We now prove the “if” direction. Suppose that there exists a reconfiguration sequence f0,f1,,f between fs and ft, where f0=fs and f=ft. For each i{0,1,,}, define the coloring gi of G by setting gi(v)=fi(v) for every vV(G). Since fi is a proper k-coloring of G, the construction guarantees that gi is a proper k-coloring of G.

Observe that each Cw (wV(G)) is a clique of size k. Thus, any color swap occurs only on two vertices within some clique Cw. It follows that for every i[], the colorings gi1 and gi are either identical or differ at exactly one vertex of G. By removing any consecutive duplicate colorings, we obtain a desired sequence of proper k-colorings of G from gs to gt. Therefore, (G,gs,gt) is a yes-instance of k-Coloring Reconfiguration.

This completes the proof of Theorem 4.

Figure 4: Construction of G from G using four colors. Vertices of G are assigned a proper 4-coloring gt, and those of G the corresponding proper 4-coloring ft.

3.3 Reduction from Nondeterministic Constraint Logic

In this subsection, we prove Theorem 5 by a polynomial-time reduction from the Nondeterministic Constraint Logic problem [19, 35].

Theorem 5.

For every fixed integer k3, k-CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for planar graphs of maximum degree 3 and bounded bandwidth.

We begin by formally defining the Nondeterministic Constraint Logic problem in Section 3.3.1. Next, we introduce an auxiliary gadget used in our reduction, which is described in Section 3.3.2. We then present the full reduction in Section 3.3.3, including the design of two types of gadgets: and gadgets, and or gadgets. Finally, we prove the correctness of the reduction in Section 3.3.4.

Note that our reduction is presented for k=3; however, it holds analogously for cases where k4.

3.3.1 Definition of Nondeterministic Constraint Logic

A Nondeterministic Constraint Logic (NCL) machine is an undirected graph in which each edge is assigned a weight from {1,2} (see Figure 5 (a)). A configuration of an NCL machine is an orientation of its edges such that, at every vertex, the total weight of incoming edges is at least 2. Two configurations are said to be adjacent if they differ in the orientation of exactly one edge. In the Nondeterministic Constraint Logic problem, we are given an NCL machine M and two of its configurations, Cs and Ct. The goal is to determine whether there exists a sequence of configurations starting from Cs and ending at Ct, such that each consecutive pair of configurations in the sequence differs in the orientation of exactly one edge; that is, they are adjacent.

An NCL machine M is called an and/or constraint graph if it contains only two types of vertices: and vertices and or vertices (see again Figure 5 (a)). A vertex of degree 3 in M is an and vertex if its incident three edges have weights 1, 1, and 2; see Figure 5 (b). Similarly, a vertex of degree 3 in M is defined as an or vertex if all its incident three edges have weight 2; see Figure 5 (c). For the remainder of this paper, we will use the term NCL machine to refer specifically to an and/or constraint graph. It is known that the Nondeterministic Constraint Logic problem remains 𝖯𝖲𝖯𝖠𝖢𝖤-complete when the input NCL machine (and/or constraint graph) is restricted to be planar, of maximum degree 3, and of bounded bandwidth [35]. Recall that, for a graph G, the bandwidth of G is the minimum integer b such that G has a bijection π:V(G)[|V(G)|] with maxuvE(G)|π(u)π(v)|b.

Figure 5: (a) A configuration of an NCL machine, (b) an and vertex, and (c) an or vertex. Edges of weight 2 are shown in blue lines, and edges of weight 1 in red lines. The NCL machine in (a) is an and/or constraint graph.

3.3.2 Auxiliary Gadgets

Figure 6: (a) An illustration of a 3-forbidden pendant for a vertex x, which ensures that x is never assigned color 3. (b) A simplified depiction of the gadget used to represent this pendant.

Before presenting our full construction, we introduce auxiliary gadgets, called forbidden pendants, which prevent a vertex from being assigned a specific color.

Let C={1,2,3} be a set of colors. Consider a vertex x adjacent to a vertex y, where y is part of a 4-cycle, as illustrated in Figure 6. We consider two possible colorings of the 4-cycle in clockwise order starting from y: (1,2,1,3) or (3,1,3,2). Note that in each of these colorings, y is assigned color 1 or 3, respectively.

Since x is adjacent to y, it must be assigned a color different from that of y. In particular, x can be assigned only colors from the sets {2,3} or {1,2}, respectively, depending on the color of y. Furthermore, observe that no valid color swaps can occur within the cycle or between x and y in any reconfiguration sequence. This ensures that the color of y remains fixed, and thus x is prevented from ever taking the same color as y.

If y is assigned color c{1,3}, we refer to this gadget as a c-forbidden pendant for x. For simplicity, we use the diagram shown in Figure 6 (b) to represent such a gadget.

3.3.3 AND/OR Gadgets and Our Reduction

Figure 7: (a) An edge uv in G, and (b) its corresponding gadgets, where the port vertices are depicted by red circles and the shared port edge is depicted by a red line.

Let I=(M,Cs,Ct) be an instance of Nondeterministic Constraint Logic. Our reduction constructs a graph G by using two types of vertex gadgets, which simulate and and or vertices of M, respectively. Each vertex of M is replaced by the corresponding gadget according to its type.

For each edge e=uv in M, the vertex gadgets for u and v each contain a special vertex, called a port vertex, which serves as an interface to the corresponding edge. These two port vertices, denoted by ue and ve, are connected by an edge referred to as a port edge (see Figure 7). Accordingly, the gadget corresponding to a vertex u of M with incident edges e1, e2, and e3 includes three port vertices: ue1, ue2, and ue3.

Let u be an and vertex in M, incident to one weight-2 edge e1 and two weight-1 edges e2 and e3. We construct the corresponding and gadget Gu, which consists of two internal vertices: u0 and u21, along with three port vertices: u11=ue1, u12=ue2, and u13=ue3. Each port vertex of Gu is adjacent to a 3-forbidden pendant (see Figure 8 (a)); hence, it can only be colored with color 1 or 2 in any proper coloring. Consequently, any color swap involving a port vertex in Gu must occur along the corresponding port edge.

Figure 8: (a) The and gadget and (b) the or gadget, corresponding to (b) and (c) in Figure 5, respectively.

Let u be an or vertex in M, incident to three weight-2 edges e1, e2, and e3. The corresponding or gadget Gv consists of 12 vertices, denoted by vji for i[3] and j[4]. For each i[3], the vertex v4i is a port vertex of Gv, that is, v4i=vei. Moreover, every v4i is adjacent to a 3-forbidden pendant, while each of v2i and v3i is adjacent to a 1-forbidden pendant (see Figure 8(b)).

Similar to the and gadget, each port vertex in Gv is restricted to colors 1 or 2 due to its adjacency to a 3-forbidden pendant. Consequently, any color swap involving a port vertex in Gv must occur along the corresponding port edge. Moreover, since both v2i and v3i for i[3] are adjacent to 1-forbidden pendants, they must be assigned distinct colors: one must be colored 2 and the other 3. Thus, any color swap involving v2i or v3i can only occur on the edge v2iv3i.

Reduction

Let I=(M,Cs,Ct) be an instance of Nondeterministic Constraint Logic. We construct a corresponding instance (G,fs,ft) of k-CRCS.

We begin by constructing a graph G from the NCL instance M as follows. For each and or or vertex in M, we replace it with the corresponding gadget as defined in Section 3.3.3. Then, for each edge e=uv in M, we add a port edge between the corresponding port vertices ue and ve in the gadgets for u and v, respectively; see Figure 7.

Let G denote the resulting graph. Then, we observe the following.

Observation 6 ().

The constructed graph G is planar, of maximum degree 3, and has bounded bandwidth.

We define two proper 3-colorings, fs and ft, of the constructed graph G. We begin by assigning colors to all c-forbidden pendants for c{1,3} according to the colorings described in Section 3.3.2.

Let e be an edge of M with an endpoint u. For each corresponding port vertex ue, we set fs(ue)=1 (resp. ft(ue)=1) if the edge e is directed toward u in the configuration Cs (resp. Ct); otherwise, we assign fs(ue)=2 (resp. ft(ue)=2).

For each and gadget Gu corresponding to an and vertex u of M, we assign colors to the internal vertices u21 and u0 of Gu, which are depicted in Figure 8, so that fs becomes a proper 3-coloring. That is, we set either fs(u21)=2 and fs(u0)=3, or fs(u21)=3 and fs(u0)=2. We define ft similarly to fs.

For each or gadget Gv corresponding to an or vertex v of M, we assign colors to the internal vertices of Gv depending on the coloring of its port vertices under fs (resp. ft). Specifically, for a given coloring of the port vertices, the internal vertices are colored according to one of the configurations illustrated in Figure 9, so that fs (resp. ft) becomes a proper 3-coloring. Since multiple valid internal colorings may exist for the same coloring of the port vertices of Gv, we may choose any such coloring arbitrarily.

This completes our polynomial-time reduction.

Figure 9: All valid orientations of the three edges incident to an or vertex v, and the corresponding colorings of the or gadget with their adjacency. Port vertices v41, v42, and v43 are shown, and only the colors excluding those forbidden by c-forbidden pendants are indicated. In each row, no color swap is allowed between vertices separated by a hyphen due to the c-forbidden pendants.

3.3.4 Correctness

Before proceeding to our proof, we provide an overview of the main ideas behind our reduction and outline the argument for its correctness.

Our reduction establishes a correspondence between the orientations of edges in a given instance of Nondeterministic Constraint Logic and the colorings in the constructed graph G. For each edge e=uv, we have associated two port vertices ue and ve in the gadgets for u and v, respectively. We interpret the edge as being oriented toward vertex v if ue is assigned color 2, and as oriented toward vertex u if ve is assigned color 2. Note that the coloring of each pair {ue,ve} must be such that exactly one vertex is colored with 2 and the other with 1.

We briefly describe the behavior of the and and or gadgets. The and gadget ensures that the port vertex u11 can be colored with 2 only if both u12 and u13 are colored with 1. Once this condition is satisfied, the vertex u21 can be recolored with 3 via a color swap with u0.

Next, we explain the behavior of the or gadgets. In an or vertex of M, it suffices that at least one of the three incident edges is oriented inward. Accordingly, our gadget must only prohibit the configuration in which all three port vertices v41,v42,v43 are simultaneously colored with 2. As shown in Figure 8(b), our construction enforces this constraint: if all three port vertices are colored with 2, then all intermediate vertices v21,v22,v23 must also be colored with 2, which is impossible because the three vertices v11,v12,v13 form a clique. Thus, at least one of the port vertices must be assigned color 1. See all proper colorings of the or gadget shown in Figure 9.

To establish the correctness of our reduction, we present the following lemma.

Lemma 7 ().

The instance (M,Cs,Ct) of Nondeterministic Constraint Logic is a yes-instance if and only if the constructed instance (G,fs,ft) of 3-CRCS is a yes-instance.

4 Polynomial-time Algorithms

In this section, we present polynomial-time algorithms for CRCS and k-CRCS on paths, cographs, and split graphs.

4.1 Paths

We begin by presenting the following result for path graphs:

Theorem 8.

3-CRCS can be solved in linear time for path graphs.

To prove Theorem 8, we design a linear-time algorithm that solves 3-CRCS on path graphs.

In our algorithm, we compute and compare the invariants of the two input 3-colorings. If the invariants are identical, the algorithm returns YES; otherwise, it returns NO. Although the implementation of our algorithm is relatively simple, we emphasize that the core idea behind the algorithm is conceptually nontrivial, as it captures the essential structure preserved under 𝖢𝖲.

4.1.1 Invariant for Coloring Strings

Before introducing the invariant, we first define several terms used throughout this subsection.

Given a string S, S[i] denotes the i-th character of S, and S[i,j] denotes the substring from the i-th to the j-th character (inclusive). If i>j, we define S[i,j]𝖭𝖨𝖫, where 𝖭𝖨𝖫 denotes the empty string (a string of length 0).

Let P=v1,v2,,vn be a path on n vertices. A string S=S[1]S[2]S[n] is called a coloring string if there exists a proper 3-coloring f of P such that S[i]=f(vi) for all i[n]. We sometimes refer to S as the coloring string corresponding to f. Note that a coloring f can be encoded into its corresponding coloring string in O(n) time.

We say that two consecutive characters in S are swappable if they can be exchanged to produce another coloring string S. In this case, we say that S and S are adjacent. If no such pair of swappable characters exists in S, then we say that S is rigid. Note that each swap of two characters precisely corresponds to a single color swapping operation. Finally, two coloring strings S and S are said to be reconfigurable if there exists a sequence S0,S1,,S of coloring strings such that S0=S, S=S, and each consecutive pair Si1,Si is adjacent for all i[].

We next observe a condition that determines whether two adjacent characters in a coloring string are swappable. Recall that a coloring string represents a proper 3-coloring of an n-vertex path.

Observation 9.

Let S=s1s2sn be a coloring string. We can swap si and si+1 in S for i[n1] if and only if the following conditions are satisfied:

  • If i=1, then the three characters s1,s2,s3 are pairwise distinct.

  • If 2in2, then si1=si+2 holds.

  • If i=n1, then the three characters sn2,sn1,sn are pairwise distinct.

We now define the notion of contraction, which will be used to define our invariant for a coloring string. Let S=s1s2sn be a coloring string of length n3. We define the following three contraction operations:

(C1.)

If S=S[1,i2]si1sisi+1si+2S[i+3,n] and si1=si+2 for some 2in2, then S can be contracted to S[1,i2]si+2S[i+3,n].

(C2.)

If s1,s2,s3 are pairwise distinct, then S=s1s2s3S[4,n] can be contracted to S[4,n].

(C3.)

If sn2,sn1,sn are pairwise distinct, then S=S[1,n3]sn2sn1sn can be contracted to S[1,n3].

Note that in each of these cases, the contracted substring consists of three characters that are pairwise distinct.

Let 𝖼𝗈𝗇𝗍(S) denote the set of all coloring strings that can be obtained from S by applying a single contraction operation. Each contraction reduces the length of the string by exactly 3, i.e., for every S𝖼𝗈𝗇𝗍(S), we have |S|=|S|3. We now define the invariant 𝗂𝗇𝗏(S) of a coloring string S recursively as follows:

𝗂𝗇𝗏(S)={𝖭𝖨𝖫if |S|2,𝗂𝗇𝗏(S)if there exists S𝖼𝗈𝗇𝗍(S),Sotherwise. (i.e., S is rigid)

The following lemma shows that 𝗂𝗇𝗏(S) is uniquely determined regardless of the order in which the contractions are applied.

Lemma 10 ().

For any coloring string S, the invariant 𝗂𝗇𝗏(S) is well-defined.

A straightforward implementation of computing the invariant of a coloring string would take O(n2) time, as each contraction step may require scanning the entire string, and up to O(n) such steps may be needed. However, the procedure can be implemented in linear time using a stack to efficiently simulate the recursive contractions.

Lemma 11 ().

For any coloring string S of length n, the invariant 𝗂𝗇𝗏(S) can be computed in O(n) time.

4.1.2 Correctness of Algorithm

In the following, we discuss the correctness of our algorithm presented in Section 4.1.1. We begin with the following lemma, which states that taking a single swap of characters preserves the invariant.

Lemma 12 ().

Let S and S be two adjacent coloring strings. Then, 𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S).

The next two lemmas are crucial for our converse direction: if two coloring strings have the identical invariant, then they are reconfigurable.

Lemma 13 ().

Let S be a coloring string of length at least 3. If S is not rigid, then there exists a coloring string S such that S[1],S[2],S[3] are pairwise distinct, and S and S are reconfigurable.

Lemma 14 ().

Let S and S be coloring strings, and let w1,w2,w3 and w1,w2,w3 be two triples of pairwise distinct characters such that w1w2w3S and w1w2w3S are coloring strings. If S and S are reconfigurable, then w1w2w3S and w1w2w3S are also reconfigurable.

The following is the main theorem in this subsection.

Theorem 15.

Let (P,fs,ft) be a valid instance of 3-CRCS such that P is a path of n-vertices, and let S and S be the coloring strings corresponding to fs and ft, respectively. Then, 𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S) if and only if S and S are reconfigurable.

Proof.

The “if” direction follows directly from Lemma 12. Hence, we now prove the “only-if” direction. We show that S and S are reconfigurable if 𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S), by induction on the length of S (and S).

For the base case where |S|=|S|{0,1,2}, we always have 𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S)=𝖭𝖨𝖫, and it is clear that S and S are reconfigurable.

For the induction step, assume that the claim holds for all coloring strings shorter than n. Now consider n=|S|=|S|3. Since 𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S), either both S and S are rigid, or both are non-rigid. If both are rigid, then S=𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S)=S, so S and S are identical and thus trivially reconfigurable.

Suppose S and S are not rigid. By Lemma 13, there exist coloring strings Sx and Sy such that the first three characters of each string are pairwise distinct, and S is reconfigurable to Sx, while S is reconfigurable to Sy. Note that Sx and Sy can be contracted to Sx[4,n] and Sy[4,n], respectively. Since 𝗂𝗇𝗏(Sx[4,n])=𝗂𝗇𝗏(Sx)=𝗂𝗇𝗏(S)=𝗂𝗇𝗏(S)=𝗂𝗇𝗏(Sy)=𝗂𝗇𝗏(Sy[4,n]), by the induction hypothesis, Sx[4,n] and Sy[4,n] are reconfigurable.

Applying Lemma 14, it follows that Sx and Sy are also reconfigurable. Consequently, by the transitivity of reconfigurability, S and S are reconfigurable.

4.2 Cographs

We begin by defining the class of cographs, also known as P4-free graphs [15]. For two graphs G1=(V1,E1) and G2=(V2,E2), their disjoint union is defined as G1G2=(V1V2,E1E2), and their join is defined as G1G2=(V1V2,E1E2{v1v2v1V1,v2V2}). A graph G=(V,E) is a cograph if it can be constructed recursively according to the following rules:

  1. 1.

    A graph consisting of a single vertex is a cograph.

  2. 2.

    If G1 and G2 are cographs, then their disjoint union G1G2 is also a cograph.

  3. 3.

    If G1 and G2 are cographs, then their join G1G2 is also a cograph.

This inductive definition yields a canonical tree representation called a cotree, where each leaf corresponds to a vertex of the graph, and each internal node is labeled as either a disjoint union node () or a join node (). Note that, by the definition of cographs, a cotree is a binary tree. For a cograph G, let TG denote a cotree corresponding to G, and for a node tV(TG), let Gt denote the subgraph of G induced by the leaves of the subtree of TG rooted at t. It is known that a cotree of a given cograph can be computed in linear time [34].

In this subsection, we provide a polynomial-time algorithm for CRCS on cographs.

Theorem 16.

CRCS can be solved in polynomial time for cographs.

4.2.1 Extended 𝒌-Colorings

To describe our algorithm, we introduce the notion of extended colorings. Let k be a positive integer. An extended k-coloring of a graph G is a map f:V(G)[k]{} such that for every edge uvE(G), either f(u)f(v) or f(u)=f(v)=. That is, we allow a special flexible color in addition to the usual color set [k], and adjacent vertices are permitted to share the color . Given an extended k-coloring f of G, we define the set of swappable colors with respect to f as Sf={c[k]{}|f1(c)|=1 or (c= and f1(c))}. Namely, a color c is swappable if it is used by exactly one vertex in G under f, or if c= and at least one vertex is assigned the color under f.

Our polynomial-time algorithm solves a generalized version of CRCS, which we call the Extended k-Coloring Reconfiguration (ECRCS) problem. In ECRCS, we are given a graph G and two extended k-colorings fs and ft of G, and the goal is to determine whether there exists a sequence of extended k-colorings that transforms fs into ft via color swaps. We use the terminology for ECRCS in the same way as for CRCS. Note that ECRCS generalizes CRCS in the following sense: for any instance (G,k,fs,ft) of CRCS, it holds that (G,k,fs,ft) is a yes-instance of CRCS if and only if it is a yes-instance of ECRCS. Furthermore, for any valid instance (G,k,fs,ft) of ECRCS, the initial and target colorings fs and ft must have the same set of swappable colors, i.e., Sfs=Sft.

4.2.2 Polynomial-time Algorithm for Cographs

We now outline the strategy of our polynomial-time algorithm. Our approach is inspired by the polynomial-time algorithm for Token Sliding on cographs [22]. Indeed, an extended 1-coloring of a graph G naturally corresponds to an independent set of G, and thus our algorithm generalizes their result.

The algorithm proceeds recursively from the root to the leaves of the cotree TG of the input cograph G, solving the ECRCS instance associated with each node t of TG.

For a k-coloring f of G, let f1 and f2 denote the restrictions of f to V(Gt1) and V(Gt2), respectively. Suppose that we are given an instance (G,k,fs,ft) of ECRCS.

Leaf node.

Let G be a cograph consisting of a single vertex v. Observe that (G,k,fs,ft) is a yes-instance of ECRCS if and only if fs(v)=ft(v).

Union node.

We consider the case where the root node of TG is a union node with children t1 and t2. Since a union operation introduces no edges between V(Gt1) and V(Gt2), swaps involving vertices in V(Gt1) and those in V(Gt2) occur independently. Therefore, (G,k,fs,ft) is a yes-instance of ECRCS if and only if both (Gt1,k,fs1,ft1) and (Gt2,k,fs2,ft2) are yes-instances of ECRCS.

Join node.

We now consider the case where the root node of TG is a join node with children t1 and t2. Note that since t is a join node, all vertices in V(Gt1) are adjacent to all vertices in V(Gt2). Consequently, for any k-coloring of G, no color can appear in both f1 and f2.

We perform a case analysis based on whether any of the swappable color sets Sfs1, Sfs2, Sft1, or Sft2 is empty. We begin with the following observation.

Observation 17 ().

Let (G,k,fs,ft) be a yes-instance of ECRCS, where G is a cograph and the root node of TG is a join node with children t1 and t2. Then, the following statements hold:

  1. 1.

    If at least one of Sfs1 or Sfs2 is empty, then no color swap between a vertex in V(Gt1) and a vertex in V(Gt2) occurs in any reconfiguration sequence from fs to ft.

  2. 2.

    Sfs1= if and only if Sft1=; similarly, Sfs2= if and only if Sft2=.

We first consider the case where at least one of Sfs1 or Sfs2 is empty.

Lemma 18 ().

Let (G,k,fs,ft) be a valid instance of ECRCS, where G is a cograph and the root node of TG is a join node with children t1 and t2. Suppose that at least one of Sfs1 or Sfs2 is empty. Then, (G,k,fs,ft) is a yes-instance of ECRCS if and only if both (Gt1,k,fs1,ft1) and (Gt2,k,fs2,ft2) are yes-instances of ECRCS.

We then consider the remaining case. Let (G,k,fs,ft) be a valid instance of ECRCS, where G is a cograph and the root node of TG is a join node with children t1 and t2. For each j=1,2, we define extended k-colorings fsj,ftj:V(Gtj)[k]{} as follows:

fsj(v)={if fsj(v)Sfs,fsj(v)otherwise,ftj(v)={if ftj(v)Sft,ftj(v)otherwise.

By construction, both fsj and ftj are extended k-colorings of Gtj.

Lemma 19 ().

Let (G,k,fs,ft) be a valid instance of ECRCS, where G is a cograph and the root node of TG is a join node with children t1 and t2. Suppose that both Sfs1 and Sfs2 are non-empty. Then, (G,k,fs,ft) is a yes-instance of ECRCS if and only if both (Gt1,k,fs1,ft1) and (Gt2,k,fs2,ft2) are yes-instances of ECRCS.

Algorithm.

The arguments for leaf, union, and join nodes naturally lead to a recursive algorithm for ECRCS on cographs. Since the set of swappable colors at each node of TG and the corresponding extended colorings can be constructed in polynomial time, the overall algorithm runs in polynomial time. This concludes the proof of Theorem 16.

4.3 Split Graphs

Recall that CRCS is 𝖯𝖲𝖯𝖠𝖢𝖤-complete on split graphs, as shown in Theorem 2. In this subsection, we show a contrasting result: k-CRCS is solvable in polynomial time on split graphs when the number of colors k is a constant.

Theorem 20 ().

CRCS on split graphs admits a kernel with at most k+2k2k vertices, where k is the number of colors of an input.

Theorem 20 immediately leads to the following Corollary 21.

Corollary 21.

k-CRCS can be solved in polynomial time for split graphs.

5 Concluding Remarks

An intriguing direction is to determine the complexity of CRCS on graph classes that include paths. For example, does CRCS admit a polynomial-time algorithm on trees or on caterpillars? Another natural case is interval graphs, which are a subclass of chordal graphs where k-CRCS has been shown to be 𝖯𝖲𝖯𝖠𝖢𝖤-complete (Theorem 4). Since our algorithm for paths (Theorem 8) relies heavily on both the path structure and the restriction k=3, it seems difficult to generalize our approach directly to broader classes. On the other hand, Token Sliding is known to be solvable in polynomial time on both trees [16] and interval graphs [4, 11]. Thus, as in the case of cographs (Theorem 16), it is conceivable that algorithms for CRCS could be derived from existing algorithms for Token Sliding.

References

  • [1] Valentin Bartier, Nicolas Bousquet, Carl Feghali, Marc Heinrich, Benjamin Moore, and Théo Pierron. Recoloring planar graphs of girth at least five. SIAM J. Discret. Math., 37(1):332–350, 2023. doi:10.1137/21M1463598.
  • [2] Rémy Belmonte, Eun Jung Kim, Michael Lampis, Valia Mitsou, Yota Otachi, and Florian Sikora. Token sliding on split graphs. Theory Comput. Syst., 65(4):662–686, 2021. doi:10.1007/S00224-020-09967-8.
  • [3] Marthe Bonamy and Nicolas Bousquet. Recoloring bounded treewidth graphs. Electron. Notes Discret. Math., 44:257–262, 2013. doi:10.1016/J.ENDM.2013.10.040.
  • [4] Marthe Bonamy and Nicolas Bousquet. Token sliding on chordal graphs. In Hans L. Bodlaender and Gerhard J. Woeginger, editors, Graph-Theoretic Concepts in Computer Science - 43rd International Workshop, WG 2017, Eindhoven, The Netherlands, June 21-23, 2017, Revised Selected Papers, volume 10520 of Lecture Notes in Computer Science, pages 127–139. Springer, 2017. doi:10.1007/978-3-319-68705-6_10.
  • [5] Marthe Bonamy, Nicolas Bousquet, Carl Feghali, and Matthew Johnson. On a conjecture of mohar concerning kempe equivalence of regular graphs. J. Comb. Theory B, 135:179–199, 2019. doi:10.1016/J.JCTB.2018.08.002.
  • [6] Marthe Bonamy, Marc Heinrich, Takehiro Ito, Yusuke Kobayashi, Haruka Mizuta, Moritz Mühlenthaler, Akira Suzuki, and Kunihiro Wasa. Diameter of colorings under kempe changes. Theor. Comput. Sci., 838:45–57, 2020. doi:10.1016/J.TCS.2020.05.033.
  • [7] Édouard Bonnet, Tillmann Miltzow, and Pawel Rzazewski. Complexity of token swapping and its variants. Algorithmica, 80(9):2656–2682, 2018. doi:10.1007/S00453-017-0387-0.
  • [8] Paul S. Bonsma and Luis Cereceda. Finding paths between graph colourings: PSPACE-completeness and superpolynomial distances. Theor. Comput. Sci., 410(50):5215–5226, 2009. doi:10.1016/J.TCS.2009.08.023.
  • [9] Paul S. Bonsma, Amer E. Mouawad, Naomi Nishimura, and Venkatesh Raman. The complexity of bounded length graph recoloring and CSP reconfiguration. In Marek Cygan and Pinar Heggernes, editors, Parameterized and Exact Computation - 9th International Symposium, IPEC 2014, Wroclaw, Poland, September 10-12, 2014. Revised Selected Papers, volume 8894 of Lecture Notes in Computer Science, pages 110–121. Springer, 2014. doi:10.1007/978-3-319-13524-3_10.
  • [10] Nicolas Bousquet and Marc Heinrich. A polynomial version of Cereceda’s conjecture. J. Comb. Theory B, 155:1–16, 2022. doi:10.1016/J.JCTB.2022.01.006.
  • [11] Marcin Brianski, Stefan Felsner, Jedrzej Hodor, and Piotr Micek. Reconfiguring independent sets on interval graphs. In Filippo Bonchi and Simon J. Puglisi, editors, 46th International Symposium on Mathematical Foundations of Computer Science, MFCS 2021, August 23-27, 2021, Tallinn, Estonia, volume 202 of LIPIcs, pages 23:1–23:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.MFCS.2021.23.
  • [12] Charlie Carlson, Ewan Davies, Alexandra Kolla, and Will Perkins. Computational thresholds for the fixed-magnetization ising model. In Stefano Leonardi and Anupam Gupta, editors, STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 1459–1472. ACM, 2022. doi:10.1145/3519935.3520003.
  • [13] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Connectedness of the graph of vertex-colourings. Discret. Math., 308(5-6):913–919, 2008. doi:10.1016/J.DISC.2007.07.028.
  • [14] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Finding paths between 3-colorings. J. Graph Theory, 67(1):69–82, 2011. doi:10.1002/JGT.20514.
  • [15] Derek G. Corneil, H. Lerchs, and L. Stewart Burlingham. Complement reducible graphs. Discret. Appl. Math., 3(3):163–174, 1981. doi:10.1016/0166-218X(81)90013-5.
  • [16] Erik D. Demaine, Martin L. Demaine, Eli Fox-Epstein, Duc A. Hoang, Takehiro Ito, Hirotaka Ono, Yota Otachi, Ryuhei Uehara, and Takeshi Yamada. Linear-time algorithm for sliding tokens on trees. Theor. Comput. Sci., 600:132–142, 2015. doi:10.1016/J.TCS.2015.07.037.
  • [17] Tatsuhiko Hatanaka, Takehiro Ito, and Xiao Zhou. The coloring reconfiguration problem on specific graph classes. IEICE Trans. Inf. Syst., 102-D(3):423–429, 2019. doi:10.1587/TRANSINF.2018FCP0005.
  • [18] Robert A. Hearn and Erik D. Demaine. PSPACE-completeness of sliding-block puzzles and other problems through the nondeterministic constraint logic model of computation. Theor. Comput. Sci., 343(1-2):72–96, 2005. doi:10.1016/j.tcs.2005.05.008.
  • [19] Robert A. Hearn and Erik D. Demaine. Games, puzzles and computation. A K Peters, 2009.
  • [20] Jan van den Heuvel. The complexity of change. In Surveys in Combinatorics 2013, volume 409 of London Mathematical Society Lecture Note Series, pages 127–160. Cambridge University Press, 2013. doi:10.1017/CBO9781139506748.005.
  • [21] Matthew Johnson, Dieter Kratsch, Stefan Kratsch, Viresh Patel, and Daniël Paulusma. Finding shortest paths between graph colourings. Algorithmica, 75(2):295–321, 2016. doi:10.1007/S00453-015-0009-7.
  • [22] Marcin Kaminski, Paul Medvedev, and Martin Milanic. Complexity of independent set reconfigurability problems. Theor. Comput. Sci., 439:9–15, 2012. doi:10.1016/J.TCS.2012.03.004.
  • [23] Kyozi Kawasaki. Diffusion constants near the critical point for time-dependent ising models. i. Phys. Rev., 145:224–230, May 1966. doi:10.1103/PhysRev.145.224.
  • [24] A. B. Kempe. On the geographical problem of the four colours. American Journal of Mathematics, 2(3):193–200, 1879.
  • [25] Aiya Kuchukova, Marcus Pappik, Will Perkins, and Corrine Yap. Fast and slow mixing of the kawasaki dynamics on bounded-degree graphs. In Amit Kumar and Noga Ron-Zewi, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2024, August 28-30, 2024, London School of Economics, London, UK, volume 317 of LIPIcs, pages 56:1–56:24. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.APPROX/RANDOM.2024.56.
  • [26] Daniel Lokshtanov and Amer E. Mouawad. The complexity of independent set reconfiguration on bipartite graphs. ACM Trans. Algorithms, 15(1):7:1–7:19, 2019. doi:10.1145/3280825.
  • [27] Bojan Mohar. Kempe Equivalence of Colorings, pages 287–297. Birkhäuser Basel, Basel, 2007. doi:10.1007/978-3-7643-7400-6_22.
  • [28] Bojan Mohar and Jesús Salas. A new kempe invariant and the (non)-ergodicity of the Wang–Swendsen–Kotecký algorithm. Journal of Physics A: Mathematical and Theoretical, 42(22):225204, May 2009. doi:10.1088/1751-8113/42/22/225204.
  • [29] Bojan Mohar and Jesús Salas. On the non-ergodicity of the Swendsen–Wang–Kotecký algorithm on the kagomé lattice. Journal of Statistical Mechanics: Theory and Experiment, 2010(05):P05016, May 2010. doi:10.1088/1742-5468/2010/05/P05016.
  • [30] C. M. Mynhardt and S. Nasserasr. Reconfiguration of colourings and dominating sets in graphs: a survey. CoRR, abs/2003.05956, 2020. doi:10.48550/arXiv.2003.05956.
  • [31] Naomi Nishimura. Introduction to reconfiguration. Algorithms, 11(4):52, 2018. doi:10.3390/A11040052.
  • [32] Walter J. Savitch. Relationships between nondeterministic and deterministic tape complexities. J. Comput. Syst. Sci., 4(2):177–192, 1970. doi:10.1016/S0022-0000(70)80006-X.
  • [33] Alan D. Sokal. The multivariate tutte polynomial (alias potts model) for graphs and matroids. In Bridget S. Webb, editor, Surveys in Combinatorics, 2005: Invited lectures from the Twentieth British Combinatorial Conference, Durham, UK, July 2005, volume 327 of London Mathematical Society Lecture Note Series, pages 173–226. Cambridge University Press, 2005.
  • [34] Marc Tedder, Derek G. Corneil, Michel Habib, and Christophe Paul. Simpler linear-time modular decomposition via recursive factorizing permutations. In Luca Aceto, Ivan Damgård, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz, editors, Automata, Languages and Programming, 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, July 7-11, 2008, Proceedings, Part I: Tack A: Algorithms, Automata, Complexity, and Games, volume 5125 of Lecture Notes in Computer Science, pages 634–645. Springer, 2008. doi:10.1007/978-3-540-70575-8_52.
  • [35] Tom C. van der Zanden. Parameterized complexity of graph constraint logic. In Proceedings of IPEC 2015, pages 282–293, 2015. doi:10.4230/LIPICS.IPEC.2015.282.
  • [36] Eric Vigoda. Improved bounds for sampling colorings. In 40th Annual Symposium on Foundations of Computer Science, FOCS ’99, 17-18 October, 1999, New York, NY, USA, pages 51–59. IEEE Computer Society, 1999. doi:10.1109/SFFCS.1999.814577.
  • [37] Katsuhisa Yamanaka, Erik D. Demaine, Takehiro Ito, Jun Kawahara, Masashi Kiyomi, Yoshio Okamoto, Toshiki Saitoh, Akira Suzuki, Kei Uchizawa, and Takeaki Uno. Swapping labeled tokens on graphs. Theor. Comput. Sci., 586:81–94, 2015. doi:10.1016/J.TCS.2015.01.052.
  • [38] Katsuhisa Yamanaka, Takashi Horiyama, J. Mark Keil, David G. Kirkpatrick, Yota Otachi, Toshiki Saitoh, Ryuhei Uehara, and Yushi Uno. Swapping colored tokens on graphs. Theor. Comput. Sci., 729:1–10, 2018. doi:10.1016/J.TCS.2018.03.016.