23
Reconfiguring Independent Sets in Claw-Free Graphs * Paul Bonsma Marcin Kami´ nski Marcin Wrochna § Abstract We present a polynomial-time algorithm that given two independent sets in a claw-free graph G decides whether one can be transformed into the other by a sequence of elementary steps. Each elementary step is to remove a vertex v from the current independent set S in the sequence and to add a new vertex w (not in S) such that the set S -v +w is independent in G. 1 Introduction Reconfiguration problems. The reconfiguration version of an algorithmic problem P asks whether there is a sequence of reconfiguration steps between two feasible solutions to P such that all intermediate solutions are also feasible and each solution in the sequence is obtained from the previous one according to a reconfiguration rule. For example, in the reconfiguration version of vertex coloring, we are given two k-colorings of the vertices of a graph and we should decide whether one can be brought into the other by recoloring one vertex at the time in such a way that all intermediate solutions are also valid k-colorings. A useful way to look at reconfiguration problems is through the concept of the reconfiguration graph. The vertices of the reconfiguration graph are feasible solutions and two vertices are adjacent if and only if the corresponding feasible solutions are one step away according to the reconfiguration rule. Clearly, one feasible solution can be reconfigured into another if they both belong to the same connected component of the reconfiguration graph. Two examples of interesting properties of the reconfiguration graph that are often studied are whether it is connected or what is the diameter of each connected component. Reconfiguration is a natural setting for real-life problems in which solutions evolve over time and an interesting theoretical framework that has been grad- ually attracting more attention. The theoretical interest is based on the fact * This work is supported by the (Polish) National Science Center within SONATA program under grant no. UMO-2012/07/D/ST6/02432. University of Twente, Faculty of EEMCS, Twente, The Netherlands, email: [email protected] Uniwersytet Warszawski, Institute of Computer Science, Warsaw, Poland, email: [email protected] § Uniwersytet Warszawski, Institute of Computer Science, Warsaw, Poland, email: [email protected] 1

Recon guring Independent Sets in Claw-Free Graphsrutcor.rutgers.edu/~mkaminski/preprints/Reconfiguring independent... · Recon guring Independent Sets in Claw-Free Graphs Paul Bonsmay

  • Upload
    lyphuc

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Reconfiguring Independent Sets in Claw-Free Graphs∗

Paul Bonsma† Marcin Kaminski‡ Marcin Wrochna§

Abstract

We present a polynomial-time algorithm that given two independentsets in a claw-free graph G decides whether one can be transformed intothe other by a sequence of elementary steps. Each elementary step is toremove a vertex v from the current independent set S in the sequence andto add a new vertex w (not in S) such that the set S−v+w is independentin G.

1 Introduction

Reconfiguration problems. The reconfiguration version of an algorithmicproblem P asks whether there is a sequence of reconfiguration steps betweentwo feasible solutions to P such that all intermediate solutions are also feasibleand each solution in the sequence is obtained from the previous one accordingto a reconfiguration rule. For example, in the reconfiguration version of vertexcoloring, we are given two k-colorings of the vertices of a graph and we shoulddecide whether one can be brought into the other by recoloring one vertex atthe time in such a way that all intermediate solutions are also valid k-colorings.

A useful way to look at reconfiguration problems is through the concept ofthe reconfiguration graph. The vertices of the reconfiguration graph are feasiblesolutions and two vertices are adjacent if and only if the corresponding feasiblesolutions are one step away according to the reconfiguration rule. Clearly, onefeasible solution can be reconfigured into another if they both belong to the sameconnected component of the reconfiguration graph. Two examples of interestingproperties of the reconfiguration graph that are often studied are whether it isconnected or what is the diameter of each connected component.

Reconfiguration is a natural setting for real-life problems in which solutionsevolve over time and an interesting theoretical framework that has been grad-ually attracting more attention. The theoretical interest is based on the fact

∗This work is supported by the (Polish) National Science Center within SONATA programunder grant no. UMO-2012/07/D/ST6/02432.†University of Twente, Faculty of EEMCS, Twente, The Netherlands, email:

[email protected]‡Uniwersytet Warszawski, Institute of Computer Science, Warsaw, Poland, email:

[email protected]§Uniwersytet Warszawski, Institute of Computer Science, Warsaw, Poland, email:

[email protected]

1

that reconfiguration problems provide a new perspective and offer a deeper un-derstanding of the solution space as well as a potential to develop heuristics tonavigate that space.

Reconfiguration paradigm has been recently applied to a number of algo-rithmic problems: vertex coloring [BC09, BCvdHJ07, CvdHJ09, CvdHJ08],list-edge coloring [IKD09], clique, set cover, integer programming, matching,spanning tree, matroid bases [IDH+08], block puzzles [HD05], satisfiability[GKMP09], independent set [HD05, IDH+08, KMM12], shortest paths [Bon12,Bon13, KMM11], and dominating set [SMN14]; recently also in the setting ofparameterized complexity [MNR+13]. A recent survey [vdH13] gives a goodintroduction to this area of research.

Reconfiguration of independent sets. The topic of this paper is reconfig-uration of independent sets. An independent set in a graph is a set of pairwisenon-adjacent vertices. We will think of the elements of an independent setsas tokens placed on vertices. Three different reconfiguration rules have beenstudied in the literature: token sliding (TS), token jumping (TJ), and tokenaddition/removal (TAR).

The reconfiguration rule in the TS model allows to slide a token along anedge to a vertex which had no token in its closed neighbourhood except for theone that is slid. The reconfiguration rule in the TJ model allows to remove atoken from a vertex and place it on another vertex which had no token in itsclosed neighbourhood except (possibly) for the one that is moved. Notice thatTS is a special case of TJ. In the TAR model, a specified threshold k boundsthe cardinality of the intermediate feasible solutions. The reconfiguration ruleallows to either add or remove a token (keeping the set of tokens independent)as long as there are at least k tokens on the graph at any given time. TS seemsto have been introduced by Hearn and Demaine [HD05], TAR was introducedby Ito et al. [IDH+11], and TJ by Kaminski et al. [KMM12], where TAR andTJ were also proved to be equivalent.

In all three models, the corresponding reconfigurability problems are PSPACE-complete in general graphs [IDH+11] and even in perfect graphs [KMM12]; tokensliding is PSPACE-complete even for planar graphs of maximum degree 3 [BC09](see also [HD05]).

Claw-free grahs. A claw is the tree with four vertices and three leaves.A graph is claw-free if it does not contain a claw as an induced subgraph.A claw is not a line graph of any graph and thus the class of claw-free graphsgeneralizes the class of line graphs. The structure of claw-free graphs is not sim-ple but has been recently described by Chudnovsky and Seymour in the formof a decomposition theorem [CS05].

There is a natural one-to-one correspondence between matchings in a graphand independent sets in its line graph. In particular, a maximum matching ina graph corresponds to a maximum independent set in its line graph. Hence,Edmond’s matching algorithm [Edm65] gives a polynomial-time algorithm forindependent set in line graphs. This results has been extended to claw-freegraphs independently by Minty [Min80] and Shibi [Sbi80]. Both algorithms

2

work for the unweighted case, while the algorithm of Minty, with a modificationproposed by Nakamura and Tamura in [NT01] to fix a problem in the originalpaper, applies to weighted graphs.

A fork is the graph obtained from the claw by subdividing one edge. Everyclaw-free graph is also fork-free. Milanic and Lozin gave a polynomial-timealgorithm for maximum weighted independent set in fork-free graphs [LM08].Their algorithm generalizes all previously known results for claw-free graphs.

Our results. In this paper, we study reconfiguration of independent sets inclaw-free graphs and consider two models: token sliding and token jumping. Weshow that token sliding and token jumping are equivalent for connected claw-freegraphs. Our main result is that the problem of reconfiguring independent sets inany of the two models in a connected claw-free graph can be solved in polynomialtime. A combination of our results with a recent dynamic programming schemeby Bonsma [Bon14] yields the same result for any (not necessarily connected)claw-free graph.

On the way, we also show that the reconfiguration graph of a claw-free andeven-hole-free graph1 in the token jumping model is always connected and inthe token sliding model only when the independent sets are of maximum size.This answers an open question posed in [KMM12].

