Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Parameterized Shortest Path Reconfiguration

Nicolas Bousquet111Univ. Lyon, LIRIS, CNRS, Université Claude Bernard Lyon 1, Villeurbanne, France. E-mail: nicolas.bousquet@cnrs.fr.    Kshitij Gajjar222International Institute of Information Technology Hyderabad (IIIT-H), Hyderabad, India. E-mail: kshitij@iiit.ac.in.    Abhiruk Lahiri333Department of Computer Science, Heinrich Heine University, Düsseldorf, Germany. E-mail: abhiruk@hhu.de.    Amer E. Mouawad444Department of Computer Science, American University of Beirut, Beirut, Lebanon. E-mail: aa368@aub.edu.lb.
Abstract

An st𝑠𝑡stitalic_s italic_t-shortest path, or st𝑠𝑡stitalic_s italic_t-path for short, in a graph G𝐺Gitalic_G is a shortest (induced) path from s𝑠sitalic_s to t𝑡titalic_t in G𝐺Gitalic_G. Two st𝑠𝑡stitalic_s italic_t-paths are said to be adjacent if they differ on exactly one vertex. A reconfiguration sequence between two st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q is a sequence of adjacent st𝑠𝑡stitalic_s italic_t-paths starting from P𝑃Pitalic_P and ending at Q𝑄Qitalic_Q. Deciding whether there exists a reconfiguration sequence between two given st𝑠𝑡stitalic_s italic_t-paths is known to be PSPACE-complete, even on restricted classes of graphs such as graphs of bounded bandwidth (hence pathwidth). On the positive side, and rather surprisingly, the problem is polynomial-time solvable on planar graphs. In this paper, we study the parameterized complexity of the Shortest Path Reconfiguration (SPR) problem. We show that SPR is W[1]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ, even when restricted to graphs of bounded (constant) degeneracy; here k𝑘kitalic_k denotes the number of edges on an st𝑠𝑡stitalic_s italic_t-path, and \ellroman_ℓ denotes the length of a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q. We complement our hardness result by establishing the fixed-parameter tractability of SPR parameterized by \ellroman_ℓ and restricted to nowhere-dense classes of graphs. Additionally, we establish fixed-parameter tractability of SPR when parameterized by the treedepth, by the cluster-deletion number, or by the modular-width of the input graph.

1 Introduction

Many algorithmic questions can be posed as follows: given the description of a system state and the description of a state we would “prefer” the system to be in, is it possible to transform the system from its current state into a more desired one without “breaking” the system in the process? And if yes, how many steps are needed? Such problems naturally arise in the fields of mathematical puzzles, operational research, computational geometry [17], bioinformatics, and quantum computing [12]. These questions received a substantial amount of attention under the so-called combinatorial reconfiguration framework in the last decade. We refer the reader to the surveys by van den Heuvel [22], Nishimura [20], and Bousquet et al. [7] for more background on combinatorial reconfiguration.

Shortest path reconfiguration.

In this work, we focus on the reconfiguration of st𝑠𝑡stitalic_s italic_t-shortest paths (or st𝑠𝑡stitalic_s italic_t-paths for short) in undirected, unweighted, simple graphs. It is well-known that one can easily find an st𝑠𝑡stitalic_s italic_t-path in a graph in polynomial time. In order to define the reconfiguration variant of the problem, we first require a notion of adjacency between st𝑠𝑡stitalic_s italic_t-paths.

As is common in the combinatorial reconfiguration framework, we focus on two models; the token-jumping model (TJ) and the token-sliding model (TS). We say that two st𝑠𝑡stitalic_s italic_t-paths are TJ-adjacent if they differ on exactly one vertex, i.e., all the vertices are the same except at a unique position p𝑝pitalic_p. We say that two st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q are TS-adjacent if they are TJ-adjacent and the p𝑝pitalic_pth vertex of P𝑃Pitalic_P and the p𝑝pitalic_pth vertex of Q𝑄Qitalic_Q are adjacent. A reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q (if it exists) is a sequence of adjacent shortest paths starting at P𝑃Pitalic_P and ending at Q𝑄Qitalic_Q. In the Shortest Path Reconfiguration (SPR) problem, we are given a graph G𝐺Gitalic_G, two vertices s𝑠sitalic_s and t𝑡titalic_t, two st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q of length k𝑘kitalic_k each, and the goal is to decide whether a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q exists. In the Shortest Shortest Path Reconfiguration (SSPR) problem, we are additionally given an integer \ellroman_ℓ which is an upper bound on the length of the desired reconfiguration sequence. Reconfiguration of shortest paths has many applications, e.g., in network design and operational research (we refer the interested reader to [11] for a detailed discussion around these applications).

Many reconfiguration problems, SPR and SSPR included, naturally lie in the class PSPACE. Since there are no simple polynomial-time checkable certificates (as reconfiguration sequences are possibly of exponential length), they are generally not in NP. A decade ago, Bonsma [4] proved that SPR is PSPACE-complete. In fact, the problem remains PSPACE-complete even when restricted to bipartite graphs [4], line graphs [11], and graphs of bounded bandwidth/pathwidth/treewidth [23]. Several groups studied the complexity of the problem in other restricted graph classes such as grid graphs [1], claw-free graphs, chordal graphs [4], and circle graphs [11]. The most notable result has been obtained by Bonsma who showed that Shortest Path Reconfiguration can be decided in polynomial time for planar graphs [5]. This result is rather surprising in the reconfiguration setting since most reconfiguration problems are known to be PSPACE-complete on planar graphs, see e.g. [15, 16, 6].

Our results.

Our focus is on the parameterized complexity of shortest path reconfiguration problems; which, to the best of our knowledge, has not been studied so far. Other reconfiguration problems have been widely studied from a parameterized perspective in the last decade, see, e.g., [7] for a survey. A problem is fixed-parameter tractable, FPT for short, on a class 𝒞𝒞\mathcal{C}caligraphic_C of graphs with respect to a parameter κ𝜅\kappaitalic_κ, if there is an algorithm deciding whether a given input instance with graph G𝒞𝐺𝒞G\in\mathcal{C}italic_G ∈ caligraphic_C admits a solution in time f(κ)|V(G)|c𝑓𝜅superscript𝑉𝐺𝑐f(\kappa)\cdot|V(G)|^{c}italic_f ( italic_κ ) ⋅ | italic_V ( italic_G ) | start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT, for a computable function f𝑓fitalic_f and constant c𝑐citalic_c. A kernelization algorithm is a polynomial-time algorithm that reduces an input instance to an equivalent instance of size bounded in the parameter only (independent of the input size), known as a kernel; we will say that two instances are equivalent if they are both yes-instances or both no-instances. Every fixed-parameter tractable problem admits a kernel, however, possibly of exponential or worse size. For efficient algorithms, it is therefore most desirable to obtain polynomial, or even linear, kernels. The W-hierarchy is a collection of parameterized complexity classes FPTW[1]W[2]W[t]FPTW[1]W[2]W[t]\textsf{FPT}\subseteq\textsf{W[1]}\subseteq\textsf{W[2]}\subseteq\cdots% \subseteq\textsf{W[t]}FPT ⊆ W[1] ⊆ W[2] ⊆ ⋯ ⊆ W[t], for t𝑡t\in\mathbb{N}italic_t ∈ blackboard_N. The conjecture FPTW[1]FPTW[1]\textsf{FPT}\subsetneq\textsf{W[1]}FPT ⊊ W[1] can be seen as the analogue of the conjecture that PNPPNP\textsf{P}\subsetneq\textsf{NP}P ⊊ NP. Before stating our results precisely, let us formally define the problems we are interested in:

Shortest Path Reconfiguration (SPR)
Input: A graph G𝐺Gitalic_G, two vertices s,t𝑠𝑡s,titalic_s , italic_t, and two st𝑠𝑡stitalic_s italic_t-shortest paths P,Q𝑃𝑄P,Qitalic_P , italic_Q (each of length k𝑘kitalic_k).
Question: Is there a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q?

Shortest Shortest Path Reconfiguration (SSPR)
Input: A graph G𝐺Gitalic_G, two vertices s,t𝑠𝑡s,titalic_s , italic_t, two st𝑠𝑡stitalic_s italic_t-shortest paths P,Q𝑃𝑄P,Qitalic_P , italic_Q (each of length k𝑘kitalic_k), and an integer \ellroman_ℓ.
Question: Is there a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length at most \ellroman_ℓ?

In parameterized complexity, one is usually interested in two types of parameters; parameters related to the size of the solution or parameters related to the structure of the input graph. For shortest path reconfiguration, there are two parameters related to the size of the solution which are the length \ellroman_ℓ of a reconfiguration sequence, and the length k𝑘kitalic_k of the shortest st𝑠𝑡stitalic_s italic_t-paths (number of edges on the shortest st𝑠𝑡stitalic_s italic_t-paths) in G𝐺Gitalic_G. Our first results will focus on these parameters. We will then discuss some parameters related to the graph structure such as treedepth and modular width. Our first result is a hardness result. We prove that the following holds (in both the token jumping and the token sliding model):

Theorem 1.

SPR is \W[1]\Wdelimited-[]1\W[1][ 1 ]-hard parameterized by k𝑘kitalic_k, and SSPR is \W[1]\Wdelimited-[]1\W[1][ 1 ]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ.

We will prove Theorem 1 in Section 2. The idea of the proof is a reduction from the Multicolored Clique problem. Let (Vi)iksubscriptsubscript𝑉𝑖𝑖𝑘(V_{i})_{i\leq k}( italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) start_POSTSUBSCRIPT italic_i ≤ italic_k end_POSTSUBSCRIPT be the vertices of an instance of the Multicolored Clique problem. Intuitively (the real proof being more technical), we will construct a graph where the length of the st𝑠𝑡stitalic_s italic_t-paths will be in 𝒪(k2)𝒪superscript𝑘2\mathcal{O}(k^{2})caligraphic_O ( italic_k start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ), each integer representing a vertex of the set Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. The goal would be to transform a path P𝑃Pitalic_P into a path Q𝑄Qitalic_Q, forcing us to select a vertex in each set. For every pair i,j𝑖𝑗i,jitalic_i , italic_j, there exists an integer r𝑟ritalic_r such that the r𝑟ritalic_rth vertex corresponds to a vertex in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and the (r+1)𝑟1(r+1)( italic_r + 1 )th vertex corresponds to a vertex in Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. The key argument of the proof consists in finding a mechanism to ensure that the vertex selected in each copy of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the same, which permits us to conclude that the subset of selected vertices is a multicolored clique of the desired size.

One can then naturally wonder if this hardness result can be pushed further. The answer is yes, and in fact, we prove that the problems are hard (in both the token jumping and the token sliding model) even restricted to a very simple class of graphs:

Theorem 2.

SPR is \W[1]\Wdelimited-[]1\W[1][ 1 ]-hard parameterized by k𝑘kitalic_k, and SSPR is \W[1]\Wdelimited-[]1\W[1][ 1 ]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ, even when the inputs are restricted to graphs of constant degeneracy.

In order to prove Theorem 2, we adapt the proof of Theorem 1 to appropriately reduce the degeneracy of the graph. We then complement these negative results with the following positive ones.

Theorem 3.

SSPR is \FPT\FPT\FPT parameterized by \ellroman_ℓ on nowhere-dense classes of graphs (in both the token jumping and the token sliding model).

The idea of the proof of Theorem 3 consists in proving that if k𝑘kitalic_k is too large compared to \ellroman_ℓ then there are many positions along the shortest paths that are already occupied by tokens that never have to move. Using this fact, we then contract parts of the paths in order to get st𝑠𝑡stitalic_s italic_t-paths of length 𝒪(f())𝒪𝑓\mathcal{O}(f(\ell))caligraphic_O ( italic_f ( roman_ℓ ) ), for some computable function f𝑓fitalic_f. Now, since k𝑘kitalic_k is bounded by some function of \ellroman_ℓ, one can prove that the existence of a reconfiguration sequence of length \ellroman_ℓ can be verified via model checking a first-order formula ϕitalic-ϕ\phiitalic_ϕ whose size depends only on \ellroman_ℓ. Combining this observation with the black-box result of [13] that ensures that the model checking problem can be decided in time 𝒪(f(|ϕ|)|V(G)|)𝒪𝑓italic-ϕ𝑉𝐺\mathcal{O}(f(|\phi|)\cdot|V(G)|)caligraphic_O ( italic_f ( | italic_ϕ | ) ⋅ | italic_V ( italic_G ) | ) on nowhere-dense graphs, we get the desired result.

We proceed by considering some of the most commonly studied structural graph parameters. In particular, we prove the following:

Theorem 4.

SPR and SSPR (in both the token jumping and the token sliding model) are \FPT\FPT\FPT when parameterized by either the treedepth, the cluster deletion number, or the modular width of the input graph.

To motivate the study of these parameters, we refer the reader to Figure 1 (formal definitions provided later). Recall that SPR is PSPACE-complete even when restricted to graphs of bounded bandwidth, pathwidth, treewidth, and cliquewidth [23]. This implies para-PSPACE-hardness on the aforementioned classes. Hence, our Theorem 4 almost completes the picture for structural parameterizations of the problems, leaving open the case of feedback vertex set number.

Refer to caption
Figure 1: The graph parameters studied in this paper. A connection between two parameters indicates the existence of a function in the one above that lower-bounds the one below.
Further discussions and open problems.

As we later show, it turns out that when solving the SPR problem parameterized by the feedback vertex set number of the graph, one can assume that k𝑘kitalic_k, the length of st𝑠𝑡stitalic_s italic_t-paths, is bounded linearly in the parameter. Hence, the following remains an interesting open question:

Problem 1.

Is SPR fixed-parameter tractable when parameterized by feedback vertex set number?

When the feedback vertex set number is bounded, the graph can be seen as a disjoint union of trees plus a bounded number of additional vertices. One can easily remark that if vertices of the feedback vertex set are far apart in the st𝑠𝑡stitalic_s italic_t-paths then the structure is very rigid and very few tokens can move in the graph. However, when vertices of the feedback vertex set are close to one another (along the st𝑠𝑡stitalic_s italic_t-paths), there might exist some arbitrarily long paths between two layers in the layered partition of the graph. Here, the layered partition refers to the partitioning of the vertex set based on distance either from s𝑠sitalic_s or from t𝑡titalic_t. Tokens along these (layer) paths that do not belong to the feedback vertex set are not restricted and can traverse their corresponding layer path in both directions an unbounded number of times. In particular, it implies that, if there exists a reconfiguration sequence, that sequence might be arbitrarily long. So in order to design a reconfiguration sequence (from a kernelization perspective at least, which is known to be equivalent to fixed-parameter tractability), we have to find a way to reduce these long structures into structures of bounded length (see Figure 2 for an example of such an instance). We were not able to solve this very special case of the problem.

Refer to caption
Figure 2: Example of a hard instance. Only edges of starting and ending paths are shown. Rectangles represent vertices of the feedback vertex set who neighborhood into the adjacent paths can be arbitrary.

As far as we know, it also remains an open question whether SPR is in P or is NP-complete on graphs of constant feedback vertex set number. Note that an XP algorithm follows immediately from the fact that (after appropriately discarding parts of the input) the number of st𝑠𝑡stitalic_s italic_t-paths is roughly |V(G)|fsuperscript𝑉𝐺𝑓|V(G)|^{f}| italic_V ( italic_G ) | start_POSTSUPERSCRIPT italic_f end_POSTSUPERSCRIPT, where f𝑓fitalic_f denotes the feedback vertex set number. Regardless, in case of a positive answer to Problem 1, the next natural question is the following:

Problem 2.

Is SPR fixed-parameter tractable when parameterized by k𝑘kitalic_k on graphs of bounded pathwidth? What about bounded treewidth? How about parameterization by k𝑘kitalic_k plus the treewidth?

It is an easy exercise to remark that SPR is PSPACE-complete on graphs of bounded bandwidth, pathwidth, and treewidth using a reduction from H𝐻Hitalic_H-Word Reconfiguration [23]. When the treewidth is 1111, there exists a unique minimum st𝑠𝑡stitalic_s italic_t-path and the problem is simple. Trees and forests are graphs which are 1111-degenerate and every 1111-degenerate graph is a forest, however, the complexity of both SPR and SSPR remains open for 2222-degenerate graphs.

Problem 3.

What is the complexity of SPR and SSPR on 2222-degenerate graphs? How about 3333-degenerate and 4444-degenerate graphs?

Related work.

Reconfiguration of paths and other subgraphs has been considered before. In the example of paths, Demaine et al. proved in [9] that the problem of reconfiguring (arbitrary) paths is PSPACE-complete in general, and polynomial-time solvable for some restricted graph classes. When not restricted to shortest paths, the problem is quite different, since the extremities of the paths are not fixed and the goal is not necessarily to reconfigure shortest paths.

Reconfiguration problems on graphs of bounded feedback vertex set number and on graphs of bounded treewidth have already received a considerable amount of attention, and they are usually not easy to place in FPT (unlike their optimization counterparts, where a simple branching strategy or dynamic programming algorithm is usually enough to get an FPT algorithm). For instance, Independent Set Reconfiguration (in the token sliding model) on graphs of bounded feedback vertex set number is FPT; this fact follows easily from the multi-component reduction in [2]. However, the question is still open for the reconfiguration of dominating sets, for instance. The case of bounded treewidth graphs is open for both Independent Set Reconfiguration and Dominating Set Reconfiguration (in the sliding model) [7].

2 Hardness results

We start with the case of SPR parameterized by k𝑘kitalic_k on general graphs. The same reduction will imply the hardness of SSPR parameterized by k+𝑘k+\ellitalic_k + roman_ℓ. We then describe how to modify the construction to obtain a graph of constant degeneracy.

2.1 General graphs

