TS-Reconfiguration of $k$-Path Vertex Covers in Caterpillars for $k \geq 4$

A $k$-path vertex cover ($k$-PVC) of a graph $G$ is a vertex subset $I$ such that each path on $k$ vertices in $G$ contains at least one member of $I$. Imagine that a token is placed on each vertex of a $k$-PVC. Given two $k$-PVCs $I, J$ of a graph $G$, the $k$-Path Vertex Cover Reconfiguration ($k$-PVCR) under Token Sliding ($\mathsf{TS}$) problem asks if there is a sequence of $k$-PVCs between $I$ and $J$ where each intermediate member is obtained from its predecessor by sliding a token from some vertex to one of its unoccupied neighbors. This problem is known to be $\mathtt{PSPACE}$-complete even for planar graphs of maximum degree $3$ and bounded treewidth and can be solved in polynomial time for paths and cycles. Its complexity for trees remains unknown. In this paper, as a first step toward answering this question, for $k \geq 4$, we present a polynomial-time algorithm that solves $k$-PVCR under $\mathsf{TS}$ for caterpillars (i.e., trees formed by attaching leaves to a path).


Introduction
Recently, reconfiguration problems have attracted the attention from both theoretical and practical viewpoints.The input of a reconfiguration problem consists of two feasible solutions of some computational problem (e.g., Satisfiability, Independent Set, Vertex Cover, Dominating Set, etc.) and a reconfiguration rule that describes an adjacency relation between solutions.One of the primary goal is to decide whether one feasible solution can be transformed into the other via a sequence of adjacent feasible solutions where each intermediate member is obtained from its predecessor by applying the given reconfiguration rule exactly once.Such a sequence, if exists, is called a reconfiguration sequence.Readers may recall the classic Rubik's cube puzzle as an example of a reconfiguration problem, where each configuration of the Rubik's cube corresponds to a feasible solution, and two configurations (solutions) are adjacent if one can be obtained from the other by rotating a face of the cube by either 90, 180, or 270 degree.The question is whether one can transform an arbitrary configuration to the one where each face of the cube has only one color.For an overview of this research area, see the recent surveys [14,10,9].
Let G = (V, E) be a simple graph.Let k ≥ 2 be a fixed positive integer.A subset I of V is called a k-path vertex cover (k-PVC) if every path on k vertices in G contains at least one vertex from I. The k-Path Vertex Cover problem asks, given a graph G and an integer s, if there is a k-path vertex cover of G whose size is at most some positive integer s.Motivated by the importance of a problem related to secure communication in wireless sensor networks, Brešar et al. initiated the study of k-PVC in [2] (as a generalisation of the wellknown vertex cover ).It is known that k-Path Vertex Cover is NP-complete for every k ≥ 2 [1,2].Subsequent work regarding the maximum variant [8] and weighted variant [3] of k-Path Vertex Cover has also been considered in the literature.Recently, the study of k-Path Vertex Cover and related problems has gained a lot of attraction from both theoretical aspect [11,12] and practical application [5].For more details, see the survey [13].
Imagine that each vertex of G contains at most one token and the set of tokens form a k-PVC.Two k-PVCs I, J of a graph G are adjacent under Token Sliding (TS) if there are two vertices u, v ∈ V (G) such that I is obtained from J (or vice versa) by sliding a token along the edge uv ∈ E(G) from u to v (or from v to u).The k-Path Vertex Cover Reconfiguration (k-PVCR) problem under TS asks whether there is a sequence of adjacent k-PVCs that transforms I into J.When k = 2, it is simply called the Vertex Cover Reconfiguration (VCR) problem.The VCR problem has been very well-studied in the literature under TS as well as other reconfiguration rules.Readers are referred to [10] for a quick summary of the known results.
Hoang et al. [7] initiated the study of k-PVCR under TS and other reconfiguration rules (namely Token Jumping (TJ) and Token Addition/Removal (TAR(u)) which respectively involve moving a token to any unoccupied vertex and adding/removing a token such that the resulting set always contains at most u tokens for some given positive integer u) for fixed k ≥ 3.In particular, they showed that k-PVCR under TS remains PSPACE-complete for planar graphs of maximum degree 3 and bounded bandwidth, chordal graphs, and perfect graphs.We note that in a preliminary version [6] of the mentioned paper, the authors wrongly claimed that k-PVCR under TS is PSPACE-complete for bipartite graphs.The reason is that they reduced from the Minimum Vertex Cover Reconfiguration problem-a problem that has not yet been shown to be PSPACE-hard for bipartite graphs under TS.On the other hand, it is not hard to verify that their reduction remains true for perfect graphs-a superclass of bipartite graphs.On the positive side, they designed polynomial-time algorithms for solving k-PVCR under TS for some very restricted graphs, namely paths and cycles.Unfortunately, the complexity of k-PVCR under TS for trees remains unknown, while for TJ/TAR(u) it can be solved in linear time [7].As an attempt to tackle this open question, in this paper, when k ≥ 4, we present a polynomial-time algorithm for solving this problem with caterpillars-a subclass of trees-as the input graph.Roughly speaking, a caterpillar is obtained by attaching leaves (i.e., vertices of degree 1) to a given path (called the spine, or backbone path).Intuitively, by characterizing the tokens that "cannot be moved at all" in polynomial time, we show that one can efficiently identify all no-instances of k-PVCR under TS.Though this is a familiar technique in designing polynomial-time algorithms for solving several reconfiguration problems, our characterization of such tokens, in several cases, is non-trivial.In particular, it is done via studying "a special region H surrounding a token t satisfying that t can be moved only if no token outside H can be moved in".(For more details, see Section 3.) Additionally, in a yes-instance, we explicitly describe how to construct a sequence of TS-moves that transforms one k-PVC into another.

Preliminaries
In this section, we define some notation and terminology.We also briefly recall an useful algorithm from [7] (Algorithm 1).