Structure of the paper. Here is the structure of the paper. We begin withpreliminaries in Section 2. Next, we prove the equivalence of TJ and TS inSection 3. In Section 4 we give polynomial-time algorithms to find various typesof alternating paths we will need later. Section 5 defines the notion of resolvablecycles and in the two subsequent sections we look at two different types of suchcycles: externally resolvable in Section 6 and internally resolvable in Section 7.Section 8 collects all the previous lemmas and theorems in an algorithm. InSection 9, we discuss how to extend the algorithm to not necessarily connectedclaw-free graphs.

2 Preliminaries

For a graph G, by TSk(G) we denote the graph that has as its vertex the setof all independent sets of G of size k, where two independent sets I and J areadjacent if there is an edge uv ∈ E(G) with I\J = {u} and J\I = {v}. Wesay that J can be obtained from I by sliding the token from u to v. A walk inTSk(G) from I to J is called a TS-sequence from I to J . We write I ↔ts J toindicate that there exists a TS-sequence from I to J .

Analogously, by TJk(G) we denote the graph that has as its vertex set theset of all independent sets of G of size k, where two independent sets I and J areadjacent if there is a vertex pair u, v ∈ V (G) with I\J = {u} and J\I = {v}.

1An even hole is the cycle on an even number of vertices. A graph is even-hole-free if itcontains no odd hole as an induced subgraph.

3

We say that J can be obtained from I by jumping the token from u to v. A walkin TSk(G) from I to J is called a TJ-sequence from I to J . We write I ↔tj Jto indicate that there exists a TJ-sequence from I to J . Note that TSk(G) is aspanning subgraph of TJk(G).

The reachability problem for token sliding (resp. token jumping) has as in-put a graph G and two independent sets I and J of G with |I| = |J |, andasks whether I ↔ts J (resp. I ↔tj J). These problems are denoted by TS-Reachability and TJ-Reachability, respectively.

The symmetric difference of two sets I and J is denoted by I∆J = (I\J) ∪(J\I). Sets I\{v} and I ∪ {v} are denoted by I − v and I + v respectively. Byα(G) we denote the size of the largest independent set of G. An independentset I is called maximum if |I| = α(G). We denote the distance of two verticesu, v ∈ V (G) by dG(u, v). We omit the subscript when G is clear from thecontext. By diam(G) we denote the diameter of a connected graph G, definedas maxu,v∈V (G) dG(u, v). For a vertex set S of a graph G and integer i ∈ N, wedenote

Ni(S) = {v ∈ V (G)\S : |N(v) ∩ S| = i}.

The vertex of degree 3 in the claw is called its center. If v is the center of aclaw, the claw is v-centered.

3 The Equivalence of Sliding and Jumping

Lemma 1 Let I and J be independent sets in a connected claw-free graph G,with |I| = |J |. If G[I∆J ] contains no cycles then there is a TS-sequence fromI to J of length at most 2 · |I\J | · diam(G).

Proof: For two vertex sets I and J with I\J 6= ∅ and J\I 6= ∅, define theminimum distance md(I, J) to be the minimum of d(u, v) over all pairs u ∈ I\Jand v ∈ J\I. In addition, define φ(I, J) = (|I\J |− 1) ·diam(G) + md(I, J). Wewill prove by induction on φ(I, J) that if I and J are two independent sets with|I| = |J | such that G[I∆J ] contains no cycles, then there exists a TS-sequencefrom I to J of length at most 2φ(I, J). Since 2φ(I, J) ≤ 2 · |I\J | ·diam(G), thisis a stronger claim.

First let us consider the case that md(I, J) = 1. This means that G[I∆J ]contains at least one edge. Since G is claw-free, G[I∆J ] has maximum degree 2.But we assumed that it contains no cycles, so it is a collection of paths, with atleast one path P of length at least 1. Choose an end vertex v of P . Suppose firstthat v ∈ J . Let u be the vertex on P that is adjacent to v (so u ∈ I). Then in I,the token from u can be moved to v, which yields an independent set I ′ such thatI ′\J = (I\J)\{u}. In the case that φ(I, J) = 1 (the induction base), |I\J | = 1,so I ′ = J and we showed a TS-sequence of length 1 between I and J . Otherwise,note that G[I ′∆J ] again contains no cycles, so by induction, there exists a TS-sequence from I ′ to J of length at most 2(|I ′\J | − 1) · diam(G) + 2md(I ′, J) ≤2(|I\J | − 2) · diam(G) + 2diam(G) = 2(|I\J | − 1) · diam(G).

4

Since I ′ was obtained from I using one token slide, we conclude that thereexists a TS-sequence from I to J of length at most 2(|I\J | − 1) · diam(G) + 1,which proves the claim. If the chosen end vertex v of the path P is in I, thenfrom J we obtain J ′ by sliding the adjacent token to v, and the statement canbe proved analogously.

Now suppose that md(I, J) ≥ 2, let d = md(I, J). Choose u ∈ I\J andv ∈ J\I such that d(u, v) = d, and let P = v0, . . . , vd be a shortest pathbetween v0 = u and vd = v. We intend to slide the token from u to v along thepath P . Define Ii = I −u+ vi for i = 0, . . . , d. If these are all independent sets,then they form a TS-sequence of length d from I0 = I to a set Id that satisfies|Id\J | < |I\J |. Then we can prove the statement by applying the inductionassumption to Id and J , analogously to before.

Otherwise, let i be the maximum index such that Ii is not an independentset, and let x ∈ I − u be a token adjacent to vi. (Informally: we choose a tokenx adjacent to or on P , and as close as possible to v. Furthermore, if x lies on P ,then this implies x = vi−1.) Clearly i > 0 and note that i < d: otherwise eitherJ is not an independent set (if x ∈ J) or d = 1 (if x 6∈ J), both contradictions.

We first argue that it is possible to slide the token from x to v, along thepath x, vi, vi+1, . . . , vd. By choice of i, there is no vertex in I adjacent to vjfor j > i. If there is a vertex y ∈ I − x that is also adjacent to vi, then Gcontains a vi-claw with leaves x, y, vi+1, a contradiction. This shows that I canbe reconfigured to I ′ = I − x+ v, using d− i+ 1 moves.

It remains to show that we may apply the induction assumption to I ′ andJ . Clearly, G[I ′∆J ] again contains no cycles. Since P is a shortest path, andi ≥ 2 (otherwise there is a v1-claw with leaves u, x and v2), it holds thatd(x, v) ≤ d − i + 1 < d = d(u, v). So by choice of u and v, it follows thatx ∈ J ∩ I. Therefore, |I ′\J | = |I\J |. However, the minimum distance md(I ′, J)is now at most d(u, x). If x ∈ P , then x = vi−1 and d(u, x) ≤ i − 1; otherwisex is adjacent to vi−1 (since there is no vi-claw with leaves vi−1, vi+1 and x),so d(u, x) ≤ i. Since i < d = md(I, J), we conclude that φ(I ′, J) < φ(I, J),and thus we may apply the induction assumption to I ′ and J . Combining thiswith the fact that we have a TS-sequence from I to I ′ of length d− i+ 1, andthat d + i + 1 ≤ 2d = 2md(I, J), we conclude that there exists a TS-sequencefrom I to J of length at mostd− i+ 1 + 2(|I ′\J | − 1) · diam(G) + 2md(I ′, J) ≤d− i+ 1 + 2(|I\J |−1) ·diam(G) + 2i ≤ 2(|I\J |−1) ·diam(G) + 2md(I, J). Thisconcludes the proof of the induction step. �

Corollary 2 Let I and J be independent sets in a connected claw-free graph G.Then I ↔ts J if and only if I ↔tj J .

Proof: Clearly, a token sliding sequence from I to J is also a token jumpingsequence. For the nontrivial direction of the proof, it suffices to show that anytoken jump can be replaced by a sequence of token slides. Let J be obtainedfrom I by jumping a token from u to v. Then G[I∆J ] contains only two vertices,and therefore no cycles. Then Lemma 1 shows that I ↔ts J . �

5

We now consider implications of the above corollary for graphs that are inaddition even-hole-free. A graph is even-hole-free if it contains no even cycle asan induced subgraph. Kaminski et al. [KMM12] proved the following statement.

Theorem 3 Let I and J be two independent sets of a graph G with |I| = |J |.If G[I∆J ] contains no even cycles, then there exists a TJ-sequence from I to Jof length |I\J |, which can be constructed in linear time.