Our reduction is from the Regular Multicolored Clique (RMC) problem, which is known to be NP-complete and W[1]-hard when parameterized by solution size κ𝜅\kappaitalic_κ [21]. The problem is defined as follows. We are given a κ𝜅\kappaitalic_κ-partite graph G=(V,E)𝐺𝑉𝐸G=(V,E)italic_G = ( italic_V , italic_E ) such that V𝑉Vitalic_V is partitioned into κ𝜅\kappaitalic_κ independent sets V=V1\cupdotV2\cupdot\cupdotVκ𝑉subscript𝑉1\cupdotsubscript𝑉2\cupdot\cupdotsubscript𝑉𝜅V=V_{1}\cupdot V_{2}\cupdot\cdots\cupdot V_{\kappa}italic_V = italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ⋯ italic_V start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT and each partition has size exactly n𝑛nitalic_n, i.e., |V|=κn𝑉𝜅𝑛|V|=\kappa n| italic_V | = italic_κ italic_n. We denote the vertices of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT by v1i,v2i,,vnisuperscriptsubscript𝑣1𝑖superscriptsubscript𝑣2𝑖superscriptsubscript𝑣𝑛𝑖v_{1}^{i},v_{2}^{i},\ldots,v_{n}^{i}italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , … , italic_v start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT. Moreover, every vertex vjiVisuperscriptsubscript𝑣𝑗𝑖subscript𝑉𝑖v_{j}^{i}\in V_{i}italic_v start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT has exactly r𝑟ritalic_r neighbors in every set Visubscript𝑉superscript𝑖V_{i^{\prime}}italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, ii𝑖superscript𝑖i\neq i^{\prime}italic_i ≠ italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. In other words, every vertex in G𝐺Gitalic_G has degree exactly r(κ1)𝑟𝜅1r(\kappa-1)italic_r ( italic_κ - 1 ). Given an instance (G,κ)𝐺𝜅(G,\kappa)( italic_G , italic_κ ) of RMC, the goal is to decide if G𝐺Gitalic_G contains a clique of size κ𝜅\kappaitalic_κ, which we call a multicolored clique since it must contain exactly one vertex from each Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ]. We reduce (G,κ)𝐺𝜅(G,\kappa)( italic_G , italic_κ ) to an instance (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) of SPR, where P𝑃Pitalic_P and Q𝑄Qitalic_Q are st𝑠𝑡stitalic_s italic_t-paths in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT of length k=𝒪(κ2)𝑘𝒪superscript𝜅2k=\mathcal{O}(\kappa^{2})italic_k = caligraphic_O ( italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

Properly colored st𝑠𝑡stitalic_s italic_t-paths.

Before discussing Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, we start by describing a key gadget of our construction which is a graph called H𝐻Hitalic_H. The graph H𝐻Hitalic_H consists of α=6κ2𝛼6superscript𝜅2\alpha=6\kappa^{2}italic_α = 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT sets of vertices H1,H2,,Hαsubscript𝐻1subscript𝐻2subscript𝐻𝛼H_{1},H_{2},\ldots,H_{\alpha}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_H start_POSTSUBSCRIPT italic_α end_POSTSUBSCRIPT such that |Hi|=nsubscript𝐻𝑖𝑛|H_{i}|=n| italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | = italic_n for each i[α]𝑖delimited-[]𝛼i\in[\alpha]italic_i ∈ [ italic_α ]. We group every three consecutive sets into β=2κ2𝛽2superscript𝜅2\beta=2\kappa^{2}italic_β = 2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT groups R1={H1,H2,H3}subscript𝑅1subscript𝐻1subscript𝐻2subscript𝐻3R_{1}=\{H_{1},H_{2},H_{3}\}italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT }, R2={H4,H5,H6}subscript𝑅2subscript𝐻4subscript𝐻5subscript𝐻6R_{2}=\{H_{4},H_{5},H_{6}\}italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT }, R3={H7,H8,H9}subscript𝑅3subscript𝐻7subscript𝐻8subscript𝐻9R_{3}=\{H_{7},H_{8},H_{9}\}italic_R start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 9 end_POSTSUBSCRIPT }, \ldots, and Rβ={Hα2,Hα1,Hα}subscript𝑅𝛽subscript𝐻𝛼2subscript𝐻𝛼1subscript𝐻𝛼R_{\beta}=\{H_{\alpha-2},H_{\alpha-1},H_{\alpha}\}italic_R start_POSTSUBSCRIPT italic_β end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_α - 2 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_α - 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_α end_POSTSUBSCRIPT }. We call Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT the i𝑖iitalic_ith layer of H𝐻Hitalic_H and Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT the i𝑖iitalic_ith group of H𝐻Hitalic_H; it will become clear later that a shortest path will select a vertex from each Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. We also define a mapping μ:[β][κ]:𝜇delimited-[]𝛽delimited-[]𝜅\mu:[\beta]\rightarrow[\kappa]italic_μ : [ italic_β ] → [ italic_κ ] such that each Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is mapped to some Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, for i[β]𝑖delimited-[]𝛽i\in[\beta]italic_i ∈ [ italic_β ] and j[κ]𝑗delimited-[]𝜅j\in[\kappa]italic_j ∈ [ italic_κ ]. In other words, each Ri={Ha,Hb,Hc}subscript𝑅𝑖subscript𝐻𝑎subscript𝐻𝑏subscript𝐻𝑐R_{i}=\{H_{a},H_{b},H_{c}\}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT } will correspond to taking three copies of some Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. We sometimes abuse notation and write μ(Ri)=Vj𝜇subscript𝑅𝑖subscript𝑉𝑗\mu(R_{i})=V_{j}italic_μ ( italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT to denote the image of a set. We also overload notation and write μ(Hp)=Vj𝜇subscript𝐻𝑝subscript𝑉𝑗\mu(H_{p})=V_{j}italic_μ ( italic_H start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT whenever HpRisubscript𝐻𝑝subscript𝑅𝑖H_{p}\in R_{i}italic_H start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∈ italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and μ(Ri)=Vj𝜇subscript𝑅𝑖subscript𝑉𝑗\mu(R_{i})=V_{j}italic_μ ( italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. In other words, we also define a mapping μ:[α][β][κ]:𝜇delimited-[]𝛼delimited-[]𝛽delimited-[]𝜅\mu:[\alpha]\rightarrow[\beta]\rightarrow[\kappa]italic_μ : [ italic_α ] → [ italic_β ] → [ italic_κ ].

Furthermore, we construct μ𝜇\muitalic_μ in such a way that, for every pair (j,j)𝑗superscript𝑗(j,j^{\prime})( italic_j , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ), jj𝑗superscript𝑗j\neq j^{\prime}italic_j ≠ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and j,j[κ]𝑗superscript𝑗delimited-[]𝜅j,j^{\prime}\in[\kappa]italic_j , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ [ italic_κ ], there exists at least one integer i<β𝑖𝛽i<\betaitalic_i < italic_β such that μ(i)=j𝜇𝑖𝑗\mu(i)=jitalic_μ ( italic_i ) = italic_j, μ(i+1)=j𝜇𝑖1superscript𝑗\mu(i+1)=j^{\prime}italic_μ ( italic_i + 1 ) = italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. In other words, for every two sets Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and Vjsubscript𝑉superscript𝑗V_{j^{\prime}}italic_V start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, there must exist two consecutive groups Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and Ri+1subscript𝑅𝑖1R_{i+1}italic_R start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT such that Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is mapped to Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and Ri+1subscript𝑅𝑖1R_{i+1}italic_R start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT is mapped to Vjsubscript𝑉superscript𝑗V_{j^{\prime}}italic_V start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT. One can easily check that it is indeed possible to construct such a function μ𝜇\muitalic_μ when β=2κ2𝛽2superscript𝜅2\beta=2\kappa^{2}italic_β = 2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. We define μ𝜇\muitalic_μ as follows:

For each i[β]Ri is mapped to Vμ(i), where μ(i)={1+(i1)/2κif i is odd;1+((i2)mod2κ)/2if i is even.For each i[β]Ri is mapped to Vμ(i), where 𝜇𝑖cases1𝑖12𝜅if i is odd1modulo𝑖22𝜅2if i is even\displaystyle\text{For each $i\in[\beta]$, $R_{i}$ is mapped to $V_{\mu(i)}$, % where }\displaystyle{\mu(i)=\begin{cases}1+\lfloor(i-1)/2\kappa\rfloor&\text{% if $i$ is odd};\\ 1+((i-2)\bmod 2\kappa)/2&\text{if $i$ is even}.\end{cases}}For each italic_i ∈ [ italic_β ] , italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is mapped to italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT , where italic_μ ( italic_i ) = { start_ROW start_CELL 1 + ⌊ ( italic_i - 1 ) / 2 italic_κ ⌋ end_CELL start_CELL if italic_i is odd ; end_CELL end_ROW start_ROW start_CELL 1 + ( ( italic_i - 2 ) roman_mod 2 italic_κ ) / 2 end_CELL start_CELL if italic_i is even . end_CELL end_ROW
Observation 5.

For each (j,j)[κ]×[κ]𝑗superscript𝑗delimited-[]𝜅delimited-[]𝜅(j,j^{\prime})\in[\kappa]\times[\kappa]( italic_j , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∈ [ italic_κ ] × [ italic_κ ] such that jj𝑗superscript𝑗j\neq j^{\prime}italic_j ≠ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, there exists an i[β1]𝑖delimited-[]𝛽1i\in[\beta-1]italic_i ∈ [ italic_β - 1 ] such that μ(i)=j𝜇𝑖𝑗\mu(i)=jitalic_μ ( italic_i ) = italic_j and μ(i+1)=j𝜇𝑖1superscript𝑗\mu(i+1)=j^{\prime}italic_μ ( italic_i + 1 ) = italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

We also define a mapping π:RiVμ(i):𝜋subscript𝑅𝑖subscript𝑉𝜇𝑖\pi:R_{i}\rightarrow V_{\mu(i)}italic_π : italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT → italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT (and π:HiVμ(i):𝜋subscript𝐻𝑖subscript𝑉𝜇𝑖\pi:H_{i}\rightarrow V_{\mu(i)}italic_π : italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT → italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT) that maps every vertex of Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT) to its corresponding vertex in Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT. We note that each vertex of Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT appears three times in Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (once in each layer) and all three vertices map to the same vertex of Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT. Let us now describe the edge set of H𝐻Hitalic_H. For every i[β]𝑖delimited-[]𝛽i\in[\beta]italic_i ∈ [ italic_β ], we add a matching between vertices of Hjsubscript𝐻𝑗H_{j}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and Hj+1subscript𝐻𝑗1H_{j+1}italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT and a matching between vertices of Hj+1subscript𝐻𝑗1H_{j+1}italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT and Hj+2subscript𝐻𝑗2H_{j+2}italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT whenever there exists a group Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT such that Ri={Hj,Hj+1,Hj+2}subscript𝑅𝑖subscript𝐻𝑗subscript𝐻𝑗1subscript𝐻𝑗2R_{i}=\{H_{j},H_{j+1},H_{j+2}\}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT }. For every two consecutive groups Ri={Hj,Hj+1,Hj+2}subscript𝑅𝑖subscript𝐻𝑗subscript𝐻𝑗1subscript𝐻𝑗2R_{i}=\{H_{j},H_{j+1},H_{j+2}\}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT } and Ri+1={Hj+3,Hj+4,Hj+5}subscript𝑅𝑖1subscript𝐻𝑗3subscript𝐻𝑗4subscript𝐻𝑗5R_{i+1}=\{H_{j+3},H_{j+4},H_{j+5}\}italic_R start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_j + 3 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 4 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 5 end_POSTSUBSCRIPT }, we add in H𝐻Hitalic_H the edges of G𝐺Gitalic_G between Hj+2subscript𝐻𝑗2H_{j+2}italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT and Hj+3subscript𝐻𝑗3H_{j+3}italic_H start_POSTSUBSCRIPT italic_j + 3 end_POSTSUBSCRIPT. That is, we add between consecutive sets corresponding to different sets of G𝐺Gitalic_G the edges corresponding to the edges between those two sets in G𝐺Gitalic_G. More formally, let aHj+2𝑎subscript𝐻𝑗2a\in H_{j+2}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT, bHj+3𝑏subscript𝐻𝑗3b\in H_{j+3}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j + 3 end_POSTSUBSCRIPT, π(a)Vμ(i)𝜋𝑎subscript𝑉𝜇𝑖\pi(a)\in V_{\mu(i)}italic_π ( italic_a ) ∈ italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT, and π(b)Vμ(i+i)𝜋𝑏subscript𝑉𝜇𝑖𝑖\pi(b)\in V_{\mu(i+i)}italic_π ( italic_b ) ∈ italic_V start_POSTSUBSCRIPT italic_μ ( italic_i + italic_i ) end_POSTSUBSCRIPT. Then, there is an edge between vertices a𝑎aitalic_a and b𝑏bitalic_b in H𝐻Hitalic_H if and only if there is an edge between vertices π(a)𝜋𝑎\pi(a)italic_π ( italic_a ) and π(b)𝜋𝑏\pi(b)italic_π ( italic_b ) in G𝐺Gitalic_G.

Assume that we create a new graph Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT consisting of H𝐻Hitalic_H plus two additional vertices s𝑠sitalic_s and t𝑡titalic_t, where s𝑠sitalic_s is connected to all the vertices of H1subscript𝐻1H_{1}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and t𝑡titalic_t is connected to all the vertices of Hαsubscript𝐻𝛼H_{\alpha}italic_H start_POSTSUBSCRIPT italic_α end_POSTSUBSCRIPT. Note that any st𝑠𝑡stitalic_s italic_t-path in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT must contain exactly one vertex from every layer. We say that an st𝑠𝑡stitalic_s italic_t-path P𝑃Pitalic_P is properly colored whenever for any aHi𝑎subscript𝐻𝑖a\in H_{i}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and bHj𝑏subscript𝐻𝑗b\in H_{j}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT (on the path) such that μ(i)=μ(j)𝜇𝑖𝜇𝑗\mu(i)=\mu(j)italic_μ ( italic_i ) = italic_μ ( italic_j ), we have π(a)=π(b)𝜋𝑎𝜋𝑏\pi(a)=\pi(b)italic_π ( italic_a ) = italic_π ( italic_b ). In other words, whenever two layers of H𝐻Hitalic_H (containing vertices of P𝑃Pitalic_P) map to the same set of V𝑉Vitalic_V we must select the same vertices in both. We note that any st𝑠𝑡stitalic_s italic_t-path P𝑃Pitalic_P in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT can intersect with a group Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT in one of n𝑛nitalic_n ways, i.e., the vertices of P𝑃Pitalic_P in Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT all map to the same vertex of Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT.

Observation 6.

Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT contains a properly colored st𝑠𝑡stitalic_s italic_t-path P𝑃Pitalic_P (consisting of 6κ2+26superscript𝜅226\kappa^{2}+26 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + 2 vertices) if and only if G𝐺Gitalic_G contains a multicolored clique of size κ𝜅\kappaitalic_κ.

Proof.

The proof follows from the definition of a properly colored st𝑠𝑡stitalic_s italic_t-path in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Let P𝑃Pitalic_P be such a path. For path vertices aHi𝑎subscript𝐻𝑖a\in H_{i}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and bHj𝑏subscript𝐻𝑗b\in H_{j}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT such that μ(i)=μ(j)𝜇𝑖𝜇𝑗\mu(i)=\mu(j)italic_μ ( italic_i ) = italic_μ ( italic_j ) we have π(a)=π(b)𝜋𝑎𝜋𝑏\pi(a)=\pi(b)italic_π ( italic_a ) = italic_π ( italic_b ). Moreover, for path vertices aHj𝑎subscript𝐻𝑗a\in H_{j}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, bHj+1𝑏subscript𝐻𝑗1b\in H_{j+1}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT, and cHj+2𝑐subscript𝐻𝑗2c\in H_{j+2}italic_c ∈ italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT, where there exists i[β]𝑖delimited-[]𝛽i\in[\beta]italic_i ∈ [ italic_β ] such that Ri={Hj,Hj+1,Hj+2}subscript𝑅𝑖subscript𝐻𝑗subscript𝐻𝑗1subscript𝐻𝑗2R_{i}=\{H_{j},H_{j+1},H_{j+2}\}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT }, we have π(a)=π(b)=π(c)𝜋𝑎𝜋𝑏𝜋𝑐\pi(a)=\pi(b)=\pi(c)italic_π ( italic_a ) = italic_π ( italic_b ) = italic_π ( italic_c ); recall that μ(Ri)=μ(Hj)=μ(Hj+1)=μ(Hj+2)𝜇subscript𝑅𝑖𝜇subscript𝐻𝑗𝜇subscript𝐻𝑗1𝜇subscript𝐻𝑗2\mu(R_{i})=\mu(H_{j})=\mu(H_{j+1})=\mu(H_{j+2})italic_μ ( italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT italic_j + 2 end_POSTSUBSCRIPT ). Hence, the internal vertices of P𝑃Pitalic_P correspond to exactly κ𝜅\kappaitalic_κ distinct vertices of G𝐺Gitalic_G, one vertex in each part of V𝑉Vitalic_V. The fact that those vertices must form a multicolored clique in G𝐺Gitalic_G follows from Observation 5 and the fact that, within each group, we connect all three copies of a vertex by a path.

The converse follows by similar arguments. That is, suppose that G𝐺Gitalic_G contains a multicolored clique C={v1,,vκ}𝐶subscript𝑣1subscript𝑣𝜅C=\{v_{1},\ldots,v_{\kappa}\}italic_C = { italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_v start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT } of size κ𝜅\kappaitalic_κ. Then, for every iβ𝑖𝛽i\leq\betaitalic_i ≤ italic_β such that μ(i)=j𝜇𝑖𝑗\mu(i)=jitalic_μ ( italic_i ) = italic_j, the vertices of P𝑃Pitalic_P in Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT correspond to π1(vj)superscript𝜋1subscript𝑣𝑗\pi^{-1}(v_{j})italic_π start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_v start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ). And, once these vertices are chosen, it is clear that they form a path P𝑃Pitalic_P in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, since each pair of vertices in the multicolored clique is adjacent in the graph G𝐺Gitalic_G. More formally, since we chose the same vertex in each layer of each group, we know that the chosen vertices within a group form a path. The fact that the paths within the groups connect to form an st𝑠𝑡stitalic_s italic_t-path P𝑃Pitalic_P is immediate from our construction and C𝐶Citalic_C being a multicolored clique. ∎

Outline of the reduction.

Assume that we add to the graph Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT two new (internally) vertex-disjoint st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q each containing exactly α+2𝛼2\alpha+2italic_α + 2 vertices (s𝑠sitalic_s and t𝑡titalic_t and one vertex per layer of H𝐻Hitalic_H). We add all the edges between the i𝑖iitalic_i-th vertex of P𝑃Pitalic_P and the vertices in layers i𝑖iitalic_i, i1𝑖1i-1italic_i - 1, and i+1𝑖1i+1italic_i + 1 of H𝐻Hitalic_H (with the assumption that H0={s}subscript𝐻0𝑠H_{0}=\{s\}italic_H start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = { italic_s } and Hα+1={t}subscript𝐻𝛼1𝑡H_{\alpha+1}=\{t\}italic_H start_POSTSUBSCRIPT italic_α + 1 end_POSTSUBSCRIPT = { italic_t }). Similarly, we add all the edges between the i𝑖iitalic_i-th vertex of Q𝑄Qitalic_Q and the vertices in layers i𝑖iitalic_i, i1𝑖1i-1italic_i - 1, and i+1𝑖1i+1italic_i + 1 of H𝐻Hitalic_H. We denote the resulting graph by H+P+Qsuperscript𝐻𝑃𝑄H^{\prime}+P+Qitalic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT + italic_P + italic_Q.

Consider the instance (H+P+Q,s,t,P,Q)superscript𝐻𝑃𝑄𝑠𝑡𝑃𝑄(H^{\prime}+P+Q,s,t,P,Q)( italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT + italic_P + italic_Q , italic_s , italic_t , italic_P , italic_Q ) of SPR. If there exists a multicolored clique in G𝐺Gitalic_G then there exists a properly colored st𝑠𝑡stitalic_s italic_t-path in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT by Observation 6. By the definition of the edge set, on can easily see that we can transform P𝑃Pitalic_P into Q𝑄Qitalic_Q by first moving the vertices of P𝑃Pitalic_P onto a properly colored st𝑠𝑡stitalic_s italic_t-path in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and then moving all the vertices to Q𝑄Qitalic_Q one by one. Unfortunately, the converse is not necessarily true since we might not be consistent in the selection of vertices in Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. In other words, i.e. we have no reason to select a properly colored path (said differently, we might select vertices aHi𝑎subscript𝐻𝑖a\in H_{i}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and bHj𝑏subscript𝐻𝑗b\in H_{j}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT in the path such that μ(i)=μ(j)𝜇𝑖𝜇𝑗\mu(i)=\mu(j)italic_μ ( italic_i ) = italic_μ ( italic_j ), π(a)π(b)𝜋𝑎𝜋𝑏\pi(a)\neq\pi(b)italic_π ( italic_a ) ≠ italic_π ( italic_b ), and Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and Hjsubscript𝐻𝑗H_{j}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT belong to different groups).

By considerably complicating the gadgetry, we will prove that we can handle this issue. To do so, we create a new gadget that will force us to select the same vertex for a fixed value of the image of μ𝜇\muitalic_μ. We replicate our gadget to enforce the consistency of all the images of μ𝜇\muitalic_μ. In addition to enforcing consistent selection of vertices, our construction further guarantees that choices cannot be undone.

Another issue in the simplistic construction of Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT described above is that we implicitly assume that we move from P𝑃Pitalic_P to a path fully contained in H𝐻Hitalic_H before going to Q𝑄Qitalic_Q. But nothing prevents an st𝑠𝑡stitalic_s italic_t-path to contain some vertices of P𝑃Pitalic_P, then some vertices from H𝐻Hitalic_H. then some vertices from Q𝑄Qitalic_Q, then more vertices from H𝐻Hitalic_H, and so on. To avoid this phenomena, we shall add what we call buffer space. We formalize all these ideas next.

Buffers and collapses.

Most of the time, we will consider matchings and edges between sets of size n𝑛nitalic_n. Given two sets of size n𝑛nitalic_n (with an implicit ordering), we define the natural matching as the matching that matches the vertices in increasing index order (in the natural way). We will sometimes consider edges between a set A𝐴Aitalic_A of size n𝑛nitalic_n and a set B𝐵Bitalic_B of size larger than n𝑛nitalic_n with a canonical mapping function to {1,,n}1𝑛\{1,\ldots,n\}{ 1 , … , italic_n }. By abuse of notation, we still denote by the natural matching the set of edges (that is not a matching anymore) that links the i𝑖iitalic_i-th vertex of A𝐴Aitalic_A and all the vertices that map to i𝑖iitalic_i in B𝐵Bitalic_B.

We denote by Insubscript𝐼𝑛I_{n}italic_I start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT and Jnsubscript𝐽𝑛J_{n}italic_J start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT independent sets on n𝑛nitalic_n vertices555These two notations for the same grapph will permit to simply description of the constructions in the rest of the proof.. We let qsuperscript𝑞\mathcal{I}^{q}caligraphic_I start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT and 𝒥qsuperscript𝒥𝑞\mathcal{J}^{q}caligraphic_J start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT denote the graphs obtained by taking q𝑞qitalic_q copies of Insubscript𝐼𝑛I_{n}italic_I start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT (resp. Jnsubscript𝐽𝑛J_{n}italic_J start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT) where consecutive copies of Insubscript𝐼𝑛I_{n}italic_I start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT (Jnsubscript𝐽𝑛J_{n}italic_J start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT) are linked with the natural matching. Note that qsuperscript𝑞\mathcal{I}^{q}caligraphic_I start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT (resp. 𝒥qsuperscript𝒥𝑞\mathcal{J}^{q}caligraphic_J start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT) consists of exactly n𝑛nitalic_n paths on q𝑞qitalic_q vertices.

Let R=R1,R2,,Rγ𝑅subscript𝑅1subscript𝑅2subscript𝑅𝛾R=R_{1},R_{2},\ldots,R_{\gamma}italic_R = italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_R start_POSTSUBSCRIPT italic_γ end_POSTSUBSCRIPT be a graph where edges are between consecutive sets and there is a canonical mapping from R1subscript𝑅1R_{1}italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and Rγsubscript𝑅𝛾R_{\gamma}italic_R start_POSTSUBSCRIPT italic_γ end_POSTSUBSCRIPT to {1,,n}1𝑛\{1,\ldots,n\}{ 1 , … , italic_n } (in our proof, R𝑅Ritalic_R will be H𝐻Hitalic_H or a graph close to H𝐻Hitalic_H). We write Γ(p,H,q)=pH𝒥qΓ𝑝𝐻𝑞direct-sumsuperscript𝑝𝐻superscript𝒥𝑞\Gamma(p,H,q)=\mathcal{I}^{p}\oplus H\oplus\mathcal{J}^{q}roman_Γ ( italic_p , italic_H , italic_q ) = caligraphic_I start_POSTSUPERSCRIPT italic_p end_POSTSUPERSCRIPT ⊕ italic_H ⊕ caligraphic_J start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT (or ΓΓ\Gammaroman_Γ when p,q,H𝑝𝑞𝐻p,q,Hitalic_p , italic_q , italic_H are clear from context) to denote the graph obtained by taking a copy of psuperscript𝑝\mathcal{I}^{p}caligraphic_I start_POSTSUPERSCRIPT italic_p end_POSTSUPERSCRIPT, a copy of 𝒥qsuperscript𝒥𝑞\mathcal{J}^{q}caligraphic_J start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT, a copy of H𝐻Hitalic_H, and then adding the natural matching between the vertices of Iqsubscript𝐼𝑞I_{q}italic_I start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT and H1subscript𝐻1H_{1}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT as well as a matching between the vertices of Hαsubscript𝐻𝛼H_{\alpha}italic_H start_POSTSUBSCRIPT italic_α end_POSTSUBSCRIPT and J1subscript𝐽1J_{1}italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT (see Figure 3).