Graph Notation
Readers are referred to [4] for the concepts that are not mentioned here.We use V (G) and E(G) to denote the sets of vertices and edges of a (simple, undirected) graph G, respectively.For v ∈ V (G), we use N G (v) to indicate the set of v's neighbors in G, i.e., the set of vertices that are adjacent to v.
For a subset X of V (G), we denote by G − X the graph obtained from G by removing vertices in X (and their incident edges), and G[X] the subgraph induced by vertices in X.For convenience, if X has exactly one member, say v, then we write G − v to indicate G − {v}.Additionally, if X = V (H) for some induced subgraph H of G, then we write G − H to indicate G − V (H).We say that two vertices u and v are in the same component of G if there is a path in G between u and v.A k-path is simply a path on k vertices.A vertex v covers a path P if v ∈ V (P ).A k-path vertex cover (k-PVC) I of G is a vertex subset such that every k-path is covered by some member of I. We denote by ψ k (G) the minimum size of a k-PVC of G.
A tree is a simple, undirected, connected graph that contains no cycles.For any pair of vertices u, v in a tree T , we use P uv to denote the unique uv-path connecting u and v in T .A caterpillar G is a tree where V (G) can be partitioned into two sets S (spine) and L (leaves) satisfying that (a) vertices in S induce a path s 1 s 2 . . .s in G, and (b) each vertex in L has degree 1, and its unique neighbor is in S. We use G = (S ∪ L, E) to indicate a caterpillar with spine S and leaves L. To avoid ambiguity, we assume that ≥ 2, deg G (s 1 ) ≥ 2, and deg G (s ) ≥ 2. For a vertex s = s i ∈ S (1 ≤ i ≤ ), we denote by l(s i ) = s i−1 (resp.r(s i ) = s i+1 ) the left-neighbor (resp.right-neighbor ) of s.In order to make the concept of left/right-neighbors well-defined, we set s 0 = s 1 and s +1 = s .We also denote by L G (s) the set N G (s) ∩ L containing leaf-neighbors (i.e., degree-1 neighbors) of s in G and by L G [s] the set L G (s) ∪ {s}.

Reconfiguration Notation
We denote by (G, I, J) an instance of k-PVCR where I, J are k-PVCs of G. Imagine that a token is placed on each vertex in a k-PVC of a graph G.A TS-sequence in G between I and J is the sequence I = I 0 , I 1 , . . ., I q = J such that for i ∈ {0, . . ., q − 1}, the set I i is a k-PVC of G and there exists a pair x i , y i ∈ V (G) such that I i \ I i+1 = {x i }, I i+1 \ I i = {y i }, and x i y i ∈ E(G).In other words, I i+1 is obtained from I i by immediately sliding a token from x i to y i along the edge x i y i .In short, S can be viewed as a (ordered) sequence of either k-PVCs or token-slides.With respect to the latter viewpoint, we say that S slides/moves a token t from u to v in G if t is originally placed on u ∈ I 0 and finally on v ∈ I q after performing S.
For a TS-sequence S = I 0 , I 1 , . . ., I q , we denote by rev(S) the reverse of S, i.e., the TS-sequence I q , . . ., I 1 , I 0 .For two TS-sequences S = I 0 , I 1 , . . ., I p and S = I 0 , I 1 , . . ., I q , if I p = I 0 then we say that they can be concatenated and define their concatenation S ⊕ S as the TS-sequence I 0 , I 1 , . . ., I p , I 1 , . . ., I q .We assume for convenience that if S is empty then S ⊕ S = S ⊕ S = S.
For a k-PVC I of G, we say that a token t on u ∈ I is (G, I)-rigid if it cannot be moved at all, that is, for any k-PVC J of G obtained from I via a TS-sequence in G, we always have u ∈ J.In other words, there is no TS-sequence that slides t from u to any of its neighbors in G.If t is not (G, I)-rigid, we call it a (G, I)-movable token.We denote by R(G, I) the set of all vertices in G where (G, I)-rigid tokens are placed.

Partitioning Trees
In this section, we describe a slightly modified version of an algorithm used in [7] for partitioning a given tree T .We remark that this algorithm is also crucial for solving the problem under TJ and TAR.A properly rooted subtree T v of a n-vertex rooted tree T is a subtree of T induced by the vertex v and all its descendants (with respect to the root r) satisfying the following conditions (1) T v contains a k-path; (2) T v − v does not contain a k-path.
The O(n)-time algorithm Partition(T, k, r) (Algorithm 1) takes a tree T , an integer k ≥ 3, and a root vertex r ∈ V (T ) as an input, and returns a minimum k-PVC I(T, k, r) and a partition P (T, k, r) of T .In short, it systematically searches for a properly rooted tree T v , decides whether T v is properly rooted, and if so, add T v to P (T, k, r) and v to I(T, k, r), and remove T v from the input tree T .To check if T contains a properly rooted subtree T v , one can start by assigning v to a vertex of largest depth (i.e., distance from r) and verify if T v is properly rooted.If so, the answer is "yes".Otherwise, we assign v to its parent and repeat, until a T v is found (answering "yes") or there is nothing to check (answering "no").The number of subtrees in P (T, k, r) is indeed ψ k (T )-the minimum size of a k-PVC of T .

Algorithm 1: Partition(T, k, r).
Input: A tree T on n vertices rooted at r and an integer k ≥ 3. Output: A partition P (T, k, r) and a minimum k-PVC I(T, k, r) of T . 1 i := 1; 2 while T contains a properly rooted subtree Tv do