In particular, this implies that if G is even-hole-free, then TJ(G) is connected.However, TS(G) is not necessarily connected (consider G = K1,3 and two to-kens). This motivated the question asked in [KMM12] whether if G is connected,claw-free and even-hole-free, then TS(G) is connected. Combining Corollary 2with Theorem 3 shows that the answer to this question is affirmative.

Corollary 4 Let G be a connected claw-free and even-hole-free graph. ThenTSk(G) is connected.

4 Augmenting Paths

Let I and J be two independent sets of a connected claw-free graph G, of equalsize. In the previous section we showed that if there are no cycles in G[I∆J ],then I ↔ts J . In this section, we show that such cycles can always be resolved,if I and J are not maximum independent sets of G. This requires the followingdefinitions.

A vertex v ∈ V (G) is free (with respect to an independent set I of G) ifv /∈ I and |N(v)∩ I| ≤ 1. Let W = v0, . . . , vk be a walk in G, and let I ⊆ V (G).Then W is called I-alternating if |{vi, vi+1} ∩ I| = 1 for i = 0, . . . , k− 1. In thecase that W is a path, W is called chordless if G[{v0, . . . , vk}] is a path. In thecase that W is a cycle (so v0 = vk), W is called chordless if G[{v0, . . . , vk−1}]is a cycle. A cycle W = v0, . . . , vk is called I-bad if it is I-alternating andchordless. A path W = v0, . . . , vk with k ≥ 2 is called I-augmenting if it is I-alternating and chordless, and v0 and vk are both free vertices. This definition ofI-augmenting paths differs from the usual definition, as it is used in the settingof finding maximum independent sets, since the chordless condition is strongerthan needed in such a setting. (The usual definition, as used e.g. in [Sch03], isgiven in Proposition 5 below.) However, we observe that in a claw-free graphG, the two definitions are equivalent:

Proposition 5 Let I be an independent set in a claw-free graph G. An I-alternating walk W = w0, v1, w1, . . . , vk, wk is an I-augmenting path if and onlyif w0, wk 6∈ I and I ′ = I\{v1, . . . , vk} ∪ {w0, . . . , wk} is an independent set.

Proof: Suppose W is an I-augmenting path. Then clearly w0, wk 6∈ I and vi ∈ Ifor i = 0, . . . , k. The vertices w0 and wk have no neighbors in I\{v1, . . . , vk}since they are free. If a vertex wi with 1 ≤ i ≤ k − 1 has a neighbor x ∈I\{v1, . . . , vk}, then G contains a wi-claw with leaves vi, vi+1, x, a contradiction.

6

Two vertices wi and wj are not adjacent since W is chordless. Hence I ′ is anindependent set again, which proves one direction of the statement.

Now suppose I ′ is an independent set and w0, wk 6∈ I. We prove that W isan I-augmenting path. W is chordless, otherwise there would be an edge viwj

with j 6∈ {i − 1, i} – but then G contains a vi-claw with leaves wj , wi−1, wi,a contradiction. Therefore w0 and wk are free with respect to I, so W is anI-augmenting path. �

The above proposition shows that we can apply well-known statements aboutI-augmenting paths proved elsewhere. In particular, the following two resultsby Minty [Min80] and Sbihi [Sbi80] (see also [Sch03, Section 69.2]).

Theorem 6 Let I be an independent set in a claw-free graph G. In polyno-mial time, we can decide whether an I-augmenting path between two given freevertices x and y exists, and if so, compute one.

Proposition 7 Let I be a non-maximum independent set in a claw-free graphG. Then either I is not a dominating set, or there exists an I-augmenting path.

Lemma 8 Let I be a non-maximum independent set in a claw-free connectedgraph G. Then for any independent set J with |J | = |I|, I ↔ts J holds.

Proof: By Corollary 2, we need only prove I ↔tj J . The proof is by inductionon |I\J |. The case |I\J | = 0 is trivial. Otherwise, we first show that I ↔tj I

′,for some I ′ that is not dominating. The case where I is not dominating itselfis trivial. Otherwise, Proposition 7 shows that there exists an I-augmentingpath P = v0, . . . , vk. We then slide v1 → v0, v3 → v2, etc., and finally vk−1 →vk−2. We argue that this way, we maintain an independent set throughout.By definition, P is chordless, so we only need to consider the case in which weslide a token to a vertex x ∈ V (P ) that is adjacent to another token y 6∈ V (P ).The case x = v0 is excluded because v0 is a free vertex. If x = vi with i ≥ 2,then there is a vi-claw with leaves vi−1, vi+1 and y (since these are all in theindependent set I), a contradiction. Note that the independent set I ′ that weobtain this way does not dominate vk, since vk is a free vertex for I. Henceit now suffices to prove that I ↔tj J , where we may assume that I is notdominating.

Consider G[I∆J ]. Because G is claw-free and both I and J are independentsets, every component of this graph is a single vertex, or an even cycle, or paththat is both I-alternating and J-alternating. If G[I∆J ] contains a componentthat is a single vertex v ∈ J , then any token from I\J can be jumped to v,resulting in an independent set I ′ again. Since |I ′\J | < |I\J |, the statementnow follows by induction. If G[I∆J ] contains a component that is a singlevertex v ∈ I, then analogously, there is an independent set J ′ with J ↔tj J

and |I\J ′| < |I\J |, and the statement follows by induction again. Now supposeG[I∆J ] contains a path component P = v0, . . . , vk. W.l.o.g. assume that vk ∈ J .

7

Then we can slide the I-token from vk−1 to vk, obtain from I an independentset I ′ with |I ′\J | < |I\J |, and use induction again.

It remains to consider the case that every component of G[I∆J ] is an evencycle. In this case, we use the fact that I is not dominating. Choose an evencycle component C of G[I∆J ]. Choose a vertex v ∈ V (C)∩ I. Choose a vertexw that is not dominated by I. Let I ′ = I−v+w. Clearly, I ↔tj I

′. The vertexw is not adjacent to any vertex x ∈ J ∩ V (C), since otherwise there would bean x-claw (since w is not adjacent to any vertex from I, in particular not to thetwo neighbors of x on the cycle C). Therefore, V (C)− v induces a componentof G[I ′∆J ], which is a path. Then the previous argument applies, which showsthat I ′ ↔tj J . This concludes the proof. �

5 Resolving Cycles

It now remains to study the case where G[I∆J ] contains (even) cycles, andboth I and J are maximum independent sets. In this case, there may not bea TS-sequence from I to J (even though we assume that G is connected andclaw-free). In this section, we characterize the case where I ↔ts J holds, byshowing that this is equivalent with stating that every cycle in G[I∆J ] can beresolved in a certain sense (Theorem 14 below). Subsequently, we show thatresolvable cycles fall into two cases: internally or externally resolvable, whichare characterized algorithmically in the next two sections. We first define thenotion of resolving a cycle.

Cycles in G[I∆J ] are clearly chordless, I-alternating and J-alternating, sothey are both I-bad and J-bad. We will denote I-bad cycles C also by theordered pair [A,B], where A = V (C) ∩ I and B = V (C)\I. We say that anI-bad cycle [A,B] is resolvable (with respect to I) if there exists an independentset I ′ such that I ↔ts I

′ and G[I ′ ∪ B] contains no cycles. A correspondingTS-sequence from I to I ′ is said to resolve [A,B].

Proposition 9 Let I be an independent set of a claw-free graph G, and let[A,B] be an I-bad cycle. Then the following properties hold:

(a) For all i ≥ 3, Ni(B) = ∅.

(b) There are no edges between vertices in N2(B) and N0(B).

(c) For any v, v ∈ N(B)\A if and only if v ∈ N(A)\B.

(d) N(B) ∩ I = A

Proof:

(a) This follows since B is an independent set and G is claw-free.

(b) Suppose to the contrary that vw ∈ E(G) with v ∈ N2(B) and w ∈ N0(B).Let N(v) ∩ B = {x, y}. Then G contains a v-claw with leaves v, x, y, acontradiction.

8

(c) Suppose v ∈ N(B)\A and v 6∈ N(A)\B (the symmetric case is analogous).Since v ∈ N(B), we have v 6∈ B, so v 6∈ N(A). Choose any vertex x ∈B ∩ N(v). It has two neighbors y, z ∈ A, so G contains an x-claw withleaves v, y, z, a contradiction.