Refer to caption
Figure 3: Example of a graph Γ(2,H,2)=2H𝒥2Γ2𝐻2direct-sumsuperscript2𝐻superscript𝒥2\Gamma(2,H,2)=\mathcal{I}^{2}\oplus H\oplus\mathcal{J}^{2}roman_Γ ( 2 , italic_H , 2 ) = caligraphic_I start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ⊕ italic_H ⊕ caligraphic_J start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT, where μ(R1)=μ(H1)=μ(H2)=μ(H3)=V1𝜇subscript𝑅1𝜇subscript𝐻1𝜇subscript𝐻2𝜇subscript𝐻3subscript𝑉1\mu(R_{1})=\mu(H_{1})=\mu(H_{2})=\mu(H_{3})=V_{1}italic_μ ( italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_μ ( italic_H start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, μ(R2)=V2𝜇subscript𝑅2subscript𝑉2\mu(R_{2})=V_{2}italic_μ ( italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, μ(R3)=V3𝜇subscript𝑅3subscript𝑉3\mu(R_{3})=V_{3}italic_μ ( italic_R start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT, and μ(Rβ)=V1𝜇subscript𝑅𝛽subscript𝑉1\mu(R_{\beta})=V_{1}italic_μ ( italic_R start_POSTSUBSCRIPT italic_β end_POSTSUBSCRIPT ) = italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT. Edges inside H𝐻Hitalic_H are omitted.

If we denote by Iisubscript𝐼𝑖I_{i}italic_I start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT the sets of psuperscript𝑝\mathcal{I}^{p}caligraphic_I start_POSTSUPERSCRIPT italic_p end_POSTSUPERSCRIPT and Jisubscript𝐽𝑖J_{i}italic_J start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT the sets of 𝒥qsuperscript𝒥𝑞\mathcal{J}^{q}caligraphic_J start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT, for i[p+α+q]𝑖delimited-[]𝑝𝛼𝑞i\in[p+\alpha+q]italic_i ∈ [ italic_p + italic_α + italic_q ], we call Lisubscript𝐿𝑖L_{i}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT the i𝑖iitalic_i-th layer of Γ(p,H,q)Γ𝑝𝐻𝑞\Gamma(p,H,q)roman_Γ ( italic_p , italic_H , italic_q ), where Li=Iisubscript𝐿𝑖subscript𝐼𝑖L_{i}=I_{i}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = italic_I start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT when ip𝑖𝑝i\leq pitalic_i ≤ italic_p, Li=Hiqsubscript𝐿𝑖subscript𝐻𝑖𝑞L_{i}=H_{i-q}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = italic_H start_POSTSUBSCRIPT italic_i - italic_q end_POSTSUBSCRIPT when p<ip+α𝑝𝑖𝑝𝛼p<i\leq p+\alphaitalic_p < italic_i ≤ italic_p + italic_α, and Li=Ii(q+α)subscript𝐿𝑖subscript𝐼𝑖𝑞𝛼L_{i}=I_{i-(q+\alpha)}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = italic_I start_POSTSUBSCRIPT italic_i - ( italic_q + italic_α ) end_POSTSUBSCRIPT when i>q+α𝑖𝑞𝛼i>q+\alphaitalic_i > italic_q + italic_α.

Let us now define collapses which are an important tool in our reduction. Let iκ𝑖𝜅i\leq\kappaitalic_i ≤ italic_κ and vjVisubscript𝑣𝑗subscript𝑉𝑖v_{j}\in V_{i}italic_v start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. We let H(vji)𝐻subscriptsuperscript𝑣𝑖𝑗H(v^{i}_{j})italic_H ( italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) denote the induced subgraph obtained from H𝐻Hitalic_H by deleting in Hisubscript𝐻superscript𝑖H_{i^{\prime}}italic_H start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, for every isuperscript𝑖i^{\prime}italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT such that ν(i)=i𝜈superscript𝑖𝑖\nu(i^{\prime})=iitalic_ν ( italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_i, all the vertices of Hisubscript𝐻superscript𝑖H_{i^{\prime}}italic_H start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT but the vertex hhitalic_h such that π(h)=vji𝜋subscriptsuperscript𝑣𝑖𝑗\pi(h)=v^{i}_{j}italic_π ( italic_h ) = italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. That is, we restrict all the layers of H𝐻Hitalic_H corresponding to Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT to a single vertex (the same vertex). By abuse of notation, We will sometimes use H(hji)𝐻subscriptsuperscript𝑖𝑗H(h^{i}_{j})italic_H ( italic_h start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ), for some vertex hjiHisuperscriptsubscript𝑗𝑖subscript𝐻𝑖h_{j}^{i}\in H_{i}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, to denote the graph H(vja)𝐻subscriptsuperscript𝑣𝑎𝑗H(v^{a}_{j})italic_H ( italic_v start_POSTSUPERSCRIPT italic_a end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) where a=ν(i)𝑎𝜈𝑖a=\nu(i)italic_a = italic_ν ( italic_i ). We say that H(hji)𝐻superscriptsubscript𝑗𝑖H(h_{j}^{i})italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) is a collapse of H𝐻Hitalic_H on hjisuperscriptsubscript𝑗𝑖h_{j}^{i}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, or, equivalently, collapsing H𝐻Hitalic_H on hjisuperscriptsubscript𝑗𝑖h_{j}^{i}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT results in H(hji)𝐻superscriptsubscript𝑗𝑖H(h_{j}^{i})italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) (see Figure 4). Note that in the graph H(vji)𝐻superscriptsubscript𝑣𝑗𝑖H(v_{j}^{i})italic_H ( italic_v start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) we are indeed forced to be properly colored for the i𝑖iitalic_ith set since we have deleted all the other vertices in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT.

Refer to caption
Figure 4: Example of a graph Γ(2,H(h11),2)Γ2𝐻subscriptsuperscript112\Gamma(2,H(h^{1}_{1}),2)roman_Γ ( 2 , italic_H ( italic_h start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) , 2 ) obtained after collapsing H𝐻Hitalic_H on h11subscriptsuperscript11h^{1}_{1}italic_h start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT.

Now, for every iκ,jnformulae-sequence𝑖𝜅𝑗𝑛i\leq\kappa,j\leq nitalic_i ≤ italic_κ , italic_j ≤ italic_n, we define Γi,j(p,q)subscriptΓ𝑖𝑗𝑝𝑞\Gamma_{i,j}(p,q)roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_p , italic_q ) as Γ(p,H(hji),q)Γ𝑝𝐻superscriptsubscript𝑗𝑖𝑞\Gamma(p,H(h_{j}^{i}),q)roman_Γ ( italic_p , italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) , italic_q ) (it can be interpreted as the graph Hjisuperscriptsubscript𝐻𝑗𝑖H_{j}^{i}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT where we added some empty space before and after it). Finally, we let Γi(p,q)superscriptΓ𝑖𝑝𝑞\Gamma^{i}(p,q)roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ( italic_p , italic_q ) denote the union of the n𝑛nitalic_n graphs Γi,j(p,q)subscriptΓ𝑖𝑗𝑝𝑞\Gamma_{i,j}(p,q)roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_p , italic_q ). We write Γi,j=Γi,j(p,q)subscriptΓ𝑖𝑗subscriptΓ𝑖𝑗𝑝𝑞\Gamma_{i,j}=\Gamma_{i,j}(p,q)roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT = roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_p , italic_q ) whenever p𝑝pitalic_p and q𝑞qitalic_q are clear from context. Note that all the Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT being disjoint, if we have a path fully included in one of the Γi,j(p,q)subscriptΓ𝑖𝑗𝑝𝑞\Gamma_{i,j}(p,q)roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_p , italic_q ) at some point, then all the selected vertices in sets mapping to i𝑖iitalic_i by μ𝜇\muitalic_μ are the same. That is, Γi(p,q)superscriptΓ𝑖𝑝𝑞\Gamma^{i}(p,q)roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ( italic_p , italic_q ) will allow us to verify that for any Hj,Hjsubscript𝐻𝑗superscriptsubscript𝐻𝑗H_{j},H_{j}^{\prime}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in the selection gadget such that μ(j)=μ(j)=i𝜇𝑗𝜇superscript𝑗𝑖\mu(j)=\mu(j^{\prime})=iitalic_μ ( italic_j ) = italic_μ ( italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_i we always pick vertices aHj𝑎subscript𝐻𝑗a\in H_{j}italic_a ∈ italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, bHj𝑏subscript𝐻superscript𝑗b\in H_{j^{\prime}}italic_b ∈ italic_H start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT such that π(a)=π(b)𝜋𝑎𝜋𝑏\pi(a)=\pi(b)italic_π ( italic_a ) = italic_π ( italic_b ).

Construction.

We are now ready to describe the construction of the instance (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) of SPR. We begin by considering the token jumping model and discuss the changes required for sliding later.

We start from an empty graph Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and add two new vertices s𝑠sitalic_s and t𝑡titalic_t. We let q=2κ2𝑞2superscript𝜅2q=2\kappa^{2}italic_q = 2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT and δ=2q+α=10κ2𝛿2𝑞𝛼10superscript𝜅2\delta=2q+\alpha=10\kappa^{2}italic_δ = 2 italic_q + italic_α = 10 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (recall that α=6κ2𝛼6superscript𝜅2\alpha=6\kappa^{2}italic_α = 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT). We add two internally vertex-disjoint st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q consisting of δ𝛿\deltaitalic_δ internal vertices each.

The next step consists of adding Γ=Γ(q,H,q)subscriptΓΓ𝑞𝐻𝑞\Gamma_{\star}=\Gamma(q,H,q)roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT = roman_Γ ( italic_q , italic_H , italic_q ) to Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and connecting s𝑠sitalic_s to every vertex in I1subscript𝐼1I_{1}italic_I start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and t𝑡titalic_t to every vertex in Jqsubscript𝐽𝑞J_{q}italic_J start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT. Moreover, we let the i𝑖iitalic_ith internal vertex of P𝑃Pitalic_P, i2𝑖2i\geq 2italic_i ≥ 2, be adjacent to every vertex in layer i1𝑖1i-1italic_i - 1 of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT. We call ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT the selection gadget. The rest of the gadgets will be verification and boundary gadgets that allow us to guarantee that properties similar to those in Observation 6 will hold.

We then create a graph Γ1(q1,q+1)superscriptΓ1𝑞1𝑞1\Gamma^{1}(q-1,q+1)roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT ( italic_q - 1 , italic_q + 1 ) denoted by Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT which will be the verification gadget for i=1𝑖1i=1italic_i = 1. We deal with the graphs of Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT first (and slightly differently than the rest) as they require special attention given that they exist at the “boundary” of our construction. Notice that, in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, all the graphs in Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT are “shifted one position to the left with respect to ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT” (in the sense that the number of independent sets at the left has reduced by one), see Figure 5 for an illustration. In particular, the graph H𝐻Hitalic_H of each Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT, j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ], starts (or appears) one layer before the graph H𝐻Hitalic_H in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT. We now describe the edges between ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT and any Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT (in Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT). Let L𝐿Litalic_L denote some layer of Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT (ignoring the last layer) and let Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT be the layer after L𝐿Litalic_L in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT. If L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT correspond to independent sets (not sets of H𝐻Hitalic_H) they are connected by the natural matching. Otherwise, we have two cases:

  • If layer L𝐿Litalic_L of Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT corresponds to a set Hpsubscript𝐻𝑝H_{p}italic_H start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT with μ(p)=1𝜇𝑝1\mu(p)=1italic_μ ( italic_p ) = 1 then we deleted all vertices of L𝐿Litalic_L except for hjpsuperscriptsubscript𝑗𝑝h_{j}^{p}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_p end_POSTSUPERSCRIPT (collapse). We connect hjpsuperscriptsubscript𝑗𝑝h_{j}^{p}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_p end_POSTSUPERSCRIPT to its image in Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, which must exists since layer Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT corresponds to a set Hpsubscript𝐻superscript𝑝H_{p^{\prime}}italic_H start_POSTSUBSCRIPT italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT with μ(p)=μ(p)=1𝜇𝑝𝜇superscript𝑝1\mu(p)=\mu(p^{\prime})=1italic_μ ( italic_p ) = italic_μ ( italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 1.

  • Otherwise, we have the same number of vertices in L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and we add a matching between the pairs of vertices having the same image in G𝐺Gitalic_G.

We now add a boundary gadget that will separate all the verification gadgets and allow us to simplify some of the arguments. Picturing the graph being constructed from top to bottom with P𝑃Pitalic_P and Q𝑄Qitalic_Q encircling all of the graph, we assume that Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT is drawn before Γi,j+1subscriptΓ𝑖𝑗1\Gamma_{i,j+1}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j + 1 end_POSTSUBSCRIPT. Similarly, we only insert Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT after inserting all graphs of ΓisuperscriptΓ𝑖\Gamma^{i}roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT (see again Figure 5 for an illustration). After Γ1,nsubscriptΓ1𝑛\Gamma_{1,n}roman_Γ start_POSTSUBSCRIPT 1 , italic_n end_POSTSUBSCRIPT is inserted, we insert another graph (connecting s𝑠sitalic_s and t𝑡titalic_t) that we denote by Γ1,=Γ(q2,H,q+2)subscriptΓ1Γ𝑞2𝐻𝑞2\Gamma_{1,\star}=\Gamma(q-2,H,q+2)roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT = roman_Γ ( italic_q - 2 , italic_H , italic_q + 2 ) which is called the boundary gadget of Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT. Note that Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT is again shifted one position to the left compared to all the graphs in Γ1superscriptΓ1\Gamma^{1}roman_Γ start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT. We add edges between layers of Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT and layers of Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT, for each j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ]. Like before, we let L𝐿Litalic_L denote some layer of Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT (ignoring the last layer) and let Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT be the layer after L𝐿Litalic_L in Γ1,jsubscriptΓ1𝑗\Gamma_{1,j}roman_Γ start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT. If L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT correspond to independent sets (not sets of an H𝐻Hitalic_H) then we connect them via a matching in the natural way. Otherwise, we have again two cases:

  • |L|=n𝐿𝑛|L|=n| italic_L | = italic_n, |L|=1superscript𝐿1|L^{\prime}|=1| italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT | = 1, and we connect by an edge the unique vertex of Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT to its image in L𝐿Litalic_L; or

  • |L|=|L|=n𝐿superscript𝐿𝑛|L|=|L^{\prime}|=n| italic_L | = | italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT | = italic_n (by construction) and we connect the two layers by a matching.

Informally speaking, we collapse the set V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT into n𝑛nitalic_n sets in all the layers isuperscript𝑖i^{\prime}italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT satisfying ν(i)=i𝜈superscript𝑖𝑖\nu(i^{\prime})=iitalic_ν ( italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_i between ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT and Γ1subscriptΓ1\Gamma_{1}roman_Γ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT which replaces a single connected graph by n𝑛nitalic_n of them. And then, we group them back in the gadget Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT. This collapse will permit to ensure that we select the same vertex everywhere and the grouping back phase will permit to avoid a combinatorial explosion (i.e. will allow to check the coherences of the different sets in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT independently).

We can now complete the construction as follows. For i[κ1]𝑖delimited-[]𝜅1i\in[\kappa-1]italic_i ∈ [ italic_κ - 1 ], after Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT is inserted we proceed just like before by assuming that Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT now takes the role of the  selection gadget ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT. Formally, for i[κ1]𝑖delimited-[]𝜅1i\in[\kappa-1]italic_i ∈ [ italic_κ - 1 ] and j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ] (processing in increasing order), we create a graph Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT, where Γi+1,j=Γ(q(2i+1),H(hji+1),q+(2i+1))subscriptΓ𝑖1𝑗Γ𝑞2𝑖1𝐻superscriptsubscript𝑗𝑖1𝑞2𝑖1\Gamma_{i+1,j}=\Gamma(q-(2i+1),H(h_{j}^{i+1}),q+(2i+1))roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT = roman_Γ ( italic_q - ( 2 italic_i + 1 ) , italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT ) , italic_q + ( 2 italic_i + 1 ) ). We connect s𝑠sitalic_s to all the first-layer vertices and t𝑡titalic_t to all the last-layer vertices in the obvious way. Let Γi+1superscriptΓ𝑖1\Gamma^{i+1}roman_Γ start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT denote the collection of the n𝑛nitalic_n graphs of the form Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT. We add edges between Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT and graphs in Γi+1superscriptΓ𝑖1\Gamma^{i+1}roman_Γ start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT just like before. Similarly, we then add a new graph Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT and proceed as described until we reach Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT. We connect all the vertices of a layer of Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT to the vertex of Q𝑄Qitalic_Q on the preceding layer (see Figure 5). This completes the construction of the SPR instance (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q )666We note that most of the buffer space “to the right” of the construction is not needed but was added to favor a symmetric construction.. Note that |V(P)|=|V(Q)|=10κ2+2𝑉𝑃𝑉𝑄10superscript𝜅22|V(P)|=|V(Q)|=10\kappa^{2}+2| italic_V ( italic_P ) | = | italic_V ( italic_Q ) | = 10 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + 2.

Safeness of the reduction.

Before we dive into the technical details of the proof, let us give some high-level intuition. Simply put, the purpose of every set of graphs ΓisuperscriptΓ𝑖\Gamma^{i}roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ], is to verify that all the sets/layers of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT mapping to the same Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT use the same vertex of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. The trickier part of the proof is in showing that tokens are “well-behaved”.

Refer to caption
Figure 5: An example of our reduction in the case of token jumping.

Let us start by proving the easier direction. We assume, without loss of generality, that all of our gadgets H𝐻Hitalic_H start with a copy of V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and end with a copy of Vκsubscript𝑉𝜅V_{\kappa}italic_V start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT. Moreover no two consecutive groups of any H𝐻Hitalic_H map to the same Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT.

Lemma 7.

If (G,κ)𝐺𝜅(G,\kappa)( italic_G , italic_κ ) is a yes-instance of (Regular) Multicolored Clique then there exists a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q whose length is 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

Proof.

Let {vj11,vj22,,vjii,,vjκκ}superscriptsubscript𝑣subscript𝑗11superscriptsubscript𝑣subscript𝑗22superscriptsubscript𝑣subscript𝑗𝑖𝑖superscriptsubscript𝑣subscript𝑗𝜅𝜅\{v_{j_{1}}^{1},v_{j_{2}}^{2},\ldots,v_{j_{i}}^{i},\ldots,v_{j_{\kappa}}^{% \kappa}\}{ italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT , italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT , … , italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , … , italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_κ end_POSTSUPERSCRIPT } denote the vertices of a multicolored clique in G𝐺Gitalic_G. Let us exhibit a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q. To do so, let us first give a reconfiguration sequence from P𝑃Pitalic_P to a path that contains vertices in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT as follows:

  • We move one by one the tokens of P𝑃Pitalic_P to ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT by increasing distance to s𝑠sitalic_s (in ascending order).

  • For every layer iq𝑖𝑞i\leq qitalic_i ≤ italic_q, we jump (in order) the token at layer i1𝑖1i\geq 1italic_i ≥ 1 in P𝑃Pitalic_P to vertex vj1subscript𝑣subscript𝑗1v_{j_{1}}italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT in the i𝑖iitalic_ith layer of Γ=Γ(q,H,q)subscriptΓΓ𝑞𝐻𝑞\Gamma_{\star}=\Gamma(q,H,q)roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT = roman_Γ ( italic_q , italic_H , italic_q ) as long as iq+1𝑖𝑞1i\leq q+1italic_i ≤ italic_q + 1 (as H1subscript𝐻1H_{1}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT maps to V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT by assumption). In other words, we map all the vertices at the beginning of the path to the copy of vertex vj11superscriptsubscript𝑣subscript𝑗11v_{j_{1}}^{1}italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT.

  • Then, for any layer q+1<iq+1+α𝑞1𝑖𝑞1𝛼q+1<i\leq q+1+\alphaitalic_q + 1 < italic_i ≤ italic_q + 1 + italic_α, we jump the token at layer i𝑖iitalic_i of P𝑃Pitalic_P to vertex hjμ(i)μ(i)superscriptsubscriptsubscript𝑗𝜇𝑖𝜇𝑖h_{j_{\mu(i)}}^{\mu(i)}italic_h start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_μ ( italic_i ) end_POSTSUPERSCRIPT of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT.

  • For every i>q+1+α𝑖𝑞1𝛼i>q+1+\alphaitalic_i > italic_q + 1 + italic_α, we jump the i𝑖iitalic_ith vertex of P𝑃Pitalic_P to vertex vjκsubscript𝑣subscript𝑗𝜅v_{j_{\kappa}}italic_v start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT end_POSTSUBSCRIPT (since we assume that H𝐻Hitalic_H ends with a set that maps to Vκsubscript𝑉𝜅V_{\kappa}italic_V start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT).

The fact that we maintain an st𝑠𝑡stitalic_s italic_t-path after every token jump follows from Observation 6 combined with the fact that vertices of P𝑃Pitalic_P are connected to all vertices of the preceding layer of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT.

Once we have reached a properly colored st𝑠𝑡stitalic_s italic_t-path P1subscript𝑃1P_{1}italic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT fully contained in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT (in exactly 10κ210superscript𝜅210\kappa^{2}10 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT steps), we can use a similar strategy to reach a properly colored st𝑠𝑡stitalic_s italic_t-path P2subscript𝑃2P_{2}italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT fully contained in Γ1,j1subscriptΓ1subscript𝑗1\Gamma_{1,j_{1}}roman_Γ start_POSTSUBSCRIPT 1 , italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT. More formally, we move by increasing order all the tokens of P1subscript𝑃1P_{1}italic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT in such a way the i𝑖iitalic_i-th vertex of P2subscript𝑃2P_{2}italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT is a the copy of the (i+1)𝑖1(i+1)( italic_i + 1 )-th vertex of P1subscript𝑃1P_{1}italic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT. Note that it is well-defined since, for every i𝑖iitalic_i such that μ(i)=1𝜇𝑖1\mu(i)=1italic_μ ( italic_i ) = 1, the vertex hj1subscriptsubscript𝑗1h_{j_{1}}italic_h start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT belongs to P2subscript𝑃2P_{2}italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT. Observe that during that transformation the vertices “shift one layer to the left”. We then use a similar transformation to transform P2subscript𝑃2P_{2}italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT into a path P3subscript𝑃3P_{3}italic_P start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT fully contained in Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT. We use 20κ220superscript𝜅220\kappa^{2}20 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT steps from P1subscript𝑃1P_{1}italic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT to P3subscript𝑃3P_{3}italic_P start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT.

We repeat this procedure for every 2iκ2𝑖𝜅2\leq i\leq\kappa2 ≤ italic_i ≤ italic_κ to transform the path in Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT into a path in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT in 20κ220superscript𝜅220\kappa^{2}20 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT jumps. Then we need an extra 10κ210superscript𝜅210\kappa^{2}10 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT steps to go from Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT to Q𝑄Qitalic_Q (using the converse of the transformation from P𝑃Pitalic_P to ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT). Hence, the length of the reconfiguration sequence is exactly 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ). ∎

In order to prove the other direction, we first establish some useful properties of our construction. We let Γ=Γ0,0subscriptΓsubscriptΓ00\Gamma_{\star}=\Gamma_{0,0}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT = roman_Γ start_POSTSUBSCRIPT 0 , 0 end_POSTSUBSCRIPT and Γi,=Γi,n+1subscriptΓ𝑖subscriptΓ𝑖𝑛1\Gamma_{i,\star}=\Gamma_{i,n+1}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT = roman_Γ start_POSTSUBSCRIPT italic_i , italic_n + 1 end_POSTSUBSCRIPT. We say Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT comes before or above Γi,jsubscriptΓsuperscript𝑖superscript𝑗\Gamma_{i^{\prime},j^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT whenever i<i𝑖superscript𝑖i<i^{\prime}italic_i < italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT or i=i𝑖superscript𝑖i=i^{\prime}italic_i = italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and j<j𝑗superscript𝑗j<j^{\prime}italic_j < italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT (we also assume that P𝑃Pitalic_P appears first and Q𝑄Qitalic_Q appears last, i.e., P=Γ1,1𝑃subscriptΓ11P=\Gamma_{-1,-1}italic_P = roman_Γ start_POSTSUBSCRIPT - 1 , - 1 end_POSTSUBSCRIPT and Q=Γn+1,n+1𝑄subscriptΓ𝑛1𝑛1Q=\Gamma_{n+1,n+1}italic_Q = roman_Γ start_POSTSUBSCRIPT italic_n + 1 , italic_n + 1 end_POSTSUBSCRIPT). We say that two consecutive internal vertices vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT of an st𝑠𝑡stitalic_s italic_t-path P𝑃Pitalic_P are siblings if they belong to the same graph Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT (that is they belong to the same row in the representation of Figure 5). Otherwise, we say vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is above (or below) vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT if the graph of vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is above (below) that of vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT (that is vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is in the row above or below vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT in the representation of Figure 5).

Lemma 8.

Let P𝑃Pitalic_P be a shortest path from s𝑠sitalic_s to t𝑡titalic_t in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Let vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT denote the p𝑝pitalic_pth internal vertex of P𝑃Pitalic_P. Then:

  • For every p𝑝pitalic_p, vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is a vertex of the p𝑝pitalic_pth layer of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

  • For every two consecutive internal vertices of P𝑃Pitalic_P, vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT, either vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT are siblings or vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is below vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT.

  • For every p𝑝pitalic_p, if vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT belongs to Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT then no vertex vpsubscript𝑣superscript𝑝v_{p^{\prime}}italic_v start_POSTSUBSCRIPT italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT with ppsuperscript𝑝𝑝p^{\prime}\geq pitalic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≥ italic_p is below vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT.

  • For every p𝑝pitalic_p, if vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT belongs to Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT then vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT is either in Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT or Γi,n+1subscriptΓ𝑖𝑛1\Gamma_{i,n+1}roman_Γ start_POSTSUBSCRIPT italic_i , italic_n + 1 end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is either in Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT or Γi1,n+1subscriptΓ𝑖1𝑛1\Gamma_{i-1,n+1}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , italic_n + 1 end_POSTSUBSCRIPT.

Proof.

The first point is trivial. The second point follows from the fact that there are no edges connecting a vertex of the (p+1)𝑝1(p+1)( italic_p + 1 )-th layer of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT to the p𝑝pitalic_pth layer of Γi,jsubscriptΓsuperscript𝑖superscript𝑗\Gamma_{i^{\prime},j^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT with i<isuperscript𝑖𝑖i^{\prime}<iitalic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT < italic_i. The third point is a simple consequence of the second. The fourth point follows from the construction of the graph. ∎

Our next result states that the reconfiguration sequence described in Lemma 7 is the best possible. We say that a token τ𝜏\tauitalic_τ makes a forward move (backward move) whenever the move decreases (increases) the number of moves still required by τ𝜏\tauitalic_τ to reach Q𝑄Qitalic_Q. When a move causes neither a decrease nor an increase we say that token τ𝜏\tauitalic_τ makes a local move. We will prove that, if it exists, there is a transformation that does not make any local or backward move. That permits to control the shape of a shortest reconfiguration sequence and then ensures that this reconfiguration sequence can be interpreted as a multicolored clique of G𝐺Gitalic_G.

Lemma 9.

Any reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q requires at least 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) token moves. Moreover, if there exists a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q then there exists one of length exactly 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

Proof.

Recall that the number of internal vertices in any st𝑠𝑡stitalic_s italic_t-path in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is exactly 10κ210superscript𝜅210\kappa^{2}10 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. Hence, to establish the lower bound of 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ), it suffices to show that every token on an internal vertex of P𝑃Pitalic_P has to make at least 2κ+22𝜅22\kappa+22 italic_κ + 2 forward moves.

In order to go from the i𝑖iitalic_i-th vertex of P𝑃Pitalic_P to the i𝑖iitalic_i-th vertex of Q𝑄Qitalic_Q, one has to pass through a vertex of Γj,subscriptΓ𝑗\Gamma_{j,\star}roman_Γ start_POSTSUBSCRIPT italic_j , ⋆ end_POSTSUBSCRIPT for every j𝑗jitalic_j in increasing order (since the vertices of Γj,subscriptΓ𝑗\Gamma_{j,\star}roman_Γ start_POSTSUBSCRIPT italic_j , ⋆ end_POSTSUBSCRIPT in the i𝑖iitalic_i-th layer separate Γj,rsubscriptΓsuperscript𝑗𝑟\Gamma_{j^{\prime},r}roman_Γ start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_r end_POSTSUBSCRIPT with jjsuperscript𝑗𝑗j^{\prime}\leq jitalic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≤ italic_j from Γj,rsubscriptΓsuperscript𝑗𝑟\Gamma_{j^{\prime},r}roman_Γ start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_r end_POSTSUBSCRIPT with j>jsuperscript𝑗𝑗j^{\prime}>jitalic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT > italic_j). As vertices of Γj,subscriptΓ𝑗\Gamma_{j,\star}roman_Γ start_POSTSUBSCRIPT italic_j , ⋆ end_POSTSUBSCRIPT are anti-complete to Γj,subscriptΓsuperscript𝑗\Gamma_{j^{\prime},\star}roman_Γ start_POSTSUBSCRIPT italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , ⋆ end_POSTSUBSCRIPT, at least 2κ2𝜅2\kappa2 italic_κ moves are needed. Since we also need to move from P𝑃Pitalic_P to ΓsubscriptΓ\Gamma_{*}roman_Γ start_POSTSUBSCRIPT ∗ end_POSTSUBSCRIPT and from Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT to Q𝑄Qitalic_Q, we get the desired bound.

So to conclude we have to prove that all the shortest reconfiguration sequences have length 20(κ3+κ2)+120superscript𝜅3superscript𝜅2120(\kappa^{3}+\kappa^{2})+120 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) + 1. Assume by contradiction that P𝑃Pitalic_P can be transformed to Q𝑄Qitalic_Q and that every reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q has length at least 20(κ3+κ2)+120superscript𝜅3superscript𝜅2120(\kappa^{3}+\kappa^{2})+120 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) + 1. Let σ𝜎\sigmaitalic_σ denote such a shortest reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q. It follows that at least one token must make at least 2κ+32𝜅32\kappa+32 italic_κ + 3 moves in σ𝜎\sigmaitalic_σ. This implies that the token must make at least one local or backward move; a token on P𝑃Pitalic_P reaches Q𝑄Qitalic_Q after a sequence of exactly 2κ+22𝜅22\kappa+22 italic_κ + 2 forward moves. We claim that the existence of a local or backward move in σ𝜎\sigmaitalic_σ contradicts the assumption that σ𝜎\sigmaitalic_σ is a shortest reconfiguration sequence.

