Turing Kernelization for Finding Long Paths in Graph Classes Excluding a Topological Minor

The notion of Turing kernelization investigates whether a polynomial-time algorithm can solve an NP-hard problem, when it is aided by an oracle that can be queried for the answers to bounded-size subproblems. One of the main open problems in this direction is whether k\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k$$\end{document}-Path admits a polynomial Turing kernel: can a polynomial-time algorithm determine whether an undirected graph has a simple path of length k, using an oracle that answers queries of size kO(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k^{\mathscr {O} (1)}$$\end{document}? We show this can be done when the input graph avoids a fixed graph H as a topological minor, thereby significantly generalizing an earlier result for bounded-degree and K3,t\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K_{3,t}$$\end{document}-minor-free graphs. Moreover, we show that k\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k$$\end{document}-Path even admits a polynomial Turing kernel when the input graph is not H-topological-minor-free itself, but contains a known vertex modulator of size bounded polynomially in the parameter, whose deletion makes it so. To obtain our results, we build on the graph minors decomposition to show that any H-topological-minor-free graph that does not contain a k-path, has a separation that can safely be reduced after communication with the oracle.


Introduction
Suppose that Alice is a polynomial-time agent faced with an input to an NP-hard problem that she wishes to solve exactly. To facilitate her in this process, she can ask questions to an all-knowing oracle. These will be answered truthfully and instantly, but the oracle is memory-less and will not take previous questions into account when answering the next one. How large do these questions have to be, to allow Alice to find the answer to her problem? Clearly, the answer can be established by sending the entire input to the oracle, who determines the answer and sends it to Alice. Could there be a more clever strategy? Alice can attempt to isolate a small but meaningful question about the behavior of her input, such that after learning its answer, she can reduce to a smaller input without changing the outcome. Iterating this process solves her problem: when it has become sufficiently small, it can be posed to the oracle in its entirety.
Such problem-solving strategies can be rigorously analyzed using the notion of Turing kernelization that originated in parameterized algorithmics. The parameter makes it possible to express how the size of the questions that Alice asks, depends on properties of the input that she is given. (See Section 3 for a formal definition.) Understanding the power of Turing kernelization is one of the main open research horizons in parameterized algorithmics. There is a handful of problems for which a nontrivial Turing kernelization is known [1,3,4,6,14,17,19,20,26,28]. On the other hand, there is a hierarchy of parameterized complexity classes which are conjectured not to admit polynomial Turing kernels [16]. Arguably, the main open problem (cf. [5,4,16]) in this direction is to determine whether the k-Path problem (determine whether an undirected graph has a simple path of length k) has a polynomial Turing kernel. In earlier work [18], the first author showed that k-Path indeed admits polynomial Turing kernels on several graph classes. In this work, we develop Turing kernels for k-Path in a much more general setting.
Our results Our algorithmic contributions are twofold. First of all, we extend the Turing kernelization for k-Path to much broader families of sparse graphs. Whereas the earlier work could only deal with K 3,t -minor-free graphs, claw-free graphs, and bounded-degree graphs, we show that a Turing kernelization exists on H-minor-free graphs for all fixed graphs H. We even lift the kernelization to H-topological-minor-free graphs, thereby capturing a common generalization of the bounded-degree and K 3,t -minor-free cases. Our second contribution is the following theorem. By a novel algorithmic approach, we obtain a Turing kernelization even when the input graph does not belong to the desired restricted graph class itself, but contains a small known vertex modulator whose deletion places the graph in such a graph class. Theorem 1.2. For every fixed graph H, the k-Path problem, on instances consisting of a graph G, integer k, and a modulator M ⊆ V (G) such that G − M is H-topological-minor-free, admits a polynomial Turing kernel, when parameterized by k and |M |.
Techniques To explain our approach, we briefly recall the idea behind the Turing kernelization for k-Path on planar graphs. At the core lies a win/win: there is a polynomial-time algorithm that either (i) establishes that a planar graph G has a k-path (a simple path on k vertices), or (ii) finds a separation (A, B) in G with the following property: the size of A is polynomially bounded in k, but large enough that after marking a witness structure for each reasonable way in which a k-path might intersect A, some vertex remains unmarked. Using bounded-size oracle queries to mark the witness structures, this allows the problem to be simplified by removing an unmarked vertex from A without changing the answer. Theorem 1.1 is established by lifting this win/win approach to H-(topological)-minor-free graphs. This requires an adaptation of the decomposition theorems of Robertson and Seymour [25] (for minors) and of Grohe and Marx [15] (for topological minors), to obtain the following. Every H-free graph that does not have a k-path, has a tree decomposition of constant adhesion and width poly(k). A reducible separation can be found by inspecting this tree decomposition. To establish this result, we exploit known theorems stating that triconnected n-vertex graphs that exclude K 3,t as a minor for some t [8], contain paths of length Ω(n ε ) for some ε > 0. Roughly speaking, this allows us to infer the existence of a k-path if there is a large embedded part in the nearly-embeddable graph corresponding to a bag of the graph minors decomposition, since graphs embeddable in a fixed surface are K 3,t -minor-free for some t. We use lower bounds on the circumference of graphs of bounded degree [7,27] to achieve a similar conclusion from the existence of a large bounded-degree bag in the topological-minor-free decomposition. Several technical steps are needed to translate this into the desired win/win, due to the existence of vortices, virtual edges, and the lack of a direct polynomial-time algorithm to compute the decomposition.
To prove Theorem 1.2, we introduce a new algorithmic tool for finding irrelevant vertices for the k-Path problem in the presence of a modulator M in the input graph G. Since Theorem 1.1 can be applied to find a k-path in G − M if one exists, the challenge is to detect a k-path in G that jumps between M and G − M several times. The absence of a k-path in G − M implies it has a tree decomposition of width poly(k) and constant adhesion. Using Theorem 1.1 as a subroutine, along with a packing argument, we can compute a vertex set X of size polynomial in k + |M | with the following guarantee. If there is a k-path, then there is a guarded k-path P in which each successive pair of vertices in M ∩ P are connected by a subpath through G − M that intersects X. Using the tree decomposition of G − M , the standard ancestor-marking technique allows us to identify a vertex subset C of G − (M ∪ X) that is adjacent to constantly many vertices from X. Unless G is already small, we can find such a set C that is sufficiently large to be reducible but small enough that we may invoke the oracle for questions about it. We can then reduce the graph without losing the existence of a guarded k-path, by marking a witness for each sensible way in which a constant-size subset from M can connect to prescribed vertices in X through C. The fact that C only has constantly many neighbors in X implies that there are only polynomially many relevant choices. We may then safely remove the unmarked vertices.
Organization After preliminaries in Section 2, we give a generic Turing-style reduction rule for k-Path in Section 3. In Section 4 we show that an H-minor-free graph either has a k-path or a separation that is suitable for reduction. In Section 5 we extend this to topological minors. Finally, in Section 6 we present a Turing kernel applicable when the input graph has a small modulator to a suitable graph class.

Preliminaries
Notation. All graphs we consider are finite, simple, and undirected. A separation of a graph G is a pair (A, B), A, B ⊆ V (G) such that A ∪ B = V (G) and there are no edges between A \ B and B \ A. The order of the separation (A, B) is |A ∩ B|. A graph is triconnected if it is connected and cannot be disconnected by deleting fewer than three vertices. When referring to the size of a graph in our statements, we mean the number of vertices.
A tree decomposition of a graph G is a pair (T, X ) where T is a rooted tree and X is a function that assigns to every node t ∈ V (T ) a subset X (t) of V (G) called a bag such that: The width of (T, X ) is max t∈V (T ) |X (t)| − 1. Its adhesion is max tt ∈E(T ) |X (t) ∩ X (t )|. We also call the set X (t) ∩ X (t ) the adhesion of tt , for every edge tt of T . For a decomposition (T, X ) of G and a node t ∈ V (T ), the torso, denoted torso(G, X (t)), is the graph obtained from G[X (t)] by adding an edge between each pair of vertices in X (t) ∩ X (t ), for every neighbor t of t in T (so each adhesion induces a clique in the torso). Added edges not present in G are called virtual edges. For a subtree T ⊆ T we write X (T ) for the union t∈V (T ) X (t) of bags in T .
For an edge Observe that the properties of a tree decomposition imply that ( A decomposition (T, X ) is connected if for every t ∈ V (T ) and its child t , if T t is the subtree of T rooted at t , we have (i) that G[X (T t ) \ X (t)] is connected, and (ii) that X (T t ) \ X (t) has edges to every vertex of the adhesion X (t)∩X (t ). It is straightforward to turn any decomposition into a connected one without increasing its width nor adhesion. For (i), as long as there exists a pair (t, t ) violating the requirement, make a distinct copy T C t of T t for each connected component C of G[X (T t ) \ X (t)], restrict the bags of T C t to the vertices of C ∪ X (t) only, and attach T C t as a subtree with the root being a child of t. For (ii), while there is a vertex v ∈ X (t) ∩ X (t ) that has no neighbors in X (T t ) \ X (t), simply remove v from all bags in T t .
We will also need the following non-standard complexity measure of a tree decomposition (T, X ). For every t ∈ V (T ), the number of distinct adhesions X (t) ∩ X (t ) for t ∈ N T (t) is called the adhesion degree of t. The maximum adhesion degree over all nodes t is the adhesion degree of the decomposition (T, X ). Observe that if a tree decomposition (T, X ) has width less than and adhesions of size at most h, then its adhesion degree is at most However, in sparse graph classes we can prove a much better bound on the adhesion degree due to linear bounds on the number of cliques in such graphs; cf. Lemma 4.3.
A path decomposition is a tree decomposition where T is a path; we will denote it simply as a sequence of bags Z 1 , . . . , Z |V (T )| .
For an integer θ, a tangle of order θ in a graph G is a family T of separations of order at most θ such that, for every separation (X, Y ) of order at most θ in G, exactly one of the separations (X, Y ) and (Y, X) belongs to T . If (X, Y ) ∈ T we call X the small side of the separation and Y the large side. Furthermore, we require that for every three separations (

Turing kernels
In this section we introduce a general toolbox and notation for proving our Turing kernel bounds.

Definitions and the auxiliary problem
For a parameterized problem Π and a computable function f , a Turing kernel of size f is an algorithm that solves an input instance (x, k) of Π in polynomial time, given access to an oracle that solves instances (x , k ) of Π with |x |, k ≤ f (k). A Turing kernel is a polynomial one if f is a polynomial.
If we are only interested in distinguishing between NP-complete problems admitting a polynomial Turing kernel from the ones that do not admit such a kernel, we can assume that the oracle solves an arbitrary problem in NP, not necessarily the k-Path problem. Indeed, note that by the definition of NP-completeness, an oracle to a problem in NP can be implemented with an oracle to k-Path with only polynomial blow-up in the size of the passed instances.
In our work, it will be convenient to reduce to the Auxiliary Linkage problem, defined as follows. The input consists of an undirected graph G , an integer k , a set of terminals S ⊆ V (G ), and a number of requests R 1 , R 2 , . . . , R r ; a request is a set of at most two terminals. A path P i in G is said to satisfy a request R i if V (P i ) ∩ S = R i and every vertex of V (P i ) ∩ S is an endpoint of P i . With such an input, the Auxiliary Linkage problem asks for a sequence of r paths P 1 , P 2 , . . . , P r such that P i satisfies R i for every 1 ≤ i ≤ r, | r i=1 V (P i )| = k , and every vertex of V (G) \ S is contained in at most one path P i (i.e., the paths P i are vertex-disjoint, except that they may share an endpoint, but only if the requests ask them to do so).
We remark that Auxiliary Linkage is a more general problem than k-Path: an instance with G = G, k = k, S = ∅, r = 1, and R 1 = ∅ asks precisely for a k-path in G.
Clearly, the decision version of the Auxiliary Linkage problem belongs to the class NP. By using its self-reducibility (cf. [18,Lemma 2]), we assume that the oracle returns a sequence of paths (P i ) r i=1 in case of a positive answer. That is, in all subsequent bounds on the number of Auxiliary Linkage oracle calls, the bound adheres to the number of calls to an oracle that returns the actual paths P i ; if one wants to use a decision oracle, one should increase the bound by the blow-up implied by the self-reducibility application (i.e., at most |E(H)| for calls on a graph H).

Generic reduction rule
We now show a generic reduction rule for the k-Path problem. We start with a few definitions.
Definition 3.1. For a graph G, a subset A ⊆ V (G), and a simple path P in G, an A-traverse of P is a maximal subpath of P that contains at least one vertex of A and has all its internal vertices in A.
Note that if Q is an A-traverse of P , then every endpoint of Q is either an endpoint of P or lies in N G (A). See Figure 1.
, and let k be an integer. A set Z ⊆ N (A) is called a k-guard of A if the following implication holds: if G admits a k-path, then there exists a k-path P in G that is either contained in A or such that every A-traverse of P has at least one endpoint in Z.
Given a graph G, a set A ⊆ V (G), and a k-guard Z ⊆ N (A) of A, a k-path P satisfying properties as in the above definition is called guarded (w.r.t. k, A, and Z). If the integer k and the set A are clear from the context, we call such a set Z simply a guard.
Observe that Z = N (A) is always a guard, but sometimes we will be able to find smaller ones. Of particular interest will be guards of constant size, as our kernel sizes will depend exponentially on the guard size. To describe our single reduction rule, we show how solutions to Auxiliary Linkage can be used to preserve the existence of guarded k-paths.
Assume we are given a graph G, a set A ⊆ V (G), an integer k, and a k-guard Z ⊆ N (A) of A. Let h = |Z| and = |N (A)|. Furthermore, assume that G admits a k-path, and let P be a guarded one w.r.t. A and Z. Let (Q 1 , Q 2 , . . . , Q r ) be the A-traverses of P , let ; the instance I P is henceforth called induced by P and A. Furthermore, it is easy to see that if (Q 1 , Q 2 , . . . , Q r ) is a different feasible solution to I P , then a path P obtained from P by replacing every subpath Q i with Q i is also a guarded k-path in G.
The crucial observation is that a small guard limits the number of A-traverses. Proof. Every vertex of Z can be an endpoint of at most two traverses. If r > 1, then none of the traverses Q i are contained in G[A], and thus every traverse has at least one endpoint in the guard Z. Lemma 3.3 in turn limits the number of possible instances I that can be induced by a guarded k-path, for a fixed set A and guard Z. Note that we have 0 ≤ k ≤ k and 0 ≤ r ≤ max(1, 2|Z|). Furthermore, unless r = 1 and R 1 = ∅, we have R i ⊆ N (A), |R i | ∈ {1, 2}, and every set R i needs to have at least one element of Z; there are at most |Z| · (|N (A)| + 1) = h( + 1) choices for such a set R i . Consequently, the number of possibilities for the instance I is at most Reduction rule. If |A| > k ·p(k, , h), then we can apply the following reduction rule. For each Auxiliary Linkage instance I out of at most p(k, , h) reasonable instances for A-traverses of a guarded k-path in G, we invoke an oracle on the instance I, and mark the vertices of the solution if the oracle finds one. The whole process will mark at most k · p(k, , h) < |A| vertices, thus at least one vertex of |A| will remain unmarked. We delete any such vertices. The observation that on a guarded k-path P one can replace a solution to the instance I P induced by P and A by a different solution provides safeness of this reduction. Finally, note that the reduction invokes at most p(k, , h) calls to the oracle; each call operates on a subgraph of the graph G[N [A]] with k ≤ k and r ≤ 2|Z|.
We shall apply the Reduction Rule for a medium-sized set A and a guard set Z of constant size formed from adhesions of a tree decomposition. For most of the paper we will use Z = N (A) with = h = |Z| a constant (depending on the excluded (topological) minor, in the results of Sections 4 and 5). Only in Section 6, when dealing with a modulator M such that G − M has an appropriate structure, it will be important to consider N (A) potentially containing all of M , with a guard set Z of constant size disjoint from M .

Separation oracles
The natural way of using our reduction rule is to find in a graph a large (but not too large) part of the graph with a small (preferably, constant) boundary. Let us first make an abstract definition of an algorithm finding such a separation.
Definition 3.4. For a graph class G, a constant h, and a computable coordinate-wise nondecreasing function q : Z ≥0 × Z ≥0 → Z ≥0 , an algorithm S is called a (h, q, T S )-separation oracle if, given a graph G ∈ G and integers k and p, in time T S (|G|, k, p) it finds a separation (A, B) in G of order at most h with p < |A| ≤ q(k, p), or correctly concludes that G contains a k-path.
For all considered graph classes, we will be able to provide a separation oracle with q being a polynomial. This, in turn, allows the following generic Turing kernel.
Lemma 3.5. Let S be a (T S , h, q)-separation oracle for a hereditary graph class G. Takê h := (2h) 4h+3 . Then, the k-Path problem restricted to graphs from G can be solved: -using at most kĥ · |V (G)| calls to Auxiliary Linkage -each call on an induced subgraph of the input graph of size at most q(k, k 2ĥ ).
As long as |V (G)| > p, we proceed as follows. Invoke algorithm S on G. If S claims that G admits a k-Path, we simply output the answer yes. Otherwise, let (A , B ) be the separation output by S. Apply the Reduction Rule for k, A := A \ B , and Z = N (A) ⊆ A ∩ B . Note that as |Z| ≤ h, the Reduction Rule deletes at least one vertex of A. Furthermore, the Reduction Rule invokes at most p(k, h, h) ≤ kĥ calls to the oracle, each call on an induced subgraph of G of size at most Once we obtain |V (G)| ≤ p, we solve the instance using a single call to Auxiliary Linkage with k = k, r = 1, and R 1 = ∅. The bounds follow, as there are at most |V (G)| applications of the Reduction Rule, and each call to the oracle takes O(|E(G)|) time to prepare the instance and parse the output.
Note that for any graph class where separations as in Definition 3.4 exist, there exists a trivial separation oracle which finds them, running in time n h+O(1) : one iterates over every candidate for A ∩ B and, for fixed set A ∩ B, a straightforward knapsack-type dynamic programming algorithm checks if one can assemble A \ B of the desired size from the connected components However, this running time bound is unsatisfactory, as it greatly exceeds the number of used oracle calls. For all considered graph classes we prove a much stronger property than just merely the prerequisites of Lemma 3.5, in particular providing a more efficient separation oracle. We provide necessary definitions in the next section.

Decomposable graph classes
The following definition captures the key concept of this section. Definition 3.6. For a constant h and a computable nondecreasing function w : Z ≥0 → Z ≥0 , a graph class G is called (w, h)-decomposable if for every positive integer k and every G ∈ G that does not admit a k-path, the graph G admits a tree decomposition of width less than w(k) and adhesions of size at most h.
A standard argument shows that in a decomposable graph class, given the decomposition with appropriate parameters, it is easy to provide a separation oracle.
Lemma 3.7. Assume we are given a graph G and a tree decomposition (T, X ) of G of width less than w, adhesion at most h, and adhesion degree at most a ≥ 2. Then, given an integer p Proof. Root the tree T in an arbitrary node, and for t ∈ V (T ) let T t be the subtree of T rooted in t. Let t 0 be the lowest node of T such that |X (V (T t ))| > p; such a node can be computed in linear time in the size of G and (T, X ).
Group the children t of t according to their adhesions X (t ) ∩ X (t). Due to the bound on the adhesion degree, there are at most a groups. For every adhesion S, let X t,S be the set of the children of t with S = X (t ) ∩ X (t). Define We consider now two cases. First, assume that |V S | ≤ p for every adhesion S. Then, by the adhesion degree bound, we have

Consequently, we can return the separation (A, B) with
In the other case, there exists an adhesion S with V S > p. We greedily take a minimal subset Y t,S ⊆ X t,S such that is of size greater than p. By the minimality of t, for every t ∈ X t,S we have |X (T t )| ≤ p and, consequently |V S | ≤ 2p. Thus, we can return the separation (A, A critical insight is that the decomposition used by Cygan et al. [9] to solve the Minimum Bisection problem in fact provides an approximate decomposition in a decomposable graph class. Let us first recall the main technical result of [9]. ). There is an algorithm that given a graph G and integer h runs in time Lemma 3.10. Let G be a graph and suppose there exists a decomposition (T, X ) of G of width less than w, adhesion h, and adhesion degree a.
. For every edge tt ∈ E(T ) of the h-decomposition, removing it partitions T into subtrees T t t and T tt containing t and t, respectively. The induced separation (X (T tt ), X (T t t )) on G has order at most h, so one of the sides, say X (T t t ) \ X (t), contains at most 2 O(h) vertices of Y , by definition of unbreakability. Let us orient the edge tt away from t (the 'smaller' side). By orienting each edge of T this way, we find a single node t 0 of T such that all incident edges point to it. That is, for every neighbor t of t 0 , we have |Y ∩ X ( While t 0 can have many neighbors, we can group those neighbors t according the adhesion X (t ) ∩ X (t 0 ) to which they correspond. By the adhesion degree bound, there are at most a such groups. If for any such group U ⊆ N (t 0 ) ⊆ V (T ), the union t ∈U X (T t t 0 ) \ X (t 0 ) contained more than 3 · 2 O(h) vertices of Y , then the group can be partitioned into two parts with more than 2 O(h) vertices of Y each. This would give a separation of order h of G with too many vertices of Y on both sides, contradicting its unbreakability. Therefore, there are at most a groups, each containing at most 3 Thus, the decomposition computed by the algorithm of Theorem 3.9 approximates the desired decomposition of a decomposable graph class.
Corollary 3.11. Let G be a (w, h)-decomposable graph class. Then, for every G ∈ G and every integer k, one can in 2 O(h 2 ) |V (G)| 2 |E(G)| time either correctly conclude that G admits a k-path, or find a tree decomposition of G of width at most (w(k) + 1) O(h) and adhesion at most 2 O(h) .
Let us now combine all the above. That is, given an integer k and a graph G from a hereditary (w, h)-decomposable graph class G, we start by computing the tree decomposition of Corollary 3.11 (or conclude there is a k-path). In general this approximated decomposition has adhesion degree (w(k) + 1) 2 O(h) . We use this decomposition to find separations of any induced subgraphs of G using the algorithm of Lemma 3.7 in time 2 O(h) times linear in the size of G and the computed decomposition. This gives a (h, q, T )-separation oracle with q(k, p) = p · (w(k) + 1) 2 O(h) and T (n, k, p) = 2 O(h) · n · (w(k) + 1) O(h) , for any hereditary (w, h)-decomposable graph class. By plugging it into Lemma 3.5, we obtain the following. Corollary 3.12. Let G be a hereditary (w, h)-decomposable graph class. Then, the k-Path problem, restricted to graphs from G, can be solved in time In the next section, we prove that H-minor-free graphs are (O H (k 22 ), O H (1))-decomposable by analyzing the Global Structure Theorem of H-minor-free graphs due to Robertson and Seymour. A subsequent section provides an analogous result for graphs excluding a fixed topological minor. In both cases we also get better bounds on the adhesion degree of the approximate decomposition outputted by Theorem 3.9, improving the bounds in the final kernel.
We would like to remark that we do not want to claim in this paper the idea that, in the context of H-(topological)-minor-free graphs, the decomposition of Theorem 3.9 should be related to the decomposition of the Global Structure Theorem via an argument as in the proof of Lemma 3.10. In particular, this observation appeared previously in a work of the second author with Daniel Lokshtanov, Micha l Pilipczuk, and Saket Saurabh [21].

Excluding a minor
In this section we tackle proper minor-closed graph classes, that is, we prove Theorem 1.1 for graph classes excluding a fixed minor, by proving the following. Our main technical result is the following: By plugging the above into Corollary 3.12, we obtain the desired polynomial Turing kernel, but with worse bounds than promised by Theorem 4.1. To obtain better bounds, we need to recall the folklore bound on the adhesion degree in sparse graph classes; for completeness, we provide a full proof in Appendix A.1. Thus, it remains to prove Theorem 4.2. For the proof, we use the graph minors structure theorem, decomposing an H-minor-free graph G into parts 'nearly embeddable' in surfaces (precise definitions are given in the next subsection). By carefully analyzing details of the structure, we either find a large triconnected embedded part, which must contain a long path by the following theorem of Chen et al. [8], or we tighten the graph structure to give a tree decomposition where all parts are small (polynomial in k) and adhesions ('boundaries') between them are of constant size.

Theorem 4.4 ([8]
). There is a constant ε > 0 such that for every integer t, every triconnected graph on n ≥ 3 vertices embeddable in a surface of (Euler) genus g contains a cycle of length at least n ε /2 (2g+3) 2 .
We note that Chen et al. phrase the theorem (more generally) for K 3,t -minor-free graphs, but a folklore edge-counting argument shows that graphs embeddable on a surface of genus g are K 3,t -minor-free for t = 2g + 3 (see e.g. [2]).
Two intertwined problems that arise with this approach is that torsos of decompositions are not necessarily triconnected, and long paths in them do not necessarily imply long paths in the original graph, because of virtual edges added in torsos. Torsos can be made triconnected if their near-embeddings include cycles or paths around each vortex, but these may use virtual edges in essential ways. On the other hand, the decomposition can be modified so that virtual edges can be replaced with paths in the original graph, but this requires changes that remove virtual edges, hence potentially removing paths around vortices and destroying triconnectedness.
Because of that, we need to go a little deeper and use a local, strong version of the structure theorem from Graph Minors XVII [25]. For the same reason we cannot use existing algorithms for finding the graph minors decompositions. Instead, we only prove the existence of a tree decomposition of bounded adhesion, small width, and with nearly embeddable bags.

Global and local graph minor structure theorems
We now define near-embeddability and the graph minors α-decomposition.
(iii) an embedding of G 0 in a surface of genus at most α such that for i ∈ [α ], the society Ω i is embedded on the boundary of a disk whose interior is empty (i.e., does not intersect the embedding or other disks), called the disk accomodating G i ; (iv) a linear ordering w 1 , . . . , w |Ω i | of each vortex society Ω i , corresponding to its natural ordering around its disk (for some choice of direction and starting point); (v) for each large vortex G i ∈ V, a path decomposition Z 1 , . . . , Z |Ω i | of G i of width at most α such that w j ∈ Z j , for j ∈ [|Ω i |].
We denote such an α-near embedding as (A, G 0 , V), with the embedding and path decompositions only implicit in the notation.
Definition 4.6. A (graph minors) α-decomposition of a graph G consists of: • a rooted tree decomposition (T, Y) of G of adhesion at most α; • for each t ∈ V (T ), an α-near embedding (A t , G t0 , V t ) of torso(G, X (t)).
In this subsection we prove the following variant of the Global Structure Theorem which implies Theorem 4.2.
Theorem 4.7. For every graph H, there is a constant α = α(H) such that the following holds, for any integer k: any graph G excluding H as a minor and without a k-path has an α-decomposition of width at most α · k 22 .
We deduce Theorem 4.7 from a similarly modified variant of the Local Structure Theorem. An α-near local embedding of a graph G is defined similarly to an α-near embedding, but we allow an arbitrary number of 'small vortices' W and we allow the path decompositions of all vortices to have only bounded adhesion instead of bounded width; thus arbitrarily complicated graphs can hide behind vortices. We additionally require each large vortex to be surrounded by a certain path. Formally: Definition 4.8. A comb is a union of a path P with some mutually vertex-disjoint (possibly trivial) paths that have their first vertex and no other vertex on P . The last vertices of those paths are called the teeth of the comb, they are naturally ordered by P . Definition 4.9. For an integer α, an α-near local embedding of G consists of: (i) a set A of at most α vertices (called the apex set); (ii) a family G 0 ∪ G 1 ∪ · · · ∪ G n = G \ A of edge-disjoint subgraphs of G \ A, where: • G 0 is called the embedded part, • large vortices are pairwise vertex-disjoint, • small vortices have societies of size ≤ 3; (iii) an embedding of G 0 in a surface of genus at most α such that for i ∈ [n], the society Ω i is embedded on the boundary of a disk whose interior is empty (i.e., does not intersect the embedding or other disks), called the disk accomodating G i ; (iv) a linear ordering w 1 , . . . , w |Ω i | of each society Ω i , corresponding to its natural ordering around its disk (for some choice of direction and starting point); We denote such an α-near local embedding as (A, G 0 , V, W), with the embedding and path decompositions only implicit in the notation. The near embedding is said to respect a tangle T if the large side of a separation in T \ A is never contained in a vortex W ∈ W or in a bag of the decomposition of a vortex V ∈ V. The following Local Structure Theorem follows from [25], as explained in [12] (we note that while [12] assumes that G is H-minor-free, the original statement in [25] only requires that T controls no H-minor -we will need this stronger version when dealing with topological minors). Since this is crucial for our approach, we stress that the comb C i contains a path of length at least |Ω i | (a scrupulous reading of [25] implies even stronger statements, but this will suffice).
Theorem 4.11 ([12]). For every graph H there exist integers α, θ such that: for every graph G and every tangle T in G of order ≥ θ that controls no H-minor, there is an α-near local embedding of G which respects T .
We now improve the statement of the Local Structure Theorem 4.11 in steps: first requiring small vortices to be 'well attached', then making the torsos triconnected, and finally deducing bounds on width in terms of longest path length.
Lemma 4.12. In Theorem 4.11, we can additionally assume that: (vii) for each small vortex G i ∈ W and every v 1 , v 2 ∈ Ω i , there is a path in G i between v 1 and v 2 , with no internal vertices in Ω i .
Proof. Property (vii) is guaranteed by (9.1) in [25]. (As explained in [12], the border cells of [25] are translated into bags of large vortex decompositions, so small vortices arise only from internal cells; for an internal cell c 0 , α(c 0 ) * is translated into a small vortex G i , while γ(c 0 ) is translated into Ω i , giving exactly the statement we want. We also note that the proof of (9.1) simply partitions a vortex with no v 1 -v 2 path into two vortices with at most two vertices in their societies).
Definition 4.13. For an α-near local embedding (A, G 0 , V, W) of G, define G * 0 to be the graph obtained from G 0 by adding an edge between every two consecutive vertices in each society Ω i , and a new vertex for each society of a large vortex, with edges to every vertex of the society. The embedding of G 0 is naturally extended to an embedding of G * 0 (the new vertices and edges embedded in place of the accommodating disks).
Lemma 4.14. In Lemma 4.12, we can additionally assume that: Proof. Suppose G * 0 has a separation (X, Y ) of order ≤ 2. Since societies of small vortices induce cliques in G * 0 , they are contained in X or Y . Similarly for each large vortex G i ∈ V, its society Ω i , together with the new vertex in G * 0 with Ω i as neighborhood, induces a wheel in G * 0 , which is triconnected, hence contained in X or Y . In the language of [25], this translates back into a partition I, J of cells, whose intersection corresponds to at most two embedded vertices v, v (that is, γ(I) ∩ γ(J) = {v, v }). But this contradicts (11.1) in [25], which states that such an intersection has size at least 3. Proof. For a given graph H, let α be the constant given by Theorem 4.11. By Theorem 4.4, there is a universal constant ε such that any triconnected graph G 0 embeddable in a surface of genus at most α contains a cycle of length at least |G 0 | ε /2 (2α+2) 2 . Let c := 2 ε and α := (α · 2 (2α+2) 2 ) 1/ε . For an H-minor-free graph G, suppose the α-near local embedding given by Lemma 4.14 has |V (G 0 )| ≥ α · k c . Then G * 0 is a triconnected graph (by property (viii)) embedded in a surface of genus at most α (by Definition 4.13) with at least as many vertices, so G * 0 must contain a cycle C of length at least (α k c ) ε /2 (2α+2) 2 = α · k 2 .
If the society Ω i of any vortex of the α-near local embedding of G has at least k vertices, then G contains a path of at least that length (in the comb from property (vi)), in which case the lemma follows. Otherwise, there are at most α large vortices, hence at most α · (k − 1) vertices in their societies, and at most α virtual vertices that were inserted as the centers of the wheels. Let P be the longest subpath of C between any two such vortex-related vertices (or any subpath not visiting any such vertices, if there are less than two). Then P is a path of length at least α·k 2 α·k = k in G * 0 whose edges in E(G * 0 ) \ E(G 0 ) came only from small vortices, by the definition of G * 0 (Definition 4.13). By property (vii), these edges can be replaced with paths (each of length at least 2) in the corresponding small vortices, giving a path in G. Only one or two consecutive edges can come from the same small vortex (since their societies have at most 3 vertices), so the resulting path has length at least k.
Finally, we deduce Theorem 4.7 (the Global Structure Theorem) from Theorem 4.11 (the Local Structure Theorem) by a standard induction, exactly as done by Diestel et al. [10,Theorem 4]. (Note that in case the excluded graph H is planar, we can already conclude the theorem trivially from the fact that there is a tree-decomposition of width O H (1) [23]). The only difference is that in the Local Structure Theorem we add the bound on the size of the embedded part from Lemma 4.15. In the proof from [10], every bag of the created decomposition is either constructed as a set of size bounded as O H (1), or is constructed from an α-near local embedding by taking the vertices of: the embedded part G 0 , the set of apices A, and for each large vortex, the intersection of every two consecutive bags of its path decomposition, each of size at most α = O H (1). The number of bags in a path decomposition of a large vortex is equal to the size of its society, and large vortex societies are disjoint subsets of V (G 0 ). Therefore every tree decomposition bag constructed in the proof has size at most |V (G 0 )| + α + α · |V (G 0 )| = O H (k 22 ), by Lemma 4.15. This proves the additional condition we require in Theorem 4.7.

Excluding a topological minor
In this section we tackle graph classes excluding a topological minor, that is, we prove Theorem 1.1 by proving the following. This follows as before from the following decomposability theorem. Note the exponent in the polynomial bound on width (bag size) now depends on H.

Theorem 5.2. For every graph H, the class of H-topological-minor-free graphs is
We proceed with the proof of the above theorem. Grohe and Marx [15] proved that when excluding a topological minor, graphs admit a similar structure as for excluding a minor, but apart from nearly embeddable parts, one needs to consider parts that have bounded degree except for a bounded number of vertices: The main 'Global Structure Theorem' of [15] is that graphs excluding a topological minor H admit a tree decomposition of bounded adhesion, where the torso of every bag is either nearly embeddable (as when excluding a minor), or has (h, d)-bounded degree, for d = O H (1). We still need the slightly stronger notion of near embeddability (with combs) for our proofs, which is why we will work with the following definition of 'Local Structure', analogous to α-near local embeddings.
A star decomposition of a graph is a (rooted) tree decomposition (T , X ) where T is a star: a root node t root with only leaf nodes attached. We call the bag X (t root ) the root bag and the remaining ones leaf bags. The root torso is torso(G, X (t root )). A star decomposition respects a tangle T if the large side of any separation in T is not fully contained in any single leaf bag. Grohe 15]). For every integer k there exist integers θ, d, k such that: for every graph G excluding K k as a topological minor and every tangle T of order ≥ θ that controls a K k -minor, there is a star decomposition of G that respects T , has adhesion < θ, and such that the root torso has (k, d)-bounded degree.
Corollary 5.5. For every graph H there exist integers θ, α, d such that: for every graph G excluding H as a topological minor and every tangle T in G of order ≥ θ, G has one of the following: • a star decomposition that respects T , has adhesion α, and such that the root torso has (|V (H)|, d)-bounded degree, or • an α-near local embedding that respects T , satisfying properties (vii)-(ix).
Proof. For k = |V (H)| let the constants given by Theorem 5.4 be θ , d , k . Let α , θ be the constants given by Theorem 4.11 for graphs excluding K k as a minor. We prove the claim for θ = max(θ , θ ), α = max(θ , α ) and d = d . If the tangle T of G controls no K k -minor, then the claim follows from Theorem 4.11. Otherwise T does control an K k -minor and Theorem 5.4 applies.
The main theoretical tool we use, besides the Grohe and Marx decomposition in the form of Corollary 5.5, is the following lower bound on cycles in graphs of bounded degree by Shan [27] (we note the constant ∆ − 1 is asymptotically optimal; for small ∆, previous results by Chen et al. [7] give a slightly better bound).
With this in hand, we can proceed to bounding the bags of almost bounded degree.
Lemma 5.7. In Corollary 5.5, we can additionally assume that in the first outcome, for any integer k, if G has no k-path, then the root bag has size k O H (1) .
Proof. Without loss of generality assume that θ ≥ α(|V (H)|+2), in the statement of Corollary 5.5 (otherwise increase θ). Let us first ensure that the star decomposition (T, X ) is connected.
Claim 5.8. We can additionally assume that For every leaf node t ∈ V (T ), the set X (t) \ X (t root ) is connected, and (C1) X (t) \ X (t root ) has edges to each vertex in the adhesion X (t) ∩ X (t root ) (C2) Proof. If (C1) fails we can partition the leaf bag into many leaf bags. If (C2) fails we can remove the adhesion vertex in question from the leaf bag.
We need to define a variant of the torso that is similarly connected as the root torso, but has no virtual edges (so that long paths in it imply long paths in G). Construct G * root from G as follows: contract X (t) \ X (t root ) to a single vertex x t for each leaf t ∈ T and merge any such vertices x t , x t that have equal neighborhoods (corresponding to the same adhesion) into one. Let X be the set of all those new vertices. Claim 5.9. If G has no k-path, then neither does G * root .
Proof. For each leaf node t ∈ V (T ), the set X (t)\X (t root ) is connected by (C1) and can therefore be contracted to a single vertex x t by repeated edge contractions. Since G * root is a subgraph of the graph obtained by these edge contractions, it follows that G * root is a minor of G. As minor operations do not increase the length of a longest path, the claim follows. Proof. Observe that G * root can be obtained from the root torso of (T, X ) by removing virtual edges and adding the vertices of X. Each vertex in X has degree equal to the size of some corresponding adhesion, which is ≤ α. Each vertex v in the torso gains as neighbors only vertices in X, which correspond to different (as vertex subsets) adhesions containing v; since these adhesions induced cliques containing v in the torso (which had (|V (H)|, d)-bounded degree), their number is bounded by 2 d (unless v was already one of the ≤ |V (H)| vertices of high degree).
Claim 5.11. If G * root does not contain a path of length at least k, then G * root has a tree decomposition of adhesion ≤ |V (H)| + 2 and width k O H (1) .
Proof. Assume that G * root does not contain a path of length at least k. By the previous claim, in G * root one can delete ≤ |V (H)| vertices to obtain a subgraph of degree bounded by ∆ := max(α, d + 2 d ); name this subgraph G † root . Consider the Tutte decomposition [29] of G † root . In modern terms (cf. [18, Theorem 1]), it is a tree decomposition of G † root of adhesion at most two, whose torsos are triconnected topological minors of G † root . Consequently, each torso again has degree bounded by ∆ and cannot contain a path of length at least k. By Theorem 5.6, if n denotes the size of such a bag, then n ε /4 + 2 < k, where ε = 1/ log 2 (max(425, α, d + 2 d ) − 1). Thus the size of each bag is n < (4(k − 2)) 1/ε = k O(d+log 2 α) = k O H (1) . Adding the ≤ |V (H)| deleted vertices back to every bag, we obtain a tree decomposition of G * root as claimed.
Denote the root torso of (T, X ) as G root .
Claim 5.12. For every tree decomposition of G * root , one can find a tree decomposition of G root with adhesion and maximum bag size at most α times larger than the adhesion and maximum bag size of the original tree decomposition.
Proof. Let (S, Y) be a tree decomposition of G * root . Define Y (s) as Y(s) with vertices x t ∈ X replaced by all of N G * root (x t ). We claim (S, Y ) is a tree decomposition of G root . Every edge of G root is either an edge of G * root − X, still contained in the same bag, or a virtual edge between two vertices of an adhesion, hence contained in N G * root (x t ) for some x t ∈ X and thus in a bag Y (s) (for an s such that Y(s) contained x t ). To show that the subset Y −1 (v) := {s ∈ S : v ∈ Y (s)} is connected, for any given vertex v ∈ V (G root ), observe that it is the union of Y −1 (v) with Y −1 (x t ) for all x t ∈ X adjacent to v in G * root ; since such sets Y −1 (v) and Y −1 (x t ) are connected in S and intersect (as x t is adjacent to v), their union is connected. Each vertex in each bag has been replaced by at most |N G * root (x t )| vertices, which is the size of an adhesion in (T, X ) and hence at most α. It follows that the maximum bag size increases by a factor at most α.
To bound any adhesion, observe similarly that for s 1 , s 2 ∈ V (S), the adhesion equals This again implies each adhesion increases at most α times.
By the last three claims, assuming G has no k-path, G root has a tree decomposition (S, Y) of adhesion α := α(|V (H)| + 2) and width k O H (1) . We focus this decomposition on the unique bag that, in some sense, respects the tangle T . Let us first see how T orients separations of G root .
For a separation (A, B) of G root , every adhesion X (t) ∩ X (t root ) of (T, X ) induces a clique in G root , hence it is fully contained in A or in B; thus (A, B) can be extended to a separation of G by adding all of X (t) to A or B, correspondingly, with an arbitrary choice for X (t) such that X (t) ∩ X (t root ) ⊆ A ∩ B. We call such separations of G extensions of the separation (A, B) of G root . For a separation (A, B) of order ≤ θ of G root , observe that either all extensions of (A, B) and no extensions of (B, A) belong to T , or vice-versa: this follows from tangle axioms and the fact that (T, X ) respects T (that is, each X (t) such that X (t) ∩ X (t root ) ⊆ A ∩ B is small w.r.t. T , so putting it one side of an extension (A , B ) instead of the other cannot change whether A is small, as otherwise the two small sides together with X (t) would cover all of G).
We now orient edges of the decomposition (S, Y) according to T , to find a (unique) bag we can focus on. For each edge s 1 s 2 ∈ E(S), if S 1 , S 2 denote the two connected components of S −s 1 s 2 containing s 1 , s 2 , respectively, then (Y(S 1 ), Y(S 2 )) is a separation with |Y(S 1 )∩Y(S 2 )| = |Y(s 1 ) ∩ Y(s 2 )| ≤ α ≤ θ, hence either all of its extensions or all extensions of (Y(S 2 ), Y(S 1 )) belongs to the tangle T . We direct the edge s 1 s 2 to either s 2 or s 1 accordingly (towards the side with large extensions). After repeating this for every edge of S, we find a node s 0 with no outgoing edges. This means that if we root S at s 0 and S 1 , S 2 , . . . , S are the subtrees of S − s 0 , then all extensions of (Y(S i ), Y(S − S i )) belong to T , for i ∈ [ ].
We can now forget about some details of the tree decomposition and define the following star decomposition (S , Y ) of G root : its nodes are s root := s 0 and its direct children The following claim thus concludes the proof of the lemma, by extending this star decomposition of G root to a star decomposition of G respecting T , with a root torso of almost bounded degree and size k O H (1) .
Claim 5.13. If G root has a star decomposition (S, Y) of adhesion α ≤ θ satisfying (2), then G has a star decomposition of adhesion max(α, α ) respecting T where the root torso has (|V (H)|, d + α · d)-bounded degree and its vertex set is equal to the root bag of (S, Y).
Proof. Let (S, Y) be a star decomposition of G root satisfying (2). Without loss of generality assume that for every leaf s ∈ V (S), every vertex of the adhesion Y(s) ∩ Y(s root ) has a neighbor in Y(s) \ Y(s root ) (otherwise we can remove it from Y(s)). Every adhesion of the (larger) star decomposition (T, X ) of G induces a clique in G root by definition, hence we can choose for each t ∈ V (T ) a node s(t) ∈ V (S) such that X (t) ∩ X (t root ) ⊆ Y(s(t)). We construct a new star decomposition (T , X ) of G from (T, X ) as follows: the root bag becomes Y(s root ), leaves t with s(t) = s root and their bags remain unchanged, the remaining leaves are deleted, and each leaf s of (S, Y) is added as a new leaf of T , with X (s) := Y(s) ∪ t : s(t)=s X (t).
It is straightforward to check that (T , X ) is a star decomposition of G of adhesion max(α, α ), as follows. Every edge is covered by a bag in X , because it was covered by a bag in X , which is either a subset of a bag in X , or in X (t root ), and hence in a bag of Y, which are again subsets of bags in X . Every vertex occurs in bags X of a connected subtree of T , because if a vertex occurs in two different leaf bags of X , then either it occurs in two different leaf bags of Y and hence in Y(s root ) = X (t root ), or in two leaf bags X (t) and X (t ) with s(t) = s(t ) and hence in X (t root ), which means it occurs in the adhesions of X (t) and X (t) ; these adhesion are contained in Y(s(t)) and Y(s(t )) respectively, so the vertex must be contained in Y(s root ) = X (t root ) as well. Finally to check the sizes of adhesions, observe that each adhesion of (T, X ) is either (for leaf nodes t coming from T ) a subset of an adhesion in X , namely X (t) ∩ X (t root ) ⊆ X (t) ∩ X (t root ), or (for leaf nodes s coming from S) equal to an adhesion of (S, Y): To show that the new decomposition respects T , suppose to the contrary that some leaf bag contains the large side B of a separation (A, B) ∈ T . Then either this bag is X (t) = X (t) for t ∈ V (T ), contradicting that (T, X ) respects T , or X (s) = Y(s) ∪ t : s(t)=s X (t) for some s ∈ V (S). Then since (X (s), s =s∈V (S) X (s )) is a separation induced by the adhesion at X (s), of order ≤ α (as shown in the previous paragraph), X (s) (which contains B) must be the large side of this separation in T . But this is an extension of the separation (Y(s), s =s∈V (S) Y(s )), contradicting (2).
The part that is not entirely straightforward is bounding the degrees in the root torso of the new star decomposition (T , X ). Observe that this new torso can be obtained from the root torso G root of (T, X ) by taking the subgraph induced by X (t root ) = Y(s root ), removing certain virtual edges (from adhesions corresponding to deleted leaves) and adding virtual edges between every two vertices of each new adhesion X (s) ∩ X (t root ), s ∈ V (S). We need to bound the number of such edges added to a vertex v ∈ Y(s root ), assuming it was not already one of the |V (H)| high-degree vertices of the root torso of (T, X ). Thus v had at most d neighbors in G root . Since for each new adhesion X (s) ∩ X (t root ) = Y(s) ∩ Y(s root ) (as shown above) which contains v we assumed that v has a neighbor in Y(s) \ Y(s root ) (and these are disjoint sets, for distinct s), it follows that v received new edges from at most d distinct new adhesions, at most α edges from each. Therefore, the degree of all but |V (H)| vertices in the root torso of (T , X ) is bounded by d + α · d, that is, Corollary 5.5 holds with this constant in place of d.
This concludes the proof of Lemma 5.7.
As before, the global decomposition stated in Theorem 5.2 follows from the Local Structure Theorem in Corollary 5.5 improved by the bound on bag size in Lemma 5.7. The construction only changes in that it can take root bags from the local structure (the star decomposition) given by the first outcome of Corollary 5.5 and use them as bags of the global decomposition, without any modifications. We note this can also be seen as an instance of a general theorem (11.1) by Robertson and Seymour [24] which allows to turn 'local decompositions' (with respect to a tangle) into global ones; however, giving a precise translation would involve too much notational overhead.

Adding a modulator
In this section we prove Theorem 1.2 in a more general setting of Section 3. More precisely, Theorem 1.2 follows directly from the following theorem via Theorems 4.2 and 5.2. Theorem 6.1. One can solve in polynomial time a given k-Path instance (G, k), given access to a set M ⊆ V (G) such that G − M admits a tree decomposition of width less than w and adhesion h = O(1), and an oracle that solves the Auxiliary Linkage problem for instances (G , k , S, (R i ) r i=1 ) with G being a subgraph of G, r, k ≤ k, |S| ≤ |M | + O(1), and |V (G )| being bounded polynomially in k, w, and |M |.
Contrary to Section 3, in this section we are not precise with the polynomial dependency on the parameters k, w, and |M |, as well as the dependency on the adhesion h = O(1) of the decomposition. This is due to the fact that the latter dependency on h is substantial, most notably in the exponent of the polynomial bound on the size of the oracle calls. Therefore, the result of this section is a purely theoretical result classifying the aforementioned parameterization as admitting a polynomial Turing kernel.
Decomposition. We apply the algorithm of Theorem 3.9 to the graph G − M and separation size h. Since h = O(1), the algorithm runs in polynomial time. By Lemma 3.10, the output decomposition (T 0 , X 0 ) has width w O(1) and adhesion O(1).
We modify the decomposition (T 0 , X 0 ) as follows. For every node t ∈ V (T ) we group the children t of t according to the adhesions X (t) ∩ X (t ). For every group U ⊆ N T (t), we add a new child t U of t with X (t U ) = X (t) ∩ X(t ), t ∈ U , and reattach the nodes of U as children of t U . Then, we duplicate t U into max(1, |U | − 1) copies, arranged in a binary tree, with the nodes of U being different leaves of the binary tree. Let (T, X ) be the final decomposition. In this manner, we maintain the property that (T, X ) has width w O(1) and adhesion O(1), while every node has a polynomial in w number of children.
Marking. We continue the proof of Theorem 6.1 with a somewhat standard marking process. For an integer 0 ≤ k ≤ k − 2 and two vertices u, v ∈ M , define a (u, v, k )-path in G as a (simple) path with k + 2 vertices: two endpoints u and v and exactly k internal vertices, all in G − M . Note that a (u, v, 0)-path is a path consisting of an edge uv. Similarly, for 0 ≤ k ≤ k − 1 and a vertex u ∈ M , a (u, k )-path in G is a path with k + 1 vertices: one endpoint being u and all other vertices in G − M .
For every 0 ≤ k ≤ k − 2 and every u, v ∈ M , we compute an inclusion-wise maximal family P 0 u,v,k of internally vertex-disjoint (u, v, k )-paths. Similarly, for every 0 ≤ k ≤ k − 1 and u ∈ M we compute an inclusion-wise maximal family P 0 u,k of internally vertex-disjoint (u, k )-paths. The computation can be done via the previously established kernel for decomposable graph classes.
Lemma 6.2. The families P 0 u,v,k and P 0 u,k can be computed in polynomial time with the access to the assumed Auxiliary Linkage oracle.
Proof. We focus on P 0 u,v,k ; the proof for the second family is analogous. Since the required family is inclusion-wise maximal, it suffices to find its paths one-by-one. That is, we show how to find, in a given induced subgraph of G − (M \ {u, v}) obtained by removing the internal vertices of the previously-found paths, a next path of the desired length k ≤ k between u and v (or conclude that none exists and the packing is maximal). For that, we use a slight modification of the previously established kernel in Section 3 for decomposable graph classes (Corollary 3.12).
More precisely, first observe that the Reduction Rule is still correct when we are looking for a k -path between fixed endpoints u and v (as opposed to any k -path) as long as the endpoints do not lie in the set A. Thus, we can (just as in Corollary 3.12) iteratively use the decomposition (T, X ) of G − M , reintroduce u and v to every bag, and find a separation (A , B ) by Lemma 3.7 such that the Reduction Rule applies, and iterate this until we find the k -path between u and v or conclude there is none, as in Lemma 3.5.
We define P u,v,k to be a subfamily of k + 1 arbitrarily chosen paths from P 0 u,v,k , or let P u,v,k = P 0 u,v,k if |P u,v,k | < k + 1. We define P u,k similarly. Let |M | = s. Let X 1 be the set of all vertices of G − M that lie on some path in any of the sets P u,v,k or P u,k (u, v ∈ M , k ≤ k). Note that, as we picked at most k + 1 paths to the families P u,v,k and P u,k , each consisting of at most k − 1 vertices from G − M , for each of at most k choices of the length k ≤ k, and s 2 + s ≤ 2s 2 choices for the endpoint(s), we have For every x ∈ X 1 , pick one node t(x) ∈ V (T ) such that x ∈ X (t(x)). Let B 1 = {t(x) | x ∈ X 1 }. Let B 2 ⊆ V (T ) consist of all of B 1 , the root of T , and the lowest common ancestor of every pair (t 1 , t 2 ) ∈ B 1 × B 1 . Let X 2 = X (B 2 ). It is folklore that |B 2 | ≤ 2|B 1 |, hence: |B 2 | ≤ 2(k + 1) · (k − 1) · k · 2s 2 , Let C be the set of connected components of T − B 2 . As B 2 is closed under taking lowest common ancestors of nodes, we have that |N T (C)| ≤ 2 for any C ∈ C: one of the elements of N T (C) is a parent of the root of C (if it exists), and additionally one vertex of C may have a child in N T (C).
Reducing a large component. Our main goal is to show that if the bags of any component C contain in total more than m = poly(k, w, s) vertices of G, that is, |X (C)| > m, then one can use the Reduction Rule from Section 3 to reduce the graph G by at least one vertex. Fix such a component C.
Let t 0 ∈ V (C) be the lowest node in C such that, if D is the set of nodes of C in the subtree of T rooted in t 0 , then |X (D)| > m.
Let Z = X (D) ∩ X 2 . Recall that |N T (C)| ≤ 2 due to the fact that B 2 is closed under taking lowest common ancestors. By the properties of the tree decomposition, every vertex of Z lies in X (t) for some t ∈ N T (C). Since the adhesions are of constant size, we have that |Z| = O(1).
Let A = X (D) \ Z. Note that A ∩ X 2 = ∅. Since in (T, X ) every node has a number of children bounded polynomially in w, the choice of t 0 ensures that |X (D)| ≤ poly(w) · m. Furthermore, note that N G (A) ⊆ Z ∪ M ; in particular, |N G (A)| ≤ |M | + O(1).
The marking process ensures the following crucial property.
Lemma 6.3. The set A is guarded by Z.
Proof. Let P be a k-path in G that contains a maximum possible number of vertices from X 1 ; we claim that P is guarded by Z in A. Assume the contrary, let Q be a traverse of P through A for which neither endpoint belongs to Z. Since P is not completely contained in G[A], and N G (A) ⊆ Z ∪ M , we have that Q is either a (u, v, k )-path for some u, v ∈ M and 1 ≤ k ≤ k − 2 or a (u, k )-path for some u ∈ M and 1 ≤ k ≤ k − 1. Assume the first case; the proof for the second case is analogous. Since A does not contain any vertex of X 2 ⊇ X 1 , from the maximality of P 0 u,v,k we infer that P u,v,k P 0 u,v,k (since it contains Q) and, consequently, |P u,v,k | = k + 1. Thus, at least one (u, v, k )-path Q ∈ P u,v,k has no internal vertices on the k-path P . Consequently, by replacing Q with Q on P , we obtain a simple k-path P with strictly more vertices of X 1 than P . This is a contradiction.
Thus, if m = poly(k, w, s) is large enough, we can apply the Reduction Rule for the set A Wrap up. Recall that we have shown that one can apply the Reduction Rule if there exists a component C ∈ C with |X (C)| > m for some m bounded polynomially in k, w, and s. However, since |B 2 | ≤ 2(k + 1) · (k − 1) · k · 2s 2 and a node of T has poly(w) children, there are at most poly(w)k 3 s 2 components. Consequently, if the reduction is not applicable, we have |V (G)| bounded polynomially in k, w, and s. Such an instance can be solved with a single call to Auxiliary Linkage with k = k, S = ∅, r = 1, and R 1 = ∅. This finishes the proof of Theorem 6.1 and, consequently, of Theorem 1.2.

Conclusions
We significantly extended the graph classes on which k-Path has a polynomial Turing kernel. In addition, we showed that even an instance that does not belong to such a class, but has a small vertex modulator whose deletion makes it so, can be solved efficiently using small queries to an oracle. A subdivision-based argument (cf. [13]) shows that we cannot generalize much beyond H-topological-minor-free graphs without settling the problem in general. In particular, the existence of a polynomial Turing kernel for graphs of bounded expansion implies its existence in general graphs.
While our narrative focused on k-Path, after small modifications our techniques can also be applied to prove analogues of Theorems 1.1 and 1.2 for the k-Cycle problem of detecting a simple cycle of length at least k. The main difficulty in adapting our arguments to k-Cycle is the fact that, a priori, the only cycles of length at least k may be arbitrarily much larger than k. However, this issue can easily be resolved in the following way. Since a cycle is contained within a single biconnected component, a Turing kernelization can decompose its input into biconnected components and solve the problem independently in each of them. We then start by testing for the existence of a path with k 2 vertices using the algorithms developed in the paper. If there is a path of length k 2 in a biconnected component, then by a classic theorem of Dirac [11] there is a cycle of length at least k, and we are done. If no such path exists, then the longest cycle in G has length less than 2k, and we can continue under the guarantee that the cycle we are looking for has length at least k and less than 2k. In this setting, our arguments can be easily adapted. In particular, the absence of a path of length k 2 implies the existence of suitable tree decompositions from which reducible separations can be extracted.
A significant portion of the technical work in this paper was devoted to modifying the graph minors decomposition to obtain the win/win that either answers the problem or finds a reducible separation. In this way, the algorithmic question has driven a challenging graph-theoretic project. It would be interesting to find more problems amenable to such an approach. We conclude with some concrete open problems. Does k-Path have a polynomial Turing kernel on chordal graphs? How about Induced k-Path or Directed k-Path, on planar graphs?