(d) Suppose there is a token v ∈ I\A in the neighborhood of B. By the previousclaim, v ∈ N(A), which contradicts that I is an independent set.

We characterize the structure of resolving sequences by the use of the fol-lowing proposition.

Proposition 10 Let I be an independent set of a claw-free graph G and letC = [A,B] be an I-bad cycle. Let I ′ = I − u+ v be an independent set obtainedby sliding u→ v. Then exactly one of the following cases hold:

• u ∈ N2(B), v ∈ N1(B) and the one-step sequence I, I ′ resolves C;

• N(u)∩B = N(v)∩B and there is an I ′-bad cycle [A′, B] for some A′ ⊆ I ′.

Proof: Since there can be no tokens in B nor in N1(B) (Proposition 9(d)) eitheru ∈ N0(B) or u ∈ N2(B).

If u ∈ N0(B), then u 6∈ A, so [A,B] is an I ′-bad cycle too. Since there canbe no tokens in the neighborhood of the cycle, v 6∈ N1(B). Since there are noedges between N0(B) and N2(B) (Proposition 9(b)), v 6∈ N2(B). So v ∈ N0(B)and clearly N(v) ∩B = ∅ = N(u) ∩B, which proves the claim.

If u ∈ N2(B), then u ∈ N2(B)∩I = A (Proposition 9(d)). Let c1, c2, . . . , c2nbe the vertices of the cycle labeled in the cyclic order, so that c2, c4, · · · ∈ A,c1, c3, · · · ∈ B and u = c2. Then N(u) ∩ B = {c1, c3}. Since v is free in I,it is the only neighbor in A is u = c2. Therefore N(v) ∩ B ⊆ N(u) ∩ B –otherwise c2i+1 ∈ N(v) ∩ B for some i 6= 0, 1, which would imply a c2i+1-clawwith leaves c2i, c2i+2, v. Since there are no edges between N0(B) and N2(B)and v is free in I (so v 6∈ B), v is either in N2(B) or N1(B). If v ∈ N2(B), thenN(v)∩B = N(u)∩B; this proves the claim, as G[I1∪B] contains an I1-bad cycle[A− u+ v,B]. If v ∈ N1(B), then in G[I ′ ∪B] the only connected componentsare isolated vertices I\A and a path c3, c4, . . . , c2n, c1 with v attached to eitherend; hence the cycle is resolved. �

Corollary 11 Let I be an independent set of a claw-free graph G and let C =[A,B] be an I-bad cycle. Let I0, . . . , Im be a TS-sequence such that exactly onemove, the last one, moves a token from N2(B) to N1(B). Then the sequenceresolves C.

Proof: The proof is by induction on m. Let u → v be the first move in thesequence. If m = 1, then u ∈ N2(B), v ∈ N1(B), so it resolves C by theprevious proposition. If m > 1, then u 6∈ N2(B) or v 6∈ N1(B), so by theprevious proposition there is an I1-bad cycle [A′, B]. Then by induction the

9

sequence I1, . . . , Im resolves it, that is, there is no cycle in G[Im ∪ B], whichproves our claim. �

Corollary 12 Let I be an independent set of a claw-free graph G, and let C =[A,B] be an I-bad cycle. Let I0, . . . , Im be a TS-sequence that resolves C suchthat no prefix I0, . . . , Ii resolves C. Then the following properties hold:

(a) For every i ≤ m− 1, Ii contains only vertices in N0(B) and N2(B).

(b) For every i ≤ m − 2, Ii+1 is obtained from Ii by a move u → v such thatN(u) ∩B = N(v) ∩B.

(c) Im is obtained from Im−1 by a move u → v such that u ∈ N2(B) andv ∈ N1(B).

Proof: The proof is by induction on m. Let u → v be the first move in thesequence. If m = 1, then the move u → v resolves C, so by the previousproposition u ∈ N2(B) and v ∈ N1(B), which proves the claim. If m > 1, thenu → v does not resolve C, so by the previous claim N(u) ∩ B = N(v) ∩ Band there is an I1-bad cycle [A′, B]. I0 contains only vertices in N0(B) andA ⊆ N2(B) (Proposition 9(d)). The cycle [A′, B] is resolved by the sequenceI1, . . . , Im and none of its prefixes, so the claim holds by induction. �

Lemma 13 Let I be an independent set in a claw-free graph G and let C =[A,B] be an I-bad cycle. If C is resolvable, then I ↔ts (I\A) ∪B.

Proof: Denote J = (I\A) ∪ B. Consider a shortest TS-sequence I0, . . . , Imthat resolves C. Suppose first that m = 1, so I1 is obtained from I by amove u → v with u ∈ N2(B) and v ∈ N1(B) (Corollary 12(c)). Numberthe vertices of C c1, . . . , c2n in order along the cycle such that u = c1 andN(v) ∩ B = {c2} (so N(u) ∩ B = {c2n, c2}). Then the following sequenceof moves yields J , when starting with I: c1 → v, c2n−1 → c2n, c2n−3 →c2n−2, . . . , c3 → c4, v → c2. Using the fact that C is a chordless cycle and thatN(B) ∩ I = A (Proposition 9(d)), it is easily verified that every vertex set inthe resulting sequence is an independent set, so I ↔ts J .

Now suppose that m ≥ 2. Let I ′ = Im−1. Then there exists an I ′-bad cycle[A′, B], since until this point in the TS-sequence, tokens that started on A (i.e.tokens on N2(B)) only moved to vertices with exactly the same neighbors in B(Corollary 12(b)). From I ′ we can obtain J ′ = (I ′\A′) ∪ B in the same wayas shown the previous paragraph. It remains to show that from J ′, J can beobtained, by essentially reversing all moves outside the neighborhood of the badcycle, while moving no tokens on B. More precisely, for every i ∈ {0, . . . ,m−1},define I ′i = (Ii\N(B)) ∪ B. Note that I ′0 = J and that I ′m−1 = J ′. We arguethat (after removing repetitions), I ′m−1, . . . , I

′0 yields a TS-sequence from J ′ to

J : By Corollary 12(a, b), for any i, if I ′i+1 6= I ′i, then I ′i+1 can be obtained fromI ′i by a move u→ v where both u and v are part of N0(B). This way, it can be

10

verified that for every i, I ′i is an independent set, so J ′ ↔ts J . Combining thiswith I ↔ts I

′ and I ′ ↔ts J′ shows that I ↔ts J . �

We can now prove the following useful characterization: I ↔ts J if andonly if (informally) every cycle in G[I∆J ] is resolvable. Clearly, by symmetry,it does not matter whether one considers resolvability with respect to I or to J .

Theorem 14 Let I and J be independent sets in a claw-free connected graph G.Then I ↔ts J if and only if every I-bad cycle [A,B] with B ⊆ J is resolvablewith respect to I.

Proof: Consider an I-bad cycle [A,B] with B ⊆ J and a TS-sequence from Ito J . Since N2(B) eventually contains no tokens, this sequence must contain amove u → v with u ∈ N2(B) and v 6∈ N2(B). The first such move resolves thecycle (Corollary 11).

The other direction is proved by induction on the number k of cycles inG[I∆J ]. If k = 0, then by Lemma 1, I ↔ts J . If k ≥ 1, then consider an I-badcycle C = [A,B] in G[I∆J ]. Let I ′ = (I\A) ∪ B. By Lemma 13, I ↔ts I

′.The graph G[I ′∆J ] has one cycle less than G[I∆J ]. Every cycle in G[I ′∆J ]remains resolvable with respect to I ′ (one can first consider a TS-sequence fromI ′ to I, and subsequently a TS-sequence from I that resolves the cycle). So byinduction, I ′ ↔ts J , and therefore, I ↔ts J . �

Finally, we show that if an I-bad cycle [A,B] can be resolved, it can beresolved in at least one of two very specific ways: internally or externally.Corollary 12 shows that a shortest TS-sequence I0, . . . , Im that resolves [A,B]contains only moves u→ v where either both u and v are in N0(B), or both uand v are in N2(B), except for the last move. Let us call such moves internalmoves and external moves, respectively. (The last move from N2(B) to N1(B) isconsidered neither external nor internal). Call an I-bad cycle [A,B] internallyresolvable (respectively, externally resolvable) if there exists a resolving sequencein which all moves but the last are internal (respectively, external) moves. Sucha sequence is called an internal or (respectively, external) resolving sequence.