Consider the first token τ𝜏\tauitalic_τ that makes a non-forward move in σ𝜎\sigmaitalic_σ. Assume that τ𝜏\tauitalic_τ makes a local move. By Lemma 8, when τ𝜏\tauitalic_τ jumps from vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT to vpsubscriptsuperscript𝑣𝑝v^{\prime}_{p}italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT (in the same layer of the same row), it must be the case that vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT is either a sibling of vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT or below vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is either a sibling of vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT or above vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. If one of vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT or vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is not a sibling of vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT then no local move is possible; since only matching edges exist between non-siblings777Local moves are possible when vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is in P𝑃Pitalic_P but similar arguments imply that we can delete all local moves that happen while vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is in P𝑃Pitalic_P and only jump τ𝜏\tauitalic_τ from P𝑃Pitalic_P to its final position in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT immediately before the first move of the token on vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT. The same is true when vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is in Q𝑄Qitalic_Q and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is in Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT.. Hence, both vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT must be sibling of vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Note that either vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT or vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and vp+1subscript𝑣𝑝1v_{p+1}italic_v start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT must belong to the same group. Assume, without loss of generality, that vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and vpsubscript𝑣𝑝v_{p}italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT belong to the same group. This implies that π(vp1)=π(vp)𝜋subscript𝑣𝑝1𝜋subscript𝑣𝑝\pi(v_{p-1})=\pi(v_{p})italic_π ( italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT ) = italic_π ( italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ); since only matching edges are added within a group. Therefore, as π(vp)π(vp)=π(vp1)𝜋subscriptsuperscript𝑣𝑝𝜋subscript𝑣𝑝𝜋subscript𝑣𝑝1\pi(v^{\prime}_{p})\neq\pi(v_{p})=\pi(v_{p-1})italic_π ( italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) ≠ italic_π ( italic_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) = italic_π ( italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT ), vpsubscriptsuperscript𝑣𝑝v^{\prime}_{p}italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is not adjacent to vp1subscript𝑣𝑝1v_{p-1}italic_v start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and the local move is impossible, a contradiction.

So we can assume that the first non-forward move in σ𝜎\sigmaitalic_σ is a backward move of token τ𝜏\tauitalic_τ. We denote the resulting path by Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT. We let Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT denote the path resulting from the last forward move of τ𝜏\tauitalic_τ prior to the backward move. We modify σ𝜎\sigmaitalic_σ to σsuperscript𝜎\sigma^{\prime}italic_σ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT by deleting both the first backward move and the closest preceding forward move of τ𝜏\tauitalic_τ. We claim that σsuperscript𝜎\sigma^{\prime}italic_σ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is a valid reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q that is shorter than σ𝜎\sigmaitalic_σ, obtaining the required contradiction.

To see why σsuperscript𝜎\sigma^{\prime}italic_σ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is valid, we consider the vertices occupied by τ𝜏\tauitalic_τ (and its two neighbors) between Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT. The last forward move of token τ𝜏\tauitalic_τ jumps forward from some vertex xpsubscript𝑥𝑝x_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT above zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT to zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Let xp1subscript𝑥𝑝1x_{p-1}italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and xp+1subscript𝑥𝑝1x_{p+1}italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT denote the two neighbors of xpsubscript𝑥𝑝x_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT in the path preceding Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and in Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT. The first backward jump of τ𝜏\tauitalic_τ jumps from vertex zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT to vertex ypsubscript𝑦𝑝y_{p}italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT above zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Let yp1subscript𝑦𝑝1y_{p-1}italic_y start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT and yp+1subscript𝑦𝑝1y_{p+1}italic_y start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT denote the two neighbors of ypsubscript𝑦𝑝y_{p}italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT in the path preceding Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT and in Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT. By Lemma 8, it must be the case that xp1subscript𝑥𝑝1x_{p-1}italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT is a sibling of zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and below xpsubscript𝑥𝑝x_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and xp+1subscript𝑥𝑝1x_{p+1}italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is a sibling of xpsubscript𝑥𝑝x_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and above zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Also by Lemma 8, it must be the case that yp1subscript𝑦𝑝1y_{p-1}italic_y start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT is a sibling of zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and below ypsubscript𝑦𝑝y_{p}italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and yp+1subscript𝑦𝑝1y_{p+1}italic_y start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT is a sibling of ypsubscript𝑦𝑝y_{p}italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and above zpsubscript𝑧𝑝z_{p}italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. By construction, we have π(xp1)=π(xp)𝜋subscript𝑥𝑝1𝜋subscript𝑥𝑝\pi(x_{p-1})=\pi(x_{p})italic_π ( italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT ) = italic_π ( italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ), π(zp)=π(xp+1)𝜋subscript𝑧𝑝𝜋subscript𝑥𝑝1\pi(z_{p})=\pi(x_{p+1})italic_π ( italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) = italic_π ( italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT ), π(yp1)=π(yp)𝜋subscript𝑦𝑝1𝜋subscript𝑦𝑝\pi(y_{p-1})=\pi(y_{p})italic_π ( italic_y start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT ) = italic_π ( italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ), and π(zp)=π(yp+1)𝜋subscript𝑧𝑝𝜋subscript𝑦𝑝1\pi(z_{p})=\pi(y_{p+1})italic_π ( italic_z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) = italic_π ( italic_y start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT ).

The token on xp1subscript𝑥𝑝1x_{p-1}italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT cannot move between Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT as any forward move of said token will require a backward move prior to Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT, contradicting our choice of τ𝜏\tauitalic_τ. Consequently, we have xp1=yp1subscript𝑥𝑝1subscript𝑦𝑝1x_{p-1}=y_{p-1}italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT. For the same reason, the token on xp+1subscript𝑥𝑝1x_{p+1}italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT cannot move between Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT, implying xp+1=yp+1subscript𝑥𝑝1subscript𝑦𝑝1x_{p+1}=y_{p+1}italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT. Putting it all together, we have xp1=yp1subscript𝑥𝑝1subscript𝑦𝑝1x_{p-1}=y_{p-1}italic_x start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT, xp+1=yp+1subscript𝑥𝑝1subscript𝑦𝑝1x_{p+1}=y_{p+1}italic_x start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT, and xp=ypsubscript𝑥𝑝subscript𝑦𝑝x_{p}=y_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Said differently, the token preceding τ𝜏\tauitalic_τ and the token succeeding τ𝜏\tauitalic_τ do not move between Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT. Combined with the fact that xp=ypsubscript𝑥𝑝subscript𝑦𝑝x_{p}=y_{p}italic_x start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT = italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT, we know that if we execute all moves of σ𝜎\sigmaitalic_σ prior to Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT excluding the moves of Pfsubscript𝑃𝑓P_{f}italic_P start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT and Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT then we still reach Pbsubscript𝑃𝑏P_{b}italic_P start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT. However, this contradicts the fact that σ𝜎\sigmaitalic_σ is a shortest reconfiguration sequence. Hence, any shortest reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q consists of exactly 20(κ3+κ2)20superscript𝜅3superscript𝜅220(\kappa^{3}+\kappa^{2})20 ( italic_κ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) forward moves, as needed. ∎

Given Lemma 8 and Lemma 9, it is easy to see that a shortest reconfiguration from P𝑃Pitalic_P to Q𝑄Qitalic_Q in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT must be monotone, i.e., tokens always move towards Q𝑄Qitalic_Q and every path in the reconfiguration sequence consists of a sequence of vertices (ordered from s𝑠sitalic_s to t𝑡titalic_t) whose distance from Q𝑄Qitalic_Q monotonically increases. The last crucial brick in our proof requires a few more definitions. We use H𝐻Hitalic_H-layer to denote a layer in some Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT that belongs to H𝐻Hitalic_H. Moreover, when Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT is clear from context, we let μ1(i)={Hj1,Hj2,}superscript𝜇1𝑖subscript𝐻subscript𝑗1subscript𝐻subscript𝑗2\mu^{-1}(i)=\{H_{j_{1}},H_{j_{2}},\ldots\}italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) = { italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , … } denote the set of all H𝐻Hitalic_H-layers in Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT that map to Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ]. For a reconfiguration sequence σ𝜎\sigmaitalic_σ, we let Γ(σ)Γ𝜎\Gamma(\sigma)roman_Γ ( italic_σ ) denote the set of all graphs ΓΓ\Gammaroman_Γ that are touched by σ𝜎\sigmaitalic_σ, i.e., a graph is touched by σ𝜎\sigmaitalic_σ if it contains a touched vertex and a vertex is touched by σ𝜎\sigmaitalic_σ if it ever receives a token. Note that Γ(σ)Γ𝜎\Gamma(\sigma)roman_Γ ( italic_σ ) contains the selection gadget, the boundary gadgets, and at least one graph from each verification gadget.

Lemma 10.

Assume that there exists a reconfiguration sequence σ𝜎\sigmaitalic_σ from P𝑃Pitalic_P to Q𝑄Qitalic_Q in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. For i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ], let μ1(i)={Hj1,Hj2,}superscript𝜇1𝑖subscript𝐻subscript𝑗1subscript𝐻subscript𝑗2\mu^{-1}(i)=\{H_{j_{1}},H_{j_{2}},\ldots\}italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) = { italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , … } denote the H𝐻Hitalic_H-layers in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT that map to Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Then:

  • For every two consecutive sets Hjsubscript𝐻𝑗H_{j}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and Hj+1subscript𝐻𝑗1H_{j+1}italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT in ΓΓ(σ)ΓΓ𝜎\Gamma\in\Gamma(\sigma)roman_Γ ∈ roman_Γ ( italic_σ ) there exists at least one st𝑠𝑡stitalic_s italic_t-path Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in the sequence σ𝜎\sigmaitalic_σ such that Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT contains one vertex in Hjsubscript𝐻𝑗H_{j}italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and one vertex in Hj+1subscript𝐻𝑗1H_{j+1}italic_H start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT.

  • If σ𝜎\sigmaitalic_σ is a shortest reconfiguration sequence then the intersection of PσV(P)subscriptsuperscript𝑃𝜎𝑉superscript𝑃\bigcup_{P^{\prime}\in\sigma}{V(P^{\prime})}⋃ start_POSTSUBSCRIPT italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_σ end_POSTSUBSCRIPT italic_V ( italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) with Hjμ1(i)V(Hj)subscriptsubscript𝐻𝑗superscript𝜇1𝑖𝑉subscript𝐻𝑗\bigcup_{H_{j}\in\mu^{-1}(i)}{V(H_{j})}⋃ start_POSTSUBSCRIPT italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∈ italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) end_POSTSUBSCRIPT italic_V ( italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) includes only vertices that map to the same vertex of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. In other words, for any two vertices w𝑤witalic_w and wsuperscript𝑤w^{\prime}italic_w start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in W=PσV(P)Hjμ1(i)V(Hj)𝑊subscriptsuperscript𝑃𝜎𝑉superscript𝑃subscriptsubscript𝐻𝑗superscript𝜇1𝑖𝑉subscript𝐻𝑗W=\bigcup_{P^{\prime}\in\sigma}{V(P^{\prime})}\cap\bigcup_{H_{j}\in\mu^{-1}(i)% }{V(H_{j})}italic_W = ⋃ start_POSTSUBSCRIPT italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_σ end_POSTSUBSCRIPT italic_V ( italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∩ ⋃ start_POSTSUBSCRIPT italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∈ italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) end_POSTSUBSCRIPT italic_V ( italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ), we have π(w)=π(w)𝜋𝑤𝜋superscript𝑤\pi(w)=\pi(w^{\prime})italic_π ( italic_w ) = italic_π ( italic_w start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ).

Proof.

The fact that for every two consecutive sets in ΓΓ(σ)ΓΓ𝜎\Gamma\in\Gamma(\sigma)roman_Γ ∈ roman_Γ ( italic_σ ) there exists at least one st𝑠𝑡stitalic_s italic_t-path Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in σ𝜎\sigmaitalic_σ that intersects with both sets follows from Lemma 8; otherwise a token jumps beyond ΓΓ\Gammaroman_Γ, which is impossible when ΓΓ(σ)ΓΓ𝜎\Gamma\in\Gamma(\sigma)roman_Γ ∈ roman_Γ ( italic_σ ).