Rigid Tokens
Let I be a k-PVC of a n-vertex caterpillar G = (S ∪ L, E).In this section, we will first characterize whether a token u ∈ I is (G, I)-rigid.Using our characterization, one can design a polynomial-time algorithm to find all such tokens when k ≥ 4. The following lemma is straightforward.
(b) The if direction is trivial.To show the only-if direction, it is sufficient to show that if either v / ∈ I or v ∈ I and the token t v on v is (G − u, I ∩ V (G − u))-movable, t can be moved in G. Indeed, if v / ∈ I, we simply slide t from u to v, because any k-path covered by u is also covered by v. On the other hand, if a token t v is placed on v ∈ I, since t v is (G − u, I ∩ V (G − u))-movable, there is a TS-sequence in G − u (which is also in G) that moves t v to one of v's neighbors.Simply apply such a sequence, and then we can move t from u to v.
Consequently, it remains to characterize whether a token on u ∈ I ∩ S is (G, I)-rigid.Additionally, by Lemma 1(a), it suffices to assume from this point forward that N G (u) = ∅.Definition 2. Let I be a k-PVC (k ≥ 3) of a caterpillar G = (S ∪ L, E).For u ∈ I ∩ S, we define H(G, I, u) to be a set of induced subgraphs of G such that for each H ∈ H(G, I, u), and ((V (P ) ∪ V (Q)) \ {u}) ∩ I = ∅; and (H.3) among all subgraphs of G containing u and satisfying (H.1) and (H.2), |V (H) ∩ S| is minimum.
Intuitively, if H(G, I, u) = ∅, the token t on u ∈ I ∩ S is (G, I)-movable if for every subgraph H ∈ H(G, I, u), at least one token from some vertex in V (G − H) ∩ I (i.e., "outside H") can be moved to some vertex in V (H) (i.e., "inside H") via a TS-sequence.For example, it can be readily verified that in Fig. 1  We now define some useful notations which will be used later in several statements.
, and let u ∈ I ∩ S. We denote by P(G, I, u) the set of all k-paths in G having either u or one of its leaf-neighbors as an endpoint and none of their vertices other than u is in I. Observe that P(G, I, u) can be partitioned into three subsets P l (G, I, u), P r (G, I, u), and P c (G, I, u) where each member is a k-path containing l(u), r(u), and only u and some of its leaf-neighbors, respectively.We denote by A(G, I, u) the set of all vertices Indeed, the following lemma says that H(G, I, u) can be determined efficiently.
To see this, note that two k-paths satisfying (H.2) contain exactly one common vertex in S, namely u.Moreover, a k-path contains at least k−2 and at most k vertices in S.This minimum (resp., maximum) value can be obtained when two endpoints of the k-path are of degree 1 (resp., more than 1) in G.
From the definition, for every time to verify (H.1).For verifying (H.2), we consider the set P(H, I, u).If P(H, I, u) is empty, clearly (H.2) is not satisfied.Otherwise, observe that for any two k-paths P, Q in H satisfying (H.2), P and Q cannot be both in either P l (H, I, u) or P r (H, I, u), otherwise they both respectively contain either l(u) or r(u), which contradicts (H.2).If both P l (H, I, u) and P r (H, I, u) are non-empty, (H.2) is satisfied: arbitrarily taking any P from P l (H, I, u) and Q from P r (H, I, u) would be sufficient.If both P l (H, I, u) and P r (H, I, u) are empty, any two k-paths P, Q in H satisfying (H.2), if they exist, must be both in P c (H, I, u), and therefore have their endpoints in L H (u) = L G (u).In this case, one can verify that (H.2) is satisfied if and only if |L G (u) \ I| ≥ 3.If exactly one of P l (H, I, u) and P r (H, I, u) is empty, say P l (H, I, u), it follows that (H.2) is satisfied if and only if P c (H, I, u) is non-empty: the only-if direction is trivial, and the if direction is proved by arbitrarily taking P from P l (H, I, u) and Q from P c (H, I, u).In each of the above cases, we have shown how to verify (H.2) in O(1) time.Therefore, the running time of our verification for (H.2) depends on the time for constructing P(H, I, u), which can be done by checking O((1 Finally, we describe how to find H(G, I, u) in O(n) time.At the beginning, H(G, I, u) = ∅.We initially start with the subgraph H induced by vertices in S of distance at most k−3 from u and their leaf-neighbors.Note that |V (H) ∩ S| = 2k − 5, and therefore none of H's proper subgraphs is in H(G, I, u).As a result, if H satisfies both (H.1) and (H.2), it certainly satisfies (H.3), and therefore we can stop and output H(G, I, u) = {H}.Otherwise, we find the vertices u l and u r in V (G − H) ∩ S such that r(u l ) and l(u r ) are in V (H), respectively.If none of u l and u r exists, we stop and output H(G, I, u) = ∅.Otherwise, let H l (resp., H r ) be the graph obtained from H by adding u l (resp., u r ), if it exists, and its corresponding leaf-neighbors and incident edges in G.If u l (resp., u r ) does not exist, we simply set As before, if either H l or H r satisfies (H.1) and (H.2), it immediately satisfies (H.3) because H / ∈ H(G, I, u), and therefore we can add it to H(G, I, u).If either H l or H r (or both) is in H(G, I, u), we stop and output H(G, I, u).Otherwise, we update H by adding to it both u l and u r and their corresponding leaf-neighbors and incident edges, and repeat the above process.We stop the process when either H(G, I, u) is output or one of |V (H) ∩ S|, |V (H l ) ∩ S|, and |V (H r ) ∩ S| is larger than 2k − 1.Our algorithm requires verifying (H.1) and (H. We now show the only-if direction.From the construction of H(G, I, u) in Lemma 4, we can assume w.l.o.g that H(G, I, u) has exactly two members H l and H r , each of which satisfies (H.1)-(H.3).(For example, see Fig. 1(a).)By definition, H l is not a subgraph of H r and vice versa.Moreover, H l (resp., H r ) is obtained from a subgraph H of G by adding the vertex u l (resp., u r ) and its leaf-neighbors, where As before, note that P H l and Q H l (P H r and Q H r ) cannot be both in either P l (G, I, u) or P r (G, I, u).
-Case 1: None of (resp., H r ) contains l(u) (resp., r(u)) and their leaf-neighbors, and therefore by (H.1), we have It remains to show the if direction.Since k = 3 and |L G (u) \ I| = 2, there is a unique 3-path P = xuy in P c (G, I, u), where x, y ∈ L G (u) \ I.As a result, ∈ H(G, I, u).Let us consider the graph H l (resp., H r ) obtained from H by adding l(u) (resp., r(u)), its leaf-neighbors, and the corresponding incident edges.(Recall that we assumed |N G (u) ∩ S| = 2, which means H l and H r are distinct.)One can verify that H l satisfies (H.1)-(H.3):(H-1) and (H-3) are trivial; for (H.2), take the 3-paths P = xuy and Q = xul(u).(Recall that we assumed L G [l(u)] ∩ I = ∅.)Similarly, so does H r .Therefore, the construction in Lemma 4 will output H(G, I, u) = {H l , H r }.
Let I be a k-PVC (k ≥ 3) of a caterpillar G = (S ∪ L, E).We now characterize if a token on u ∈ I ∩ S is (G, I)-rigid.The following simple observation will be used implicitly in several arguments: if the token t on u ∈ I is (G, I)-rigid, then it is also (G, J)-rigid for every k-PVC J that is reachable from I via a TS-sequence.Lemma 6.Let I be a k-PVC (k ≥ 3) of a n-vertex caterpillar G = (S ∪ L, E), and let u ∈ I ∩ S.Then, the token t on u is (G, I)-rigid if and only if one of the following conditions holds: , there is no TS-sequence in G − u that slides either t v or one of the tokens placed on some vertices in L G (v) (if exist) to some vertex in V (H).
Proof.It is not hard to verify the if direction.(At first glance the case H(G, I, u) = ∅ and A(G, I, u) = ∅ may be a bit tricky.In this case, we have I ⊆ L G [u], i.e., all tokens are either on u or one of its leaf-neighbors, and because H(G, I, u) = ∅ the token on u is immediately (G, I)-rigid.)We prove the only-if direction by contraposition, i.e., we claim that if none of (a) and (b) hold, there is a TS-sequence S in G that slides t from u to some vertex in N G (u).More precisely, our new assumptions are as follows. ( ] do not satisfy (H.2), it follows that both l(u) and r(u) are in I, and therefore we can slide t to one of P 's endpoints.If P(G, I, u) = P l (G, I, u), every k-path Q not in P l (G, I, u) satisfies (V (Q) \ {u}) ∩ I = ∅.Additionally, from the definition of P(G, I, u), we must have l(u) / ∈ I.Then, we can move t from u to l(u) immediately.One can argue similarly for the case P(G, I, u) = P r (G, I, u).It remains to consider the second sub-case: some member of H satisfies (H.2).For each H ∈ H satisfying (H.2), it cannot satisfy (H.1).Since H does not satisfy (H.1), there exists a vertex v H ∈ V (H) ∩ S such that v H = u and L G [v H ] ∩ I = ∅.(Recall that for every H ∈ H, we always have L G [u] ⊆ V (H).)For each such v H , if it is not in I, we immediately slide a token from some vertex in L G (v H ) ∩ I to v H , otherwise we do nothing.Since any k-path covered by a leaf is also covered by its unique neighbor in G, these token-slides always result new k-PVCs.In this way, via a TS-sequence, we finally obtain a new k-PVC J. From the construction of J, for every Note that for each H ∈ H not satisfying (H.2) with I, it also does not satisfy (H.2) with J. Now, suppose to the contrary that there exist two k-paths P H and Q H of a graph H ∈ H satisfying (H.2) with J. Since H satisfies (H.2), it does not satisfy (H.1), which implies that there exists a vertex w ∈ V (H) ∩ S such that w = u and L G [w] ∩ J = ∅.From the construction of J, we have w ∈ J. From the definition of H, we have w ∈ (V (P H ) ∪ V (Q H )) \ {u}, which contradicts the assumption that P H , Q H satisfy (H.2).As a result, we are back to the first sub-case.
-Case 2: (1.2) and (2.1) hold.Since t v is (G − u, I ∩ V (G − u))-movable, there is a TS-sequence S = I 0 , . . ., I p in G − u that slides t v to one of its neighbors w ∈ N G (v) \ {u}.Moreover, for any k-PVC I of G − u, the set I ∪ {u} forms a k-PVC of G.It follows that S = I 0 ∪ {u}, . . ., I p ∪ {u} is a TS-sequence in G that slides t v to w.Moreover, after moving t v , the only neighbor of u having no token is v, which means once t v is placed on w, we can immediately slide t from u to v. -Case 3: (1.1) and (2.2) hold.Since (b.2)-(b.4)do not hold, it follows that for each H ∈ H(G, I, u), there exists a (G − u, I ∩ V (G − u))-movable token t v on some vertex v ∈ A(G, I, u) such that some TS-sequence S in G − u slides either t v or one of the tokens placed on some vertices in L G (v) (if exist) to some vertex w ∈ V (H).For any k-PVC I of G − u, I ∪ {u} forms a k-PVC of G. Thus, by adding u to each member of S , we obtain a TS-sequence in G that slides either t v or one of the tokens placed on some vertices in Additionally, Lemma 5 implies that when k ≥ 4, H(G, I, u) has at most one member.The following lemma says that Lemma 6(b.4) can be verified efficiently when k ≥ 4. Lemma 7. Let I be a k-PVC (k ≥ 4) of a n-vertex caterpillar G = (S ∪ L, E), and let u ∈ I ∩ S. Suppose that H(G, I, u) = ∅, and there exists a (G − u, I ∩ V (G − u))-movable token t v on some v ∈ A(G, I, u).Let H be the unique member in H(G, I, u).Then, for each v ∈ A(G, I, u) such that the token there is a TS-sequence in G − u that moves either t v or one of the tokens on some vertex in L G (v) (if exist) to some vertex in V (H).
Proof.By definition, (P uv \ {u, v}) ∩ I = ∅.Thus, if v ∈ L, t v can be immediately slid to v's unique neighbor in S (which is also in V (P uv ) \ {u, v}).Then, we can assume w.l.o.g that for every v ∈ A(G, I, u) such that the token , the token t v can only be slid to its unique neighbor in P uv ; otherwise, since no token can "jump" to some vertex in V (P uv ) \ {u, v} or one of its leafneighbors before t v moves, some uncovered k-path exists.Once t v is moved, we are indeed considering the case dist G (u, v) = k − 1.As a result, we can assume w.l.o.
Additionally, we now characterize the position of t v in T 1 (r).
Claim 1.We always have v = v 1 .Additionally, if there is a TS-sequence S in G v that slides t v to some v ∈ L G (v), S must slide a token from some vertex in Then, from the definition of H and v, for every x ∈ V (P uv1 )\{u, v 1 }, we have L G [x]∩I = ∅.(Recall that we assumed w.l.o.g that v ∈ S, that is, if v ∈ L, we moved t v to v's unique neighbor in S and regarded that vertex as v.) Let a ∈ V (H) and b ∈ V (H v ) be such that ab ∈ E(G v ).Then, a, b ∈ V (P uv1 ).Note that by definition of T 1 (r), Algorithm 1 starts from either b (if it is a leaf in H v ) or one of its leaf-neighbors and "moves toward r" along the spine S until finding v 1 such that T 1 (r) contains a k-path while T 1 (r) − v 1 does not, which implies that dist Finally, we obtain k = 4.It follows that dist G (u, v 1 ) = 3 and therefore P uv1 = uabv 1 .By definition of H, every leaf of a must not be in I.By definition of T 1 (r) and the assumption v = v 1 , every leaf of b must not be in I, otherwise a leaf of b in I also satisfies the definition of v, which contradicts our assumption that any such vertex must be in S.However, a, b and their "empty" leaf-neighbors form at least one uncovered P 4 , which contradicts the fact that I is a 4-PVC.Therefore, v = v 1 .
Let S be a TS-sequence in G v that slides t v to some v ∈ L G (v). Suppose to the contrary that S does not slide any token to v 1 .We show that immediately sliding t v from v to v results some uncovered k-path.As before, we have dist G (u, v 1 ) ≥ 2k − 5. Obviously, if k ≥ 5, we have dist G (u, v 1 ) ≥ 2k − 5 ≥ k, and sliding t v from v to v results an uncovered k-path P v1u , where u is the unique neighbor of u in P uv1 .Now, if k = 4, one can readily verify that in both cases dist G (u, v 1 ) = 3 and dist G (u, v 1 ) ≥ 4, sliding t v from v to v results in some uncovered 4-path.
Observe that if |V (T i (r)) ∩ I| = 1 for every i ∈ {1, . . ., p}, the set I ∩ V (H v ) is indeed a minimum k-PVC of H v , and therefore we answer "no" in this case.Thus, it remains to consider the case when there exists some index i ∈ {1, . . ., p} such that |V (T i (r)) ∩ I| ≥ 2. For convenience, we also use i to denote the smallest member among such indices.In this case, we claim that the answer is always "yes", that is, there exists a TS-sequence in G v that slides either t v or one of the tokens on some vertex in L G (v) (if exist) to some vertex in V (H).(See Claims 2 and 3.) Claim 1 implies that one can always slide t v from v to some vertex in V (H) if there exists a TS-sequence in G v that slides t v to some v ∈ L G (v). (Slide a token to v 1 first, and then slide t v .)As a result, we can now assume w.l.o.g that for every (G − u, I ∩ V (G − u))-movable token t v , any TS-sequence in G v that slides t v , if exists, must move it to either l(v) or r(v).
To simplify our proof, we further assume that r = s 1 , that is, we only care about what happens in the "left-hand side" of H.The case r = s can be argued similarly.Let w be the (unique) vertex in H where l(w) ∈ V (T 1 (s 1 )).We first consider the case i = 1.
Claim 2. When i = 1, one can slide either t v or one of the tokens placed on some vertices in L G (v) (if exist) to w.
Proof.If v 1 ∈ I, we can immediately slide t v , because v 1 covers all k-paths in T 1 (s 1 ) and v = v 1 .Thus, suppose that v 1 / ∈ I.As before, from the definition of H and v, for every x ∈ V (P uv )\{u, v}, we have L G [x]∩I = ∅.Now, if there exists a ∈ V (T 1 (s 1 ))∩I such that (V (P av1 )\{a, v 1 })∩I = ∅ and a = v, since T 1 (s 1 )−v 1 does not contain any k-path, we can directly slide the token on a to v 1 .Once a token is placed on v 1 , as before, we can slide t v to w.If such vertex a does not exist, we must have From our assumption, v ∈ {l(v), r(v)}.If v = r(v), we can then slide a token on some vertex in L G (v) (such a token exists because i = 1) to v 1 , and then slide t v , which is now on r(v), to w.If v = l(v), we can then slide t v , which is now on l(v), to v 1 , and then slide a token on some vertex in L G (v) to w.Our proof is complete.
It remains to consider the case i > 1.More precisely, we show that Proof.Recall that we assumed that any TS-sequence in G v that slides t v , if exists, must move it to either l(v) or r(v).Indeed, if there is a TS-sequence in G v that slides t v to r(v), we can perform such sequence to obtain a new k-PVC where we are certain that there exists a TS-sequence in G v that slides t v to l(v).Moreover, if there is a TS-sequence in G v that slides t v to l(v), we can perform such a sequence except the final step of sliding t v to l(v) to obtain a new k-PVC where we are certain that one can immediately slide t v to l(v).In other words, we can further assume w.l.o.g that one can always slide t v to l(v) immediately.
Recall that i is the smallest index such that T i (s 1 ) contains at least two tokens.As a result, for each index j such that 1 ≤ j < i, there is exactly one token placed on some vertex in T j (s 1 ), say v j .In particular, there must be no token placed on its unique neighbor in S; otherwise, it contradicts the definition of v i .We can thus assume w.l.o.g that v j ∈ S for 1 ≤ j ≤ i; otherwise, we can immediately slide the token on v j to its unique neighbor in S and continue working with the resulting k-PVC.
-When 1 < i < p.We first consider the case v i ∈ I.If v i = v i then we can slide the token on v i to the unique neighbor x of v i−1 in T i (s 1 ).This can be done because v i covers all k-paths in T i (s 1 ) and (V ( ∈ I, we can immediately slide the token on x to v i−1 .If v i−1 ∈ I, we simply slide the token on v i−1 to its right-neighbor r(v i−1 ) (recall that |V (T i−1 (s 1 )) ∩ I| = 1) and then slide the token on x to v i−1 .These TS-moves do not result in any uncovered k-path because k ≥ 4, v i ∈ I, and a token has already been placed on x.On the other hand, if v i = v i , we must have V (T i (s 1 )) ∩ I = L G [v i ] ∩ I, otherwise, it contradicts the definition of v i .We now show that one can slide the token on v i to either l(v i ) or r(v i ).Once the token on v i is moved, we can then move one or more tokens on leaf-neighbors of v i to some vertex in T i (s 1 ) other than v i or its leaf-neighbors, and we are back to the case v i = v i .Observe that r(v i ) / ∈ I.If l(v i ) ∈ I, we can immediately move the token on v i to r(v i ).Thus, it remains to consider the case l(v i ) / ∈ I. From the definition of v j (1 < j ≤ i) and the observation that Recall that we assumed t v can be slid to l(v) immediately.Then, it follows that the token on v 2 can indeed be slid to l(v 2 ) immediately.By repeatedly applying this argument, we finally obtain a TS-sequence that moves the token on v j to l(v j ), for 1 ≤ j ≤ i, that is, such a sequence finally moves the token on v i = v i to l(v i ), as we required.It remains to consider the case v i / ∈ I. Let x ∈ V (T i (s 1 )) ∩ I be such that (V (P xvi ) \ {x, v i }) ∩ I = ∅.If there is such a vertex x with x = v i , since T i (s 1 ) − v i does not contain any k-path, we can simply slide the token on x to v i along P xvi , and we are then back to the case v i ∈ I. Otherwise, it follows that all tokens in V (T i (s 1 )) ∩ I must be placed either on x = v i or one of its leaf-neighbors.Observe that l(x) / ∈ I. Since t v can only be slid to l(v), as before, we can indeed show that there is a TS-sequence that moves the token on v j to l(v j ), for 1 ≤ j ≤ i, that is, such a sequence finally moves the token on x = v i to l(x).At this point, we can slide a token from some leaf-neighbor of x to x itself, slide the token on l(x) to v i along P l(x)vi , and then we are back to the case v i ∈ I.
-When i = p.If v p ∈ I and v p = v p , as before, one can construct a TS-sequence that slides the token on v p to l(v p−1 ), then slides the token on v p−1 away, if it exists, and finally slide the token on l(v p−1 ) to v p−1 .If v p ∈ I and v p = v p , let x ∈ V (T p (s 1 )) ∩ I be such that (V (P xvp ) \ {x, v p }) ∩ I = ∅.Note that if v p = s j then x must be placed on some vertex in , we can simply slide the token on v p to l(v p ) as in the previous case (which can be done by immediately sliding the token on v to l(v) and so on) and then immediately slide the token on x to v p and then to r(v p ), and finally immediately slide the token on l(v p ) back to v p .(This can be done because k ≥ 4.) The current token on r(v p ) can now be slid to v p−1 as before.Now, if x / ∈ L G (v p ), since k ≥ 4 and T p (s 1 ) − v p contains no k-path, one can slide the token t x on x to l(v p ), then slide the token on v p to r(v p ), and finally slide t x , which is currently placed on l(v p ), to v p .Again, the token on r(v p ) can now be slid to v p−1 .
By repeatedly applying Claim 3 while i > 1 and finally applying Claim 2 when i = 1, one can indeed construct a TS-sequence in G v that slides either t v or one of the tokens on some vertex in L G (v) (if exist) to some vertex in V (H).We remind that only the existence of such a TS-sequence is required in deciding whether t v or a token in L G (v) (if exists) can be moved to V (H).As a result, one can indeed verify that deciding whether t v or a token in L G (v) (if exists) can be moved to V (H) can indeed be done in O(n) time.Our proof is complete.Remark 8. We remark that deciding whether Lemma 6(b.4) can be verified in polynomial time when k = 3 may require further insightful ideas.Unlike the case k ≥ 4, even when the set I ∩ V (H v ) is not minimum, it is possible that no tokens in V (H v ) can be moved to some vertex in V (H).Fig. 3 illustrates an example of this situation.In Fig. 3, intuitively, it seems that the reason no token can be slid to some vertex in V (H) is because H ∈ H(G, I, u) Hv the token on s 6 somehow "blocks" the movement of all other tokens on its "right-hand side".Characterizing such a token on s 6 in general may require verifying whether some tokens can be slid in H v − L G [s 6 ] to both s 6 's left-neighbor s 5 and right-neighbor s 7 in polynomial time.More interestingly, s 6 may not be the only vertex whose token having such "blocking property".
To conclude this section, we show that

Our Algorithm
In this section, we use (G, I, J) to denote an instance of k-PVCR under TS whose input contains a caterpillar G = (S ∪ L, E) and two k-PVCs I, J (k ≥ 4) of G. Algorithm 2 decides whether there is a TS-sequence between I and J in polynomial time.The running time of Algorithm 2 depends on the time of finding R(G, I) and R(G, J), which, as we showed before, is O(n 3 ).The rest of this section is devoted to proving its correctness.More precisely, Lemma 10 implies that Lines 1-4 are correct.Lemma 11 explains the correctness of Line 5. Lemma 12 implies the correctness of Lines 6-9.
Input: A caterpillar G = (S ∪ L, E) on n vertices and two k-PVCs (k ≥ 4) I, J of G. Output: Yes if there is a TS-sequence between I and J, and No otherwise.Proof.First of all, we define a total ordering ≺ on vertices of a caterpillar G = (S ∪ L, E) where S = s 1 s 2 . . .s is the spine of G.For two distinct vertices u, v ∈ V (G), u ≺ v if and only if one of the following conditions holds: . By definition, the ordering ≺ between two leaves attached to the same vertex in the spine S can be arbitrarily defined.By considering all pairs of vertices in G, one can construct an ordering ≺ between vertices in G in O(n 2 ) time.
Let's fix a total ordering ≺ on vertices of G as defined above.Suppose that I = {x 1 , x 2 , . . ., x s } and J = {y 1 , y 2 , . . ., y s } be two k-PVCs of G such that x 1 ≺ x 2 ≺ • • • ≺ x s and y 1 ≺ y 2 ≺ • • • ≺ y s .Our goal is to construct a TS between I and J that slides the token on x i to y i , for 1 ≤ i ≤ s.Claim 4. Let i ∈ {1, . . ., s} be such that x i = y i and x j = y j for every j ∈ {i + 1, . . ., s}.Moreover, suppose that x i ≺ y i .Then, one can construct in polynomial time a TS-sequence S i in G starting from I that slides the token t i on x i to y i .
Proof.From our assumption, note that y i / ∈ I.If i = 1, the claim is trivial: simply sliding the token on v i to w i along P viwi is enough.If x i ∈ L G (y i ), since every k-path covered by x i is also covered by y i , one can immediately slide the token on x i to y i .Thus, we can assume w.l.o.g that 2 ≤ i ≤ s and x i / ∈ L G (y i ).We now claim that there must be an index i ∈ {1, . . ., i} such that either x i ∈ L or the token on x i can be immediately moved to r(x i ).Since k ≥ 4 and R(G, I) = ∅, there is no token t x on x ∈ I ∩ S such Algorithm 3 describes how to construct a TS-sequence S i that slides the token t i on x i to y i .Intuitively, to do this, in Algorithm 3, we repeatedly find the largest index i such that either x i ∈ L or the token on x i can be immediately moved to r(x i ).If the token on x i can be immediately moved to r(x i ), we perform that token-slide.If x i ∈ L, we move the token on x i to its unique neighbor y in S as follows.If no token is placed on y, we can immediately slide the token on x i to y.Otherwise, for i < j ≤ s and x j ∈ S, the token on x j cannot be immediately slid to r(x j ).Note that from definition of ≺, we must have x i +1 = y.Since R(G, I) = ∅, it follows that there exists j ∈ {i + 1, . . ., s} such that x j ∈ S and the token on x j can be immediately slid to l(x j ), and let j be the smallest index among such j.Now, for j from j downto i +1, if x j ∈ S, we immediately slide the token on x j to l(x j ), which can be done because the distance between any two consecutive tokens in S is always at most k ≥ 4. Finally, we can now immediately slide the token on x i to y.Note that, if the token on x i can be immediately moved to its right-neighbor, i = i.Then, the correctness of Algorithm 3 follows.
Note that, if i < i, after O(dist G (v i , v i +1 )) next iterations of the while loop in Algorithm 3, the value of i increases by at least 1.On the other hand, if i = i, the value of i in the next iterations may be decreased, but will finally increase again because tokens are, in some sense, moved to the "right-hand side" and never moved "more than one-step" back.It follows that Algorithm 3 stops after O(n) iterations, and therefore runs in polynomial time.
Using the above claim, one can construct a TS-sequence S between I = {x 1 , . . ., x s } and J = {y 1 , . . ., y s } as follows.Initially, S I = S J = ∅.For each i from s downto 1, if x i ≺ y i (resp., y i ≺ x i ), construct a TS-sequence S I i (resp., S J i ) that slides the token on x i to y i , then assign S I (resp., S J ) to S I ⊕ S I i (resp., S J ⊕ S J i ) and I (resp., J) to the resulting k-PVC I obtained by performing S I i (resp., S J i ).Intuitively, in each iteration, we move either a token in I from x i to y i or a token in J from y i to x i , depending on whether x i ≺ y i or y i ≺ x i .Finally, our desired TS-sequence S = S I ⊕ rev(S J ).Since each iteration can be performed in polynomial time (by the above claim), our algorithm runs in polynomial time.

Conclusion
In this paper, we have shown that k-PVCR for caterpillars under TS can be solved in polynomial time when k ≥ 4. Our main contribution is the characterization of "a region surrounding a token" which, under certain conditions, makes the token rigid.Unfortunately, it remains unknown whether one can find all rigid tokens in polynomial time when k = 3, and therefore this case remains open.We believe that this will also be useful for tackling the open question for trees.

Lemma 1 .
Let I be a k-PVC (k ≥ 3) of a n-vertex caterpillar G = (S ∪ L, E), and let u ∈ I.
(a) If N G (u) = ∅, the token t on u is always (G, I)-rigid.(b) If u ∈ L, the token t on u is (G, I)-rigid if and only if its unique neighbor v satisfies v ∈ I and the token t (a), H(G, I, u) = ∅ and in Fig. 1(b), for each subgraph H of G, either (H.1) or (H.2) does not hold, and therefore H(G, I, u) = ∅, where u = s 3 .
2) for at most seven subgraphs of G containing L G [u] (e.g., see Fig.2for k = 3), and therefore runs in O(n) time.In total, finding H(G, I, u) takes O(n) time.
) Either (1.1) N G (u) I or (1.2) N G (u) ⊆ I and there is v ∈ N G (u) such that the token t v on v is (G − u, I ∩ V (G − u))-movable; and (2) Either (2.1) H(G, I, u) = ∅ or (2.2) H(G, I, u) = ∅ and none of (b.1)-(b.4)hold.-Case 1: (1.1) and (2.1) hold.If P(G, I, u) = ∅, it follows that for any k-path P having either u or one of its leaf-neighbors as an endpoint, there exists a vertex v ∈ (V (P ) \ {u}) ∩ I.If exactly one of l(u) and r(u) is not in I, we can immediately slide t to it.Otherwise, since N G (u) I, there must be a vertex u ∈ L G (u)\I, and we can slide t to u immediately.Next, suppose that P(G, I, u) = ∅.Let H be the set of seven candidates for being members of H(G, I, u) considered in the proof of Lemma 4. Note that G[L G [u]] always satisfies (H.1).Since H(G, I, u) = ∅, for each member of H, either (H.1) or (H.2) does not hold.First, we consider the following sub-case: none of the graphs in H satisfies (H.2).Then, it follows that P(G, I, u) must be either P l (G, I, u), P r (G, I, u), or P c (G, I, u), otherwise, at least two of these sets must be non-empty and therefore (H.2) is satisfied.If P(G, I, u) = P c (G, I, u), we must have k = 3 and P(G, I, u) contains a single 3-path P whose endpoints are in L G (u)\I, otherwise G[L G [u]] satisfies (H.2), and therefore G

Fig. 3 .
Fig. 3. Illustration for Remark 8.Here I is a 3-PVC whose tokens are marked with black colors, u = s1, and v = s4.The concepts and notations follow Lemma 7. The token on v can be slid immediately to s3.

Lemma 9 .
Let I be a k-PVC (k ≥ 4) of a caterpillar G = (S ∪ L, E).One can find the set R(G, I) of all (G, I)-rigid tokens in O(n 3 ) time, where n = |V (G)|.

8 return
No; 9 return Yes; The following observations are straightforward.Lemma 10.Let (G, I, J) be an instance of k-PVCR (k ≥ 3) for caterpillars.If either |I| = |J| or R(G, I) = R(G, J), there is no TS-sequence between I and J. Lemma 11.Let (G, I, J) be an instance of k-PVCR (k ≥ 3) for caterpillars.Suppose that |I| = |J| and R(G, I) = R(G, J).Then, (G, I, J) is a yes-instance if and only if (G , I ∩ V (G ), J ∩ V (G )) is a yes-instance, where G is the graph obtained from G by removing every vertex in R(G, I) = R(G, J).Lemma 12. Let I, J be two k-PVCs (k ≥ 4) of a n-vertex caterpillar G = (S ∪ L, E) with |I| = |J| = s and R(G, I) = R(G, J) = ∅.Then, one can construct a TS-sequence between I and J in polynomial time.
One can verify that P H r and Q H l are in H and they both satisfy (H.2).Moreover, since H l and H r satisfy (H.1), so does H.As a result, H satisfies both (H.1) and (H.2), and |V (H) ∩ S| < |V (H l ) ∩ S| = |V (H r ) ∩ S|.This contradicts (H.3), therefore this case cannot happen.-Case 2: One of P H l , Q H l , P H r , Q H r is in P c (G, I, u).W.l.o.g, assume that P H l ∈ P From the construction of H(G, I, u) in Lemma 4, it follows that H(G, I, u) = {H }, which contradicts our assumption that |H(G, I, u)| = 2. Therefore, |L G (u) \ I| = 2. Since k = 3 and |L G (u) \ I| = 2, H does not satisfy (H.2), and therefore H / ∈ H(G, I, u).The construction of H(G, I, u) in Lemma 4 implies that H l c (G, I, u).By definition of P c (G, I, u), the vertices of P H l are in L G [u], which implies k = 3.Additionally, since P H l satisfies (H.2), none of its endpoints is u and therefore they are both not in I.Then, |L G (u) \ I| ≥ 2. Additionally, if |L G (u) \ I| ≥ 3, there must be a 3-path Q = P H l in P c (G, I, u).One can verify that the graph H = G[L G[u]] satisfies (H.1)-(H.3):H obviously satisfies (H.1) and (H.3); for (H.2), take the 3-paths P H l and Q.
exist) to w.By definition, A(G, I, u) ∩ L G (u) = ∅.Let P H and Q H be two k-paths in H satisfying (H.2).Since (b.1) does not hold, it follows that at least one of P H and Q H , say P H , must be in either P l (G, I, u) or P r (G, I, u).As a result, we can assume w.l.o.g that w ∈ V (P H ) ⊆ V (H).(Otherwise, |V (H) ∩ S| is not minimum, which contradicts H ∈ H(G, I, u).)Then, once a token is placed on w, we can immediately move t from u to one of its neighbors in V (Q H ).-Case 4: (1.2) and (2.2) hold.Observe that the condition N G (u) ⊆ I implies H(G, I, u) = ∅: for any subgraph H of G containing u, (H.1) does not hold.Therefore, this case cannot happen.
[7]of.Using Lemmas 1 and 6, one can naturally design a recursive algorithm to decide whether a token t on some vertex u ∈ I is (G, I)-rigid, where I is a k-PVC (k ≥ 4) of a caterpillar G = (S ∪ L, E).Such an algorithm should be called at most O(n) time (at most once for each token), and each call requires O(n) time for (possibly) checking if H(G, I, u) exists (Lemma 4) and O(n) time for (possibly) checking if a k-PVC is minimum (Algorithm 1 gives the minimum size in O(n) time[7]).Additionally, Lemma 7 makes sure that the condition (b.4) of Lemma 6 can indeed be verified in O(n) time when k ≥ 4. In total, it takes O(n 2 ) time to verify if the token on a vertex u ∈ I is (G, I)-rigid, and therefore it takes O(n 3 ) time to find R(G, I).