Lemma 15 Let I be an independent set in a claw-free graph G, and let C =[A,B] be an I-bad cycle. Then C is resolvable if and only if C is internally orexternally resolvable. Furthermore, any shortest TS-sequence that resolves C isan internal or external resolving sequence.

Proof: Consider a shortest TS-sequence S = I0, I1, . . . , Im that resolves C.Let u → v be the last move of this sequence, so u ∈ N2(B) and v ∈ N1(B)(Corollary 12(c)). By Proposition 9(a,c), 1 ≤ |N(v) ∩ A| ≤ 2. So one of thefollowing cases applies to the neighborhood of v.

Case 1: N(v) ∩ I = {x} for some x ∈ A.Then the move x→ v yields an independent set again, and since v ∈ N1(B), itresolves C (Corollary 11), so C is both internally and externally resolvable.

11

Case 2: N(v) ∩ I = {x, y} for some x ∈ A and y 6∈ A.In this case, we omit all internal moves, to obtain an external TS-sequence thatresolves C. More precisely, for every i, define I ′i = (Ii\N(B))∪A, and considerthe sequence I ′0, . . . , I

′m−1. For every i such that I ′i 6= I ′i+1, I ′i+1 is obtained from

I ′i by a move ui → vi where both ui and vi are in N0(B) (Corollary 12(a),(b)).Since there are no edges between N0(B) and A ⊆ N2(B) (Proposition 9(b)),every I ′i is an independent set, and thus this is a TS-sequence. Since Im−1 ∩N(v) = {x} and A∩N(v) = {x}, it also holds that I ′m−1 ∩N(v) = {x}, so fromI ′m−1, the move x → v can be made, to resolve C (Corollary 11). This showsthat C is externally resolvable.

Case 3: N(v) ∩ I = {x, y} for some x, y ∈ A.In this case, we omit all external moves, to obtain an internal TS-sequence thatresolves C. More precisely, for every i, define I ′i = (I\N(B)) ∪ (Ii ∩ N(B)),and consider the sequence I ′0, . . . , I

′m−1. For every i such that I ′i 6= I ′i+1, I ′i+1

is obtained from I ′i by a move ui → vi where both ui and vi are in N2(B)(Corollary 12(a, b)). Since there are no edges between N2(B) and (I\N(B)) ⊆N0(B) (Proposition 9(b)), every I ′i is an independent set, and thus this is aTS-sequence. Since Im−1∩N(v) = {u} and N(v)∩I ⊆ N(B), it also holds thatI ′m−1 ∩N(v) = {u}, so from I ′m−1, the move u → v can be made, to resolve C(Corollary 11). This shows that C is internally resolvable. �

It follows from Theorem 14 and Lemma 15 that to decide whether I ↔ts J ,it is enough to check whether every cycle in G[I∆J ] is externally or internally re-solvable. In the following two sections we characterize externally and internallyresolvable cycles. These characterizations yield polynomial-time algorithms fordeciding external and internal resolvability in the case when I is a maximum in-dependent set. This is the final ingredient in our algorithm for deciding whetherI ↔ts J in claw-free graphs. The algorithm is summarized in Section 8.

6 Externally Resolvable Cycles

We prove in this section that to verify whether an I-bad cycle C is externallyresolvable it suffices to search for a certain type of I-augmenting paths in G−V (C). The key observation is that in a shortest TS-sequence that externallyresolves C, no token moves more than once, provided that I is a maximumindependent set (Lemma 18 below). In that case, the token moves easily yielda set of I-alternating paths, as shown in the next lemma. Note that Lemma 18may fail if we drop the assumption that I is a maximum independent set (for anexample where I is maximal, consider Figure 1 with dashed edges removed). Tobe precise, we say that in a TS-sequence I0, . . . , In, every token moves at mostonce if for all i, j ∈ {0, . . . , n− 1} with i ≤ j: v ∈ Ij\Ij+1 implies that v ∈ Ii.

Proposition 16 Let I0, . . . , Im be a TS-sequence in a claw-free graph G inwhich every token moves at most once. Then every component of G[I0∆Im] isa path of odd length.

12

: B

: I1

: possible edge

: move in S

.... ....

x

v1u1

vj+1

uj+1uk

u =uj

y =vjz =

v =vk

uk−1

vk−1

Figure 1: An illustration of the proof of Lemma 18.

Proof: The proof is by induction on m. Let Im be obtained from Im−1 by themove x → y. By induction, G′ = G[I0∆Im−1] is a set of paths of odd length.Since every token moves at most once, G′ contains neither x nor y. By claw-freeness, G[I0∆Im] has maximum degree two, and since it is obtained from G′

by adding two adjacent vertices (plus incident edges), no even length path canbe introduced. So it now suffices to show that in G[I0∆Im], there is no cyclecontaining x and y. The vertex x is part of both I0 and Im−1, so it has noneighbors in I0∆Im−1. Therefore it has degree 1 in G[I0∆Im], which showsthat it is not part of a cycle, and thus G[I0∆Im] is a collection of odd lengthpaths again. �

We will often use the following simple proposition.

Proposition 17 Let I and J be two independent sets in a graph G. If everycomponent in G[I∆J ] is an odd length path, and |I\J | = p, then there exists aTS-sequence from I to J of length p.

Proof: We prove the statement by induction on |I\J |. The case I = J is trivial,so now assume that there exists at least one odd length path component P inG[I∆J ]. Then P has an end vertex v ∈ J\I with neighbor u ∈ I\J , but withno other neighbors in I. So from I, we can make the move u→ v, which yieldsI ′, such that every component of G[I ′∆J ] is again an odd length path, and|I ′\J | = p− 1. The statement now follows by induction. �

Lemma 18 Let I be a maximum independent set in a claw-free graph G, andlet C = [A,B] be an externally resolvable I-bad cycle. Then in any shortestexternal resolving sequence, every token moves at most once.

Proof: Let S = (I0, . . . , Im) be the shortest external resolving sequence forC. By definition of external resolving sequence all moves but the last one arebetween vertices in N0(B), and the last move of the sequence is u→ v for someu ∈ N2(B) and v ∈ N1(B) (Corollary 12). We prove the statement by inductionon m. If m = 1 then obviously, no token moves twice.

Now suppose that m ≥ 2. The following proof is illustrated in Figure 1.Then A ⊆ I1, so C = [A,B] is also an I1-bad cycle, and I1, . . . , Im is a shortestexternal resolving sequence for C with respect to I1. By induction, no tokenmoves twice in this sequence. So every component of G[I1∆Im] is an odd lengthpath (Proposition 16), which is clearly both I1-alternating and Im-alternating.

13

Let P = v1, u1, v2, u2, . . . , vk, uk be the path in G[I1∆Im] that contains u andv, labeled such that ui ∈ I1 and vi ∈ Im for every i. So u = uk′ and v = vk′

for some index k′. Then it is easily verified that from I1, we can make thesequence of moves u1 → v1, . . . , uk′ → vk′ , maintaining an independent setthroughout. This TS-sequence resolves C using k′ moves (Corollary 11). Sincethe TS-sequence I1, . . . , Im is a shortest TS-sequence for I1 that resolves C, weconclude that these are all moves from the sequence: k = k′ and the path P isthe only component in G[I1∆Im], and thus m = k + 1.

If in the entire sequence I0, . . . , Im no token moves twice, then there is noth-ing to prove, so now assume that at least one token moves twice. Since no tokenmoves twice in the subsequence I1, . . . , Im, the first move from I0 to I1 is x→ y,and later in the sequence, a move y → z occurs. Then y and z lie on the path P ,so y = uj and z = vj for some index j. We start with a few simple observations:

1. j < k.

If to the contrary j = k, then y = u and z = v, so y ∈ N2(B). Butthen x ∈ N2(B) (Corollary 12(b)), which contradicts that I0, . . . , Im is anexternal resolving sequence.