Assume that there exist two sets {Hj1,Hj2}μ1(i)subscript𝐻subscript𝑗1subscript𝐻subscript𝑗2superscript𝜇1𝑖\{H_{j_{1}},H_{j_{2}}\}\in\mu^{-1}(i){ italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT } ∈ italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) such that Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT intersect with Hj1subscript𝐻subscript𝑗1H_{j_{1}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT on vertex haj1subscriptsuperscriptsubscript𝑗1𝑎h^{j_{1}}_{a}italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT and P′′superscript𝑃′′P^{\prime\prime}italic_P start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT (possibly equal to Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT) intersects with Hj2subscript𝐻subscript𝑗2H_{j_{2}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT on vertex hbj2subscriptsuperscriptsubscript𝑗2𝑏h^{j_{2}}_{b}italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT, where π(haj1)π(hbj2)𝜋subscriptsuperscriptsubscript𝑗1𝑎𝜋subscriptsuperscriptsubscript𝑗2𝑏\pi(h^{j_{1}}_{a})\neq\pi(h^{j_{2}}_{b})italic_π ( italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ) ≠ italic_π ( italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT ) (recall that μ(j1)=μ(j2)=i𝜇subscript𝑗1𝜇subscript𝑗2𝑖\mu(j_{1})=\mu(j_{2})=iitalic_μ ( italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = italic_μ ( italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_i). Assume, without loss of generality, that j1<j2subscript𝑗1subscript𝑗2j_{1}<j_{2}italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT and Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT appears before P′′superscript𝑃′′P^{\prime\prime}italic_P start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT in σ𝜎\sigmaitalic_σ (and Hj1,Hj2subscript𝐻subscript𝑗1subscript𝐻subscript𝑗2H_{j_{1}},H_{j_{2}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT belong to different groups). When σ𝜎\sigmaitalic_σ is a shortest reconfiguration sequence, it follows that no token ever makes a backward or local jump, i.e., a jump that does not bring the token closer to its final position in Q𝑄Qitalic_Q (Lemma 9). Hence, since Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT includes a vertex of Hj1subscript𝐻subscript𝑗1H_{j_{1}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT all of its remaining vertices after Hj1subscript𝐻subscript𝑗1H_{j_{1}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT (all the vertices in layers larger than j1subscript𝑗1j_{1}italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT) must belong to ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT or P𝑃Pitalic_P. In fact, the aforementioned vertices can be partitioned into two vertex-disjoint paths with the first path contained in ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT followed by a (possibly empty) path contained in P𝑃Pitalic_P. The same is true for P′′superscript𝑃′′P^{\prime\prime}italic_P start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT and Hj2subscript𝐻subscript𝑗2H_{j_{2}}italic_H start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT.

Consider the first time the token preceding but closest to the token on haj1subscriptsuperscriptsubscript𝑗1𝑎h^{j_{1}}_{a}italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT jumps to some vertex x𝑥xitalic_x in some layer of Γi,psubscriptΓ𝑖𝑝\Gamma_{i,p}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p end_POSTSUBSCRIPT, p[n]𝑝delimited-[]𝑛p\in[n]italic_p ∈ [ italic_n ]. Let us denote the resulting path by Pxsubscript𝑃𝑥P_{x}italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT. Similarly, consider the first time the token preceding but closest to the token on hbj2subscriptsuperscriptsubscript𝑗2𝑏h^{j_{2}}_{b}italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT jumps to some vertex y𝑦yitalic_y in some layer of Γi,psubscriptΓ𝑖superscript𝑝\Gamma_{i,p^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, p[n]superscript𝑝delimited-[]𝑛p^{\prime}\in[n]italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ [ italic_n ]. Let us denote the resulting path by Pysubscript𝑃𝑦P_{y}italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT. By construction, each layer of Γi,psubscriptΓ𝑖𝑝\Gamma_{i,p}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p end_POSTSUBSCRIPT (or Γi,psubscriptΓ𝑖superscript𝑝\Gamma_{i,p^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT) corresponding to Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT contains a unique vertex and all those vertices map to the same vertex of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (the p𝑝pitalic_pth vertex or the psuperscript𝑝p^{\prime}italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPTth vertex, respectively). All vertices of Pxsubscript𝑃𝑥P_{x}italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT after x𝑥xitalic_x must be either at the same level or above x𝑥xitalic_x (Lemma 8). The same is true for Pysubscript𝑃𝑦P_{y}italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT and all vertices of Pysubscript𝑃𝑦P_{y}italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT after y𝑦yitalic_y. We now show that it is impossible for Pxsubscript𝑃𝑥P_{x}italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT to reach Pysubscript𝑃𝑦P_{y}italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT without backward moves, which contradicts the assumption that σ𝜎\sigmaitalic_σ is shortest. Assume otherwise. When the token jumps to y𝑦yitalic_y it must be the case that the token after y𝑦yitalic_y belongs to some vertex w𝑤witalic_w which is one level above y𝑦yitalic_y and such that π(y)=π(w)𝜋𝑦𝜋𝑤\pi(y)=\pi(w)italic_π ( italic_y ) = italic_π ( italic_w ) (by construction only matching edges are added). By repeated application of the same argument we get that π(y)=π(hbj2)π(haj1)=π(x)𝜋𝑦𝜋subscriptsuperscriptsubscript𝑗2𝑏𝜋subscriptsuperscriptsubscript𝑗1𝑎𝜋𝑥\pi(y)=\pi(h^{j_{2}}_{b})\neq\pi(h^{j_{1}}_{a})=\pi(x)italic_π ( italic_y ) = italic_π ( italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT ) ≠ italic_π ( italic_h start_POSTSUPERSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ) = italic_π ( italic_x ). Consequently, we have Γi,pΓi,psubscriptΓ𝑖𝑝subscriptΓ𝑖superscript𝑝\Gamma_{i,p}\neq\Gamma_{i,p^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p end_POSTSUBSCRIPT ≠ roman_Γ start_POSTSUBSCRIPT italic_i , italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT (or simply pp𝑝superscript𝑝p\neq p^{\prime}italic_p ≠ italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT). Assume, without loss of generality, that p<p𝑝superscript𝑝p<p^{\prime}italic_p < italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Before any token of Pxsubscript𝑃𝑥P_{x}italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT can jump to a vertex in Γi,psubscriptΓ𝑖superscript𝑝\Gamma_{i,p^{\prime}}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT it must be the case that all tokens (in Γi,psubscriptΓ𝑖𝑝\Gamma_{i,p}roman_Γ start_POSTSUBSCRIPT italic_i , italic_p end_POSTSUBSCRIPT) have moved to either Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT and above or to Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT and below. The former case implies at least one backward jump and the latter case implies at least one forward jump followed by a backward jump. In both cases, we get the required contradiction. ∎

We now have all the ingredients to finish the proof.

Lemma 11.

If (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) is a yes-instance of Shortest Path Reconfiguration then (G,κ)𝐺𝜅(G,\kappa)( italic_G , italic_κ ) is a yes-instance of (Regular) Multicolored Clique.

Proof.

Let (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) be a yes-instance and let σ𝜎\sigmaitalic_σ be a shortest reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q. For i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ] and Pσsuperscript𝑃𝜎P^{\prime}\in\sigmaitalic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_σ, let Wi=PσV(P)Hjμ1(i)V(Hj)subscript𝑊𝑖subscriptsuperscript𝑃𝜎𝑉superscript𝑃subscriptsubscript𝐻𝑗superscript𝜇1𝑖𝑉subscript𝐻𝑗W_{i}=\bigcup_{P^{\prime}\in\sigma}{V(P^{\prime})}\cap\bigcup_{H_{j}\in\mu^{-1% }(i)}{V(H_{j})}italic_W start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ⋃ start_POSTSUBSCRIPT italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_σ end_POSTSUBSCRIPT italic_V ( italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∩ ⋃ start_POSTSUBSCRIPT italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ∈ italic_μ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_i ) end_POSTSUBSCRIPT italic_V ( italic_H start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ). Moreover, let π(Wi)={π(w)wWi}𝜋subscript𝑊𝑖conditional-set𝜋𝑤𝑤subscript𝑊𝑖\pi(W_{i})=\{\pi(w)\mid w\in W_{i}\}italic_π ( italic_W start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) = { italic_π ( italic_w ) ∣ italic_w ∈ italic_W start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT }. By Lemma 10, we have |π(Wi)|=1𝜋subscript𝑊𝑖1|\pi(W_{i})|=1| italic_π ( italic_W start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) | = 1 and we denote the vertex by vjiisubscriptsuperscript𝑣𝑖subscript𝑗𝑖v^{i}_{j_{i}}italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT. Consider the κ𝜅\kappaitalic_κ vertices {vj11,,vjii,,vjκκ}subscriptsuperscript𝑣1subscript𝑗1subscriptsuperscript𝑣𝑖subscript𝑗𝑖subscriptsuperscript𝑣𝜅subscript𝑗𝜅\{v^{1}_{j_{1}},\ldots,v^{i}_{j_{i}},\ldots,v^{\kappa}_{j_{\kappa}}\}{ italic_v start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , … , italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT , … , italic_v start_POSTSUPERSCRIPT italic_κ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT end_POSTSUBSCRIPT }. The fact that those vertices must form a multicolored clique in G𝐺Gitalic_G again follows from Lemma 10; as every pair must appear consecutively in two H𝐻Hitalic_H-layers of ΓsubscriptΓ\Gamma_{\star}roman_Γ start_POSTSUBSCRIPT ⋆ end_POSTSUBSCRIPT and some path of σ𝜎\sigmaitalic_σ must intersect with both. This completes the proof. ∎

Refer to caption
Figure 6: An example of our reduction in the case of token sliding.
Corollary 12.

SPR is W[1]-hard parameterized by k𝑘kitalic_k and SSPR is W[1]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ under the token jumping model.

Proof.

The W[1]-hardness of SPR under the token jumping model follows from Lemmas 7 and 11. The W[1]-hardness of SSPR under the token jumping model follows by combining the aforementioned lemmas with Lemma 9. ∎

Corollary 13.

SPR is W[1]-hard parameterized by k𝑘kitalic_k and SSPR is W[1]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ under the token sliding model.

Proof.

We explain how to adapt the reduction for the token sliding model. We modify our construction in two ways. We “align” all the gadgets and add “vertical matchings” (see Figure 6). Formally, all of our graphs Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT will be either of the form Γ(3,H,3)Γ3𝐻3\Gamma(3,H,3)roman_Γ ( 3 , italic_H , 3 ) or Γ(3,H(h),3)Γ3𝐻3\Gamma(3,H(h),3)roman_Γ ( 3 , italic_H ( italic_h ) , 3 ). We add edges between sets appearing at consecutive layers in the natural way.

We describe the edges between Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT, Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, and Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT; there are no edges between the different graphs in ΓisuperscriptΓ𝑖\Gamma^{i}roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT. Let L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT denote two consecutive layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, let M𝑀Mitalic_M and Msuperscript𝑀M^{\prime}italic_M start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT denote the same two layers (as L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT) in Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT, and let N𝑁Nitalic_N and Nsuperscript𝑁N^{\prime}italic_N start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT denote the same two layers (as L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT) in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT. We add a matching from M𝑀Mitalic_M to L𝐿Litalic_L and a matching from L𝐿Litalic_L to N𝑁Nitalic_N (when L𝐿Litalic_L consist of a single vertex we instead add a single edge to the corresponding image). We connect L𝐿Litalic_L and Msuperscript𝑀M^{\prime}italic_M start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT as well as N𝑁Nitalic_N and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT the same way we connect L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. That is, if L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT belong to different groups, i.e., they map to different sets, we connect L𝐿Litalic_L and Msuperscript𝑀M^{\prime}italic_M start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, N𝑁Nitalic_N and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, and L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT using edges of G𝐺Gitalic_G. If L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT belong to the same group, we connect L𝐿Litalic_L and Msuperscript𝑀M^{\prime}italic_M start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, N𝑁Nitalic_N and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, and L𝐿Litalic_L and Lsuperscript𝐿L^{\prime}italic_L start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT using matchings.

Observe that every vertex has at most one neighbor in the layer above it (when it exists) and at most one neighbor in the layer below it (when it exists). Combining this observation with the fact that we are in the token sliding model ensures that we are always selecting the same vertex in each layer. Hence, we can mimic the proof of Lemma 10 to conclude the proof. ∎

2.2 Graphs of bounded degeneracy

The goal of this section is to adapt the previous reduction to show that both problems remain hard on graphs of bounded degeneracy.

2.2.1 Token jumping

We start with the case of token jumping. Note that the previous reduction offers two rather general (informal) properties:

  1. 1.

    We can guarantee the selection of adjacent pairs of elements from different sets; and

  2. 2.

    we can guarantee that the same element is selected from a collection of sets.

Before diving into the details of proof, let us try to understand why we might have large degree or large degeneracy in our constructed graphs. If we look at a vertex v𝑣vitalic_v in a set of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, then, by construction, it has no neighbor in the different graphs of ΓisuperscriptΓ𝑖\Gamma^{i}roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, no neighbor in sets just above or below it, no neighbor in sets below and to the right or above and to the left of it (Figure 5). In fact, in addition to neighbors in preceding and succeeding layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, v𝑣vitalic_v has exactly one neighbor in one set below and to the left and exactly one neighbor in one set above and to the right. Hence, in order to reduce the degeneracy one simply has to reduce the degeneracy in every graph Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT. To do so, we will reduce the degeneracy of the graph Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT by subdividing the edges of G𝐺Gitalic_G and adding sets to represent those edges. Recall that we start with an instance (G,κ)𝐺𝜅(G,\kappa)( italic_G , italic_κ ) of RMC where each vertex in G𝐺Gitalic_G has exactly r𝑟ritalic_r neighbors in each of the κ1𝜅1\kappa-1italic_κ - 1 other sets. We let Ei,jsubscript𝐸𝑖𝑗E_{i,j}italic_E start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT denote the set of edges between vertices in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and vertices in Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. The idea is that in the construction of the previous section, we add a new set Vi,jsubscript𝑉𝑖𝑗V_{i,j}italic_V start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT between every consecutive pair of sets Vi,Vjsubscript𝑉𝑖subscript𝑉𝑗V_{i},V_{j}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. In other words, we replace Ei,jsubscript𝐸𝑖𝑗E_{i,j}italic_E start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT by a set Vi,jsubscript𝑉𝑖𝑗V_{i,j}italic_V start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT containing one vertex vesubscript𝑣𝑒v_{e}italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT for each edge eEi,j𝑒subscript𝐸𝑖𝑗e\in E_{i,j}italic_e ∈ italic_E start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT. For veVi,jsubscript𝑣𝑒subscript𝑉𝑖𝑗v_{e}\in V_{i,j}italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT ∈ italic_V start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, where e={u,w}𝑒𝑢𝑤e=\{u,w\}italic_e = { italic_u , italic_w }, we add the edges {ve,u}subscript𝑣𝑒𝑢\{v_{e},u\}{ italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT , italic_u } and {ve,w}subscript𝑣𝑒𝑤\{v_{e},w\}{ italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT , italic_w }. We refine the partition of V𝑉Vitalic_V into sets {Vii[κ]}conditional-setsubscript𝑉𝑖𝑖delimited-[]𝜅\{V_{i}\mid i\in[\kappa]\}{ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∣ italic_i ∈ [ italic_κ ] } and sets {Vi,j(i,j)[κ]×[κ]}conditional-setsubscript𝑉𝑖𝑗𝑖𝑗delimited-[]𝜅delimited-[]𝜅\{V_{i,j}\mid(i,j)\in[\kappa]\times[\kappa]\}{ italic_V start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ∣ ( italic_i , italic_j ) ∈ [ italic_κ ] × [ italic_κ ] }. We let m=|Vi,j|𝑚subscript𝑉𝑖𝑗m=|V_{i,j}|italic_m = | italic_V start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT |. Observe that finding a multicolored clique now corresponds to finding the appropriate κ𝜅\kappaitalic_κ vertices as well as the (κ2)binomial𝜅2{\kappa\choose 2}( binomial start_ARG italic_κ end_ARG start_ARG 2 end_ARG ) edges connecting them. However, as long as we guarantee a consistent selection of actual graph vertices (from V𝑉Vitalic_V), the consistency of edge-vertices will follow.

Construction of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

We start with the construction of a gadget H𝐻Hitalic_H as before with 6κ26superscript𝜅26\kappa^{2}6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT sets of vertices H1,H2,,H6κ2subscript𝐻1subscript𝐻2subscript𝐻6superscript𝜅2H_{1},H_{2},\ldots,H_{6\kappa^{2}}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT such that |Hi|=nsubscript𝐻𝑖𝑛|H_{i}|=n| italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | = italic_n for each i[6κ2]𝑖delimited-[]6superscript𝜅2i\in[6\kappa^{2}]italic_i ∈ [ 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ]. We group every three consecutive sets into 2κ22superscript𝜅22\kappa^{2}2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT groups R1={H1,H2,H3}subscript𝑅1subscript𝐻1subscript𝐻2subscript𝐻3R_{1}=\{H_{1},H_{2},H_{3}\}italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT }, R2={H4,H5,H6}subscript𝑅2subscript𝐻4subscript𝐻5subscript𝐻6R_{2}=\{H_{4},H_{5},H_{6}\}italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT }, R3={H7,H8,H9}subscript𝑅3subscript𝐻7subscript𝐻8subscript𝐻9R_{3}=\{H_{7},H_{8},H_{9}\}italic_R start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 9 end_POSTSUBSCRIPT }, \ldots, and R2κ2={H6κ22,H6κ21,H6κ2}subscript𝑅2superscript𝜅2subscript𝐻6superscript𝜅22subscript𝐻6superscript𝜅21subscript𝐻6superscript𝜅2R_{2\kappa^{2}}=\{H_{6\kappa^{2}-2},H_{6\kappa^{2}-1},H_{6\kappa^{2}}\}italic_R start_POSTSUBSCRIPT 2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT }. We again assume, without loss of generality, that H1=V1subscript𝐻1subscript𝑉1H_{1}=V_{1}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, H6κ2=Vκsubscript𝐻6superscript𝜅2subscript𝑉𝜅H_{6\kappa^{2}}=V_{\kappa}italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_κ end_POSTSUBSCRIPT, and no two consecutive groups of H𝐻Hitalic_H map to the same Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. We then modify H𝐻Hitalic_H (without changing its name) by adding a set Hi,jsubscript𝐻𝑖𝑗H_{i,j}italic_H start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT between every consecutive two groups Ri={Hh,Hh+1,Hh+2}subscript𝑅𝑖subscript𝐻subscript𝐻1subscript𝐻2R_{i}=\{H_{h},H_{h+1},H_{h+2}\}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_h + 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_h + 2 end_POSTSUBSCRIPT } followed by Rj={Hh+3,Hh+4,Hh+5}subscript𝑅𝑗subscript𝐻3subscript𝐻4subscript𝐻5R_{j}=\{H_{h+3},H_{h+4},H_{h+5}\}italic_R start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = { italic_H start_POSTSUBSCRIPT italic_h + 3 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_h + 4 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_h + 5 end_POSTSUBSCRIPT }. Every Hi,jsubscript𝐻𝑖𝑗H_{i,j}italic_H start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT is a copy of Vμ(i),μ(j)subscript𝑉𝜇𝑖𝜇𝑗V_{\mu(i),\mu(j)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_j ) end_POSTSUBSCRIPT and every vertex ea,bsubscript𝑒𝑎𝑏e_{a,b}italic_e start_POSTSUBSCRIPT italic_a , italic_b end_POSTSUBSCRIPT with aVμ(i)𝑎subscript𝑉𝜇𝑖a\in V_{\mu(i)}italic_a ∈ italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT and bVμ(j)𝑏subscript𝑉𝜇𝑗b\in V_{\mu(j)}italic_b ∈ italic_V start_POSTSUBSCRIPT italic_μ ( italic_j ) end_POSTSUBSCRIPT is connected to exactly the copy of a𝑎aitalic_a in Hh+2subscript𝐻2H_{h+2}italic_H start_POSTSUBSCRIPT italic_h + 2 end_POSTSUBSCRIPT and the copy of b𝑏bitalic_b in Hh+3subscript𝐻3H_{h+3}italic_H start_POSTSUBSCRIPT italic_h + 3 end_POSTSUBSCRIPT. We call Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT a vertex layer of H𝐻Hitalic_H and Hi,jsubscript𝐻𝑖𝑗H_{i,j}italic_H start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT an edge layer of H𝐻Hitalic_H. We number the edge layers starting from 1111; H𝐻Hitalic_H now consists of 6κ26superscript𝜅26\kappa^{2}6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT vertex layers (divided into 2κ22superscript𝜅22\kappa^{2}2 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT groups) and 2κ212superscript𝜅212\kappa^{2}-12 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 edge layers, i.e., we have a total of 8κ218superscript𝜅218\kappa^{2}-18 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 layers.

We again maintain a mapping μ𝜇\muitalic_μ such that each Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT corresponds to a copy of some Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, for i[6κ2]𝑖delimited-[]6superscript𝜅2i\in[6\kappa^{2}]italic_i ∈ [ 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ] and j[κ]𝑗delimited-[]𝜅j\in[\kappa]italic_j ∈ [ italic_κ ]. We also maintain a mapping π𝜋\piitalic_π that maps every vertex of Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT to its corresponding vertex in Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT. Given H𝐻Hitalic_H and a vertex hjiHisuperscriptsubscript𝑗𝑖subscript𝐻𝑖h_{j}^{i}\in H_{i}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, we let H(hji)𝐻superscriptsubscript𝑗𝑖H(h_{j}^{i})italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) denote the graph obtained from H𝐻Hitalic_H by deleting all vertices from each set Hisubscript𝐻superscript𝑖H_{i^{\prime}}italic_H start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, where μ(i)=μ(i)𝜇superscript𝑖𝜇𝑖\mu(i^{\prime})=\mu(i)italic_μ ( italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_μ ( italic_i ), except for hjisuperscriptsubscript𝑗superscript𝑖h_{j}^{i^{\prime}}italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT.

We now describe the construction of the instance (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) of SPR (which is adapted from the one of the proof of Theorem 1), where Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT has degeneracy four. We first add two new vertices s𝑠sitalic_s and t𝑡titalic_t and two internally vertex-disjoint st𝑠𝑡stitalic_s italic_t-paths P𝑃Pitalic_P and Q𝑄Qitalic_Q consisting of 24κ2124superscript𝜅2124\kappa^{2}-124 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 internal vertices each. The next step consists of adding Γ0,=Γ(8κ2,H,8κ2)subscriptΓ0Γ8superscript𝜅2𝐻8superscript𝜅2\Gamma_{0,\star}=\Gamma(8\kappa^{2},H,8\kappa^{2})roman_Γ start_POSTSUBSCRIPT 0 , ⋆ end_POSTSUBSCRIPT = roman_Γ ( 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT , italic_H , 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) to Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and connecting s𝑠sitalic_s to every vertex in I1subscript𝐼1I_{1}italic_I start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and t𝑡titalic_t to every vertex in J8κ2subscript𝐽8superscript𝜅2J_{8\kappa^{2}}italic_J start_POSTSUBSCRIPT 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT. Moreover, we let the i𝑖iitalic_ith internal vertex of P𝑃Pitalic_P, i2𝑖2i\geq 2italic_i ≥ 2, be adjacent to every vertex in layer i1𝑖1i-1italic_i - 1 of Γ0,subscriptΓ0\Gamma_{0,\star}roman_Γ start_POSTSUBSCRIPT 0 , ⋆ end_POSTSUBSCRIPT. After Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT is inserted we proceed as follows:

  • For i[κ1]𝑖delimited-[]𝜅1i\in[\kappa-1]italic_i ∈ [ italic_κ - 1 ] and for every j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ] (processing in increasing order), we insert a graph Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT, where

    Γi+1,j=Γ(8κ2(2i+1),H(hji+1),8κ2+(2i+1)).subscriptΓ𝑖1𝑗Γ8superscript𝜅22𝑖1𝐻superscriptsubscript𝑗𝑖18superscript𝜅22𝑖1\Gamma_{i+1,j}=\Gamma(8\kappa^{2}-(2i+1),H(h_{j}^{i+1}),8\kappa^{2}+(2i+1)).roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT = roman_Γ ( 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - ( 2 italic_i + 1 ) , italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT ) , 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + ( 2 italic_i + 1 ) ) .
  • Next, we insert a graph Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT, where

    Γi+1,=Γ(8κ2(2i+2),H,8κ2+(2i+2)).subscriptΓ𝑖1Γ8superscript𝜅22𝑖2𝐻8superscript𝜅22𝑖2\Gamma_{i+1,\star}=\Gamma(8\kappa^{2}-(2i+2),H,8\kappa^{2}+(2i+2)).roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT = roman_Γ ( 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - ( 2 italic_i + 2 ) , italic_H , 8 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + ( 2 italic_i + 2 ) ) .

We connect s𝑠sitalic_s to all the first-layer vertices and t𝑡titalic_t to all the last-layer vertices in the obvious way (that is we connect s𝑠sitalic_s to the first independent set at the left of ΓΓ\Gammaroman_Γ and t𝑡titalic_t to the last independent set at the right of ΓΓ\Gammaroman_Γ). Let Γi+1superscriptΓ𝑖1\Gamma^{i+1}roman_Γ start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT denote the collection of the n𝑛nitalic_n graphs of the form Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT. We add edges between Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT and graphs in Γi+1superscriptΓ𝑖1\Gamma^{i+1}roman_Γ start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT just like before. Similarly, we then add a new graph Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT and proceed as described until we reach Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT. We connect all the vertices of a layer of Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT to the vertex of Q𝑄Qitalic_Q on the preceding layer.

Lemma 14.

The graph Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is 4444-degenerate.

Proof.

We start by deleting all the vertices in edge layers of graphs Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, where i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ] and j𝑗j\neq\staritalic_j ≠ ⋆. Recall that each such vertex has a neighbor in the preceding layer of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, a neighbor in the succeeding layer of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, a neighbor in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT, and a neighbor in Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT. After deleting all vertices in edge layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, the vertices of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT belonging to vertex layers become adjacent to at most four vertices; a neighbor in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT, a neighbor in Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT, a possible neighbor in IqJ1subscript𝐼𝑞subscript𝐽1I_{q}\cup J_{1}italic_I start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT ∪ italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, and at most two neighbors within a group (have two neighbors inside a group implies no neighbors in IqJ1subscript𝐼𝑞subscript𝐽1I_{q}\cup J_{1}italic_I start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT ∪ italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT). We delete those vertices followed by deleting all remaining vertices of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT. Consequently, we can then remove all graphs of the form Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT, where 2iκ12𝑖𝜅12\leq i\leq\kappa-12 ≤ italic_i ≤ italic_κ - 1, starting with the edge-layer vertices. This leaves P𝑃Pitalic_P, Q𝑄Qitalic_Q, Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT, and Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT. We proceed by deleting Γ1,subscriptΓ1\Gamma_{1,\star}roman_Γ start_POSTSUBSCRIPT 1 , ⋆ end_POSTSUBSCRIPT and Γκ,subscriptΓ𝜅\Gamma_{\kappa,\star}roman_Γ start_POSTSUBSCRIPT italic_κ , ⋆ end_POSTSUBSCRIPT again starting with vertices in edge layers. We are now left with a cycle formed by P𝑃Pitalic_P and Q𝑄Qitalic_Q, which completes the proof. ∎

Corollary 15.

SPR is W[1]-hard parameterized by k𝑘kitalic_k and SSPR is W[1]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ under the token jumping model, even when restricted to 4444-degenerate graphs.

Proof.

Hardness on 4444-degenerate graphs under the token jumping model follows from an easy adaptation of Corollary 12 and Lemma 14. ∎

2.2.2 Token sliding

Let us explain how we can adjust the construction of the previous section in order to get the hardness proof under the token sliding model. We modify the reduction in a few ways. Informally, as in the proof of Corollary 13, we will “align” all the gadgets (see Figure 6), add vertical edges, and replace some H𝐻Hitalic_H gadgets with (H)𝐻\triangle(H)△ ( italic_H ) gadgets to reduce the density in certain subgraphs of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

We start with a few definitions. Given a vertex vVi𝑣subscript𝑉𝑖v\in V_{i}italic_v ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and i,i,i′′[κ]𝑖superscript𝑖superscript𝑖′′delimited-[]𝜅i,i^{\prime},i^{\prime\prime}\in[\kappa]italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT ∈ [ italic_κ ] such that iii′′𝑖superscript𝑖superscript𝑖′′i\neq i^{\prime}\neq i^{\prime\prime}italic_i ≠ italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT, we let (v,i,i,i′′)𝑣𝑖superscript𝑖superscript𝑖′′\triangle(v,i,i^{\prime},i^{\prime\prime})△ ( italic_v , italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT ) denote a set of vertices containing one vertex for each pair (u,w)𝑢𝑤(u,w)( italic_u , italic_w ) such that uVi𝑢subscript𝑉superscript𝑖u\in V_{i^{\prime}}italic_u ∈ italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, wVi′′𝑤subscript𝑉superscript𝑖′′w\in V_{i^{\prime\prime}}italic_w ∈ italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, and {v,u},{v,w},{u,w}E(G)𝑣𝑢𝑣𝑤𝑢𝑤𝐸𝐺\{v,u\},\{v,w\},\{u,w\}\in E(G){ italic_v , italic_u } , { italic_v , italic_w } , { italic_u , italic_w } ∈ italic_E ( italic_G ). In other words, (v,i,i,i′′)𝑣𝑖superscript𝑖superscript𝑖′′\triangle(v,i,i^{\prime},i^{\prime\prime})△ ( italic_v , italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT ) contains a vertex for each triangle in G𝐺Gitalic_G that contains v𝑣vitalic_v, a vertex from Visubscript𝑉superscript𝑖V_{i^{\prime}}italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, and a vertex from Vi′′subscript𝑉superscript𝑖′′V_{i^{\prime\prime}}italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT. Given vVi𝑣subscript𝑉𝑖v\in V_{i}italic_v ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and i,i[κ]𝑖superscript𝑖delimited-[]𝜅i,i^{\prime}\in[\kappa]italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ [ italic_κ ] such that ii𝑖superscript𝑖i\neq i^{\prime}italic_i ≠ italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, we let (v,i,i)𝑣𝑖superscript𝑖\nabla(v,i,i^{\prime})∇ ( italic_v , italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) denote a set of vertices containing one vertex for each edge in G𝐺Gitalic_G that is incident to v𝑣vitalic_v and a vertex from Visubscript𝑉superscript𝑖V_{i^{\prime}}italic_V start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT. We let i,i,i′′=vVi(v,i,i,i′′)subscript𝑖superscript𝑖superscript𝑖′′subscript𝑣subscript𝑉𝑖𝑣𝑖superscript𝑖superscript𝑖′′\triangle_{i,i^{\prime},i^{\prime\prime}}=\bigcup_{v\in V_{i}}{\triangle(v,i,i% ^{\prime},i^{\prime\prime})}△ start_POSTSUBSCRIPT italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = ⋃ start_POSTSUBSCRIPT italic_v ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT △ ( italic_v , italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT ) and i,i=vVi(v,i,i)subscript𝑖superscript𝑖subscript𝑣subscript𝑉𝑖𝑣𝑖superscript𝑖\nabla_{i,i^{\prime}}=\bigcup_{v\in V_{i}}{\nabla(v,i,i^{\prime})}∇ start_POSTSUBSCRIPT italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = ⋃ start_POSTSUBSCRIPT italic_v ∈ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ∇ ( italic_v , italic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ).

We introduce a new gadget (H)𝐻\triangle(H)△ ( italic_H ), similar to H𝐻Hitalic_H, which consists of replacing each non-collapsed Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, i.e., |Hi|2subscript𝐻𝑖2|H_{i}|\geq 2| italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | ≥ 2, with a copy of μ(i),μ(i1),μ(i+1)subscript𝜇𝑖𝜇𝑖1𝜇𝑖1\triangle_{\mu(i),\mu(i-1),\mu(i+1)}△ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT (instead of a copy of Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT) if μ(i)μ(i1)μ(i+1)𝜇𝑖𝜇𝑖1𝜇𝑖1\mu(i)\neq\mu(i-1)\neq\mu(i+1)italic_μ ( italic_i ) ≠ italic_μ ( italic_i - 1 ) ≠ italic_μ ( italic_i + 1 ). If μ(i)=μ(i1)μ(i+1)𝜇𝑖𝜇𝑖1𝜇𝑖1\mu(i)=\mu(i-1)\neq\mu(i+1)italic_μ ( italic_i ) = italic_μ ( italic_i - 1 ) ≠ italic_μ ( italic_i + 1 ) we let Hi=μ(i),μ(i+1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT, and if μ(i)=μ(i+1)μ(i1)𝜇𝑖𝜇𝑖1𝜇𝑖1\mu(i)=\mu(i+1)\neq\mu(i-1)italic_μ ( italic_i ) = italic_μ ( italic_i + 1 ) ≠ italic_μ ( italic_i - 1 ) we let Hi=μ(i),μ(i1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i-1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) end_POSTSUBSCRIPT. We set H1=μ(1),μ(2)subscript𝐻1subscript𝜇1𝜇2H_{1}=\nabla_{\mu(1),\mu(2)}italic_H start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( 1 ) , italic_μ ( 2 ) end_POSTSUBSCRIPT and H6κ2=μ(6κ2),μ(6κ21)subscript𝐻6superscript𝜅2subscript𝜇6superscript𝜅2𝜇6superscript𝜅21H_{6\kappa^{2}}=\nabla_{\mu(6\kappa^{2}),\mu(6\kappa^{2}-1)}italic_H start_POSTSUBSCRIPT 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) , italic_μ ( 6 italic_κ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 ) end_POSTSUBSCRIPT. We update the mapping π:HiVμ(i):𝜋subscript𝐻𝑖subscript𝑉𝜇𝑖\pi:H_{i}\rightarrow V_{\mu(i)}italic_π : italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT → italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT to map every vertex of Hisubscript𝐻𝑖H_{i}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT to its corresponding vertex in Vμ(i)subscript𝑉𝜇𝑖V_{\mu(i)}italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT. We construct a new mapping π:HiVμ(i1)×Vμ(i)×Vμ(i+1):subscript𝜋subscript𝐻𝑖subscript𝑉𝜇𝑖1subscript𝑉𝜇𝑖subscript𝑉𝜇𝑖1\pi_{\triangle}:H_{i}\rightarrow V_{\mu(i-1)}\times V_{\mu(i)}\times V_{\mu(i+% 1)}italic_π start_POSTSUBSCRIPT △ end_POSTSUBSCRIPT : italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT → italic_V start_POSTSUBSCRIPT italic_μ ( italic_i - 1 ) end_POSTSUBSCRIPT × italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT × italic_V start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT to map every vertex of Hi=μ(i),μ(i1),μ(i+1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1𝜇𝑖1H_{i}=\triangle_{\mu(i),\mu(i-1),\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = △ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT to its corresponding triangle. We construct a new mapping π:Hi{Vμ(i1)×Vμ(i)}{Vμ(i+1)×Vμ(i)}:subscript𝜋subscript𝐻𝑖subscript𝑉𝜇𝑖1subscript𝑉𝜇𝑖subscript𝑉𝜇𝑖1subscript𝑉𝜇𝑖\pi_{\nabla}:H_{i}\rightarrow\{V_{\mu(i-1)}\times V_{\mu(i)}\}\cup\{V_{\mu(i+1% )}\times V_{\mu(i)}\}italic_π start_POSTSUBSCRIPT ∇ end_POSTSUBSCRIPT : italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT → { italic_V start_POSTSUBSCRIPT italic_μ ( italic_i - 1 ) end_POSTSUBSCRIPT × italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT } ∪ { italic_V start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT × italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT } to map every vertex of Hi=μ(i),μ(i1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i-1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) end_POSTSUBSCRIPT or Hi=μ(i),μ(i+1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT to its corresponding edge. We assume, without loss of generality, that |Hi|=nsubscript𝐻𝑖𝑛|H_{i}|=n| italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | = italic_n even for (H)𝐻\triangle(H)△ ( italic_H ); all sets can be made of equal size by adding dummy vertices. Now, after Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT is inserted we proceed as follows:

  • For i[κ1]𝑖delimited-[]𝜅1i\in[\kappa-1]italic_i ∈ [ italic_κ - 1 ] and for every j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ] (processing in increasing order), we insert a graph Γi+1,jsubscriptΓ𝑖1𝑗\Gamma_{i+1,j}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT, where

    Γi+1,j=Γ(3,(H(hji+1)),3).subscriptΓ𝑖1𝑗Γ3𝐻superscriptsubscript𝑗𝑖13\Gamma_{i+1,j}=\Gamma(3,\triangle(H(h_{j}^{i+1})),3).roman_Γ start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT = roman_Γ ( 3 , △ ( italic_H ( italic_h start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i + 1 end_POSTSUPERSCRIPT ) ) , 3 ) .
  • Next, we insert a graph Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT, where

    Γi+1,=Γ(3,H,3).subscriptΓ𝑖1Γ3𝐻3\Gamma_{i+1,\star}=\Gamma(3,H,3).roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT = roman_Γ ( 3 , italic_H , 3 ) .

All of our graphs Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT will be either of the form Γ(3,H,3)Γ3𝐻3\Gamma(3,H,3)roman_Γ ( 3 , italic_H , 3 ) or Γ(3,(H(h)),3)Γ3𝐻3\Gamma(3,\triangle(H(h)),3)roman_Γ ( 3 , △ ( italic_H ( italic_h ) ) , 3 ). We add edges between sets appearing in consecutive layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT in the natural way. That is, whenever one of the two layers consists of an independent set and whenever both layers belong to the same group, we simply add a matching between the vertices. Otherwise, i.e., when we have (Hi,Hi,i+1j)subscript𝐻𝑖subscriptsuperscript𝐻𝑗𝑖𝑖1(H_{i},H^{j}_{i,i+1})( italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_H start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_i , italic_i + 1 end_POSTSUBSCRIPT ), then we add an edge between a vertex hHisubscript𝐻𝑖h\in H_{i}italic_h ∈ italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and a vertex heHi,i+1jsubscript𝑒subscriptsuperscript𝐻𝑗𝑖𝑖1h_{e}\in H^{j}_{i,i+1}italic_h start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT ∈ italic_H start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_i , italic_i + 1 end_POSTSUBSCRIPT, π(he)=e={u,v}𝜋subscript𝑒𝑒𝑢𝑣\pi(h_{e})=e=\{u,v\}italic_π ( italic_h start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT ) = italic_e = { italic_u , italic_v }, whenever one of the following is true:

  • |Hi|=1subscript𝐻𝑖1|H_{i}|=1| italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | = 1 or Hi=Vμ(i)subscript𝐻𝑖subscript𝑉𝜇𝑖H_{i}=V_{\mu(i)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_μ ( italic_i ) end_POSTSUBSCRIPT and π(h)e𝜋𝑒\pi(h)\in eitalic_π ( italic_h ) ∈ italic_e;

  • Hi=μ(i),μ(i1),μ(i+1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1𝜇𝑖1H_{i}=\triangle_{\mu(i),\mu(i-1),\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = △ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT and eπ(h)𝑒subscript𝜋e\subseteq\pi_{\triangle}(h)italic_e ⊆ italic_π start_POSTSUBSCRIPT △ end_POSTSUBSCRIPT ( italic_h );

  • Hi=μ(i),μ(i1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i-1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i - 1 ) end_POSTSUBSCRIPT and π(h)=esubscript𝜋𝑒\pi_{\nabla}(h)=eitalic_π start_POSTSUBSCRIPT ∇ end_POSTSUBSCRIPT ( italic_h ) = italic_e; or

  • Hi=μ(i),μ(i+1)subscript𝐻𝑖subscript𝜇𝑖𝜇𝑖1H_{i}=\nabla_{\mu(i),\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i ) , italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT and π(h)=esubscript𝜋𝑒\pi_{\nabla}(h)=eitalic_π start_POSTSUBSCRIPT ∇ end_POSTSUBSCRIPT ( italic_h ) = italic_e;

When we have (Hi,i+1j,Hi+1)subscriptsuperscript𝐻𝑗𝑖𝑖1subscript𝐻𝑖1(H^{j}_{i,i+1},H_{i+1})( italic_H start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_i , italic_i + 1 end_POSTSUBSCRIPT , italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT ), then we add an edge between a vertex heHi,i+1jsubscript𝑒subscriptsuperscript𝐻𝑗𝑖𝑖1h_{e}\in H^{j}_{i,i+1}italic_h start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT ∈ italic_H start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_i , italic_i + 1 end_POSTSUBSCRIPT, π(he)=e={u,v}𝜋subscript𝑒𝑒𝑢𝑣\pi(h_{e})=e=\{u,v\}italic_π ( italic_h start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT ) = italic_e = { italic_u , italic_v }, and a vertex hHi+1subscript𝐻𝑖1h\in H_{i+1}italic_h ∈ italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT whenever one of the following is true:

  • |Hi+1|=1subscript𝐻𝑖11|H_{i+1}|=1| italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT | = 1 or Hi+1=Vμ(i+1)subscript𝐻𝑖1subscript𝑉𝜇𝑖1H_{i+1}=V_{\mu(i+1)}italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) end_POSTSUBSCRIPT and π(h)e𝜋𝑒\pi(h)\in eitalic_π ( italic_h ) ∈ italic_e;

  • Hi+1=μ(i+1),μ(i),μ(i+2)subscript𝐻𝑖1subscript𝜇𝑖1𝜇𝑖𝜇𝑖2H_{i+1}=\triangle_{\mu(i+1),\mu(i),\mu(i+2)}italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT = △ start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) , italic_μ ( italic_i ) , italic_μ ( italic_i + 2 ) end_POSTSUBSCRIPT and eπ(h)𝑒subscript𝜋e\subseteq\pi_{\triangle}(h)italic_e ⊆ italic_π start_POSTSUBSCRIPT △ end_POSTSUBSCRIPT ( italic_h );

  • Hi+1=μ(i+1),μ(i)subscript𝐻𝑖1subscript𝜇𝑖1𝜇𝑖H_{i+1}=\nabla_{\mu(i+1),\mu(i)}italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) , italic_μ ( italic_i ) end_POSTSUBSCRIPT and π(h)=esubscript𝜋𝑒\pi_{\nabla}(h)=eitalic_π start_POSTSUBSCRIPT ∇ end_POSTSUBSCRIPT ( italic_h ) = italic_e; or

  • Hi+1=μ(i+1),μ(i+2)subscript𝐻𝑖1subscript𝜇𝑖1𝜇𝑖2H_{i+1}=\nabla_{\mu(i+1),\mu(i+2)}italic_H start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT = ∇ start_POSTSUBSCRIPT italic_μ ( italic_i + 1 ) , italic_μ ( italic_i + 2 ) end_POSTSUBSCRIPT and π(h)=esubscript𝜋𝑒\pi_{\nabla}(h)=eitalic_π start_POSTSUBSCRIPT ∇ end_POSTSUBSCRIPT ( italic_h ) = italic_e;

We describe the edges between Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT, Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, and Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT; there are no edges between the different graphs in ΓisuperscriptΓ𝑖\Gamma^{i}roman_Γ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT. Let Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Lp+1subscript𝐿𝑝1L_{p+1}italic_L start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT denote two consecutive layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, let Mpsubscript𝑀𝑝M_{p}italic_M start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Mp+1subscript𝑀𝑝1M_{p+1}italic_M start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT denote the same two layers (as Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Lp+1subscript𝐿𝑝1L_{p+1}italic_L start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT) in Γi1,subscriptΓ𝑖1\Gamma_{i-1,\star}roman_Γ start_POSTSUBSCRIPT italic_i - 1 , ⋆ end_POSTSUBSCRIPT, and let Npsubscript𝑁𝑝N_{p}italic_N start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Np+1subscript𝑁𝑝1N_{p+1}italic_N start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT denote the same two layers (as Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Lp+1subscript𝐿𝑝1L_{p+1}italic_L start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT) in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT. We add an edge from every vertex u𝑢uitalic_u in Mpsubscript𝑀𝑝M_{p}italic_M start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT to every vertex v𝑣vitalic_v in Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT whenever π(v)(π(u),μ(p),μ(p1),μ(p+1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1𝜇𝑝1\pi(v)\in\triangle(\pi(u),\mu(p),\mu(p-1),\mu(p+1))italic_π ( italic_v ) ∈ △ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p - 1 ) , italic_μ ( italic_p + 1 ) ) or π(v)(π(u),μ(p),μ(p+1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1\pi(v)\in\nabla(\pi(u),\mu(p),\mu(p+1))italic_π ( italic_v ) ∈ ∇ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p + 1 ) ) or π(v)(π(u),μ(p),μ(p1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1\pi(v)\in\nabla(\pi(u),\mu(p),\mu(p-1))italic_π ( italic_v ) ∈ ∇ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p - 1 ) ). Similarly, we add an edge from every vertex u𝑢uitalic_u in Npsubscript𝑁𝑝N_{p}italic_N start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT to every vertex v𝑣vitalic_v in Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT whenever π(v)(π(u),μ(p),μ(p1),μ(p+1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1𝜇𝑝1\pi(v)\in\triangle(\pi(u),\mu(p),\mu(p-1),\mu(p+1))italic_π ( italic_v ) ∈ △ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p - 1 ) , italic_μ ( italic_p + 1 ) ) or π(v)(π(u),μ(p),μ(p+1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1\pi(v)\in\nabla(\pi(u),\mu(p),\mu(p+1))italic_π ( italic_v ) ∈ ∇ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p + 1 ) ) or π(v)(π(u),μ(p),μ(p1))𝜋𝑣𝜋𝑢𝜇𝑝𝜇𝑝1\pi(v)\in\nabla(\pi(u),\mu(p),\mu(p-1))italic_π ( italic_v ) ∈ ∇ ( italic_π ( italic_u ) , italic_μ ( italic_p ) , italic_μ ( italic_p - 1 ) ). When Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT consist of a single vertex we instead add a single edge to the corresponding image. We connect Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Mp+1subscript𝑀𝑝1M_{p+1}italic_M start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT as well as Npsubscript𝑁𝑝N_{p}italic_N start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Lp+1subscript𝐿𝑝1L_{p+1}italic_L start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT the same way we connect Lpsubscript𝐿𝑝L_{p}italic_L start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and Lp+1subscript𝐿𝑝1L_{p+1}italic_L start_POSTSUBSCRIPT italic_p + 1 end_POSTSUBSCRIPT, i.e., as described above for adding edges between sets appearing in consecutive layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT. This completes the construction of the instance (G,s,t,P,Q)superscript𝐺𝑠𝑡𝑃𝑄(G^{\prime},s,t,P,Q)( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_s , italic_t , italic_P , italic_Q ) of SPR.

Lemma 16.

The graph Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is 6666-degenerate.

Proof.

We repeatedly delete vertices of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT of degree at most six, and, by a slight abuse of notation, keep using Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT to denote the resulting graph. We claim that this procedure will delete all vertices of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. We prove the claim by contradiction, i.e., we assume that no vertex can be deleted from Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Equivalently, we assume that Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT has minimum degree seven.

Note that each vertex in an edge layer of graph Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ] and j𝑗j\neq\staritalic_j ≠ ⋆, has a neighbor in the preceding layer of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, a neighbor in the succeeding layer of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, two neighbors in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT, and two neighbors in Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT. Hence, Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT cannot contain any edge-layer vertex in Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, i[κ]𝑖delimited-[]𝜅i\in[\kappa]italic_i ∈ [ italic_κ ] and j𝑗j\neq\staritalic_j ≠ ⋆. After deleting all vertices in edge layers of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, the vertices of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT belonging to vertex layers of size greater than one (not collapsed) become adjacent to at most six vertices; two neighbors in Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT, two neighbors in Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT, possibly a neighbor in Iqsubscript𝐼𝑞I_{q}italic_I start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT or J1subscript𝐽1J_{1}italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, and at most two neighbors within the same group (having two neighbors inside the group implies no neighbors in Iqsubscript𝐼𝑞I_{q}italic_I start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT or J1subscript𝐽1J_{1}italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT). This follows from the fact that every such vertex either corresponds to an edge or a triangle. So, if some vertex of Γi,jsubscriptΓ𝑖𝑗\Gamma_{i,j}roman_Γ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT still exists in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, it must be the case that the vertex is in a vertex layer of H𝐻Hitalic_H and has many neighbors in (the next layer of) Γi,subscriptΓ𝑖\Gamma_{i,\star}roman_Γ start_POSTSUBSCRIPT italic_i , ⋆ end_POSTSUBSCRIPT or (the previous layer of) Γi+1,subscriptΓ𝑖1\Gamma_{i+1,\star}roman_Γ start_POSTSUBSCRIPT italic_i + 1 , ⋆ end_POSTSUBSCRIPT. Such a vertex must belong to a collapsed layer and is the unique vertex in its layer. Let us consider the first p𝑝pitalic_p (closest to 00) such that p𝑝pitalic_p is the index of the first Γp,jsubscriptΓ𝑝𝑗\Gamma_{p,j}roman_Γ start_POSTSUBSCRIPT italic_p , italic_j end_POSTSUBSCRIPT that could not be completely deleted. By our choice of p𝑝pitalic_p, it must be the case that all graphs of the form Γp1,jsubscriptΓ𝑝1𝑗\Gamma_{p-1,j}roman_Γ start_POSTSUBSCRIPT italic_p - 1 , italic_j end_POSTSUBSCRIPT, j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ] no longer exist in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Consequently, the edge-layer vertices of Γp,subscriptΓ𝑝\Gamma_{p,\star}roman_Γ start_POSTSUBSCRIPT italic_p , ⋆ end_POSTSUBSCRIPT are adjacent to vertices at the same level or below them. In particular, an edge-layer vertex vesubscript𝑣𝑒v_{e}italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT of Γp,subscriptΓ𝑝\Gamma_{p,\star}roman_Γ start_POSTSUBSCRIPT italic_p , ⋆ end_POSTSUBSCRIPT has only two neighbors in Γp,subscriptΓ𝑝\Gamma_{p,\star}roman_Γ start_POSTSUBSCRIPT italic_p , ⋆ end_POSTSUBSCRIPT and zero or more neighbors in Γp,jsubscriptΓ𝑝𝑗\Gamma_{p,j}roman_Γ start_POSTSUBSCRIPT italic_p , italic_j end_POSTSUBSCRIPT, j[n]𝑗delimited-[]𝑛j\in[n]italic_j ∈ [ italic_n ]. Hence, the vertex vesubscript𝑣𝑒v_{e}italic_v start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT has degree more than six if and only if it has more than two neighbors contained in non-collapsed preceding vertex layers that come after Γp,subscriptΓ𝑝\Gamma_{p,\star}roman_Γ start_POSTSUBSCRIPT italic_p , ⋆ end_POSTSUBSCRIPT. We know that this is impossible since all such vertices (in non-collapsed vertex layers of Γp,jsubscriptΓ𝑝𝑗\Gamma_{p,j}roman_Γ start_POSTSUBSCRIPT italic_p , italic_j end_POSTSUBSCRIPT) have been deleted already; as they have degree at most six after the edge-layers have been deleted. This contradicts our assumption that no vertex of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT can be deleted, as needed to complete the proof. ∎

Corollary 17.

SPR is W[1]-hard parameterized by k𝑘kitalic_k and SSPR is W[1]-hard parameterized by k+𝑘k+\ellitalic_k + roman_ℓ under the token sliding model, even when restricted to 6666-degenerate graphs.

Proof.

Hardness on 6666-degenerate graphs under the token sliding model follows from Corollary 12 (for correctness) and Lemma 16 (for bounding the degeneracy). ∎

3 \FPT\FPT\FPT algorithms

First, we observe that both SPR and SSPR are easily shown to be fixed-parameter tractable when parameterized by k+Δ(G)𝑘Δ𝐺k+\Delta(G)italic_k + roman_Δ ( italic_G ), where Δ(G)Δ𝐺\Delta(G)roman_Δ ( italic_G ) denotes the maximum degree of G𝐺Gitalic_G; by only retaining vertices that belong to some shortest st𝑠𝑡stitalic_s italic_t-path one can easily bound the size of the graph since the i𝑖iitalic_i-th layer, consisting of all the vertices at distance exactly i𝑖iitalic_i from s𝑠sitalic_s, will contain at most Δ(G)iΔsuperscript𝐺𝑖\Delta(G)^{i}roman_Δ ( italic_G ) start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT vertices. In the remainder of this section, we investigate the complexity of the problem further (and for different parameters) in order to identify the boundary between tractability and intractability.

We denote an instance of SSPR by a tuple (G,s,t,P,Q,)𝐺𝑠𝑡𝑃𝑄(G,s,t,P,Q,\ell)( italic_G , italic_s , italic_t , italic_P , italic_Q , roman_ℓ ), where G𝐺Gitalic_G denotes the input graph, s𝑠sitalic_s and t𝑡titalic_t denote the starting and ending vertices of the shortest paths, respectively, and P𝑃Pitalic_P and Q𝑄Qitalic_Q denote the source and target shortest paths, respectively. We use k𝑘kitalic_k to denote |P|=|Q|𝑃𝑄|P|=|Q|| italic_P | = | italic_Q | which is the number of edges along a shortest path from s𝑠sitalic_s to t𝑡titalic_t, i.e., the length of the path.

3.1 \FPT\FPT\FPT for parameter \ellroman_ℓ on nowhere dense classes of graphs

As a warm-up, let us first prove that the following holds:

Lemma 18.

SSPR is \FPT\FPT\FPT parameterized by k+𝑘k+\ellitalic_k + roman_ℓ on nowhere-dense classes of graphs for both the sliding and the jumping models.

Proof.

The proof easily follows from the fact that FO-model checking is \FPT\FPT\FPT on nowhere dense classes of graphs [13]. Such an argument has already been used in various proofs for reconfiguration problems, see e.g., [7].

For every ik𝑖𝑘i\leq kitalic_i ≤ italic_k and j𝑗j\leq\ellitalic_j ≤ roman_ℓ, let us create a variable xi,jsubscript𝑥𝑖𝑗x_{i,j}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT that represents the i𝑖iitalic_i-th vertex of the path at the j𝑗jitalic_j-th step of the reconfiguration sequence. Let us prove that we can formulate the existence of a reconfiguration sequence of length \ellroman_ℓ between P𝑃Pitalic_P and Q𝑄Qitalic_Q as a FO-formula on the set of variables xi,jsubscript𝑥𝑖𝑗x_{i,j}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT.

First we set xi,1=pisubscript𝑥𝑖1subscript𝑝𝑖x_{i,1}=p_{i}italic_x start_POSTSUBSCRIPT italic_i , 1 end_POSTSUBSCRIPT = italic_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT where pisubscript𝑝𝑖p_{i}italic_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the i𝑖iitalic_i-th vertex of the path P𝑃Pitalic_P. Similarly xi,=qisubscript𝑥𝑖subscript𝑞𝑖x_{i,\ell}=q_{i}italic_x start_POSTSUBSCRIPT italic_i , roman_ℓ end_POSTSUBSCRIPT = italic_q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT where qisubscript𝑞𝑖q_{i}italic_q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the i𝑖iitalic_i-th vertex of the path Q𝑄Qitalic_Q. We now need to ensure that at every step j𝑗j\leq\ellitalic_j ≤ roman_ℓ, the set of variables xi,1,,xi,subscript𝑥𝑖1subscript𝑥𝑖x_{i,1},\ldots,x_{i,\ell}italic_x start_POSTSUBSCRIPT italic_i , 1 end_POSTSUBSCRIPT , … , italic_x start_POSTSUBSCRIPT italic_i , roman_ℓ end_POSTSUBSCRIPT is a path of G𝐺Gitalic_G, that is, for every ik1𝑖𝑘1i\leq k-1italic_i ≤ italic_k - 1 and every j𝑗j\leq\ellitalic_j ≤ roman_ℓ, xi,jxi+1,jsubscript𝑥𝑖𝑗subscript𝑥𝑖1𝑗x_{i,j}x_{i+1,j}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT italic_i + 1 , italic_j end_POSTSUBSCRIPT is an edge.

We further want to ensure that if one vertex is modified between the j𝑗jitalic_j-th path and the (j+1)𝑗1(j+1)( italic_j + 1 )-th path then all the other vertices are the same. That is, for every i,ik𝑖superscript𝑖𝑘i,i^{\prime}\leq kitalic_i , italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≤ italic_k and j1𝑗1j\leq\ell-1italic_j ≤ roman_ℓ - 1, we have (xi,jxi,j+1(xi,j=xi,j+1)(x_{i,j}\neq x_{i,j+1}\Rightarrow(x_{i^{\prime},j}=x_{i^{\prime},j+1})( italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ≠ italic_x start_POSTSUBSCRIPT italic_i , italic_j + 1 end_POSTSUBSCRIPT ⇒ ( italic_x start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_j end_POSTSUBSCRIPT = italic_x start_POSTSUBSCRIPT italic_i start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_j + 1 end_POSTSUBSCRIPT ). If we want a reconfiguration sequence with the token sliding rule, we have to add the following constraint: for every ik,j1formulae-sequence𝑖𝑘𝑗1i\leq k,j\leq\ell-1italic_i ≤ italic_k , italic_j ≤ roman_ℓ - 1, xi,j=xi,j+1subscript𝑥𝑖𝑗subscript𝑥𝑖𝑗1x_{i,j}=x_{i,j+1}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT = italic_x start_POSTSUBSCRIPT italic_i , italic_j + 1 end_POSTSUBSCRIPT or xi,jxi,j+1subscript𝑥𝑖𝑗subscript𝑥𝑖𝑗1x_{i,j}x_{i,j+1}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT italic_i , italic_j + 1 end_POSTSUBSCRIPT is an edge. Finally, we add the constraints x1,j=ssubscript𝑥1𝑗𝑠x_{1,j}=sitalic_x start_POSTSUBSCRIPT 1 , italic_j end_POSTSUBSCRIPT = italic_s and xk,j=tsubscript𝑥𝑘𝑗𝑡x_{k,j}=titalic_x start_POSTSUBSCRIPT italic_k , italic_j end_POSTSUBSCRIPT = italic_t for every j𝑗j\leq\ellitalic_j ≤ roman_ℓ.

Let us denote by ϕitalic-ϕ\phiitalic_ϕ the resulting formula. Let us prove that there exists a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length at most \ellroman_ℓ if and only if ϕitalic-ϕ\phiitalic_ϕ is satisfiable.

If there exists a reconfiguration sequence P1=P,,Pr=Qformulae-sequencesubscript𝑃1𝑃subscript𝑃𝑟𝑄P_{1}=P,\ldots,P_{r}=Qitalic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = italic_P , … , italic_P start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_Q with r𝑟r\leq\ellitalic_r ≤ roman_ℓ then we simply have to set xi,jsubscript𝑥𝑖𝑗x_{i,j}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT to be the i𝑖iitalic_i-th vertex of Pjsubscript𝑃𝑗P_{j}italic_P start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and xi,j=qisubscript𝑥𝑖superscript𝑗subscript𝑞𝑖x_{i,j^{\prime}}=q_{i}italic_x start_POSTSUBSCRIPT italic_i , italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT = italic_q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT for every jrsuperscript𝑗𝑟j^{\prime}\geq ritalic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≥ italic_r in order to satisfy all the constraints.

Conversely, assume that there exists an assignment of the variables that satisfies all the constraints. Let us denote by Pjsubscript𝑃𝑗P_{j}italic_P start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT the set of ordered vertices xi,jsubscript𝑥𝑖𝑗x_{i,j}italic_x start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT for 1ik1𝑖𝑘1\leq i\leq k1 ≤ italic_i ≤ italic_k. Note that, by hypothesis, Pjsubscript𝑃𝑗P_{j}italic_P start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is an st𝑠𝑡stitalic_s italic_t-path for every j𝑗jitalic_j. Moreover, by definition Pjsubscript𝑃𝑗P_{j}italic_P start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and Pj+1subscript𝑃𝑗1P_{j+1}italic_P start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT differ on at most one vertex and P1=Psubscript𝑃1𝑃P_{1}=Pitalic_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = italic_P and P=Qsubscript𝑃𝑄P_{\ell}=Qitalic_P start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT = italic_Q. By removing consecutive paths that are the same we obtain a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q, which completes the proof. ∎

Let us now generalize this result and prove that the following holds:

Theorem 19.

SSPR is \FPT\FPT\FPT parameterized by \ellroman_ℓ on nowhere dense classes of graphs for both the sliding and the jumping models.

Proof.

The idea of the proof consists of proving that there exists an equivalent instance where the distance between s𝑠sitalic_s and t𝑡titalic_t is bounded by a function of \ellroman_ℓ. The conclusion then directly follows from Lemma 18. To do so, we will prove that we can bound (by a function of \ellroman_ℓ) the set of indices i𝑖iitalic_i on which there is a relevant modification on the i𝑖iitalic_i-th vertex of the path at some step of the reconfiguration sequence. We will then prove that we can “forget” the vertices which are not in these positions by reducing the length of the shortest paths.

Let (G,s,t,P,Q,)𝐺𝑠𝑡𝑃𝑄(G,s,t,P,Q,\ell)( italic_G , italic_s , italic_t , italic_P , italic_Q , roman_ℓ ) be an instance of SSPR. Let us denote by S𝑆Sitalic_S the set of positions on which P𝑃Pitalic_P and Q𝑄Qitalic_Q differ. Note that if |S|>𝑆|S|>\ell| italic_S | > roman_ℓ then we can immediately return false since more than \ellroman_ℓ steps are needed to transform P𝑃Pitalic_P into Q𝑄Qitalic_Q. So we can assume that |S|𝑆|S|\leq\ell| italic_S | ≤ roman_ℓ in the rest of the proof.

Claim 20.

If there is a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length at most \ellroman_ℓ then there is a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q that only modifies vertices whose indices are at distance at most \ellroman_ℓ from an index of S𝑆Sitalic_S.

Proof.

Let \mathcal{R}caligraphic_R be a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length at most \ellroman_ℓ. At each step, there is exactly one position where a vertex is modified. Let us denote by R𝑅Ritalic_R that set of positions where a vertex is modified. We have |R|𝑅|R|\leq\ell| italic_R | ≤ roman_ℓ. A component Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT of R𝑅Ritalic_R is a maximal subset of R𝑅Ritalic_R containing consecutive integers. Every component Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT has a minimum and a maximum value (that might be equal). We say that a component is important if it contains a vertex of S𝑆Sitalic_S and useless otherwise.

We claim that if there is a useless component Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, removing from \mathcal{R}caligraphic_R all the modifications at position c𝑐citalic_c for every cR𝑐superscript𝑅c\in R^{\prime}italic_c ∈ italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT leaves a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q. Indeed, let us denote by superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT the resulting reconfiguration sequence. First note that since Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is a useless component, the final shortest path is still Q𝑄Qitalic_Q (we cancel modifications on positions where P𝑃Pitalic_P and Q𝑄Qitalic_Q were identical). Assume now, for a contradiction, that at some step of the reconfiguration sequence in superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, the set of vertices Pisubscript𝑃𝑖P_{i}italic_P start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is not a shortest st𝑠𝑡stitalic_s italic_t-path. Let us denote by u,v𝑢𝑣u,vitalic_u , italic_v the consecutive vertices of Pisubscript𝑃𝑖P_{i}italic_P start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT that are not adjacent. Since the path is only modified at positions of indices of Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, either the index of u𝑢uitalic_u or v𝑣vitalic_v is in Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Moreover, both of them are not in Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT since by definition of superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT all the vertices of indices in Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT remain the same all along the reconfiguration sequence and the initial set of vertices is indeed a path. So we can assume by symmetry that the position of u𝑢uitalic_u is the index just before the minimum value of Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and v𝑣vitalic_v is the minimum value of Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Since the vertex v𝑣vitalic_v belongs to all the sets in the reconfiguration sequence superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, it means that u𝑢uitalic_u has been modified. But then u𝑢uitalic_u should be added in the component Rsuperscript𝑅R^{\prime}italic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT of v𝑣vitalic_v, a contradiction.

Thus, if there is a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length \ellroman_ℓ, there is one with no useless component. But the width of a component is at most \ellroman_ℓ since only \ellroman_ℓ vertices are modified in a reconfiguration sequence. So if there is a reconfiguration sequence, there is one that only moves tokens on vertices whose indices are at distance at most \ellroman_ℓ from an index of S𝑆Sitalic_S, as claimed. ∎

Let X(i,s)𝑋𝑖𝑠X(i,s)italic_X ( italic_i , italic_s ) be the set of vertices at distance exactly i𝑖iitalic_i from s𝑠sitalic_s in G𝐺Gitalic_G. Let ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT be the set of indices at distance at most \ellroman_ℓ from an index of S𝑆Sitalic_S. Note that ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT has size at most 2|S|2𝑆2\ell\cdot|S|2 roman_ℓ ⋅ | italic_S |. An empty interval for ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT is an interval maximal by inclusion in {0,,d(s,t)}IS0𝑑𝑠𝑡subscript𝐼𝑆\{0,\ldots,d(s,t)\}\setminus I_{S}{ 0 , … , italic_d ( italic_s , italic_t ) } ∖ italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT. Note that ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT has at most |S|𝑆|S|| italic_S | empty intervals. We create the graph Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT from G𝐺Gitalic_G as follows:

  • For every iIS𝑖subscript𝐼𝑆i\in I_{S}italic_i ∈ italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT, Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT contains all the vertices of X(i,s)𝑋𝑖𝑠X(i,s)italic_X ( italic_i , italic_s ).

  • For all the integers iIS𝑖subscript𝐼𝑆i\notin I_{S}italic_i ∉ italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT but at distance one from an integer of ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT, Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT contains the vertex at position i𝑖iitalic_i in P𝑃Pitalic_P (and Q𝑄Qitalic_Q).

  • Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT contains s𝑠sitalic_s and t𝑡titalic_t.

  • There is an edge between x𝑥xitalic_x and y𝑦yitalic_y if xy𝑥𝑦xyitalic_x italic_y is an edge of G𝐺Gitalic_G, or if x,y𝑥𝑦x,yitalic_x , italic_y are the unique two vertices of G𝐺Gitalic_G whose positions are in the same empty interval for ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT 888Informally, we link the vertex of P𝑃Pitalic_P just after an interval of ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT with the vertex of P𝑃Pitalic_P just before the beginning of the next interval of ISsubscript𝐼𝑆I_{S}italic_I start_POSTSUBSCRIPT italic_S end_POSTSUBSCRIPT..

Let us denote by Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and Qsuperscript𝑄Q^{\prime}italic_Q start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT the set PV(G)𝑃𝑉superscript𝐺P\cap V(G^{\prime})italic_P ∩ italic_V ( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) and QV(G)𝑄𝑉superscript𝐺Q\cap V(G^{\prime})italic_Q ∩ italic_V ( italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ). One can easily remark that Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and Qsuperscript𝑄Q^{\prime}italic_Q start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT are shortest st𝑠𝑡stitalic_s italic_t-paths in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

Claim 21.

There is a reconfiguration sequence from P𝑃Pitalic_P to Q𝑄Qitalic_Q in G𝐺Gitalic_G if and only if there is a reconfiguration sequence from Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT to Qsuperscript𝑄Q^{\prime}italic_Q start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

Proof.

The proof follows from the fact that we can assume that a transformation from P𝑃Pitalic_P to Q𝑄Qitalic_Q of length at most \ellroman_ℓ in G𝐺Gitalic_G only modifies vertices whose indices are at distance at most \ellroman_ℓ from an index of S𝑆Sitalic_S. All those vertices are in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and all the vertices of Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that contain non-movable tokens are unique at their corresponding distance from s𝑠sitalic_s (hence cannot move in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT). ∎

One can remark that the distance between s𝑠sitalic_s and t𝑡titalic_t in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is at most 424superscript24\ell^{2}4 roman_ℓ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. So by Lemma 18, we can decide in FPT-time in \ellroman_ℓ if there is a reconfiguration sequence from Psuperscript𝑃P^{\prime}italic_P start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT to Qsuperscript𝑄Q^{\prime}italic_Q start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in Gsuperscript𝐺G^{\prime}italic_G start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, which completes the proof. ∎

3.2 \FPT\FPT\FPT for parameters cluster deletion number, treedepth, and modular width

In this section we show that SPR and SSPR are fixed-parameter tractable when parameterized by cd(G)cd𝐺\textsf{cd}(G)cd ( italic_G ), td(G)td𝐺\textsf{td}(G)td ( italic_G ), and mw(G)mw𝐺\textsf{mw}(G)mw ( italic_G ), where cd(G)cd𝐺\textsf{cd}(G)cd ( italic_G ), td(G)td𝐺\textsf{td}(G)td ( italic_G ), and mw(G)mw𝐺\textsf{mw}(G)mw ( italic_G ) denote the cluster deletion number, treedepth, and modularwidth of G𝐺Gitalic_G, respectively. For all three parameters, we present algorithms that compute reconfiguration sequences of minimum length; so we focus only on SPR. We conclude by proving that if we parameterize by the feedback vertex set number of the graph, fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ), then we can assume that the length of shortest paths is also bounded by fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ), i.e., k𝒪(fvs(G))𝑘𝒪fvs𝐺k\in\mathcal{O}(\textsf{fvs}(G))italic_k ∈ caligraphic_O ( fvs ( italic_G ) ). Despite this fact, the complexity of the problem remains open when parameterized by fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ).

Let us first start by defining the aforementioned graph parameters and how they relate to each other (see Figure 1). The cluster deletion number of a graph G𝐺Gitalic_G, denoted by cd(G)cd𝐺\textsf{cd}(G)cd ( italic_G ), is the minimum number of vertices whose deletion from G𝐺Gitalic_G results in a disjoint union of complete graphs, i.e., cliques (deleting a vertex also deletes all edges incident to it).

The treedepth of a connected graph G𝐺Gitalic_G, denoted by td(G)td𝐺\textsf{td}(G)td ( italic_G ), is the minimum depth of a rooted tree T𝑇Titalic_T on the vertices of G𝐺Gitalic_G such that each edge of G𝐺Gitalic_G connects an ancestor-descendant pair of T𝑇Titalic_T [19]. Here, the depth of a tree is the length of the longest root-to-leaf path. For disconnected graphs, one can use a forest instead of a tree but we only consider connected graphs. Intuitively, just like graphs of large treewidth may be characterized by large grid minors, treedepth may be characterized by excluded paths, i.e., a graph has large treedepth if and only if it contains a long path [18]. As noted by Demaine et al. [9], treedepth is a natural graph parameter to use for path reconfiguration since the maximum path-length of graphs of bounded treedepth is also bounded by treedepth. In fact, if a graph G𝐺Gitalic_G has maximum path-length r𝑟ritalic_r then its treedepth can be at most r𝑟ritalic_r. In the other direction, a graph with treedepth r𝑟ritalic_r has maximum path-length at most 2r+12superscript2𝑟122^{r+1}-22 start_POSTSUPERSCRIPT italic_r + 1 end_POSTSUPERSCRIPT - 2 [9]. It is also known that in graphs of treedepth r𝑟ritalic_r, the number of paths of a given length can be Θ(n2r)Θsuperscript𝑛superscript2𝑟\Theta(n^{2^{r}})roman_Θ ( italic_n start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT ) [9]. Wrochna initiated the study of the parameterized complexity of reconfiguration problems on graphs of bounded treedepth and graphs of bounded bandwidth [23], showing, e.g., that Shortest Path Reconfiguration (in any of the token models) is PSPACE-complete on graphs of bounded bandwidth (hence pathwidth, treewidth, and cliquewidth).

A vertex cover of a graph is a set of vertices whose deletion leaves a graph with no edges, i.e., an independent set. The vertex cover number of a graph G𝐺Gitalic_G, denoted by vc(G)vc𝐺\textsf{vc}(G)vc ( italic_G ), is the size of a smallest vertex cover in G𝐺Gitalic_G. A feedback vertex set of a graph is a set of vertices whose deletion leaves a graph without cycles, i.e., a forest. The feedback vertex set number of a graph G𝐺Gitalic_G, denoted by fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ), is the size of a smallest feedback vertex set in G𝐺Gitalic_G. To the best of our knowledge, no reconfiguration problems have been studied in graphs of bounded feedback vertex set number (with the exception of [9] that gives an XP algorithm).