2. N(x) ∩ V (P ) ⊆ {v1, vj , uj , vj+1}.This holds because x cannot be adjacent to a vertex uj′ with j′ 6= j, sincethese vertices are both part of the independent set I0. Furthermore, anyvertex vj′ with j′ 6∈ {1, j, j + 1} has neighbors uj′ and uj′−1, which areboth in I0, so an edge xvj′ would yield a vj′ -claw.

3. xvj+1 ∈ E(G).

Assume to the contrary that xvj+1 6∈ E(G). We can then argue thatJ := (I0\{uj+1, . . . , uk}) ∪ {vj+1, . . . , vk} is also an independent set: Pis chordless, so none of the added vertices {vj+1, . . . , vk} are adjacent tovertices in {u1, . . . , uj−1}. By the previous observation and the assump-tion xvj+1 6∈ E(G), x is also not adjacent to any of the added vertices.Finally, considering Im, which contains the added vertices and the ver-tices I0\V (P ), we conclude that the added vertices are not adjacent tovertices of I0\V (P ). Note that G[I0∆J ] consists of a single odd path on2(k − j) vertices, so there exists a (shorter) TS-sequence of length k − jwhich resolves C (Proposition 17), a contradiction.

To complete the proof we consider four cases.

Case 1: vj /∈ N(x) and v1 /∈ N(x).If j = 1, then v1 = vj has no I0 neighbors. Otherwise both v1 and vj are freevertices with respect to I0 (their only I0 neighbors are u1 and uj−1, respectively),so v1, u1, . . . , uj−1, vj is an I0-augmenting path. This contradicts that I = I0 isa maximum independent set.

Case 2: vj ∈ N(x) and v1 /∈ N(x).Then the previous observations show that in G[I0∆Im], we have the following

14

odd path component:

v1, u1, . . . , vj , x, vj+1, uj+1, . . . , vk, uk,

containing 2k vertices. Hence a TS-sequence of shorter length k < m thatresolves C is possible (Proposition 17), a contradiction.

Case 3: vj /∈ N(x) and v1 ∈ N(x).Then the previous observations show that in G[I0∆Im], we have the followingodd path component:

vj , uj−1, vj−1, . . . , u1, v1, x, vj+1, uj+1, . . . , vk, uk,

containing 2k vertices. Hence a TS-sequence of shorter length k < m thatresolves C is possible (Proposition 17), a contradiction.

Case 4: vj ∈ N(x) and v1 ∈ N(x).If j = 1, then y = uj = u1 and the first two moves x → y, u1 → v1 can bereplaced by one move x → v1, giving a shorter TS-sequence, a contradiction.Otherwise, x has three neighbors v1, vj and vj+1 in an independent set Im,contradicting claw-freeness.

We have obtained a contradiction in every case, so we conclude that in a shortestexternal TS-sequence of length m, no token moves twice. This concludes theinductive step of the proof, and the statement follows by induction. �

We can now combine Proposition 16 and Lemma 18 to give a polynomialtime testable condition for the external resolvability of an I-bad cycle:

Theorem 19 Let I be a maximum independent set in a claw-free graph G andlet C = [A,B] be an I-bad cycle. Then C is externally resolvable if and only ifthere exists an (I\A)-augmenting path in G−A−B between some two verticesx ∈ N0(B) and y ∈ N1(B).

Proof: Denote G′ = G−A−B and I ′ = I\A, so I ′ is an independent set of G′.Suppose first that G′ contains such an I ′-augmenting path P = u0,v0,u1,v1

,. . . ,vk−1,uk with u0 ∈ N0(B) and uk ∈ N1(B). (So k ≥ 1.) We prove that thenC = [A,B] is externally resolvable. Since u0 6∈ NG(B) and u0 6∈ B, we observethat u0 6∈ NG(A) (Proposition 9(c)). Secondly, we argue that |NG(uk)∩A| = 1:by Proposition 9(c), uk has at least one neighbor w in A. Since uk is alsoadjacent to vk−1 ∈ I\A and there is no uk-claw, w is its only neighbor inA. All other vertices uj with 1 ≤ j ≤ k − 1 are adjacent to vj−1 and vj ,which are both in I\A, so they have no neighbors in A. It follows that J =I\{u1, . . . , uk−1} ∪ {v1, . . . , vk−1} is again an independent set of G, which isreachable from I using k− 1 moves (Proposition 17). With respect to J , uk is afree vertex, which is only adjacent to w ∈ A. So the move w → uk (with w ∈ Aand uk ∈ N1(B)) subsequently resolves the cycle C (Corollary 11), and thus Cis externally resolvable.

15

We now prove the other direction. Suppose that C = [A,B] is externallyresolvable, and consider a shortest external resolving sequence S = I0, . . . , Im(with I0 = I). By definition of external resolving sequence and Corollary 12, thelast move is u→ v for some u ∈ N2(B) and v ∈ N1(B), and every other move isbetween two vertices in N0(B). By Lemma 18, every token moves at most oncein S. So G[I0∆Im] is a set of odd paths (Proposition 16), in which all verticesexcept u and v are in N0(B). Clearly these paths are all both I0-alternatingand Im-alternating. Consider the path P that contains u and v and denoteP = v0, u0, v1, u1, . . . , vk, uk, with vi ∈ Im and ui ∈ I0 for all i. So for everyi, ui → vi is a move in the TS-sequence S, and uk → vk must be the last ofthese moves on P , since an independent set should be maintained throughout.So u = uk and v = vk. We now argue that P ′ = v0, u0, v1, u1, . . . , uk−1, vkis the desired I ′-augmenting path in G′: clearly the path is I ′-alternating andchordless. The vertex v0 is not adjacent to any I-vertex x other than u0, becauseotherwise Im is not an independent set (if x ∈ Im), or P is not a component ofG[I0∆Im] (if a move x→ y occurs in S). So v0 is a free vertex with respect toboth I and I ′. The vertex vk = v is adjacent to both uk−1 and uk = u (in G),so it is not adjacent to any other vertex from I. Therefore, in G′, it is a freevertex with respect to I ′ (which does not contain u). This shows that P ′ is anI ′-augmenting path for G′, between vertices in N0(B) and N1(B). �

For a given I-bad cycle C = [A,B], there is a polynomial number of vertexpairs x ∈ N0(B) and y ∈ N1(B) that need to be considered, and for every sucha pair, testing whether there is an (I\A)-augmenting path between these inG−A−B can be done in polynomial time (Theorem 6). So from Theorem 19we conclude:

Corollary 20 Let I be a maximum independent set in a claw-free graph G,and let C be an I-bad cycle. In polynomial time, it can be decided whether C isexternally resolvable.

7 Internally resolvable cycles

16

Figure 2: An example of a graph G with a cycle with n = 7 internally resolvablein m = 18 steps. Edges at the boundary of the figure are drawn twice, faded.Vertices in each column L1, . . . , L7 form a clique. The directed path from the bto I in D(G,C) is also shown as a red dotted line to clarify the structure of G.

u1u2

u3u4

u5u6

u7u8

c8c10

c12c14

c2c4

c6

b

c1 c3 c5 c7 c9c11 c13

L1 L2 L3 L4 L5L6 L7

The graph D(G,C) obtained from it:

u1u2

u3u4

u5u6

u7u8

u9u10

u11u12

u13u14

u15u16

u17u18

u19u20

u21u22

u23u24

b

c1 c3 c5 c7 c9c11 c13

L1 L2 L3 L4 L5L6 L7

17

In this section, similarly as in the case of externally resolvable cycles, weshow that the shortest internal resolving sequences have a very specific structure,which allows us to define a digraph in which directed paths (whose existencecan easily be checked in polynomial time) will closely correspond to internalsolving sequences.

Let I, J be maximum independent sets in a claw-free connected graph G.Let c0, c1, . . . , c2n−1 be the vertices of a cycle C = [A,B] in G[I∆J ], withA = {c0, c2, . . . } ⊆ I and B = {c1, c3, . . . } ⊆ J . Define layer Li to be the set ofvertices adjacent to both c2i−1 and c2i+1; indices of ci and Li are always meantmodulo 2n and n, respectively. Layers Li are disjoint (Proposition 9(a)), exceptfor n = 2 (when L0 = L1), which is why this case is analyzed separately. Noticec2i ∈ Li.

Define D(G,C) to be a digraph with vertex set V (G). For all i, add anedge u → v for all pairs u ∈ Li, v ∈ Li+1 that are non-adjacent in G. Also, forevery b ∈ N1(B), if the vertex of B in the closed neighborhood b is c2i−1, thenadd an edge b → v for all v ∈ Li non-adjacent to b in G. Define D(G,Crev)analogously, only with the order of vertices on the cycle reversed (edges betweenlayers are reversed and edges from N1(B) go to different layers). See Figure 2for an example.

Lemma 21 Let I and J be maximum independent sets in a claw-free graphG, and let C = c0, . . . , c2n−1 be an internally resolvable cycle in G[I∆J ] withn > 2. Then in D(G,C) or D(G,Crev) there is a directed path from some vertexb ∈ N1(B) that has no neighbors in I\A to some vertex in A.

Proof: Let I0, . . . , Im be a shortest internal resolving TS-sequence, I0 = I. Bydefinition of internally resolvable and Corollary 12, the last move is is fromN2(B) to some b ∈ N1(B), and all other moves u → v satisfy u, v ∈ N2(B)and N(u) ∩B = N(v) ∩B. We shall prove that all of A is reachable from b bydirected paths in D(G,C) or D(G,Crev).

First, we show by induction that for j = 0 . . .m−1, in the step Ij of the TS-sequence, there is exactly one token in each Li and no token in N2(B)\

⋃i Li.

Initially this is true, because there is a token on each vertex of A = {c0, c2, . . . },c2i is contained in Li, and there can be no other token in N2(B) (Proposi-tion 9(d)). If it is true before a move u→ v, then u, v ∈ N2(B), so by inductiveassumption u ∈ Li for some i, and since N(u) ∩B = N(v) ∩B, the vertex v isin Li too, which proves the induction step. For j = 0, . . . ,m − 1 and all i, letvij be the vertex in Ij ∩ Li.

Let c2i0−1 be the only neighbor of b in B. Since a token is moved to bin the last move, b is free in Im−1, so it cannot be adjacent to both vi0−1m−1 and

vi0m−1. Assume w.l.o.g. it is non-adjacent to vi0m−1 (otherwise reverse the order ofvertices c0, . . . , c2n−1 in the above analysis, replacing D(G,C) with D(G,Crev)).Then by definition, D(G,C) contains an edge from b to vi0m−1. Thus some vertexof Im−1 is reachable from b in D(G,C).

For every j = 0, . . . ,m − 1, and every i, there is an edge from vij ∈ Li to

vi+1j ∈ Li+1 in D(G,C), because they are non-adjacent in G (both belong to

18

the independent set Ij). Therefore if for some j = 0 . . .m − 1 any vertex inIj = {v1j , . . . , vnj } is reachable from b in D(G,C), then all of Ij is. But Ij−1contains some vertex of Ij (all but one), so inductively every vertex of every Ijis reachable. In particular, since there are no edges to vertices outside of N2(B)in D(G,C), there is a directed path from b to I0 ∩N2(B), i.e. A, in D(G,C).

It remains to show that b has no neighbors in I\A. Suppose that some vertexx ∈ I\A is adjacent to b. Sine x /∈ N2(B) (Proposition 9(d)), the token on xis never moved in the TS-sequence and x ∈ Im. But b is a neighbor of x alsocontained in the independent set Im, a contradiction.

Lemma 22 Let I and J be maximum independent sets in a claw-free graph G,let C = [A,B] = c0, c1, . . . , c2n−1 be a cycle in G[I∆J ] with n > 3. Supposethere is a path from b to A in D(G,C) or D(G,Crev) for some b ∈ N1(B) thathas no neighbors in I\A. Then C is internally resolvable.

Proof: Choose the shortest such path u0, . . . , um with u0 = b and um ∈ A,w.l.o.g. in D(G,C) (otherwise reverse the order of vertices c0, . . . , c2n−1 in theproof). W.l.o.g. let the only neighbor of u0 in B be is c1 (otherwise cyclicallyrename c0, . . . , c2n−1). By definition of D(G,C) any edge of it beginning inu0 must end in L1. Thus u1 is in L1 and similarly, inductively, uj ∈ Lj forj = 1, . . . ,m. The vertex um ∈ Lm ∩A = {c2m} is the first vertex in A and forj = 1, . . . , n − 1 we have an edge from c2(m+j−1) to c2(m+j) ∈ Lm+j , thus wecan extend the directed path defining um+j = c2(m+j) for j = 1 . . . n − 1. Tosum up,

N(u0) ∩B = {c1},N(uj) ∩B = {c2j−1, c2j+1} for j = 1, . . . ,m+ n− 1.

The idea is to reconfigure A to subsequent infixes of the path. Define Ij ={um−j , um−j+1, . . . , um−j+n−1}∪ (I\A) for j = 0, . . . ,m. Indeed, this sequenceof subsets of V (G) starts with I0 = {um, um+1, . . . , um+n−1}∪(I\A) = I. SinceIj = Ij−1 + um−j − um−j+n for j = 1, . . . ,m, the consecutive steps correspondto moves um−j+n → um−j . If we prove this to be a reconfiguration sequence,it resolves C (Corollary 11), and it is easily checked to be internally resolving.Therefore it now suffices to show that in G:• um−j is adjacent to um−j+n for j = 1, . . . ,m,• uj is non-adjacent to uj′ for j, j′ = 0, . . . ,m+n−1 such that 1 ≤ j′−j ≤ n−1.The first condition guarantees the existence of edges along which tokens can beslid, while the second ensures that each Ij is an independent set (u0 = b has noneighbors in I\A by assumption and uj ∈ N2(B) for j = 1, . . . ,m+ n− 1 haveno neighbors in I\A ⊆ N0(B) by Proposition 9(d,b)).

The proof follows with a few steps marked with Greek letters for later ref-erence.

α: ujuj′ /∈ E(G) for j′ − j = 1.It suffices to notice that, since u0, . . . , um+n−1 is a directed path in D(G,C),

19

the digraph has an edge from uj to uj+1, so by construction there is no edgebetween those vertices in G.

β: ujuj′ /∈ E(G) for 1 < j′ − j < n− 1.If j > 0 then uj , uj′ belong to Lj , Lj′ respectively, so their neighbors in B are ex-actly c2j−1, c2j+1 and c2j′−1, c2j′+1 respectively. Since j′−j 6≡ 0, 1,−1 (mod n),we have 2j′ − 2j 6≡ 0, 2,−2 (mod 2n), so these are four different vertices. Thusif uj was adjacent to uj′ , there would be a uj′ -claw with leaves uj , c2j′−1, c2j′+1.If j = 0, the proof is analogous, except uj has exactly one neighbor in B, namelyc1 = c2j+1.

It remains to show that• um−j is adjacent to um−j+n for j = 1 . . .m,• uj is non-adjacent to uj′ for j, j′ = 0 . . .m+ n− 1 such that j′ − j = n− 1.Reindexing, it remains to show thatγ(j): uj is adjacent to uj+n for j = 0 . . .m− 1 andδ(j): uj is non-adjacent to uj+n−1 for j = 0 . . .m.We show these by induction on j.

δ(0): u0 is non-adjacent to un−1, otherwise there would be a un−1 clawwith leaves u0, c2n−3, c2n−1 (recall u0 is adjacent only to c1 in B and n > 2).

γ(0): We wish to prove that u0 is adjacent to un. The only neighbors of u0in A can be c0 and c2 (otherwise, if u0 was adjacent to c2i for i 6≡ 0, 1 (mod n),there would be a c2i-claw with leaves u0, c2i−1, c2i+1). If u0 is non-adjacent toone of them, then u0 is already free in I, making the cycle C resolvable, soassume u0 is adjacent to both c0 and c2. If m < n then un = c2(m+(n−m)) = c0,so u0 is adjacent to un. If m = n then again un = um = c2m = c2n = c0. Ifm = n+ 1, then un is non-adjacent to un+1 = um = c2 by β. So un is adjacentto c0, otherwise there would be a c1-claw with leaves c0, c2, un. Therefore u0is adjacent to un, otherwise there would be a c0-claw with leaves u0, un, un−1(un−1c0 ∈ E(G), otherwise there would be a shorter path u0, . . . , un−1, c0 inD(G,C); u0un−1 /∈ E(G) by δ(0), un−1un /∈ E(G) by α). In the remainingcase, when m > n+ 1, un is adjacent to c2 (otherwise there would be a shorterpath u0, . . . , un, c2 in D(G,C)), therefore if u0 wasn’t adjacent to un, therewould be a c2-claw with leaves u0, un, c3.