While most of our positive results in this section are relatively straightforward, the parameterization by fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ) remains elusive. In fact, we have not succeeded in solving an even simpler problem. That is, we assume that we have a bounded-size modulator to a linear forest, i.e., every tree in the forest is a path (Figure 2). Nevertheless, we show that the feedback vertex set number is a natural parameter for shortest path reconfiguration problems since every positive instance must consist of shortest paths whose length is bounded by a function of the feedback vertex set number (otherwise we can determine immediately that we are dealing with a negative instance). It is also shown in [9] that in an n𝑛nitalic_n-vertex graph with feedback vertex set number r𝑟ritalic_r, the number of paths is at most r!2r((nr2)+nr+1)r+1𝑟superscript2𝑟superscriptbinomial𝑛𝑟2𝑛𝑟1𝑟1r!2^{r}\big{(}{n-r\choose 2}+n-r+1\big{)}^{r+1}italic_r ! 2 start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT ( ( binomial start_ARG italic_n - italic_r end_ARG start_ARG 2 end_ARG ) + italic_n - italic_r + 1 ) start_POSTSUPERSCRIPT italic_r + 1 end_POSTSUPERSCRIPT, which implies a trivial XP algorithm.

We also show that the Shortest Path Reconfiguration problem is fixed-parameter tractable when parameterized by modularwidth [10], where the shortest path length is also bounded by the modularwidth. Combining our results with the \PSPACE\PSPACE\PSPACE-completeness result of Wrochna [23], the boundary separating the tractable instances from the intractable ones becomes much clearer (Figure 1); with the obvious exception of the case of feedback vertex set number which remains open.