δ(1): u1 is non-adjacent to un, otherwise there would be a un-claw withleaves c−1, u0, u1 (u0un ∈ E(G) by γ(0)).

δ(j) =⇒ γ(j) for j = 1, . . . ,m− 1:uj is adjacent to uj+n, otherwise there would be a c2j−1-claw with leavesuj , uj+n, uj+n−1 (ujuj+n−1 /∈ E(G) by δ(j), uj+nuj+n−1 /∈ E(G) by α).

γ(j) =⇒ δ(j + 1) for j = 1, . . . ,m− 1:uj+1 is non-adjacent to uj+n, otherwise there would be a uj+n-claw with leavesuj−1, uj , uj+1 (uj+nuj−1 ∈ E(G), otherwise there would be a shorter pathu0, . . . , uj−1, uj+n, . . . , um inD(G,C); uj+nuj ∈ E(G) by γ(j), uj−1uj , ujuj+1 /∈E(G) by α, uj−1uj+1 /∈ E(G) by β for n > 3).

Corollary 23 Let I and J be maximum independent sets in a claw-free graph

20

G, let C = [A,B] be a cycle in G[I∆J ]. In polynomial time we can decidewhether C is internally resolvable.

Proof: If n > 3, then by Lemmas 21, 22 it suffices to make a depth-first-searchin D(G,C) and D(G,Crev) to find an appropriate directed path. If n = 2 orn = 3, we can enumerate all pairs or triples of vertices, find all independent setsI ′ such that I ′ = (I\A) ∪ A′ for |A′| = |A| = n, in particular all configurationsreachable by making internal moves only, and check if C is internally resolvableby brute force. �

8 Summary of the Algorithm

In this section, we summarize how the previous lemmas yield a polynomial-timealgorithm for testing whether I ↔ts J or I ↔tj J holds in connected claw-freegraphs.

Theorem 24 Let I and J be independent sets in a connected, claw-free graphG. In polynomial time we can decide whether I ↔ts J and whether I ↔tj J .

Proof: By Corollary 2, since G is connected, I ↔ts J if and only if I ↔tj J ,thus we need only to consider the sliding model. Assume |I| = |J |, otherwise,we immediately return NO.

We test whether I and J are maximum independent sets of G, which canbe done in polynomial time (by combining Proposition 7 and Theorem 6; seealso [Min80, Sbi80, Sch03]). If not, then by Lemma 8, we return YES.

Now consider the case that both I and J are maximum independent sets.Theorem 14 shows that I ↔ts J if and only if every cycle in G[I∆J ] is resolv-able. (By symmetry, it does not matter if we consider resolvability with respectto I or J , so we choose I.) By Lemma 15, it suffices to check for internal andexternal resolvability of such cycles (viewed as I-bad cycles), which (since I is amaximum independent set of G) can be done in polynomial time by Corollary 20and Corollary 23. We return YES if and only if every cycle in C was found tobe internally or externally resolvable, and NO otherwise. �

9 Extensions

References

[BC09] Paul Bonsma and Luis Cereceda. Finding paths betweengraph colourings: PSPACE-completeness and superpolynomialdistances. Theor. Comput. Sci., 410(50):5215–5226, 2009.

21

[BCvdHJ07] Paul S. Bonsma, Luis Cereceda, Jan van den Heuvel, and MatthewJohnson. Finding paths between graph colourings: Computationalcomplexity and possible distances. Electronic Notes in DiscreteMath., 29:463–469, 2007.

[Bon12] Paul Bonsma. Rerouting shortest paths in planar graphs. InDeepak D’Souza, Telikepalli Kavitha, and Jaikumar Radhakr-ishnan, editors, FSTTCS, volume 18 of LIPIcs, pages 337–349.Schloss Dagstuhl - Leibniz-Zentrum fur Informatik, 2012.

[Bon13] Paul Bonsma. The complexity of rerouting shortest paths. Theor.Comput. Sci., 510:1–12, 2013.

[Bon14] Paul Bonsma. Independent set reconfiguration in cographs. CoRR,abs/1402.1587, 2014. Extended abstract accepted for WG 2014.

[CS05] Maria Chudnovsky and Paul D. Seymour. The structure of claw-free graphs. In Bridget S. Webb, editor, Surveys in Combinatorics,volume 327 of London Mathematical Society Lecture Note Series,pages 153–171. Cambridge University Press, 2005.

[CvdHJ08] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Con-nectedness of the graph of vertex-colourings. Discrete Math.,308(5-6):913–919, 2008.

[CvdHJ09] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Mixing3-colourings in bipartite graphs. European J. of Combinatorics,30(7):1593–1606, 2009.

[Edm65] Jack Edmonds. Paths, trees, and flowers. Canad. J. Math., 17:449–467, 1965.

[GKMP09] Parikshit Gopalan, Phokion G. Kolaitis, Elitza N. Maneva, andChristos H. Papadimitriou. The connectivity of Boolean satisfia-bility: Computational and structural dichotomies. SIAM J. Com-put., 38(6):2330–2355, 2009.

[HD05] Robert A. Hearn and Erik D. Demaine. PSPACE-completenessof sliding-block puzzles and other problems through the nondeter-ministic constraint logic model of computation. Theor. Comput.Sci., 343(1-2):72–96, 2005.

[IDH+08] Takehiro Ito, Erik D. Demaine, Nicholas J. A. Harvey, Christos H.Papadimitriou, Martha Sideri, Ryuhei Uehara, and Yushi Uno. Onthe complexity of reconfiguration problems. In ISAAC, volume5369 of LNCS, pages 28–39. Springer, 2008.

[IDH+11] Takehiro Ito, Erik D. Demaine, Nicholas J. A. Harvey, Christos H.Papadimitriou, Martha Sideri, Ryuhei Uehara, and Yushi Uno.On the complexity of reconfiguration problems. Theoret. Comput.Sci., 412(12–14):1054–1065, 2011.

22

[IKD09] Takehiro Ito, Marcin Kaminski, and Erik D. Demaine. Reconfigu-ration of list edge-colorings in a graph. In WADS, volume 5664 ofLNCS, pages 375–386. Springer, 2009.

[KMM11] Marcin Kaminski, Paul Medvedev, and Martin Milanic. Shortestpaths between shortest paths. Theor. Comput. Sci., 412(39):5205–5210, 2011.

[KMM12] Marcin Kaminski, Paul Medvedev, and Martin Milanic. Complex-ity of independent set reconfigurability problems. Theor. Comput.Sci., 439:9–15, 2012.

[LM08] Vadim V. Lozin and Martin Milanic. A polynomial algorithm tofind an independent set of maximum weight in a fork-free graph.J. Discrete Algorithms, 6(4):595–604, 2008.

[Min80] George J. Minty. On maximal independent sets of vertices in claw-free graphs. J. Comb. Theory, Ser. B, 28(3):284–304, 1980.

[MNR+13] Amer E. Mouawad, Naomi Nishimura, Venkatesh Raman, NargesSimjour, and Akira Suzuki. On the parameterized complexity ofreconfiguration problems. In Gregory Gutin and Stefan Szeider,editors, IPEC, volume 8246 of LNCS, pages 281–294. Springer,2013.

[NT01] Daishin Nakamura and Akihisa Tamura. A revision of Minty’salgorithm for finding a maximum weight stable set of a claw-free graph. Journal of the Operations Research Society of Japan,44(2):194–204, 2001.

[Sbi80] Najiba Sbihi. Algorithme de recherche d’un stable de cardinalitemaximum dans un graphe sans etoile. Discrete Mathematics,29(1):53–76, 1980.

[Sch03] Alexander Schrijver. Combinatorial optimization: polyhedra andefficiency, volume 24. Springer, 2003.

[SMN14] Akira Suzuki, Amer E. Mouawad, and Naomi Nishimura. Recon-figuration of dominating sets. CoRR, abs/1401.5714, 2014.

[vdH13] Jan van den Heuvel. The complexity of change. Surveys in Com-binatorics 2013, pages 127–160, 2013.

23