In a graph G𝐺Gitalic_G, a module is a set of vertices MV(G)𝑀𝑉𝐺M\subseteq V(G)italic_M ⊆ italic_V ( italic_G ) such that for all u,vM𝑢𝑣𝑀u,v\in Mitalic_u , italic_v ∈ italic_M and wV(G)M𝑤𝑉𝐺𝑀w\in V(G)\setminus Mitalic_w ∈ italic_V ( italic_G ) ∖ italic_M, if {u,w}E(G)𝑢𝑤𝐸𝐺\{u,w\}\in E(G){ italic_u , italic_w } ∈ italic_E ( italic_G ) then {v,w}E(G)𝑣𝑤𝐸𝐺\{v,w\}\in E(G){ italic_v , italic_w } ∈ italic_E ( italic_G ). In other words, a module is a set of vertices that have the same neighbors outside the module. A graph G𝐺Gitalic_G has modularwidth at most w𝑤witalic_w if it satisfies at least one of the following conditions (i) |V(G)|w𝑉𝐺𝑤|V(G)|\leq w| italic_V ( italic_G ) | ≤ italic_w, or (ii) there exists a partition of V(G)𝑉𝐺V(G)italic_V ( italic_G ) into at most w𝑤witalic_w sets V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, V2subscript𝑉2V_{2}italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Vrsubscript𝑉𝑟V_{r}italic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, such that G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] has modularwidth at most w𝑤witalic_w and Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is a module in G𝐺Gitalic_G, for all i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ]. We will use mw(G)mw𝐺\textsf{mw}(G)mw ( italic_G ) to denote the minimum w𝑤witalic_w for which G𝐺Gitalic_G has modularwidth at most w𝑤witalic_w. Note that there is a polynomial-time algorithm which, given a graph G𝐺Gitalic_G produces a non-trivial partition of V(G)𝑉𝐺V(G)italic_V ( italic_G ) into at most mw(G)mw𝐺\textsf{mw}(G)mw ( italic_G ) modules [8], we call such a (non-trivial) partition a modular decomposition of the graph. It is also not hard to see that deleting vertices cannot increase the modularwidth of a graph. This parameter has already been considered in the combinatorial reconfiguration framework; Belmonte etval. [3] show that the Independent Set Reconfiguration problem is fixed-parameter tractable on graphs of bounded modularwidth under all three models (addition/removal, jumping, and sliding).

3.2.1 Treedepth

We start by showing that Shortest Path Reconfiguration is fixed-parameter tractable when parameterized by the treedepth of the input graph. Our proof is identical to the proof of Demaine et al. [9] for a slightly different path reconfiguration problem but we include it here for completeness.

Definition 22 ([9]).

Given a graph G𝐺Gitalic_G and a vertex set S𝑆Sitalic_S, an S𝑆Sitalic_S-flap is a subset XV(G)𝑋𝑉𝐺X\subseteq V(G)italic_X ⊆ italic_V ( italic_G ) such that XS=𝑋𝑆X\cap S=\emptysetitalic_X ∩ italic_S = ∅ and there are no edges from X𝑋Xitalic_X to V(G)SX𝑉𝐺𝑆𝑋V(G)\setminus S\cup Xitalic_V ( italic_G ) ∖ italic_S ∪ italic_X. We say that two S-flaps X𝑋Xitalic_X and Y𝑌Yitalic_Y are equivalent when the induced subgraphs G[SX]𝐺delimited-[]𝑆𝑋G[S\cup X]italic_G [ italic_S ∪ italic_X ] and G[SY]𝐺delimited-[]𝑆𝑌G[S\cup Y]italic_G [ italic_S ∪ italic_Y ] are isomorphic, by an isomorphism that reduces to the identity mapping on S𝑆Sitalic_S.

An essential observation in proving the next lemma is that a path of length at most k𝑘kitalic_k has at most k+1𝑘1k+1italic_k + 1 vertices, and any two vertices in distinct flaps must be separated by at least one vertex of S𝑆Sitalic_S. This implies that for any graph G𝐺Gitalic_G and any vertex set S𝑆Sitalic_S, a path of length k𝑘kitalic_k can include vertices from at most (k1)/2𝑘12\lceil(k-1)/2\rceil⌈ ( italic_k - 1 ) / 2 ⌉ S𝑆Sitalic_S-flaps of G𝐺Gitalic_G.

Lemma 23 ([9]).

Assume we are given an instance of Shortest Path Reconfiguration for paths of length k𝑘kitalic_k in a graph G𝐺Gitalic_G, and that G𝐺Gitalic_G contains a subset S𝑆Sitalic_S that is disjoint from the source and target shortest paths and has more than (k+1)/2𝑘12\lceil(k+1)/2\rceil⌈ ( italic_k + 1 ) / 2 ⌉ pairwise equivalent S𝑆Sitalic_S-flaps all disjoint from the source and target. Then, we can construct an equivalent and smaller instance by removing all but (k+1)/2𝑘12\lceil(k+1)/2\rceil⌈ ( italic_k + 1 ) / 2 ⌉ of these equivalent S𝑆Sitalic_S-flaps.

Theorem 24.

Shortest Path Reconfiguration (in either the token jumping or the token sliding model) is fixed-parameter tractable when parameterized by the treedepth of the input graph, i.e., td(G)td𝐺\textsf{td}(G)td ( italic_G ).

Proof.

The proof consists of an algorithm that reduces an instance to an equivalent one (Using Lemma 23) such that the size of the reduced instance is a function only of the treedepth of the input graph. The problem can then be solved by a brute-force search on the resulting smaller instance. We assume without loss of generality that we already have a tree decomposition T𝑇Titalic_T of depth d𝑑ditalic_d, as it is fixed-parameter tractable to find such a decomposition when one is not already given [19]. Recall that, for graphs of treedepth d𝑑ditalic_d, the length k𝑘kitalic_k of the paths being reconfigured can be at most 2d+12superscript2𝑑122^{d+1}-22 start_POSTSUPERSCRIPT italic_d + 1 end_POSTSUPERSCRIPT - 2. We apply Lemma 23 in a sequence of stages so that, after stage i𝑖iitalic_i, for all vertices at height i𝑖iitalic_i in T𝑇Titalic_T the number of children is bounded by a function of d𝑑ditalic_d.

As a base case, for stage 00, all vertices at height 00 in T𝑇Titalic_T have 00 children, since they are the leaves of T𝑇Titalic_T. Therefore, suppose by induction on i𝑖iitalic_i that all vertices at height less than i𝑖iitalic_i in T𝑇Titalic_T have a bounded number of children. For a given vertex v𝑣vitalic_v at height i𝑖iitalic_i, let Svsubscript𝑆𝑣S_{v}italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT be the set of ancestors of v𝑣vitalic_v in T𝑇Titalic_T (including v𝑣vitalic_v). Then, for each child w𝑤witalic_w of v𝑣vitalic_v in T𝑇Titalic_T, let Xwsubscript𝑋𝑤X_{w}italic_X start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT be the set of descendants of w𝑤witalic_w (including w𝑤witalic_w itself). Then Xwsubscript𝑋𝑤X_{w}italic_X start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT is an Svsubscript𝑆𝑣S_{v}italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT-flap, because Svsubscript𝑆𝑣S_{v}italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT includes all of its ancestors in T𝑇Titalic_T and it can have no edges to vertices that are not ancestors in T𝑇Titalic_T. If we label each vertex in T𝑇Titalic_T by the set of heights of its adjacent ancestors, then the isomorphism type of G[SvXw]𝐺delimited-[]subscript𝑆𝑣subscript𝑋𝑤G[S_{v}\cup X_{w}]italic_G [ italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT ∪ italic_X start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT ] is determined by these labels, so two children u𝑢uitalic_u and w𝑤witalic_w of T𝑇Titalic_T have equivalent Svsubscript𝑆𝑣S_{v}italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT-flaps whenever they correspond to isomorphic labeled subtrees of W𝑊Witalic_W. Trees of bounded size with a bounded number of label values can have a bounded number of isomorphism types, so there are a bounded number of equivalence classes of Svsubscript𝑆𝑣S_{v}italic_S start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT-flaps among the sets Wxsubscript𝑊𝑥W_{x}italic_W start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT. Within each equivalence class, we apply Lemma 23 to reduce the number of flaps within that equivalence class to a number bounded by the treedepth. After doing so, the vertices of T𝑇Titalic_T at height i𝑖iitalic_i have a bounded number of children, completing the induction proof. ∎

3.2.2 Cluster deletion number

We now move on to the parameterization by cluster deletion number. First, we state the following proposition which is immediate in a graph of bounded cluster deletion number.

Proposition 25.

Let G𝐺Gitalic_G be a graph where cd(G)rcd𝐺𝑟\textsf{cd}(G)\leq rcd ( italic_G ) ≤ italic_r. Let C𝐶Citalic_C denote the set whose deletion leaves a disjoint union of complete graphs. Then, any shortest path in G𝐺Gitalic_G contains at most 3r3𝑟3r3 italic_r vertices in total and at most two vertices from each complete graph in GC𝐺𝐶G-Citalic_G - italic_C.

Proof.

Recall that |C|cd(G)r𝐶cd𝐺𝑟|C|\leq\textsf{cd}(G)\leq r| italic_C | ≤ cd ( italic_G ) ≤ italic_r. Any shortest path in G𝐺Gitalic_G can contain at most two vertices from each complete subgraph of GC𝐺𝐶G-Citalic_G - italic_C. Moreover, if a shortest path contains all vertices of C𝐶Citalic_C then each vertex in C𝐶Citalic_C can contribute to at most two vertices from some complete graph, as needed. ∎

Theorem 26.

Shortest Path Reconfiguration (in either the token jumping or the token sliding model) is fixed-parameter tractable when parameterized by the cluster deletion number of the input graph, i.e., cd(G)cd𝐺\textsf{cd}(G)cd ( italic_G ).

Proof.

By Proposition 25, we can assume that the length of the shortest paths is at most 3×cd(G)3cd𝐺3\times\textsf{cd}(G)3 × cd ( italic_G ).

Let CV(G)𝐶𝑉𝐺C\subseteq V(G)italic_C ⊆ italic_V ( italic_G ) denote the set of size cd(G)cd𝐺\textsf{cd}(G)cd ( italic_G ) whose deletion leaves a disjoint union of complete graphs. We denote those cliques by K1subscript𝐾1K_{1}italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, K2subscript𝐾2K_{2}italic_K start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Kqsubscript𝐾𝑞K_{q}italic_K start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT. We now classify each vertex in V(G)C𝑉𝐺𝐶V(G)\setminus Citalic_V ( italic_G ) ∖ italic_C based on its neighborhood in C𝐶Citalic_C. That is, we say u𝑢uitalic_u and v𝑣vitalic_v belong to the same class and have the same type whenever N(u)C=N(v)C𝑁𝑢𝐶𝑁𝑣𝐶N(u)\cap C=N(v)\cap Citalic_N ( italic_u ) ∩ italic_C = italic_N ( italic_v ) ∩ italic_C. Next, with the exception of the vertices of P𝑃Pitalic_P and Q𝑄Qitalic_Q, whenever a clique contains more than one vertex of the same type we can delete all except one vertex. Hence, each clique eventually contains at most 2cd(G)superscript2cd𝐺2^{\textsf{cd}(G)}2 start_POSTSUPERSCRIPT cd ( italic_G ) end_POSTSUPERSCRIPT vertices.

It remains to bound the number of cliques in GC𝐺𝐶G-Citalic_G - italic_C. To do so, we define the type of a clique as the set of types of its vertices. Excluding the cliques that intersect with P𝑃Pitalic_P and Q𝑄Qitalic_Q, whenever we have more than 3×cd(G)3cd𝐺3\times\textsf{cd}(G)3 × cd ( italic_G ) cliques of the same type we can just retain 3×cd(G)3cd𝐺3\times\textsf{cd}(G)3 × cd ( italic_G ) cliques of that type. ∎

3.2.3 Modular width

We now show that the Shortest Path Reconfiguration problem is fixed-parameter tractable when parameterized by modularwidth. Before doing so, we prove the following (straightforward but needed) proposition [14].

Proposition 27.

If a graph G𝐺Gitalic_G has modularwidth at most w𝑤witalic_w, i.e., mw(G)wmw𝐺𝑤\textsf{mw}(G)\leq wmw ( italic_G ) ≤ italic_w, then any shortest path in G𝐺Gitalic_G has length at most w𝑤witalic_w. Moreover, if |V(G)|>w𝑉𝐺𝑤|V(G)|>w| italic_V ( italic_G ) | > italic_w and V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, V2subscript𝑉2V_{2}italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Vrsubscript𝑉𝑟V_{r}italic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, rw𝑟𝑤r\leq witalic_r ≤ italic_w, is a modular decomposition of G𝐺Gitalic_G then any shortest path of length at least three is either fully contained in some G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] or consists of at most one vertex from each Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, for i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ].

Proof.

Let P𝑃Pitalic_P be a shortest path in G𝐺Gitalic_G between vertices s,tV(G)𝑠𝑡𝑉𝐺s,t\in V(G)italic_s , italic_t ∈ italic_V ( italic_G ). Recall that a module is a set of vertices that have the same neighbors outside the module and mw(G)wmw𝐺𝑤\textsf{mw}(G)\leq wmw ( italic_G ) ≤ italic_w if either |V(G)|w𝑉𝐺𝑤|V(G)|\leq w| italic_V ( italic_G ) | ≤ italic_w or there exists a partition of V(G)𝑉𝐺V(G)italic_V ( italic_G ) into at most w𝑤witalic_w sets V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, V2subscript𝑉2V_{2}italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Vrsubscript𝑉𝑟V_{r}italic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, such that mw(G[Vi])wmw𝐺delimited-[]subscript𝑉𝑖𝑤\textsf{mw}(G[V_{i}])\leq wmw ( italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] ) ≤ italic_w and Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is a module in G𝐺Gitalic_G, for all i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ].

Note that if |V(G)|w𝑉𝐺𝑤|V(G)|\leq w| italic_V ( italic_G ) | ≤ italic_w then we are done. Hence, we assume that there exists a partition of V(G)𝑉𝐺V(G)italic_V ( italic_G ) into at most w𝑤witalic_w (non-empty) module V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, V2subscript𝑉2V_{2}italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Vrsubscript𝑉𝑟V_{r}italic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT such that for each module we can recursively apply the definition of modularwidth.

Assume that |V(P)Vi|2𝑉𝑃subscript𝑉𝑖2|V(P)\cap V_{i}|\geq 2| italic_V ( italic_P ) ∩ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT | ≥ 2, for some i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ], and |V(P)Vj|1𝑉𝑃subscript𝑉𝑗1|V(P)\cap V_{j}|\geq 1| italic_V ( italic_P ) ∩ italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT | ≥ 1, for some j[r]𝑗delimited-[]𝑟j\in[r]italic_j ∈ [ italic_r ] such that ij𝑖𝑗i\neq jitalic_i ≠ italic_j. Then, we claim that the path P𝑃Pitalic_P cannot be a shortest path (unless it has length two); this indeed follows from the definition of modules since all vertices in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT have the same neighbors outside of Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Hence, whether the shortest path enters and leaves Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT twice or more or visits two or more consecutive vertices in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (before leaving) then we get a contradiction to the fact that P𝑃Pitalic_P is shortest. This implies that a shortest path in G𝐺Gitalic_G is either fully included in some Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT or uses at most one vertex from each Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. In the latter case, we get a path of length at most w𝑤witalic_w and we are done. In the former case, since mw(G[Vi])wmw𝐺delimited-[]subscript𝑉𝑖𝑤\textsf{mw}(G[V_{i}])\leq wmw ( italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] ) ≤ italic_w, we can apply the same reasoning recursively. ∎

Theorem 28.

Shortest Path Reconfiguration (in either the token jumping or the token sliding model) is fixed-parameter tractable when parameterized by the modularwidth of the input graph, i.e., mw(G)mw𝐺\textsf{mw}(G)mw ( italic_G ).

Proof.

Let (G,s,t,P,Q)𝐺𝑠𝑡𝑃𝑄(G,s,t,P,Q)( italic_G , italic_s , italic_t , italic_P , italic_Q ) be an instance of Shortest Path Reconfiguration, where mw(G)=wmw𝐺𝑤\textsf{mw}(G)=wmw ( italic_G ) = italic_w and kw𝑘𝑤k\leq witalic_k ≤ italic_w denotes the length of P𝑃Pitalic_P and Q𝑄Qitalic_Q.

If |V(G)|w𝑉𝐺𝑤|V(G)|\leq w| italic_V ( italic_G ) | ≤ italic_w or k2𝑘2k\leq 2italic_k ≤ 2 then we can solve the problem by a brute-force search on the instance, i.e., we can construct a graph containing one vertex for each shortest path between s𝑠sitalic_s and t𝑡titalic_t and then connect two vertices wherever the reconfiguration rule applies.

If V(G)>w𝑉𝐺𝑤V(G)>witalic_V ( italic_G ) > italic_w, we first run the polynomial-time algorithm which, given a graph G𝐺Gitalic_G, produces a non-trivial partition of V(G)𝑉𝐺V(G)italic_V ( italic_G ) into at most rw𝑟𝑤r\leq witalic_r ≤ italic_w sets V1subscript𝑉1V_{1}italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, V2subscript𝑉2V_{2}italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, \ldots, Vrsubscript𝑉𝑟V_{r}italic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, such that mw(G[Vi])wmw𝐺delimited-[]subscript𝑉𝑖𝑤\textsf{mw}(G[V_{i}])\leq wmw ( italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] ) ≤ italic_w and Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is a module in G𝐺Gitalic_G, for all i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ]. We know, from Proposition 27, that any shortest path in G𝐺Gitalic_G is either fully contained in some G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] or consists of exactly one vertex from each Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, for i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ].

If both s𝑠sitalic_s and t𝑡titalic_t belong to the same Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, i[r]𝑖delimited-[]𝑟i\in[r]italic_i ∈ [ italic_r ], then either the distance between them is at most two or every shortest path between them is fully contained in G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ]. To see why, assume that there exists a shortest path from s𝑠sitalic_s to t𝑡titalic_t that is not fully contained in G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ] and let v𝑣vitalic_v be the first vertex along this path that is not in Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. By the definition of modules, both s𝑠sitalic_s and t𝑡titalic_t must be adjacent to v𝑣vitalic_v which implies that the distance between them is at most two. The case of distance at most two is handled by the brute-force search. So we can assume that the distance between s𝑠sitalic_s and t𝑡titalic_t is at least three and then we solve the problem recursively in G[Vi]𝐺delimited-[]subscript𝑉𝑖G[V_{i}]italic_G [ italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ].

Finally, assume that s𝑠sitalic_s belongs to Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and t𝑡titalic_t belongs to Vjsubscript𝑉𝑗V_{j}italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, where ij𝑖𝑗i\neq jitalic_i ≠ italic_j. We show that for any two shortest paths W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT from s𝑠sitalic_s to t𝑡titalic_t the following condition must hold. All the modules that W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT have in common must appear at the same positions in W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, respectively. Let V0W=Visubscriptsuperscript𝑉𝑊0subscript𝑉𝑖V^{W}_{0}=V_{i}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, V1Wsubscriptsuperscript𝑉𝑊1V^{W}_{1}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, \ldots, VkW=Vjsubscriptsuperscript𝑉𝑊𝑘subscript𝑉𝑗V^{W}_{k}=V_{j}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT denote the modules containing the vertices of W𝑊Witalic_W (recall that we have one vertex per module). Similarly, let V0W=Visubscriptsuperscript𝑉superscript𝑊0subscript𝑉𝑖V^{W^{\prime}}_{0}=V_{i}italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, V1Wsubscriptsuperscript𝑉superscript𝑊1V^{W^{\prime}}_{1}italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, \ldots, VkW=Vjsubscriptsuperscript𝑉superscript𝑊𝑘subscript𝑉𝑗V^{W^{\prime}}_{k}=V_{j}italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT denote the modules containing the vertices of Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. We now show that whenever VxW=VyWsubscriptsuperscript𝑉𝑊𝑥subscriptsuperscript𝑉superscript𝑊𝑦V^{W}_{x}=V^{W^{\prime}}_{y}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT = italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT then x=y𝑥𝑦x=yitalic_x = italic_y. In other words, whenever the same module intersects with both W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT (in exactly one vertex which could be different for W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT) then it must be at the same position along the path. Assume, towards a contradiction, that VxW=VyWsubscriptsuperscript𝑉𝑊𝑥subscriptsuperscript𝑉superscript𝑊𝑦V^{W}_{x}=V^{W^{\prime}}_{y}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT = italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT and x<y𝑥𝑦x<yitalic_x < italic_y (the proof of the case x>y𝑥𝑦x>yitalic_x > italic_y is analogous). Since x<y𝑥𝑦x<yitalic_x < italic_y it must be the case that the distance from Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT to t𝑡titalic_t in Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is less than the distance from Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT to t𝑡titalic_t in W𝑊Witalic_W. However, this allows us to create a shortest path W′′superscript𝑊′′W^{\prime\prime}italic_W start_POSTSUPERSCRIPT ′ ′ end_POSTSUPERSCRIPT which visits the modules V0W=Visubscriptsuperscript𝑉𝑊0subscript𝑉𝑖V^{W}_{0}=V_{i}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, \ldots, VxW=VyWsubscriptsuperscript𝑉𝑊𝑥subscriptsuperscript𝑉superscript𝑊𝑦V^{W}_{x}=V^{W^{\prime}}_{y}italic_V start_POSTSUPERSCRIPT italic_W end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT = italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT, Vy+1Wsubscriptsuperscript𝑉superscript𝑊𝑦1V^{W^{\prime}}_{y+1}italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y + 1 end_POSTSUBSCRIPT, VkW=Vjsubscriptsuperscript𝑉superscript𝑊𝑘subscript𝑉𝑗V^{W^{\prime}}_{k}=V_{j}italic_V start_POSTSUPERSCRIPT italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_V start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. This contradicts our assumption that both W𝑊Witalic_W and Wsuperscript𝑊W^{\prime}italic_W start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT are shortest paths between s𝑠sitalic_s and t𝑡titalic_t. Note that by the definition of modules, whenever a module intersects with any shortest path between s𝑠sitalic_s and t𝑡titalic_t then all the vertices of the module must be at the same distance from s𝑠sitalic_s (and t𝑡titalic_t). Hence, we can label each module using its distance from s𝑠sitalic_s and safely delete all the modules which do not contain a vertex belonging to some shortest path between s𝑠sitalic_s and t𝑡titalic_t, Moreover, if one vertex of a module belongs to some shortest path between s𝑠sitalic_s and t𝑡titalic_t then the same is true for all vertices of the module, i.e., we can replace one vertex of the module by any other vertex of the module and still maintain a shortest path (since all vertices of a module have the same neighbors outside the module).

It remains to show how we can solve the problem given all of the above, For the token jumping model we can simply create a new auxiliary graph H𝐻Hitalic_H as follows. We add P𝑃Pitalic_P and Q𝑄Qitalic_Q to H𝐻Hitalic_H as well as any vertex belonging to some shortest path from s𝑠sitalic_s to t𝑡titalic_t. We omit/delete edges between vertices of H𝐻Hitalic_H that are at the same distance from s𝑠sitalic_s and t𝑡titalic_t and add/create edges between two vertices of H𝐻Hitalic_H whenever they are adjacent in G𝐺Gitalic_G and are not at the same distance from s𝑠sitalic_s and t𝑡titalic_t in G𝐺Gitalic_G. Finally, as long as we can find two vertices uV(H){V(P)V(Q)}𝑢𝑉𝐻𝑉𝑃𝑉𝑄u\in V(H)\setminus\{V(P)\cup V(Q)\}italic_u ∈ italic_V ( italic_H ) ∖ { italic_V ( italic_P ) ∪ italic_V ( italic_Q ) } and v𝑣vitalic_v in H𝐻Hitalic_H that are (false) twins, we delete u𝑢uitalic_u and retain v𝑣vitalic_v; recall that vertices are said to be (false) twins whenever they have the same neighborhood and are non-adjacent. The correctness of this step follows from the fact that when we delete edges between vertices at the same distance from s𝑠sitalic_s and t𝑡titalic_t we are left with modules that induce independent sets, which means that all vertices in a module are (false) twins and are equivalent. In the new instance (H,s,t,P,Q)𝐻𝑠𝑡𝑃𝑄(H,s,t,P,Q)( italic_H , italic_s , italic_t , italic_P , italic_Q ) of Shortest Path Reconfiguration we can again solve the problem by a brute-force search since |V(H)|4mw(G)𝑉𝐻4mw𝐺|V(H)|\leq 4\textsf{mw}(G)| italic_V ( italic_H ) | ≤ 4 mw ( italic_G ).

The situation is slightly more complicated in the token sliding model since we need to maintain more information about connectivity within each module Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT, and in particular between the modules that are at the same distance from s𝑠sitalic_s (and t𝑡titalic_t). Recall that there are only two possible ways a pair of modules can share edges; either all edges are present or none. Therefore, we now create the graph H𝐻Hitalic_H as follows. We first add P𝑃Pitalic_P and Q𝑄Qitalic_Q to H𝐻Hitalic_H as well as any vertex belonging to some shortest path from s𝑠sitalic_s to t𝑡titalic_t. We add/create edges between two vertices of H𝐻Hitalic_H whenever they are adjacent in G𝐺Gitalic_G (regardless of distance to s𝑠sitalic_s). Consider a shortest sequence of slides from P𝑃Pitalic_P to Q𝑄Qitalic_Q. It is not hard to see that we can assume that no token slides within a module and then out of the module. Similarly, no token slides from one module to another and then slides inside the latter module; this follows from the definition of modules and the fact that we assume a shortest sequence of slides. Both types of slides can be skipped while preserving a valid (shorter) reconfiguration sequence. Given a module Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT, we contract each connected component in H[Vx{V(P)V(Q)}]𝐻delimited-[]subscript𝑉𝑥𝑉𝑃𝑉𝑄H[V_{x}\setminus\{V(P)\cup V(Q)\}]italic_H [ italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT ∖ { italic_V ( italic_P ) ∪ italic_V ( italic_Q ) } ] to a single vertex.

Since the number of connected components in each module can be unbounded we still cannot apply a brute-force search algorithm. To remedy the situation we proceed as follows. We guess which tokens will not leave their respective modules. For each such token on vertex v𝑣vitalic_v in module Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT, we compute a shortest path from v=V(P)Vx𝑣𝑉𝑃subscript𝑉𝑥v=V(P)\cap V_{x}italic_v = italic_V ( italic_P ) ∩ italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT to w=V(Q)Vx𝑤𝑉𝑄subscript𝑉𝑥w=V(Q)\cap V_{x}italic_w = italic_V ( italic_Q ) ∩ italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT, save it, and then delete all vertices that are at the same distance as v𝑣vitalic_v from s𝑠sitalic_s and t𝑡titalic_t. We also adjust Q𝑄Qitalic_Q so that w𝑤witalic_w is replaced by v𝑣vitalic_v. The moves along the vw𝑣𝑤vwitalic_v italic_w-shortest path will be appended to the reconfiguration sequence computed in H𝐻Hitalic_H. When v𝑣vitalic_v and w𝑤witalic_w belong to different components of Vxsubscript𝑉𝑥V_{x}italic_V start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT we simply ignore this guess and continue to the next. Now, assuming a correct guess, we know that in the instance we have, every slide of a token implies a change of module. Consider a module Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT such that Vy{V(P)V(Q)}=subscript𝑉𝑦𝑉𝑃𝑉𝑄V_{y}\cap\{V(P)\cup V(Q)\}=\emptysetitalic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ∩ { italic_V ( italic_P ) ∪ italic_V ( italic_Q ) } = ∅. We claim that retaining only one vertex of Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT is enough. To see why, note that every move of a token into Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT or out of Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT can be done using any vertex of Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT (all the vertices of a module have the same neighbors outside the module). Since Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT is not the initial or final destination of our token, and no slides happen inside Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT the claim follows. Using similar arguments, it follows that for a module Vysubscript𝑉𝑦V_{y}italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT such that Vy{V(P)V(Q)}subscript𝑉𝑦𝑉𝑃𝑉𝑄V_{y}\cap\{V(P)\cup V(Q)\}\neq\emptysetitalic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ∩ { italic_V ( italic_P ) ∪ italic_V ( italic_Q ) } ≠ ∅ retaining only |Vy{V(P)V(Q)}|subscript𝑉𝑦𝑉𝑃𝑉𝑄|V_{y}\cap\{V(P)\cup V(Q)\}|| italic_V start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ∩ { italic_V ( italic_P ) ∪ italic_V ( italic_Q ) } | vertices is enough, i.e., we always retain the vertex of P𝑃Pitalic_P and the vertex of Q𝑄Qitalic_Q when reducing the number of independent vertices in modules.

Having bounded the number of vertices inside each module to two, we can now solve the problem via brute force as in the token jumping case (with the extra edges between vertices at the same distance). In other words, we have |V(H)|4mw(G)𝑉𝐻4mw𝐺|V(H)|\leq 4\textsf{mw}(G)| italic_V ( italic_H ) | ≤ 4 mw ( italic_G ), as needed to complete the proof. ∎

3.2.4 Feedback vertex set number

We conclude this section by proving that on graphs of bounded feedback vertex set number, we can always assume that the paths in an instance of Shortest Path Reconfiguration are of length at most 4×fvs(G)4fvs𝐺4\times\textsf{fvs}(G)4 × fvs ( italic_G ).

Lemma 29.

Let (G,s,t,P,Q)𝐺𝑠𝑡𝑃𝑄(G,s,t,P,Q)( italic_G , italic_s , italic_t , italic_P , italic_Q ) be an instance of Shortest Path Reconfiguration (in either the token jumping or the token sliding model), where fvs(G)rfvs𝐺𝑟\textsf{fvs}(G)\leq rfvs ( italic_G ) ≤ italic_r. Then, we can always assume that either k4×fvs(G)𝑘4fvs𝐺k\leq 4\times\textsf{fvs}(G)italic_k ≤ 4 × fvs ( italic_G ) or (G,s,t,P,Q)𝐺𝑠𝑡𝑃𝑄(G,s,t,P,Q)( italic_G , italic_s , italic_t , italic_P , italic_Q ) is a no-instance.

Proof.

We first run a breadth-first search traversal of the input graph starting from s𝑠sitalic_s and we label each vertex that we explore using its distance from s𝑠sitalic_s; s𝑠sitalic_s receives label 00 and t𝑡titalic_t receives label k𝑘kitalic_k. We can safely delete all vertices that are unlabeled or labelled by k𝑘kitalic_k or more (except for t𝑡titalic_t). Now, starting from t𝑡titalic_t, we traverse the labelled vertices in reverse (by running another breadth-first search) and maintain only those vertices that belong to some shortest path between s𝑠sitalic_s and t𝑡titalic_t. We now create level sets starting with L0={s}subscript𝐿0𝑠L_{0}=\{s\}italic_L start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = { italic_s }, L1subscript𝐿1L_{1}italic_L start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT containing all vertices at distance one from s𝑠sitalic_s, \ldots, Lisubscript𝐿𝑖L_{i}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT containing all vertices at distance i𝑖iitalic_i from s𝑠sitalic_s, and finally Lk={t}subscript𝐿𝑘𝑡L_{k}=\{t\}italic_L start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = { italic_t }.

Assume that k4×fvs(G)+1𝑘4fvs𝐺1k\geq 4\times\textsf{fvs}(G)+1italic_k ≥ 4 × fvs ( italic_G ) + 1 and let F𝐹Fitalic_F be a feedback vertex set of G𝐺Gitalic_G of size fvs(G)fvs𝐺\textsf{fvs}(G)fvs ( italic_G ). Hence, there must exist at least four consecutive level sets Lisubscript𝐿𝑖L_{i}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, Li+1subscript𝐿𝑖1L_{i+1}italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT, Li+2subscript𝐿𝑖2L_{i+2}italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT, and Li+3subscript𝐿𝑖3L_{i+3}italic_L start_POSTSUBSCRIPT italic_i + 3 end_POSTSUBSCRIPT such that F(LiLi+1Li+2Li+3)=𝐹subscript𝐿𝑖subscript𝐿𝑖1subscript𝐿𝑖2subscript𝐿𝑖3F\cap(L_{i}\cup L_{i+1}\cup L_{i+2}\cup L_{i+3})=\emptysetitalic_F ∩ ( italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 3 end_POSTSUBSCRIPT ) = ∅. This implies that G[LiLi+1Li+2Li+3]𝐺delimited-[]subscript𝐿𝑖subscript𝐿𝑖1subscript𝐿𝑖2subscript𝐿𝑖3G[L_{i}\cup L_{i+1}\cup L_{i+2}\cup L_{i+3}]italic_G [ italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT ∪ italic_L start_POSTSUBSCRIPT italic_i + 3 end_POSTSUBSCRIPT ] must be a forest and therefore the tokens in Li+1subscript𝐿𝑖1L_{i+1}italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT and Li+2subscript𝐿𝑖2L_{i+2}italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT cannot move. If P𝑃Pitalic_P and Q𝑄Qitalic_Q do not agree on the vertices in those two level sets then we have a no-instance. Otherwise, let u𝑢uitalic_u and v𝑣vitalic_v denote the vertices in Li+1subscript𝐿𝑖1L_{i+1}italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT and Li+2subscript𝐿𝑖2L_{i+2}italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT, respectively. We delete Li+1subscript𝐿𝑖1L_{i+1}italic_L start_POSTSUBSCRIPT italic_i + 1 end_POSTSUBSCRIPT and Li+2subscript𝐿𝑖2L_{i+2}italic_L start_POSTSUBSCRIPT italic_i + 2 end_POSTSUBSCRIPT from the graph and replace them by a single vertex w𝑤witalic_w such that w𝑤witalic_w is connected to all neighbors of u𝑢uitalic_u in Lisubscript𝐿𝑖L_{i}italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and all neighbors of v𝑣vitalic_v in Li+3subscript𝐿𝑖3L_{i+3}italic_L start_POSTSUBSCRIPT italic_i + 3 end_POSTSUBSCRIPT. It is not hard to see that we obtain an equivalent instance where the length of the shortest path is reduced by one, as needed to complete the proof. ∎

References

  • [1] John Asplund, Kossi D. Edoh, Ruth Haas, Yulia Hristova, Beth Novick, and Brett Werner. Reconfiguration graphs of shortest paths. Discret. Math., 341(10):2938–2948, 2018.
  • [2] Valentin Bartier, Nicolas Bousquet, and Amer E. Mouawad. Galactic token sliding. J. Comput. Syst. Sci., 136:220–248, 2023.
  • [3] Rémy Belmonte, Tesshu Hanaka, Michael Lampis, Hirotaka Ono, and Yota Otachi. Independent set reconfiguration parameterized by modular-width. Algorithmica, 82(9):2586–2605, 2020.
  • [4] Paul S. Bonsma. The complexity of rerouting shortest paths. Theor. Comput. Sci., 510:1–12, 2013.
  • [5] Paul S. Bonsma. Rerouting shortest paths in planar graphs. Discret. Appl. Math., 231:95–112, 2017.
  • [6] Nicolas Bousquet, Felix Hommelsheim, Yusuke Kobayashi, Moritz Mühlenthaler, and Akira Suzuki. Feedback vertex set reconfiguration in planar graphs. Theor. Comput. Sci., 979:114188, 2023.
  • [7] Nicolas Bousquet, Amer E. Mouawad, Naomi Nishimura, and Sebastian Siebertz. A survey on the parameterized complexity of the independent set and (connected) dominating set reconfiguration problems. CoRR, abs/2204.10526, 2022.
  • [8] Alain Cournier and Michel Habib. A new linear algorithm for modular decomposition. In Sophie Tison, editor, Trees in Algebra and Programming - CAAP’94, 19th International Colloquium, Edinburgh, UK, April 11-13, 1994, Proceedings, volume 787 of Lecture Notes in Computer Science, pages 68–84. Springer, 1994.
  • [9] Erik D. Demaine, David Eppstein, Adam Hesterberg, Kshitij Jain, Anna Lubiw, Ryuhei Uehara, and Yushi Uno. Reconfiguring undirected paths. In Algorithms and Data Structures - 16th International Symposium, WADS 2019, Edmonton, AB, Canada, August 5-7, 2019, Proceedings, pages 353–365, 2019.
  • [10] Jakub Gajarský, Michael Lampis, and Sebastian Ordyniak. Parameterized algorithms for modular-width. In Parameterized and Exact Computation - 8th International Symposium, IPEC 2013, Sophia Antipolis, France, September 4-6, 2013, Revised Selected Papers, volume 8246 of Lecture Notes in Computer Science, pages 163–176. Springer, 2013.
  • [11] Kshitij Gajjar, Agastya Vibhuti Jha, Manish Kumar, and Abhiruk Lahiri. Reconfiguring shortest paths in graphs. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Virtual Event, February 22 - March 1, 2022, pages 9758–9766, 2022.
  • [12] Sevag Gharibian and Jamie Sikora. Ground state connectivity of local hamiltonians. In Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, 2015, Proceedings, Part I, volume 9134 of Lecture Notes in Computer Science, pages 617–628. Springer, 2015.
  • [13] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order properties of nowhere dense graphs. In David B. Shmoys, editor, Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 - June 03, 2014, pages 89–98. ACM, 2014.
  • [14] Michel Habib and Christophe Paul. A survey on algorithmic aspects of modular decomposition. CoRR, abs/0912.1457, 2009.
  • [15] 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. Theor. Comput. Sci., 412(12-14):1054–1065, 2011.
  • [16] Takehiro Ito, Marcin Kaminski, and Erik D. Demaine. Reconfiguration of list edge-colorings in a graph. Discret. Appl. Math., 160(15):2199–2207, 2012.
  • [17] Anna Lubiw and Vinayak Pathak. Flip distance between two triangulations of a point set is NP-complete. Comput. Geom., 49:17–23, 2015.
  • [18] Jaroslav Nesetril and Patrice Ossona de Mendez. Grad and classes with bounded expansion i. decompositions. Eur. J. Comb., 29(3):760–776, 2008.
  • [19] Jaroslav Nesetril and Patrice Ossona de Mendez. Sparsity - Graphs, Structures, and Algorithms, volume 28 of Algorithms and combinatorics. Springer, 2012.
  • [20] Naomi Nishimura. Introduction to reconfiguration. Algorithms, 11(4):52, 2018.
  • [21] Krzysztof Pietrzak. On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems. Journal of Computer and System Sciences, 67(4):757–771, 2003.
  • [22] Jan van den Heuvel. The complexity of change. In Simon R. Blackburn, Stefanie Gerke, and Mark Wildon, editors, Surveys in Combinatorics 2013, volume 409 of London Mathematical Society Lecture Note Series, pages 127–160. Cambridge University Press, 2013.
  • [23] Marcin Wrochna. Reconfiguration in bounded bandwidth and tree-depth. J. Comput. Syst. Sci., 93:1–10, 2018.