© Anand Babu and Ashwin Jacob and Hitendra Kumar and R. B. Sandeep; licensed under Creative Commons License CC-BY 4.0
42nd Conference on Very Important Topics (CVIT 2016). Editors: John Q. Open and Joan R. Access; Article No. 23; pp. 23:1–23:74
Leibniz International Proceedings in Informatics
LIPICS Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany
Keywords and phrases Eccentricity shortest path, parameterized complexity, fixed-parameter tractability, kernelization, graph algorithms, structural graph parameters
Digital Object Identifier 10.4230/LIPIcs.CVIT.2016.23
Funding Ashwin Jacob : Anusandhan National Research Foundation (ANRF) research grant ANR-F/ECRG/2025/004197/PMS
W-hardness
Clique cover number
Construction
Bounding the clique cover number
Correctness
Cutwidth
Construction
Correctness
Cutwidth and completion of the proof
Para-NP-hardness
Tree-independence number
Construction
Bounding the tree-independence number
Correctness
Kernelization
Maximum leaf number
A small weighted core
A polynomial-size compression
The compressed language belongs to NP
From compression to an ordinary ESP kernel
Distance to clique
Graph construction
Parameter and size bounds
Canonical paths and clause distances
Correctness of the cross-composition
Feedback edge number
Source instances and preprocessing
Graph construction
Parameter and size bounds
Metric properties and canonical paths
Correctness of the cross-composition
Vertex cover number
Graph construction
Parameter and size bounds
Canonical paths and correctness
Consequences for deletion parameters
Bandwidth
The cross-composition construction
Canonical shortest paths and domination
Correctness of the cross-composition
Bandwidth bound and completion of the proof
Introduction
A shortest path provides an efficient route between its endpoints, but it need not pass close to the rest of the graph. When a path is intended to serve as an accessible route through a network, these two requirements must be considered together: travel along the route should be shortest, and the greatest distance needed to reach it should be small. The Eccentricity Shortest Path problem (ESP) captures this combination. For a connected graph G G G and a path P P P , the eccentricity of P P P is
ecc G ( P ) = max v ∈ V ( G ) min u ∈ V ( P ) dist G ( v , u ) . \operatorname{ecc}_{G}(P) = \max_{v \in V(G)} \min_{u \in V(P)} \operatorname{dist}_{G}(v,u). ecc G ( P ) = v ∈ V ( G ) max u ∈ V ( P ) min dist G ( v , u ) .
The optimization problem asks for a shortest path of minimum eccentricity. Its decision version asks whether a given connected graph G G G has a shortest path P P P satisfying ecc G ( P ) ≤ R \operatorname{ecc}_{G}(P) \le R ecc G ( P ) ≤ R , where R R R is part of the input. The endpoints are not prescribed, and a shortest path is always understood to be shortest between its own endpoints.
Dragan and Leitert introduced ESP and established its connection with approximating minimum-distortion embeddings of graph metrics into the line [28 ] . A path of low eccentricity provides a one-dimensional structure near every vertex, while its shortest-path property preserves distances along that structure. The problem therefore combines a metric covering requirement with an exact constraint on the chosen route. These requirements interact: extending a path can improve coverage but destroy shortness, whereas replacing it by a shorter route can leave previously covered vertices too far away. This interaction is central to both the algorithms and the lower bounds in this paper.
Previous work and structural parameterization
The general problem is computationally difficult. Dragan and Leitert [28 ] proved NP-hardness even on planar bipartite graphs of maximum degree three and W [ 2 ] W[2] W [ 2 ] -hardness when the parameter is the requested eccentricity. They also gave an O ( n 2 r + 2 m ) O(n^{2r+2}m) O ( n 2 r + 2 m ) -time algorithm for finding an optimum path, where r r r is the optimum eccentricity, together with constant-factor approximation algorithms. Here n n n and m m m denote the numbers of vertices and edges. Birmelé, de Montgolfier, and Planche [6 ] gave a linear-time 3-approximation for ESP and established tight bounds relating its optimum eccentricity to laminarity, where the path is required to be diametral. In a separate paper published in 2016, Dragan and Leitert obtained a linear-time algorithm on distance-hereditary graphs and polynomial-time algorithms on chordal graphs, dually chordal graphs, and graphs of bounded tree-length or bounded hyperbolicity [27 ] . In particular, the chordal-graph result implies polynomial-time solvability on interval and split graphs.
Generalizations of ESP have also been studied. Birmelé et al. [7 ] introduced hub-laminar decompositions , which use several locally shortest paths with small collective eccentricity that meet only near their endpoints. Chakraborty and Vaxès [16 ] considered k k k -Geodesic Center , which asks for k k k shortest paths minimizing the maximum distance from a vertex to their union; its case k = 1 k=1 k = 1 is precisely ESP. They gave a polynomial-time additive O ( δ ) O(\delta) O ( δ ) -approximation for this generalization on δ \delta δ -hyperbolic graphs and proved NP-hardness on partial grids for every fixed k ≥ 1 k \ge1 k ≥ 1 , including ESP.
Chakraborty et al. [15 ] recently obtained an O ( n 4 ) O(n^4) O ( n 4 ) -time algorithm for ESP on K 2 , 3 K_{2,3} K 2 , 3 -minor-free graphs, a class containing all outerplanar graphs, and an O ( n 3 ) O(n^3) O ( n 3 ) -time algorithm on cactus graphs. Their approach fixes the endpoints of the solution path and uses the structure of the shortest paths between them to construct a weighted auxiliary directed acyclic graph.
Minimizing the largest edge weight along a path in this auxiliary graph yields a shortest path of minimum eccentricity for the chosen endpoints. They leave open polynomial-time solvability on graphs of every fixed treewidth, including the case of treewidth at most two.
These results motivate studying how structural restrictions on the input control the complexity of ESP. We study FPT and XP algorithms, as well as polynomial kernelization, with the eccentricity threshold R R R unrestricted, using structural parameters of G G G alone.
All distances to graph classes below mean vertex-deletion distances. Kučera and Suchý [40 ] initiated a systematic study of structural parameterizations of ESP. They established fixed-parameter tractability for modular-width, distance to cluster graphs, and maximum leaf number, as well as for treewidth combined with the requested eccentricity. They also asked whether treewidth alone suffices for fixed-parameter tractability. Bhyravarapu et al. [3 ] subsequently obtained FPT algorithms for distance to a disjoint union of paths and for feedback vertex number combined with the eccentricity threshold, and an FPT approximation scheme parameterized by feedback vertex number. Their full version [4 ] also proves fixed-parameter tractability for distance to split graphs and W[2 ] -hardness for distance to chordal graphs, and asks about distance to interval graphs.
More recently, Bhyravarapu and Mohanapriya [5 ] proved that ESP is W[1 ] -hard parameterized by the vertex-deletion distance s s s to a disjoint union of spiders, where a spider is a tree with at most one vertex of degree greater than two. They also exclude an n o ( s ) n^{o(s)} n o ( s ) -time algorithm under the Exponential Time Hypothesis (ETH). Their result implies W[1 ] -hardness for each of feedback vertex number, pathwidth, and treewidth individually. This answers the earlier tractability questions for feedback vertex number and treewidth negatively unless FPT = W[1 ] . On the positive side, they give a 2 O ( t log t ) n O ( 1 ) 2^{O(t \log t)}n^{O(1)} 2 O ( t l o g t ) n O ( 1 ) -time algorithm parameterized by feedback edge number t t t .
For kernelization, Tomer’s report [52 ] reports a linear kernel parameterized by neighborhood diversity.
Our results
We provide a comprehensive picture of the structural parameterized complexity of ESP, establishing FPT and XP algorithms, parameterized hardness results, and both positive and negative kernelization results. Table 1 summarizes the principal statements proved in this paper. Figure 1 places these results among related structural parameters and previously known bounds.
Figure 1. The structural parameter landscape of ESP on connected graphs, inspired by the graph parameter hierarchy of Sorge and Weller [51 ] , and combining results from earlier work [28 , 40 , 3 , 4 , 52 , 5 ] with the results proved here. A line from an upper parameter p p p to a lower parameter q q q means that q q q is bounded by a function of p p p on connected graphs. For the nontrivial parameter relations, see [30 , 51 ] for the bounds from maximum leaf number to bandwidth, feedback edge number, and distance to disjoint paths; [41 Lemma 2] for the bound on neighborhood diversity by vertex cover number and, by complementation, by distance to a clique; [32 Theorem 3] for the bound on modular-width by neighborhood diversity; [34 , 19 ] for the bounds on clique-width in terms of modular-width, cograph-deletion distance, and treewidth; [36 ] for the bound on pathwidth by cutwidth; [44 , 51 ] for the relations between vertex cover number, treedepth, pathwidth, and diameter; and [21 ] for the bounds on tree-independence number by treewidth and chordal-deletion distance. The bound on genus by feedback edge number is given in [51 Lemma 4.19] . The remaining relations follow from graph-class inclusions and elementary structural arguments. The four colors distinguish the complexity classes listed in the legend; negative statements use the standard assumptions P ≠ N P P \ne NP P = N P , F P T ≠ W [ 1 ] FPT \ne W[1] F P T = W [ 1 ] , F P T ≠ W [ 2 ] FPT \ne W[2] F P T = W [ 2 ] , F P T ≠ W [ 3 ] FPT \ne W[3] F P T = W [ 3 ] , and N P ⊈ c o N P / p o l y NP \not\subseteq coNP/poly N P ⊆ co N P / p o l y , as appropriate. Dark and light shades distinguish directly established results from consequences of parameter bounds. Blue stars mark parameters explicitly treated in this paper, including consequences of earlier algorithms. Dist to denotes vertex-deletion distance, and Ind Set and Dom Set denote the independence and domination numbers.
Table 1. Results proved in this paper. Every kernel lower bound assumes NP ⊈ \not\subseteq ⊆ coNP/poly. Treedepth FPT and diameter XP are consequences of earlier algorithms [40 , 28 ] .
Algorithms
Our 13 k n O ( 1 ) 13^k n^{O(1)} 1 3 k n O ( 1 ) -time algorithm for interval deletion distance resolves the question posed by Bhyravarapu et al. [4 ] . We also obtain fixed-parameter tractability for distance to cographs and bandwidth. For bandwidth, the running time is 2 O ( b 2 log ( b + 1 ) ) n O ( 1 ) 2^{O(b^2 \log(b+1))}n^{O(1)} 2 O ( b 2 l o g ( b + 1 )) n O ( 1 ) , and a bandwidth ordering need not be supplied. On the XP side, we give algorithms for distance to chordal graphs, clique-width, and rank-width. In particular, our chordal-deletion algorithm complements the known W[2 ] -hardness result, highlighting a distinction in the parameterized complexity of ESP between the vertex-deletion distances to interval graphs and to chordal graphs. The clique-width and rank-width results follow from an algorithm on a supplied mim-width layout whose polynomial exponent depends on the layout width but not on R R R . Since clique-width is bounded by a function of treewidth, our clique-width XP algorithm also yields polynomial-time solvability for every fixed treewidth, including series-parallel graphs. This answers the question raised by Chakraborty et al. [15 ] ; their specialized algorithms
give explicit quartic and cubic running-time bounds on K 2 , 3 K_{2,3} K 2 , 3 -minor-free graphs and cactus graphs, respectively, both of which have bounded treewidth. For completeness, we also record treedepth FPT and diameter XP as consequences of the earlier treewidth–eccentricity and optimum-eccentricity algorithms, respectively.
Hardness
We prove W[3 ] -hardness parameterized by cutwidth, even for graphs of maximum degree five and even when a suitable ordering is supplied. Since pathwidth, and hence treewidth, is at most cutwidth, this also gives W[3 ] -hardness for both parameters, strengthening the earlier W[1 ] -hardness of Bhyravarapu and Mohanapriya [5 ] . Together with the bandwidth algorithm, this separates two familiar ordering parameters for ESP: bounding edge lengths in an ordering supports an FPT algorithm, whereas bounding the number of edges crossing each cut does not, unless FPT = W[3 ] . We also prove W[2 ] -hardness for the vertex clique-cover number, including when a clique cover is supplied. Finally, ESP is NP-hard on graphs of tree-independence number at most two. This remains true with an explicit tree decomposition whose every bag is partitioned into two cliques. Hence bounding the independence number within bags does not suffice for an XP algorithm, unless P = NP.
Polynomial preprocessing
For maximum leaf number ℓ \ell ℓ , we obtain an O ( ℓ 4 ) O(\ell^4) O ( ℓ 4 ) -bit compression into a fixed language in NP and derive an ordinary unweighted ESP kernel of polynomial encoding length. This strengthens the previously known FPT result for this parameter. In contrast, ESP has no polynomial kernel parameterized by bandwidth, feedback edge number, distance to clique, or vertex cover number, unless NP ⊆ \subseteq ⊆ coNP/poly. In particular, the feedback-edge lower bound complements the FPT algorithm of Bhyravarapu and Mohanapriya [5 ] , showing that this tractability does not extend to polynomial kernelization under the stated assumption. The vertex-cover lower bound also yields lower bounds for deletion distance to cluster, split, proper interval, and interval graphs. Thus the interval-deletion and bandwidth FPT algorithms cannot be accompanied by polynomial kernels under this assumption. The maximum-leaf and feedback-edge results further show that different restrictions on sparse graphs can have opposite consequences for polynomial preprocessing.
Overview of the techniques
Summarizing distances to a geodesic.
The algorithms for interval and chordal deletion distance use the structure of shortest paths to keep small descriptions of their interaction with a modulator. In an interval graph, distances to a geodesic can be related to distances to its endpoints. We use this property to obtain a parameter-bounded family of candidate distance profiles on the modulator. For each candidate profile, a sweep through an interval representation stores only the last three selected vertices in the processed prefix under right-endpoint order and the first three selected vertices in the unprocessed suffix under left-endpoint order, together with degree counters and witnesses for the guessed distances. Summing over these choices gives the 13 k 13^k 1 3 k factor. For a chordal modulator, the relevant decomposition has bags consisting of a clique together with the modulator. A geodesic uses at most two vertices of the clique, and its distance profile on a bag has a small set of representatives. Storing profiles for both sides of each separator gives the XP algorithm despite the bags having unbounded size.
Few distance values instead of a bounded radius.
The bandwidth algorithm addresses a different obstacle: the optimum eccentricity can be arbitrarily large even on cycles, which have bounded bandwidth. Consequently, simply applying an algorithm parameterized by treewidth and R R R cannot give the desired result. We instead bound the number of attainable distances from a vertex to a shortest path with fixed endpoints. A packing argument for separated vertices in bounded-bandwidth trees yields a bound involving a parameter-dependent power of log n \log n log n . A dynamic program over a tree decomposition uses these distance values rather than all integers up to R R R . Absorbing the remaining powers of log n \log n log n into the parameter-dependent factor gives the claimed FPT running time.
Logical descriptions of shortest paths.
For distance to cographs, a small modulator bounds both clique-width and diameter. A cotree refined by neighborhoods in the modulator provides a bounded-label expression, and the diameter bound permits an M S O 1 \mathrm{MSO}_1 MSO 1 description of the required path with parameter-bounded formula length. The clique-width XP algorithm uses a different description: a connected vertex set containing s s s and t t t and having exactly dist G ( s , t ) + 1 \operatorname{dist}_G(s,t)+1 dist G ( s , t ) + 1 vertices must induce an s s s -t t t geodesic. Combining this certificate with the mim-width model-checking theorem of Bergougnoux, Dreier, and Jaffke [2 ] handles the unbounded eccentricity threshold. Rank decompositions supply the required layouts, so no clique-width expression needs to be given.
Encoding choices by distances.
Our hardness constructions force a shortest path to make a sequence of choices and use distances to test vertices to enforce consistency. For clique-cover number, these choices encode a dominating set. For cutwidth, we reduce from the vertex-cover parameterization of Binary CSP studied by Bodlaender, Groenland, and Pilipczuk [9 ] . Variable gadgets encode values through complementary distances to two ports, and test gadgets recognize forbidden pairs. The construction simultaneously bounds the cutwidth and maximum degree. For tree-independence number, clause vertices form one clique that can be added to a decomposition of the remaining construction, yielding bags covered by two cliques.
For maximum leaf number, suppressing degree-two chains leaves a small weighted core, but its binary edge lengths may still depend on n n n . We combine a direct algorithm with this representation to obtain a polynomial-size compression. A crucial additional step is to verify the encoded path and its eccentricity without expanding the chains; this places the compressed language in NP and permits a reduction back to ordinary ESP. The negative results use OR-cross-compositions and polynomial parameter transformations. Their constructions encode many source instances or choices while keeping the relevant parameter small: through bounded modules for bandwidth, pendant structures around a fixed cyclic core for feedback edge number, and large clique or independent parts for the deletion-distance and vertex-cover lower bounds.
Organization.
Section 2 fixes the notation and graph parameters. Sections 3 and 4 present the FPT and XP algorithms. Sections 5 and 6 establish the parameterized and para-NP-hardness results. Section 7 presents the polynomial kernel and kernel lower bounds.
Preliminaries
We use standard graph-theoretic and parameterized-complexity terminology; see, for example, Cygan et al. [20 ] . All graphs are finite, undirected, simple, and unweighted, unless stated otherwise. For a graph G G G , we write V ( G ) V(G) V ( G ) and E ( G ) E(G) E ( G ) for its vertex and edge sets, and put n = ∣ V ( G ) ∣ n = |V(G)| n = ∣ V ( G ) ∣ and m = ∣ E ( G ) ∣ m = |E(G)| m = ∣ E ( G ) ∣ . The open and closed neighborhoods of a vertex v v v are denoted by N G ( v ) N_G(v) N G ( v ) and N G [ v ] N_G[v] N G [ v ] , respectively. For X ⊆ V ( G ) X \subseteq V(G) X ⊆ V ( G ) , the graph induced by X X X is denoted by G [ X ] G[X] G [ X ] , while G − X = G [ V ( G ) ∖ X ] G - X = G[V(G) \setminus X] G − X = G [ V ( G ) ∖ X ] . We omit the subscript G G G whenever the underlying graph is clear. Subdividing an edge u v uv uv means replacing it by the path u , w , v u,w,v u , w , v , where w w w is a new vertex. More generally, a subdivision replaces each edge by a path of positive length with the same endpoints; the replacement paths have pairwise disjoint sets of new internal vertices.
For vertices u , v ∈ V ( G ) u,v \in V(G) u , v ∈ V ( G ) , let dist G ( u , v ) \operatorname{dist}_G(u,v) dist G ( u , v ) be their distance in G G G . For a nonempty set S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , define
dist G ( v , S ) = min x ∈ S dist G ( v , x ) , ecc G ( S ) = max v ∈ V ( G ) dist G ( v , S ) . \operatorname{dist}_G(v,S) = \min_{x \in S} \operatorname{dist}_G(v,x), \qquad\operatorname{ecc}_G(S) = \max_{v \in V(G)} \operatorname{dist}_G(v,S). dist G ( v , S ) = x ∈ S min dist G ( v , x ) , ecc G ( S ) = v ∈ V ( G ) max dist G ( v , S ) .
A path from u u u to v v v is a shortest path , or a geodesic , if its length is dist G ( u , v ) \operatorname{dist}_G(u,v) dist G ( u , v ) . We allow one-vertex paths. Every geodesic is induced. For a path P P P , we abbreviate dist G ( v , V ( P ) ) \operatorname{dist}_G(v,V(P)) dist G ( v , V ( P )) and ecc G ( V ( P ) ) \operatorname{ecc}_G(V(P)) ecc G ( V ( P )) to dist G ( v , P ) \operatorname{dist}_G(v,P) dist G ( v , P ) and ecc G ( P ) \operatorname{ecc}_G(P) ecc G ( P ) , respectively. A subgraph H H H of G G G is isometric if dist H ( x , y ) = dist G ( x , y ) \operatorname{dist}_H(x,y) = \operatorname{dist}_G(x,y) dist H ( x , y ) = dist G ( x , y ) for all x , y ∈ V ( H ) x,y \in V(H) x , y ∈ V ( H ) .
Eccentricity Shortest Path (ESP).
The input consists of a connected graph G G G and a nonnegative integer R R R . The question is whether G G G has a shortest path P P P with ecc G ( P ) ≤ R \operatorname{ecc}_G(P) \leq R ecc G ( P ) ≤ R . The optimization version asks for a shortest path of minimum eccentricity. We call such a path a solution path and write ( G , R ) ∈ E S P (G, R) \in\mathrm{ESP} ( G , R ) ∈ ESP when the instance is a yes-instance. The problem was introduced by Dragan and Leitert [28 ] .
Parameterized complexity.
For a graph parameter k k k , an FPT algorithm has running time f ( k ) n O ( 1 ) f(k)n^{O(1)} f ( k ) n O ( 1 ) , while an XP algorithm may have running time f ( k ) n g ( k ) f(k)n^{g(k)} f ( k ) n g ( k ) , for computable functions f f f and g g g . Thus FPT algorithms keep the polynomial exponent independent of the parameter. A complementary question asks whether polynomial-time preprocessing can reduce an instance to an equivalent instance whose encoding length is polynomial in k k k ; such a reduction is a polynomial kernel . We refer the reader to the textbook [20 ] for standard terminology in parameterized complexity.
Graph parameters
We use the following graph parameters.
Basic numerical parameters. The degree of v v v is deg G ( v ) = ∣ N G ( v ) ∣ \operatorname{deg}_G(v)=|N_G(v)| deg G ( v ) = ∣ N G ( v ) ∣ , and the maximum degree is Δ ( G ) = max v ∈ V ( G ) deg G ( v ) \Delta(G)=\max_{v\in V(G)}\operatorname{deg}_G(v) Δ ( G ) = max v ∈ V ( G ) deg G ( v ) . A set of pairwise nonadjacent vertices is independent ; the independence number α ( G ) \alpha(G) α ( G ) is the maximum size of such a set. For a connected graph G G G , its diameter and optimum ESP eccentricity [28 ] are, respectively,
diam ( G ) = max u , v ∈ V ( G ) dist G ( u , v ) , r ( G ) = min { ecc G ( P ) : P is a shortest path of G } . \operatorname{diam}(G)=\max_{u,v\in V(G)}\operatorname{dist}_G(u,v), \qquad r(G)=\min\{\operatorname{ecc}_G(P): P\text{ is a shortest path of }G\}. diam ( G ) = u , v ∈ V ( G ) max dist G ( u , v ) , r ( G ) = min { ecc G ( P ) : P is a shortest path of G } .
When referring to the maximum diameter of a disconnected graph’s components, we take the maximum of diam ( C ) \operatorname{diam}(C) diam ( C ) over its connected components C C C .
Vertex-deletion distances. For a graph class H \mathcal{H} H , the deletion distance to H \mathcal{H} H is
min { ∣ X ∣ : X ⊆ V ( G ) and G − X ∈ H } . \min\{|X|:X\subseteq V(G)\text{ and }G-X\in\mathcal{H}\}. min { ∣ X ∣ : X ⊆ V ( G ) and G − X ∈ H } .
A set X X X with G − X ∈ H G-X\in\mathcal{H} G − X ∈ H is an H \mathcal{H} H -modulator [20 ] . All distances to graph classes in this paper refer to vertex deletion. We consider the following classes:
A clique is a graph whose vertices are pairwise adjacent.
A cograph is a graph with no induced P 4 P_4 P 4 [17 ] .
A chordal graph has no induced cycle of length at least four [24 ] .
An interval graph is the intersection graph of intervals on a line [42 ] . It is a proper interval graph if it has such a representation in which no interval properly contains another [47 ] .
A cluster graph is a disjoint union of cliques [50 ] .
A split graph has a vertex partition into a clique and an independent set [31 ] .
We denote the distances to cographs and to cliques by dcog ( G ) \operatorname{dcog}(G) dcog ( G ) and dtc ( G ) \operatorname{dtc}(G) dtc ( G ) , respectively. Thus a cograph modulator X X X satisfies that G − X G-X G − X is a cograph, and a clique modulator X X X satisfies that G − X G-X G − X is a clique. The distances to chordal, interval, proper interval, cluster, and split graphs are defined by the same minimum above.
Equivalently, nonempty cographs are obtained from one-vertex graphs by repeated disjoint unions and complete joins. A cotree records this construction: its leaves are the graph’s vertices, and its internal nodes are labelled ⊕ \oplus ⊕ or ⊗ \otimes ⊗ for disjoint union or complete join [17 ] .
Treewidth, pathwidth, and tree-independence number. A tree decomposition of G G G consists of a tree T T T and bags B u ⊆ V ( G ) B_u\subseteq V(G) B u ⊆ V ( G ) for u ∈ V ( T ) u\in V(T) u ∈ V ( T ) such that every vertex belongs to a bag, every edge has both endpoints in a common bag, and, for every v ∈ V ( G ) v\in V(G) v ∈ V ( G ) , the nodes whose bags contain v v v induce a connected subtree of T T T . Its width is $\max_{u\in V(T)}|B_u|-1, and its independence number is max u ∈ V ( T ) α ( G [ B u ] ) \max_{u\in V(T)} \alpha(G[B_u]) max u ∈ V ( T ) α ( G [ B u ]) . The treewidth tw ( G ) \operatorname{tw}(G) tw ( G ) [49 ] and tree-independence number tree - α ( G ) \operatorname{tree}\text{-}\alpha(G) tree - α ( G ) [21 ] are the respective minima over all tree decompositions of G G G . A path decomposition is a tree decomposition whose underlying tree is a path; the pathwidth is the minimum width of a path decomposition [48 ] .
Treedepth. The closure cl ( F ) \operatorname{cl}(F) cl ( F ) of a rooted forest F F F joins each vertex to all its proper ancestors. The treedepth td ( G ) \operatorname{td}(G) td ( G ) is the minimum height of a rooted forest F F F on V ( G ) V(G) V ( G ) with G ⊆ cl ( F ) G\subseteq\operatorname{cl}(F) G ⊆ cl ( F ) , where height counts vertices on a longest root-to-leaf path [44 ] .
Bandwidth and cutwidth. For an ordering π = ( v 1 , … , v n ) \pi=(v_1,\ldots,v_n) π = ( v 1 , … , v n ) of V ( G ) V(G) V ( G ) , put
bw ( G , π ) = max v i v j ∈ E ( G ) ∣ i − j ∣ , cutwidth ( G , π ) = max 0 ≤ h ≤ n ∣ { v i v j ∈ E ( G ) : i ≤ h < j } ∣ . \operatorname{bw}(G,\pi)=\max_{v_iv_j\in E(G)} |i-j|,\qquad\operatorname{cutwidth}(G,\pi)=\max_{0\leq h\leq n} |\{v_iv_j\in E(G):i\leq h<j\}|. bw ( G , π ) = v i v j ∈ E ( G ) max ∣ i − j ∣ , cutwidth ( G , π ) = 0 ≤ h ≤ n max ∣ { v i v j ∈ E ( G ) : i ≤ h < j } ∣.
For an edgeless graph, put bw ( G , π ) = 0 \operatorname{bw}(G,\pi)=0 bw ( G , π ) = 0 . The bandwidth bw ( G ) \operatorname{bw}(G) bw ( G ) and cutwidth cutwidth ( G ) \operatorname{cutwidth}(G) cutwidth ( G ) are the minima of these quantities over all vertex orderings π \pi π [23 ] . We also view an ordering as a bijection π : V ( G ) → { 1 , … , n } \pi:V(G)\to\{1,\ldots,n\} π : V ( G ) → { 1 , … , n } , with π ( v i ) = i \pi(v_i)=i π ( v i ) = i .
Clique-width. A k k k -expression constructs a labelled graph using labels from { 1 , … , k } \{1,\ldots,k\} { 1 , … , k } and four operations: creating a labelled vertex, taking disjoint union, adding all edges between two distinct labels, and relabelling all vertices of one label. The clique-width cw ( G ) \operatorname{cw}(G) cw ( G ) is the minimum k k k for which G G G has a k k k -expression [19 ] .
Rank-width and mim-width. For A ⊆ V ( G ) A\subseteq V(G) A ⊆ V ( G ) , put A ‾ = V ( G ) ∖ A \overline{A}=V(G)\setminus A A = V ( G ) ∖ A . Let mim G ( A ) \operatorname{mim}_G(A) mim G ( A ) be the maximum size of an induced matching in the bipartite cut graph G [ A , A ‾ ] G[A,\overline{A}] G [ A , A ] . Edges with both endpoints on one side of the cut are not part of this bipartite graph. Let ρ G ( A ) \rho_G(A) ρ G ( A ) be the rank over GF ( 2 ) \operatorname{GF}(2) GF ( 2 ) of its bipartite adjacency matrix.
A rooted layout L = ( T , δ ) \mathcal{L}=(T,\delta) L = ( T , δ ) consists of a rooted full binary tree T T T and a bijection δ \delta δ from V ( G ) V(G) V ( G ) to its leaves. If V x V_x V x is the set of vertices corresponding to leaves below a node x x x , its width is
mimw G ( L ) = max x ∈ V ( T ) mim G ( V x ) . \operatorname{mimw}_G(\mathcal{L})=\max_{x\in V(T)}\operatorname{mim}_G(V_x). mimw G ( L ) = x ∈ V ( T ) max mim G ( V x ) .
The mim-width of G G G is the minimum of mimw G ( L ) \operatorname{mimw}_G(\mathcal{L}) mimw G ( L ) over all rooted layouts L \mathcal{L} L [53 , 2 ] . A rank-decomposition is a subcubic tree with leaves bijectively labelled by V ( G ) V(G) V ( G ) ; its width is the maximum cut-rank over the cuts obtained by deleting its edges. The minimum such width is the rank-width rw ( G ) \operatorname{rw}(G) rw ( G ) [46 ] . For a one-vertex graph, both rank-width and mim-width are zero.
Vertex cover number and feedback edge number. The vertex cover number vc ( G ) \operatorname{vc}(G) vc ( G ) is the minimum size of a set X ⊆ V ( G ) X\subseteq V(G) X ⊆ V ( G ) such that G − X G-X G − X is independent [35 ] . The feedback edge number fen ( G ) \operatorname{fen}(G) fen ( G ) is the minimum number of edges whose deletion makes G G G a forest [1 ] .
Clique cover number. The vertex clique-cover number ϑ ( G ) \vartheta(G) ϑ ( G ) is the minimum number of cliques whose vertex sets partition V ( G ) V(G) V ( G ) [35 ] . This is different from the edge clique-cover number.
Maximum leaf number. For connected G G G , the maximum leaf number ml ( G ) \operatorname{ml}(G) ml ( G ) is the maximum number of leaves in a spanning tree of G G G [30 ] . We write ℓ = ml ( G ) \ell=\operatorname{ml}(G) ℓ = ml ( G ) when using this parameter.
FPT algorithms
In this section, we present FPT algorithms for ESP parameterized by each of the following: distance to cographs, distance to interval graphs, bandwidth, and treedepth.
Distance to cographs
In this subsection, we show that ESP is fixed-parameter tractable parameterized by distance to cographs. Recall that dcog ( G ) \operatorname{dcog}(G) dcog ( G ) is the minimum size of a cograph modulator; see Subsection 2.1.
Theorem 1. There is a computable function f f f such that ESP can be solved in time f ( k ) ∣ V ( G ) ∣ O ( 1 ) f(k)|V(G)|^{O(1)} f ( k ) ∣ V ( G ) ∣ O ( 1 ) on every instance ( G , R ) (G,R) ( G , R ) with k = dcog ( G ) k = \operatorname{dcog}(G) k = dcog ( G ) . Consequently, ESP is fixed-parameter tractable parameterized by distance to cographs. The optimization version is FPT for the same parameter.
Our proof has two ingredients. First, from a cograph modulator we construct a clique-width expression whose width is bounded by a function of the modulator size. Second, we express the existence of a suitable shortest path by a formula whose length depends only on the parameter. Then we use the following meta-theorem of Courcelle, Makowsky, and Rotics [18 ] .
Proposition 2. [Courcelle–Makowsky–Rotics [18 ] ] There is a computable function F F F with the following property. Given a q q q -expression τ \tau τ constructing a graph G G G and an M S O 1 \mathrm{MSO}_1 MSO 1 sentence φ \varphi φ , whether G ⊨ φ G \models\varphi G ⊨ φ can be decided in F ( q , ∣ φ ∣ ) ∣ τ ∣ F(q,|\varphi|)|\tau| F ( q , ∣ φ ∣ ) ∣ τ ∣ time. The same statement holds for a formula with free individual variables when values for those variables are supplied.
A bounded-width clique-width expression
We first construct a clique-width expression for a graph that is close to a cograph. The following standard cotree fact will be useful.
Proposition 3. Let G G G be a cograph with n n n vertices and m m m edges. Then G G G admits a rooted binary cotree in which the leaves correspond bijectively to V ( G ) V(G) V ( G ) and every internal node is labelled either ⊕ \oplus ⊕ or ⊗ \otimes ⊗ , representing disjoint union and complete join, respectively. Moreover, such a binary cotree can be constructed in O ( n + m ) O(n+m) O ( n + m ) time.
Proof. Corneil, Perl, and Stewart [17 ] showed that a cotree of a cograph can be constructed in O ( n + m ) O(n+m) O ( n + m ) time. A cotree node may have more than two children. As observed by Bodlaender and Möhring [11 ] , an internal node with children u 1 , … , u r u_1,\ldots,u_r u 1 , … , u r , where r > 2 r>2 r > 2 , can be replaced by a rooted binary tree whose leaves are u 1 , … , u r u_1,\ldots,u_r u 1 , … , u r and whose internal nodes all receive the label of the original node. This does not change the represented graph, since both disjoint union and complete join are associative. The number of new nodes is linear in the size of the original cotree, so the transformation takes linear time; see also Lyons [43 Section 2.1] . ◀
The next lemma is based on the standard clique-width construction for adding vertices; compare Gurski [34 ] . We include the direct construction because we need an explicit bound on the size of the expression.
Lemma 4. Let X X X be a cograph modulator of G G G with ∣ X ∣ = t |X|=t ∣ X ∣ = t , and let n = ∣ V ( G ) ∣ n=|V(G)| n = ∣ V ( G ) ∣ . One can construct a ( 2 t + 1 + t ) (2^{t+1}+t) ( 2 t + 1 + t ) -expression τ \tau τ for G G G with ∣ τ ∣ = O ( 4 t n ) |\tau|=O(4^t n) ∣ τ ∣ = O ( 4 t n ) in f 0 ( t ) n O ( 1 ) f_0(t)n^{O(1)} f 0 ( t ) n O ( 1 ) time, for a computable function f 0 f_0 f 0 .
Proof. Put H = G − X H=G-X H = G − X . By Proposition 3, a rooted binary cotree gives a 2 2 2 -expression for H H H of size O ( ∣ V ( H ) ∣ ) O(|V(H)|) O ( ∣ V ( H ) ∣ ) , ending with all vertices labelled 1 1 1 . Disjoint-union nodes need no additional operation. At a join node, relabel the output of the second child to 2 2 2 before taking the disjoint union, insert all edges between labels 1 1 1 and 2 2 2 , and then relabel 2 2 2 to 1 1 1 .
For v ∈ V ( H ) v\in V(H) v ∈ V ( H ) , let σ ( v ) = N G ( v ) ∩ X \sigma(v)=N_G(v)\cap X σ ( v ) = N G ( v ) ∩ X . Refine each label i ∈ { 1 , 2 } i\in\{1,2\} i ∈ { 1 , 2 } to labels ( i , S ) (i,S) ( i , S ) for all S ⊆ X S\subseteq X S ⊆ X , and create v v v with the refined label determined by σ ( v ) \sigma(v) σ ( v ) . Replace an edge-insertion operation between labels 1 and 2 by insertions between every pair ( 1 , S ) , ( 2 , T ) (1,S),(2,T) ( 1 , S ) , ( 2 , T ) . Similarly, replace a relabelling i → j i \to j i → j by ( i , S ) → ( j , S ) (i,S) \to(j,S) ( i , S ) → ( j , S ) for every S ⊆ X S \subseteq X S ⊆ X . A straightforward induction over the expression shows that this constructs exactly H H H and ends with each vertex v v v labelled ( 1 , σ ( v ) ) (1,\sigma(v)) ( 1 , σ ( v )) .
Now create every x ∈ X x \in X x ∈ X with its own private label. Insert the edges of G [ X ] G[X] G [ X ] individually, and join the label of x x x to ( 1 , S ) (1,S) ( 1 , S ) precisely when x ∈ S x \in S x ∈ S . These operations add exactly the missing edges of G G G . The construction uses 2 ⋅ 2 t + t 2 \cdot2^t+t 2 ⋅ 2 t + t labels and
O ( 4 t ∣ V ( H ) ∣ + t 2 t + t 2 + t ) = O ( 4 t n ) O(4^t|V(H)|+t2^t+t^2+t)=O(4^tn) O ( 4 t ∣ V ( H ) ∣ + t 2 t + t 2 + t ) = O ( 4 t n )
operations. If H H H is empty, only the private labels and the edges of G [ X ] G[X] G [ X ] are needed.
A logical description of ESP
Set δ − 1 ( x , y ) : = ⊥ \delta_{-1}(x,y):=\bot δ − 1 ( x , y ) := ⊥ and δ 0 ( x , y ) : = ( x = y ) \delta_0(x,y):=(x=y) δ 0 ( x , y ) := ( x = y ) . For r ≥ 1 r \ge1 r ≥ 1 , define recursively, always using fresh bound variables,
δ r ( x , y ) : = ∃ z ( ( x = z ∨ E ( x , z ) ) ∧ δ r − 1 ( z , y ) ) . \delta_r(x,y):=\exists z\left((x=z \lor E(x,z)) \land\delta_{r-1}(z,y)\right). δ r ( x , y ) := ∃ z ( ( x = z ∨ E ( x , z )) ∧ δ r − 1 ( z , y ) ) .
After expansion, this formula describes a walk of at most r r r edges; equality allows a step to remain at its current vertex. Hence δ r ( u , v ) \delta_r(u,v) δ r ( u , v ) holds exactly when dist G ( u , v ) ≤ r \operatorname{dist}_G(u,v) \le r dist G ( u , v ) ≤ r .
For nonnegative integers D D D and R R R , define
Φ D , R : = ⋁ ℓ = 0 D ∃ p 0 ⋯ ∃ p ℓ [ ( ⋀ i = 0 ℓ − 1 E ( p i , p i + 1 ) ) ∧ ¬ δ ℓ − 1 ( p 0 , p ℓ ) ∧ ( ∀ v ⋁ i = 0 ℓ δ R ( v , p i ) ) ] . (1) \Phi_{D,R}:=\bigvee_{\ell=0}^{D}\exists p_0\cdots\exists p_\ell\left[\left(\bigwedge_{i=0}^{\ell-1}E(p_i,p_{i+1})\right)\land\neg\delta_{\ell-1}(p_0,p_\ell)\land\left(\forall v\bigvee_{i=0}^{\ell}\delta_R(v,p_i)\right)\right]. \tag*{(1)} Φ D , R := ℓ = 0 ⋁ D ∃ p 0 ⋯ ∃ p ℓ [ ( i = 0 ⋀ ℓ − 1 E ( p i , p i + 1 ) ) ∧ ¬ δ ℓ − 1 ( p 0 , p ℓ ) ∧ ( ∀ v i = 0 ⋁ ℓ δ R ( v , p i ) ) ] . (1)
The empty conjunction for ℓ = 0 \ell=0 ℓ = 0 is true.
The following diameter bound is a direct consequence of a result of Kobayashi and Otachi [38 ] .
Proposition 5. Let G G G be connected and let X ⊆ V ( G ) X \subseteq V(G) X ⊆ V ( G ) be a cograph modulator. If ∣ X ∣ = k |X|=k ∣ X ∣ = k , then diam ( G ) ≤ 4 k + 3 \operatorname{diam}(G) \le4k+3 diam ( G ) ≤ 4 k + 3 .
Proof. Kobayashi and Otachi [38 ] observed that, if every component of every graph in a class H \mathcal{H} H has diameter at most d d d , then every component of a graph at vertex-deletion distance at most k k k from H \mathcal{H} H has diameter less than ( k + 1 ) ( d + 2 ) (k+1)(d+2) ( k + 1 ) ( d + 2 ) . Every connected cograph has diameter at most 2. Therefore diam ( G ) < 4 ( k + 1 ) \operatorname{diam}(G)<4(k+1) diam ( G ) < 4 ( k + 1 ) , and the integral bound diam ( G ) ≤ 4 k + 3 \operatorname{diam}(G)\le4k+3 diam ( G ) ≤ 4 k + 3 follows.
Lemma 6. Let X X X be a cograph modulator of a graph G G G , put t = ∣ X ∣ t=|X| t = ∣ X ∣ , and let R ≥ 0 R\ge0 R ≥ 0 . Then G ⊨ Φ 4 t + 3 , R G\models\Phi_{4t+3,R} G ⊨ Φ 4 t + 3 , R if and only if ( G , R ) (G,R) ( G , R ) is a yes-instance of ESP.
Proof. Suppose first that G ⊨ Φ 4 t + 3 , R G\models\Phi_{4t+3,R} G ⊨ Φ 4 t + 3 , R . Some disjunct indexed by an integer ℓ ≤ 4 t + 3 \ell\le4t+3 ℓ ≤ 4 t + 3 has a satisfying assignment. Its first conjunct describes a walk of length ℓ \ell ℓ , while the second conjunct rules out a shorter walk between its endpoints. The walk is therefore a geodesic path. The last conjunct says that every vertex of G G G is at distance at most R R R from this path. Conversely, let P = p 0 p 1 ⋯ p ℓ P=p_0p_1\cdots p_\ell P = p 0 p 1 ⋯ p ℓ be a shortest path with ecc G ( P ) ≤ R \operatorname{ecc}_G(P)\le R ecc G ( P ) ≤ R . By Proposition 5, ℓ ≤ diam ( G ) ≤ 4 t + 3 \ell\le\operatorname{diam}(G)\le4t+3 ℓ ≤ diam ( G ) ≤ 4 t + 3 . Assigning the vertices of P P P to p 0 , … , p ℓ p_0,\ldots,p_\ell p 0 , … , p ℓ satisfies Φ 4 t + 3 , R \Phi_{4t+3,R} Φ 4 t + 3 , R .
The number of symbols in Φ 4 t + 3 , R \Phi_{4t+3,R} Φ 4 t + 3 , R is bounded by a computable function of t + R t+R t + R .
The FPT algorithm
We can now combine the expression and the logical description.
Proof of Theorem 1. Let ( G , R ) (G,R) ( G , R ) be an instance, put k = dcog ( G ) k = \operatorname{dcog}(G) k = dcog ( G ) , and let n = ∣ V ( G ) ∣ n = |V(G)| n = ∣ V ( G ) ∣ . Greedily take a maximal collection of pairwise vertex-disjoint induced P 4 P_4 P 4 ’s, and let X X X be the union of their vertex sets. Maximality implies that G − X G-X G − X is a cograph. Every cograph modulator must meet every selected P 4 P_4 P 4 . Thus, writing t = ∣ X ∣ t = |X| t = ∣ X ∣ , we have t ≤ 4 k t \le4k t ≤ 4 k . The collection can be found in O ( n 4 ) O(n^4) O ( n 4 ) time by scanning all four-vertex sets and selecting an induced P 4 P_4 P 4 whenever its vertices avoid the previously selected paths.
Proposition 5, applied to X X X , gives diam ( G ) ≤ 4 t + 3 \operatorname{diam}(G) \le4t+3 diam ( G ) ≤ 4 t + 3 . If R ≥ 4 t + 3 R \ge4t+3 R ≥ 4 t + 3 , the answer is immediately YES: a path consisting of any one vertex has eccentricity at most diam ( G ) ≤ R \operatorname{diam}(G) \le R diam ( G ) ≤ R . We may therefore assume that R ≤ 4 t + 3 R \le4t+3 R ≤ 4 t + 3 .
By Lemma 4, we can construct a q q q -expression τ \tau τ for G G G in f 0 ( t ) n O ( 1 ) f_0(t)n^{O(1)} f 0 ( t ) n O ( 1 ) time such that q ≤ 2 t + 1 + t q \le2^{t+1}+t q ≤ 2 t + 1 + t and ∣ τ ∣ = O ( 4 t n ) |\tau| = O(4^t n) ∣ τ ∣ = O ( 4 t n ) . The number of symbols in Φ 4 t + 3 , R \Phi_{4t+3,R} Φ 4 t + 3 , R is bounded by a computable function g ( t ) g(t) g ( t ) , since R ≤ 4 t + 3 R \le4t+3 R ≤ 4 t + 3 . The total running time is at most
O ( n 4 ) + f 0 ( t ) n O ( 1 ) + F ( 2 t + 1 + t , g ( t ) ) O ( 4 t n ) = f ( t ) n O ( 1 ) ≤ f ′ ( k ) n O ( 1 ) O(n^4) + f_0(t)n^{O(1)} + F(2^{t+1}+t,g(t))O(4^t n) = f(t)n^{O(1)} \le f'(k)n^{O(1)} O ( n 4 ) + f 0 ( t ) n O ( 1 ) + F ( 2 t + 1 + t , g ( t )) O ( 4 t n ) = f ( t ) n O ( 1 ) ≤ f ′ ( k ) n O ( 1 )
for computable functions f f f and f ′ f' f ′ , where the last equality uses t ≤ 4 k t \le4k t ≤ 4 k . Hence the decision problem is FPT.
For the optimization version, test R = 0 , 1 , … , 4 t + 3 R = 0,1,\ldots,4t+3 R = 0 , 1 , … , 4 t + 3 and return the first accepted value. The value R = 4 t + 3 R = 4t+3 R = 4 t + 3 is always accepted, so this requires at most 4 t + 4 4t+4 4 t + 4 calls. A witnessing path can be recovered by standard self-reduction. First determine an accepted disjunct ℓ \ell ℓ , and then fix p 0 , p 1 , … , p ℓ p_0,p_1,\ldots,p_\ell p 0 , p 1 , … , p ℓ one at a time, using the model checker for the formula with free individual variables and trying all vertices as the next value. This uses at most n ( ℓ + 1 ) = O ( t n ) n(\ell+1) = O(tn) n ( ℓ + 1 ) = O ( t n ) further model-checking calls. Since t ≤ 4 k t \le4k t ≤ 4 k , it preserves fixed-parameter tractability. ◀
Distance to interval graphs
Recall that the distance to interval graphs is the minimum number of vertices whose deletion leaves an interval graph, as defined in Subsection 2.1.
The ESP problem is polynomial-time solvable on interval graphs, as a special case of the polynomial-time algorithm for chordal graphs given by Dragan and Leitert [27 ] . Bhyravarapu et al. [4 ] identified the parameterization by interval vertex deletion number as an open question. We resolve this question by presenting an FPT algorithm for ESP parameterized by the deletion distance to interval graphs.
Let G G G be a graph and let S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k , be a set such that H = G − S H = G-S H = G − S is an interval graph. We assume that such a modulator S S S is given; if not we can find such a set using the FPT algorithm for Interval Vertex Deletion [14 ] , which runs in time 10 k n O ( 1 ) 10^k n^{O(1)} 1 0 k n O ( 1 ) . We also assume that an interval representation of H H H is available; if not it can be computed in polynomial time [13 ] .
Enumerating distance profiles
The algorithm first check if the path is a singleton vertex in polynomial time. If not, it enumerates distinct endpoints a , b a,b a , b and sets D = d ( a , b ) D = d(a,b) D = d ( a , b ) . For this guess let
τ ( v ) = { 1 , v ∈ { a , b } , 2 , v ∉ { a , b } . \tau(v) =
\begin{cases}
1, & v \in\{a,b\},\\
2, & v \notin\{a,b\}.
\end{cases} τ ( v ) = { 1 , 2 , v ∈ { a , b } , v ∈ / { a , b } .
τ ( v ) \tau(v) τ ( v ) denote the degree of the vertices in the solution path. We begin with the following lemma.
Lemma 7. Let Q = q 0 ⋯ q ℓ Q=q_0\cdots q_\ell Q = q 0 ⋯ q ℓ be a geodesic of an interval graph H H H . If r = dist H ( u , V ( Q ) ) r=\operatorname{dist}_H(u,V(Q)) r = dist H ( u , V ( Q )) is finite and r ≥ 2 r\ge2 r ≥ 2 , then min { dist H ( u , q 0 ) , dist H ( u , q ℓ ) } ≤ r + 1 \min\{\operatorname{dist}_H(u,q_0),\operatorname{dist}_H(u,q_\ell)\}\le r+1 min { dist H ( u , q 0 ) , dist H ( u , q ℓ )} ≤ r + 1 .
Proof. If Q Q Q is a singleton, the claim is immediate. Otherwise, choose a vertex q i q_i q i in Q Q Q that is nearest to u u u and a shortest u u u –q i q_i q i path W W W . Suppose both endpoint distances exceed r + 1 r+1 r + 1 . Then i ≥ 2 i\ge2 i ≥ 2 and ℓ − i ≥ 2 \ell-i\ge2 ℓ − i ≥ 2 , by following W W W and the appropriate subpath of Q Q Q . The vertices u u u , q 0 q_0 q 0 , q ℓ q_\ell q ℓ are pairwise nonadjacent. The path Q Q Q avoids N H [ u ] N_H[u] N H [ u ] because r ≥ 2 r\ge2 r ≥ 2 . Also, W W W followed by Q [ q i , q 0 ] Q[q_i,q_0] Q [ q i , q 0 ] avoids N H [ q ℓ ] N_H[q_\ell] N H [ q ℓ ] . An internal vertex w w w of W W W equal or adjacent to q ℓ q_\ell q ℓ would give a route from u u u to q ℓ q_\ell q ℓ of length at most r r r , a contradiction. The subpath Q [ q i , q 0 ] Q[q_i,q_0] Q [ q i , q 0 ] avoids N H [ q ℓ ] N_H[q_\ell] N H [ q ℓ ] because Q Q Q is induced and ℓ − i ≥ 2 \ell-i\ge2 ℓ − i ≥ 2 . The analogous path to q ℓ q_\ell q ℓ avoids N H [ q 0 ] N_H[q_0] N H [ q 0 ] . These concatenations are paths: an internal vertex of W W W on Q Q Q would be closer to u u u than r r r . Thus u u u , q 0 q_0 q 0 , q ℓ q_\ell q ℓ form an asteroidal triple, which is impossible for interval graphs [42 ] .
For an a a a –b b b geodesic P P P , define for all s ∈ S s\in S s ∈ S , ρ s = d ( s , V ( P ) ) \rho_s=d(s,V(P)) ρ s = d ( s , V ( P )) , and distance profile ρ = ( ρ s ) s ∈ S \rho=(\rho_s)_{s\in S} ρ = ( ρ s ) s ∈ S . Let T = { s ∈ S : ρ s ≤ 2 } T=\{s\in S:\rho_s\le2\} T = { s ∈ S : ρ s ≤ 2 } . We use the vertices of T T T as anchors. For each s ∈ S s\in S s ∈ S , define
β s = min { d ( s , a ) , d ( s , b ) , min t ∈ T ( d ( s , t ) + ρ t ) } . (2) \beta_s=\min\left\{d(s,a),d(s,b),\min_{t\in T}\left(d(s,t)+\rho_t\right)\right\}. \tag*{(2)} β s = min { d ( s , a ) , d ( s , b ) , t ∈ T min ( d ( s , t ) + ρ t ) } . (2)
We guess the set T T T and the values ρ t \rho_t ρ t for t ∈ T t\in T t ∈ T . Once these values are fixed, β s \beta_s β s gives an estimate of ρ s \rho_s ρ s using only the two endpoints of P P P and the nearby anchors. The next lemma shows that this estimate is exact on T T T and is within additive two for every vertex of S S S .
Lemma 8. For every s ∈ S s\in S s ∈ S , ρ s ≤ β s ≤ ρ s + 2 \rho_s\le\beta_s\le\rho_s+2 ρ s ≤ β s ≤ ρ s + 2 . Moreover, if s ∈ T s\in T s ∈ T , then β s = ρ s \beta_s=\rho_s β s = ρ s .
Proof. Every term in the definition of β s \beta_s β s corresponds to a walk from s s s to P P P . Hence β s ≥ ρ s \beta_s\ge\rho_s β s ≥ ρ s . If s ∈ T s\in T s ∈ T , then ρ s ≤ 2 \rho_s\le2 ρ s ≤ 2 , and the term corresponding to t = s t=s t = s in the definition of β s \beta_s β s gives β s ≤ d ( s , s ) + ρ s = ρ s \beta_s\le d(s,s)+\rho_s=\rho_s β s ≤ d ( s , s ) + ρ s = ρ s . Thus β s = ρ s \beta_s=\rho_s β s = ρ s .
It remains to prove β s ≤ ρ s + 2 \beta_s\le\rho_s+2 β s ≤ ρ s + 2 for an arbitrary s ∈ S s\in S s ∈ S . Let W W W be a shortest s s s –P P P path, and let p ∈ V ( P ) p\in V(P) p ∈ V ( P ) be its endpoint. If p ∈ S p\in S p ∈ S , then p ∈ T p\in T p ∈ T and ρ p = 0 \rho_p=0 ρ p = 0 . The corresponding anchor term gives β s ≤ d ( s , p ) + ρ p = d ( s , p ) = ρ s \beta_s\le d(s,p)+\rho_p=d(s,p)=\rho_s β s ≤ d ( s , p ) + ρ p = d ( s , p ) = ρ s .
Suppose now that p ∉ S p\notin S p ∈ / S . Let z z z be the last vertex of S S S on W W W , and let u u u be the vertex immediately following z z z on W W W . Let Q Q Q be the component of P − S P-S P − S containing p p p . The suffix of W W W from u u u to p p p lies entirely in H H H . It is a shortest u u u –Q Q Q path in H H H ; otherwise, replacing this suffix by a shorter u u u –Q Q Q path would give a shorter s s s –P P P path in G G G . Put r = d H ( u , V ( Q ) ) r=d_H(u,V(Q)) r = d H ( u , V ( Q )) . Then ρ s = d ( s , z ) + 1 + r \rho_s=d(s,z)+1+r ρ s = d ( s , z ) + 1 + r . We first note that ρ z = 1 + r \rho_z=1+r ρ z = 1 + r . Indeed, the path from z z z through u u u to Q Q Q has length 1 + r 1+r 1 + r , so ρ z ≤ 1 + r \rho_z\le1+r ρ z ≤ 1 + r . On the other hand, ρ s ≤ d ( s , z ) + ρ z ≤ d ( s , z ) + 1 + r = ρ s \rho_s\le d(s,z)+\rho_z\le d(s,z)+1+r=\rho_s ρ s ≤ d ( s , z ) + ρ z ≤ d ( s , z ) + 1 + r = ρ s , and therefore equality holds throughout. In particular, ρ z = 1 + r \rho_z=1+r ρ z = 1 + r .
If r ≤ 1 r\le1 r ≤ 1 , then ρ z ≤ 2 \rho_z\le2 ρ z ≤ 2 , so z ∈ T z\in T z ∈ T . The anchor term for z z z therefore gives β s ≤ d ( s , z ) + ρ z = ρ s \beta_s\le d(s,z)+\rho_z=\rho_s β s ≤ d ( s , z ) + ρ z = ρ s .
It remains to consider r ≥ 2 r\ge2 r ≥ 2 . The path Q Q Q is a geodesic of H H H ; otherwise a shorter path between its endpoints in H H H would shorten P P P in G G G . By Lemma 7, Q Q Q has an endpoint e e e such that d H ( u , e ) ≤ r + 1 d_H(u,e)\le r+1 d H ( u , e ) ≤ r + 1 . Consequently,
d ( s , e ) ≤ d ( s , z ) + 1 + d H ( u , e ) ≤ d ( s , z ) + r + 2 = ρ s + 1. d(s,e)\le d(s,z)+1+d_H(u,e)\le d(s,z)+r+2=\rho_s+1. d ( s , e ) ≤ d ( s , z ) + 1 + d H ( u , e ) ≤ d ( s , z ) + r + 2 = ρ s + 1.
If e ∈ { a , b } e\in\{a,b\} e ∈ { a , b } , the corresponding endpoint term in the definition of β s \beta_s β s gives β s ≤ d ( s , e ) ≤ ρ s + 1 \beta_s\le d(s,e)\le\rho_s+1 β s ≤ d ( s , e ) ≤ ρ s + 1 . Otherwise, e e e has a neighbor m ∈ S ∩ V ( P ) m\in S\cap V(P) m ∈ S ∩ V ( P ) along P P P . Since m ∈ V ( P ) m\in V(P) m ∈ V ( P ) , we have ρ m = 0 \rho_m = 0 ρ m = 0 , and hence m ∈ T m \in T m ∈ T . The anchor term for m m m gives
β s ≤ d ( s , m ) + ρ m ≤ d ( s , e ) + 1 ≤ ρ s + 2. \beta_s \le d(s,m) + \rho_m \le d(s,e) + 1 \le\rho_s + 2. β s ≤ d ( s , m ) + ρ m ≤ d ( s , e ) + 1 ≤ ρ s + 2.
Thus β s ≤ ρ s + 2 \beta_s \le\rho_s + 2 β s ≤ ρ s + 2 in all cases.
For fixed endpoints a , b a, b a , b , we enumerate six possible labels for every s ∈ S s \in S s ∈ S :
n e a r 0 \mathrm{near}_0 near 0 , n e a r 1 \mathrm{near}_1 near 1 , n e a r 2 \mathrm{near}_2 near 2 , f a r 0 \mathrm{far}_0 far 0 , f a r 1 \mathrm{far}_1 far 1 , f a r 2 \mathrm{far}_2 far 2 .
A label n e a r j \mathrm{near}_j near j declares that s ∈ T s \in T s ∈ T and sets ρ s = j \rho_s = j ρ s = j . After all near labels have been chosen, we compute β s \beta_s β s from these guessed values using (2) . A label f a r j \mathrm{far}_j far j then sets ρ s = β s − j \rho_s = \beta_s - j ρ s = β s − j . We discard the candidate if a vertex labeled f a r j \mathrm{far}_j far j receives ρ s ≤ 2 \rho_s \le2 ρ s ≤ 2 , since such a vertex should belong to T T T . Finally, we define M = { s ∈ S : ρ s = 0 } M = \{s \in S : \rho_s = 0\} M = { s ∈ S : ρ s = 0 } . Thus M M M is determined by the distance assignments and need not be guessed separately.
Corollary 9. For fixed endpoints, the enumeration produces at most $6^k$ candidates ( M , ρ ) (M,\rho) ( M , ρ ) , and contains the true candidate for every a a a –b b b geodesic. For a fixed prescribed zero set M M M of size m m m , at most 5 k − m 5^{k-m} 5 k − m candidates have zero set exactly $M.
Proof. Consider a distance profile ρ \rho ρ . If ρ s ≤ 2 \rho_s \le2 ρ s ≤ 2 , assign s s s the label n e a r ρ s \mathrm{near}_{\rho_s} near ρ s . Otherwise, by Lemma 8, 0 ≤ β s − ρ s ≤ 2 0 \le\beta_s - \rho_s \le2 0 ≤ β s − ρ s ≤ 2 , so assigning s s s the label f a r β s − ρ s \mathrm{far}_{\beta_s-\rho_s} far β s − ρ s produces the correct value of ρ s \rho_s ρ s . Hence the actual distance profile is included in the enumeration.
There are six labels for each of the k k k vertices of S S S , giving at most 6 k 6^k 6 k candidates. If the zero set M M M is prescribed, every s ∈ M s \in M s ∈ M is forced to receive the label n e a r 0 \mathrm{near}_0 near 0 . Each s ∈ S ∖ M s \in S \setminus M s ∈ S ∖ M has the remaining five possible labels, giving at most 5 k − m 5^{k-m} 5 k − m candidates. ◀
Coverage and interval summaries
Lemma 10. Let Y = M ∪ X ≠ ∅ Y = M \cup X \ne\varnothing Y = M ∪ X = ∅ , where M ⊆ S M \subseteq S M ⊆ S and X ⊆ V ( H ) X \subseteq V(H) X ⊆ V ( H ) . Suppose that for every s ∈ S s \in S s ∈ S , ρ s = d ( s , Y ) \rho_s = d(s,Y) ρ s = d ( s , Y ) . Then, for every v ∈ V ( H ) v \in V(H) v ∈ V ( H ) ,
d ( v , Y ) = min { dist H ( v , X ) , min s ∈ S ( d ( v , s ) + ρ s ) } . (3) d(v,Y) = \min\left\{\operatorname{dist}_H(v,X), \min_{s \in S}\left(d(v,s) + \rho_s\right)\right\}. \tag*{(3)} d ( v , Y ) = min { dist H ( v , X ) , s ∈ S min ( d ( v , s ) + ρ s ) } . (3)
Proof. Every finite term on the right-hand side gives a walk from v v v to Y Y Y . Indeed, a path in H H H from v v v to X X X gives the first term, while for s ∈ S s \in S s ∈ S , a shortest v v v –s s s path followed by a shortest s s s –Y Y Y path gives a walk of length d ( v , s ) + ρ s d(v,s) + \rho_s d ( v , s ) + ρ s . Hence
d ( v , Y ) ≤ min { dist H ( v , X ) , min s ∈ S ( d ( v , s ) + ρ s ) } . d(v,Y) \le\min\left\{\operatorname{dist}_H(v,X), \min_{s \in S}\left(d(v,s) + \rho_s\right)\right\}. d ( v , Y ) ≤ min { dist H ( v , X ) , s ∈ S min ( d ( v , s ) + ρ s ) } .
For the reverse inequality, let P P P be a shortest v v v –Y Y Y path. If P P P avoids S S S , then P P P lies entirely in H H H and its endpoint belongs to X X X . Thus d ( v , Y ) = ∣ P ∣ ≥ dist H ( v , X ) d(v,Y) = |P| \ge\operatorname{dist}_H(v,X) d ( v , Y ) = ∣ P ∣ ≥ dist H ( v , X ) . Otherwise, let s s s be the first vertex of P P P that belongs to S S S . The prefix of P P P from v v v to s s s has length at least d ( v , s ) d(v,s) d ( v , s ) , while the remaining suffix has length at least d ( s , Y ) = ρ s d(s,Y) = \rho_s d ( s , Y ) = ρ s . Therefore
d ( v , Y ) = ∣ P ∣ ≥ d ( v , s ) + ρ s ≥ min x ∈ S ( d ( v , x ) + ρ x ) . d(v,Y) = |P| \ge d(v,s) + \rho_s \ge\min_{x \in S}\left(d(v,x) + \rho_x\right). d ( v , Y ) = ∣ P ∣ ≥ d ( v , s ) + ρ s ≥ x ∈ S min ( d ( v , x ) + ρ x ) .
Combining the two cases proves (3). ◀╝
Fix a candidate ( M , ρ ) (M,\rho) ( M , ρ ) from the enumeration. We first perform the following consistency checks, rejecting the candidate if any of them fails:
0 ≤ ρ s ≤ R ∀ s ∈ S , { a , b } ∩ S ⊆ M , ∣ M ∣ ≤ D + 1 , d ( s , m ) ≥ ρ s ∀ s ∈ S , ∀ m ∈ M , ∣ N G ( m ) ∩ M ∣ ≤ τ ( m ) ∀ m ∈ M . (4) \begin{aligned}
0 &\le\rho_s \le R && \forall s \in S, & \{a,b\} \cap S &\subseteq M, & |M| &\le D+1,\\
d(s,m) &\ge\rho_s && \forall s \in S,\ \forall m \in M, & |N_G(m) \cap M| &\le\tau(m) && \forall m \in M. \tag*{(4)}
\end{aligned} 0 d ( s , m ) ≤ ρ s ≤ R ≥ ρ s ∀ s ∈ S , ∀ s ∈ S , ∀ m ∈ M , { a , b } ∩ S ∣ N G ( m ) ∩ M ∣ ⊆ M , ≤ τ ( m ) ∣ M ∣ ≤ D + 1 , ∀ m ∈ M . (4)
The first two conditions ensure that the guessed distances are feasible and that every modulator vertex used by the endpoints belongs to the guessed path. The remaining conditions ensure that the vertices of M M M do not already violate the guessed distances or their required induced degrees.
Next, define the set of vertices that are eligible to be selected by
E ρ = { v ∈ V ( H ) : d ( s , v ) ≥ ρ s for every s ∈ S } , E_\rho= \{v \in V(H) : d(s,v) \ge\rho_s \text{ for every } s \in S\}, E ρ = { v ∈ V ( H ) : d ( s , v ) ≥ ρ s for every s ∈ S } ,
and the set of vertices whose coverage cannot be satisfied using the modulator alone by
U ρ = { v ∈ V ( H ) : d ( v , s ) + ρ s > R for every s ∈ S } . U_\rho= \{v \in V(H) : d(v,s) + \rho_s > R \text{ for every } s \in S\}. U ρ = { v ∈ V ( H ) : d ( v , s ) + ρ s > R for every s ∈ S } .
Thus, only vertices of E ρ E_\rho E ρ may be selected. Moreover, when ρ \rho ρ is the actual distance profile of the selected path, i.e., ρ s = d ( s , Y ) \rho_s = d(s,Y) ρ s = d ( s , Y ) for every s ∈ S s \in S s ∈ S , Lemma 10 shows that the remaining coverage requirement is precisely dist H ( v , X ) ≤ R \operatorname{dist}_H(v,X) \le R dist H ( v , X ) ≤ R for every v ∈ U ρ v \in U_\rho v ∈ U ρ .
Fix an interval representation I v = [ L ( v ) , R ( v ) ] I_v = [L(v),R(v)] I v = [ L ( v ) , R ( v )] of H H H . We may assume that all interval endpoints are distinct: at each tied coordinate, place all left endpoints before all right endpoints, and break ties arbitrarily within each group. Let ≺ R \prec_R ≺ R and ≺ L \prec_L ≺ L denote the orders of the vertices by increasing right and left endpoints, respectively.
Lemma 11. For distinct vertices v , x , y v,x,y v , x , y of H H H :
if R ( x ) < R ( y ) < R ( v ) R(x) < R(y) < R(v) R ( x ) < R ( y ) < R ( v ) and dist H ( x , v ) < ∞ \operatorname{dist}_H(x,v) < \infty dist H ( x , v ) < ∞ , then dist H ( y , v ) ≤ dist H ( x , v ) \operatorname{dist}_H(y,v) \le\operatorname{dist}_H(x,v) dist H ( y , v ) ≤ dist H ( x , v ) ;
if R ( v ) < R ( x ) R(v) < R(x) R ( v ) < R ( x ) , R ( v ) < R ( y ) R(v) < R(y) R ( v ) < R ( y ) , L ( x ) < L ( y ) L(x) < L(y) L ( x ) < L ( y ) , and dist H ( v , y ) < ∞ \operatorname{dist}_H(v,y) < \infty dist H ( v , y ) < ∞ , then dist H ( v , x ) ≤ dist H ( v , y ) \operatorname{dist}_H(v,x) \le\operatorname{dist}_H(v,y) dist H ( v , x ) ≤ dist H ( v , y ) .
Proof. For the first statement, let x = p 0 , p 1 , … , p d = v x = p_0, p_1, \ldots, p_d = v x = p 0 , p 1 , … , p d = v be a shortest x x x –v v v path. The union of the intervals I p 0 , … , I p d I_{p_0}, \ldots, I_{p_d} I p 0 , … , I p d is connected. Since R ( x ) < R ( y ) < R ( v ) R(x) < R(y) < R(v) R ( x ) < R ( y ) < R ( v ) , this union contains the point R ( y ) R(y) R ( y ) . On the other hand, R ( x ) < R ( y ) R(x) < R(y) R ( x ) < R ( y ) , so I x I_x I x does not contain R ( y ) R(y) R ( y ) . Hence some vertex p j p_j p j , j ≥ 1 j \ge1 j ≥ 1 , has an interval containing R ( y ) R(y) R ( y ) . Therefore p j p_j p j is equal or adjacent to y y y . Starting at y y y , move to p j p_j p j if necessary and then follow the suffix p j , p j + 1 , … , p d = v p_j, p_{j+1}, \ldots, p_d = v p j , p j + 1 , … , p d = v . This gives a y y y –v v v walk of length at most 1 + ( d − j ) ≤ d 1 + (d-j) \le d 1 + ( d − j ) ≤ d , since j ≥ 1 j \ge1 j ≥ 1 . Thus dist H ( y , v ) ≤ d = dist H ( x , v ) \operatorname{dist}_H(y,v) \le d = \operatorname{dist}_H(x,v) dist H ( y , v ) ≤ d = dist H ( x , v ) .
For the second statement, first suppose that L ( x ) < L ( v ) L(x) < L(v) L ( x ) < L ( v ) . Since R ( v ) < R ( x ) R(v) < R(x) R ( v ) < R ( x ) , the interval I x I_x I x contains R ( v ) R(v) R ( v ) , and hence x v ∈ E ( H ) xv \in E(H) xv ∈ E ( H ) . Therefore dist H ( v , x ) = 1 ≤ dist H ( v , y ) \operatorname{dist}_H(v,x) = 1 \le\operatorname{dist}_H(v,y) dist H ( v , x ) = 1 ≤ dist H ( v , y ) . It remains to consider the case L ( v ) < L ( x ) < L ( y ) L(v) < L(x) < L(y) L ( v ) < L ( x ) < L ( y ) . Let v = p 0 , p 1 , … , p d = y v = p_0, p_1, \ldots, p_d = y v = p 0 , p 1 , … , p d = y be a shortest v v v –y y y path. The union of the intervals along this path is connected and contains L ( x ) L(x) L ( x ) . Since L ( y ) > L ( x ) L(y) > L(x) L ( y ) > L ( x ) , the interval I y I_y I y does not contain L ( x ) L(x) L ( x ) . Thus some p j p_j p j , with j ≤ d − 1 j \le d-1 j ≤ d − 1 , has an interval intersecting I x I_x I x . Consequently p j x ∈ E ( H ) p_jx \in E(H) p j x ∈ E ( H ) . Following the path from v v v to p j p_j p j and then taking the edge p j x p_jx p j x gives a v v v –x x x walk of length at most j + 1 ≤ d j+1 \le d j + 1 ≤ d . Hence dist H ( v , x ) ≤ d = dist H ( v , y ) \operatorname{dist}_H(v,x) \le d = \operatorname{dist}_H(v,y) dist H ( v , x ) ≤ d = dist H ( v , y ) .
:::
Write h 1 ≺ R ⋯ ≺ R h N h_1 \prec_R \cdots\prec_R h_N h 1 ≺ R ⋯ ≺ R h N where N = ∣ V ( H ) ∣ N = |V(H)| N = ∣ V ( H ) ∣ , and let L i = { h 1 , … , h i } L_i = \{h_1,\ldots,h_i\} L i = { h 1 , … , h i } and L i ‾ = V ( H ) ∖ L i \overline{L_i} = V(H) \setminus L_i L i = V ( H ) ∖ L i . For a vertex set Z Z Z , let R 3 ( Z ) R_3(Z) R 3 ( Z ) be the last three vertices of Z Z Z in the order ≺ R \prec_R ≺ R , and let L 3 ( Z ) L_3(Z) L 3 ( Z ) be the first three vertices of Z Z Z in the order ≺ L \prec_L ≺ L . If ∣ Z ∣ ≤ 3 |Z| \le3 ∣ Z ∣ ≤ 3 , we retain all vertices of Z Z Z .
Corollary 12. Let v = h i + 1 v = h_{i+1} v = h i + 1 and t ≥ 1 t \ge1 t ≥ 1 .
For any Z − ⊆ L i Z^{-} \subseteq L_i Z − ⊆ L i , let q − q^{-} q − be the number of vertices of Z − Z^{-} Z − at distance at most t t t from v v v . Then R 3 ( Z − ) R_3(Z^{-}) R 3 ( Z − ) contains exactly min { 3 , q − } \min\{3,q^{-}\} min { 3 , q − } such vertices. Similarly, for any Z + ⊆ L i + 1 Z^{+} \subseteq L_{i+1} Z + ⊆ L i + 1 , if q + q^{+} q + is the number of vertices of Z + Z^{+} Z + at distance at most t t t from v v v , then L 3 ( Z + ) L_3(Z^{+}) L 3 ( Z + ) contains exactly min { 3 , q + } \min\{3,q^{+}\} min { 3 , q + } such vertices.
Proof. Consider first Z − Z^{-} Z − . By Lemma 11 , among the vertices preceding v v v in the order ≺ R \prec_R ≺ R , moving to the right can only decrease the distance to v v v . Hence the vertices of Z − Z^{-} Z − that are within distance t t t of v v v form a suffix of Z − Z^{-} Z − in the order ≺ R \prec_R ≺ R . If there are at most three such vertices, all of them are among the last three vertices of Z − Z^{-} Z − . If there are more than three, the last three vertices of Z − Z^{-} Z − are all within distance t t t of v v v . Thus R 3 ( Z − ) R_3(Z^{-}) R 3 ( Z − ) contains exactly min { 3 , q − } \min\{3,q^{-}\} min { 3 , q − } such vertices. The argument for Z + Z^{+} Z + is analogous. By Lemma 11 , the vertices of Z + Z^{+} Z + within distance t t t of v v v form a prefix in the order ≺ L \prec_L ≺ L . Hence the first three vertices, L 3 ( Z + ) L_3(Z^{+}) L 3 ( Z + ) , preserve their number up to three.
The dynamic programming algorithm
Put S 0 = S ∖ M S_0 = S \setminus M S 0 = S ∖ M . For each m ∈ M m \in M m ∈ M , let b m = ∣ N G ( m ) ∩ M ∣ b_m = |N_G(m) \cap M| b m = ∣ N G ( m ) ∩ M ∣ and t m = τ ( m ) − b m t_m = \tau(m) - b_m t m = τ ( m ) − b m . The preliminary checks ensure that 0 ≤ t m ≤ 2 0 \leq t_m \leq2 0 ≤ t m ≤ 2 . Since every vertex of M M M belongs to the selected path and has ρ m = 0 \rho_m = 0 ρ m = 0 , each vertex of M M M already witnesses its own distance. Thus we only need distance-equality witnesses for vertices in S 0 S_0 S 0 , and degree counters only for vertices in M M M .
After processing L i L_i L i , a state is a tuple ( A , B , c , q , W ) (A,B,c,q,W) ( A , B , c , q , W ) , where
A ⊆ L i , B ⊆ L i , ∣ A ∣ , ∣ B ∣ ≤ 3 , A \subseteq L_i,\qquad B \subseteq L_i,\qquad|A|,|B| \leq3, A ⊆ L i , B ⊆ L i , ∣ A ∣ , ∣ B ∣ ≤ 3 ,
c ( m ) ∈ { 0 , … , t m } ∀ m ∈ M , 0 ≤ q ≤ D + 1 , W ⊆ S 0 . c(m) \in\{0,\ldots,t_m\}\quad\forall m \in M,\qquad0 \leq q \leq D+1,\qquad W \subseteq S_0. c ( m ) ∈ { 0 , … , t m } ∀ m ∈ M , 0 ≤ q ≤ D + 1 , W ⊆ S 0 .
The state components have the following intended meanings for a solution vertex set X ⊆ V ( H ) X \subseteq V(H) X ⊆ V ( H ) :
A = R 3 ( X ∩ L i ) , A = R_3(X \cap L_i), A = R 3 ( X ∩ L i ) ,
B = L 3 ( X ∩ L i ) , B = L_3(X \cap L_i), B = L 3 ( X ∩ L i ) ,
c ( m ) = ∣ N G ( m ) ∩ X ∩ L i ∣ ∀ m ∈ M , c(m) = |N_G(m) \cap X \cap L_i| \qquad\forall m \in M, c ( m ) = ∣ N G ( m ) ∩ X ∩ L i ∣ ∀ m ∈ M ,
q = ∣ M ∣ + ∣ X ∩ L i ∣ , q = |M| + |X \cap L_i|, q = ∣ M ∣ + ∣ X ∩ L i ∣ ,
W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i ) ) = ρ s } . W = \{s \in S_0 : d(s,M \cup(X \cap L_i)) = \rho_s\}. W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i )) = ρ s } .
Thus, A A A records the three rightmost selected vertices already processed, while B B B records the three leftmost selected vertices that are promised for the unprocessed part. The counter c ( m ) c(m) c ( m ) records how many selected neighbors of m m m have been seen so far, q q q records the number of selected vertices counted so far including M M M , and W W W records the vertices of S 0 S_0 S 0 whose required distance ρ s \rho_s ρ s already has a witness among M M M and the processed vertices.
A table entry is retained whenever it can be obtained by the transitions below. The correctness of these intended meanings, including the promised information in B B B , is proved for states occurring in an accepting computation.
Initialization.
At i = 0 i = 0 i = 0 , no vertices of H H H have been processed. Thus set A = ∅ A = \varnothing A = ∅ , c = 0 c = 0 c = 0 , q = ∣ M ∣ q = |M| q = ∣ M ∣ , and let W = { s ∈ S 0 : d ( s , M ) = ρ s } W = \{s \in S_0 : d(s,M) = \rho_s\} W = { s ∈ S 0 : d ( s , M ) = ρ s } . We enumerate every set B ⊆ V ( H ) B \subseteq V(H) B ⊆ V ( H ) with ∣ B ∣ ≤ 3 |B| \leq3 ∣ B ∣ ≤ 3 and retain the corresponding initial states ( ∅ , B , 0 , ∣ M ∣ , W ) (\varnothing,B,0,|M|,W) ( ∅ , B , 0 , ∣ M ∣ , W ) .
Processing a vertex.
Consider a state that is retained at layer i < N i < N i < N , and let v = h i + 1 v = h_{i+1} v = h i + 1 . Choose ε ∈ { 0 , 1 } \varepsilon\in\{0,1\} ε ∈ { 0 , 1 } , where ε = 1 \varepsilon= 1 ε = 1 means that v v v is selected. Let
Z = { { v } , ε = 1 , ∅ , ε = 0. Z =
\begin{cases}
\{v\}, & \varepsilon= 1,\\
\varnothing, & \varepsilon= 0.
\end{cases} Z = { { v } , ∅ , ε = 1 , ε = 0.
If v ∈ { a , b } v \in\{a,b\} v ∈ { a , b } , we force ε = 1 \varepsilon= 1 ε = 1 . If v v v is selected, we also require v ∈ E ρ v \in E_\rho v ∈ E ρ .
We next enumerate a new future promise B ′ ⊆ L ‾ i + 1 B' \subseteq\overline{L}_{i+1} B ′ ⊆ L i + 1 , ∣ B ′ ∣ ≤ 3 |B'| \le3 ∣ B ′ ∣ ≤ 3 , and require
B = L 3 ( B ′ ∪ Z ) . (5) B = L_3(B' \cup Z). \tag*{(5)} B = L 3 ( B ′ ∪ Z ) . (5)
The selected vertices in L ‾ i \overline{L}_i L i are precisely Z ∪ ( X ∩ L ‾ i + 1 ) Z \cup(X \cap\overline{L}_{i+1}) Z ∪ ( X ∩ L i + 1 ) , where Z = { v } Z = \{v\} Z = { v } if v v v is selected and Z = ∅ Z = \varnothing Z = ∅ otherwise. Since B ′ B' B ′ stores the first three vertices of X ∩ L ‾ i + 1 X \cap\overline{L}_{i+1} X ∩ L i + 1 in the order ≺ L \prec_L ≺ L , equation (5) gives the required value of B B B .
If v v v is selected, we must verify its final degree in G [ M ∪ X ] G[M \cup X] G [ M ∪ X ] . By Corollary 12 with t = 1 t = 1 t = 1 , the last three selected vertices among the processed vertices and the first three promised selected vertices among the unprocessed vertices suffice to determine whether v v v has one, two, or at least three selected neighbors in X X X . Therefore, require
min { 3 , ∣ N G ( v ) ∩ M ∣ + ∣ N H ( v ) ∩ A ∣ + ∣ N H ( v ) ∩ B ′ ∣ } = τ ( v ) . (6) \min\{3, |N_G(v) \cap M| + |N_H(v) \cap A| + |N_H(v) \cap B'|\} = \tau(v). \tag*{(6)} min { 3 , ∣ N G ( v ) ∩ M ∣ + ∣ N H ( v ) ∩ A ∣ + ∣ N H ( v ) ∩ B ′ ∣ } = τ ( v ) . (6)
If v v v is skipped and v ∈ U ρ v \in U_\rho v ∈ U ρ , then v v v cannot be covered through the modulator and must therefore have a selected vertex of X X X within distance R R R in H H H . If R = 0 R = 0 R = 0 , this is impossible, so we reject. For R ≥ 1 R \ge1 R ≥ 1 , Corollary 12 with t = R t = R t = R implies that it suffices to check
∃ w ∈ A ∪ B ′ such that dist H ( v , w ) ≤ R . (7) \exists w \in A \cup B' \quad\text{such that} \quad\operatorname{dist}_H(v,w) \le R. \tag*{(7)} ∃ w ∈ A ∪ B ′ such that dist H ( v , w ) ≤ R . (7)
A selected vertex is covered by itself, while a skipped vertex outside U ρ U_\rho U ρ is already covered through the modulator. After these tests, set A ′ = R 3 ( A ∪ Z ) A' = R_3(A \cup Z) A ′ = R 3 ( A ∪ Z ) .
The remaining state components are updated in the following way: c ′ ( m ) = c ( m ) + ε 1 m v ∈ E ( G ) c'(m) = c(m) + \varepsilon\mathbf{1}_{mv \in E(G)} c ′ ( m ) = c ( m ) + ε 1 m v ∈ E ( G ) for all m ∈ M m \in M m ∈ M , q ′ = q + ε q' = q + \varepsilon q ′ = q + ε , and W ′ = W ∪ { s ∈ S 0 : ε = 1 and d ( s , v ) = ρ s } W' = W \cup\{s \in S_0 : \varepsilon= 1 \text{ and } d(s,v) = \rho_s\} W ′ = W ∪ { s ∈ S 0 : ε = 1 and d ( s , v ) = ρ s } . Reject the transition if c ′ ( m ) > t m c'(m) > t_m c ′ ( m ) > t m for some m ∈ M m \in M m ∈ M or if q ′ > D + 1 q' > D + 1 q ′ > D + 1 . Otherwise retain ( A ′ , B ′ , c ′ , q ′ , W ′ ) (A', B', c', q', W') ( A ′ , B ′ , c ′ , q ′ , W ′ ) at layer i + 1 i + 1 i + 1 .
Acceptance.
After all vertices of H H H have been processed, accept a state exactly when
B = ∅ , q = D + 1 , W = S 0 , c ( m ) = t m ∀ m ∈ M . (8) B = \varnothing, \qquad q = D + 1, \qquad W = S_0, \qquad c(m) = t_m \quad\forall m \in M. \tag*{(8)} B = ∅ , q = D + 1 , W = S 0 , c ( m ) = t m ∀ m ∈ M . (8)
The condition B = ∅ B = \varnothing B = ∅ ensures that no selected vertex remains in the future promise. The equality q = D + 1 q = D + 1 q = D + 1 gives the required number of vertices in the geodesic, while W = S 0 W = S_0 W = S 0 certifies that every s ∈ S 0 s \in S_0 s ∈ S 0 attains its guessed distance ρ s \rho_s ρ s . Finally, c ( m ) = t m c(m) = t_m c ( m ) = t m for every m ∈ M m \in M m ∈ M ensures that all selected vertices of the modulator have their required degree.
Correctness and running time
The following lemma proves the correctness of the algorithm.
Lemma 13. For every candidate from Corollary 9 , the dynamic programming algorithm accept if and only if there is an a a a –b b b geodesic P P P of eccentricity at most R R R such that
V ( P ) ∩ S = M and d ( s , V ( P ) ) = ρ s for every s ∈ S . V(P) \cap S = M \qquad\text{and} \qquad d(s,V(P)) = \rho_s \quad\text{for every } s \in S. V ( P ) ∩ S = M and d ( s , V ( P )) = ρ s for every s ∈ S .
Proof. For completeness, let Y = V ( P ) = M ∪ X Y = V(P) = M \cup X Y = V ( P ) = M ∪ X be such a path. At each layer i i i , take A = R 3 ( X ∩ L i ) , B = L 3 ( X ∩ L i ‾ ) A = R_3(X \cap L_i), B = L_3(X \cap\overline{L_i}) A = R 3 ( X ∩ L i ) , B = L 3 ( X ∩ L i ) , let c c c and q q q have their values according to the definitions above, and let W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i ) ) = ρ s } W = \{s \in S_0 : d(s, M \cup(X \cap L_i)) = \rho_s\} W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i )) = ρ s } .
The set A A A has the required meaning by the definition of the update: after processing v v v , the selected processed vertices are X ∩ L i + 1 = ( X ∩ L i ) ∪ Z X \cap L_{i+1} = (X \cap L_i) \cup Z X ∩ L i + 1 = ( X ∩ L i ) ∪ Z , and hence A ′ = R 3 ( A ∪ Z ) = R 3 ( X ∩ L i + 1 ) A' = R_3(A \cup Z) = R_3(X \cap L_{i+1}) A ′ = R 3 ( A ∪ Z ) = R 3 ( X ∩ L i + 1 ) . Thus the meaning of A A A is preserved.
For B B B , the new promise B ′ B' B ′ is chosen so that B ′ = L 3 ( X ∩ L i + 1 ‾ ) B' = L_3(X \cap\overline{L_{i+1}}) B ′ = L 3 ( X ∩ L i + 1 ) . Since X ∩ L i ‾ = ( X ∩ L i + 1 ‾ ) ∪ Z X \cap\overline{L_i} = (X \cap\overline{L_{i+1}}) \cup Z X ∩ L i = ( X ∩ L i + 1 ) ∪ Z , equation (5) gives B = L 3 ( B ′ ∪ Z ) = L 3 ( X ∩ L i ‾ ) B = L_3(B' \cup Z) = L_3(X \cap\overline{L_i}) B = L 3 ( B ′ ∪ Z ) = L 3 ( X ∩ L i ) . Thus the meaning of B B B is preserved.
All vertices of X X X belong to E ρ E_\rho E ρ : for every s ∈ S s \in S s ∈ S , d ( s , x ) ≥ d ( s , Y ) = ρ s d(s,x) \ge d(s,Y) = \rho_s d ( s , x ) ≥ d ( s , Y ) = ρ s . The degree of every selected vertex is correctly tested by Corollary 12 with t = 1 t = 1 t = 1 . Since the required degree is at most two, retaining three vertices is sufficient to determine whether the degree is one or two. The contribution of vertices of M M M is known exactly. Moreover, the counters c ( m ) c(m) c ( m ) never exceed their final values t m t_m t m . The candidate also satisfies the preliminary checks: ρ s ≤ R \rho_s \le R ρ s ≤ R because ecc G ( P ) ≤ R \operatorname{ecc}_G(P) \le R ecc G ( P ) ≤ R , { a , b } ∩ S ⊆ M \{a,b\} \cap S \subseteq M { a , b } ∩ S ⊆ M , ∣ M ∣ ≤ D + 1 |M| \le D + 1 ∣ M ∣ ≤ D + 1 , and the remaining inequalities follow from Y = V ( P ) Y = V(P) Y = V ( P ) and the fact that P P P is induced.
Consider now a skipped vertex v ∈ U ρ v \in U_\rho v ∈ U ρ . Since ρ \rho ρ is the actual distance profile, Lemma 10 gives dist H ( v , X ) ≤ R \operatorname{dist}_H(v,X) \le R dist H ( v , X ) ≤ R . For R ≥ 1 R \ge1 R ≥ 1 , Corollary 12 with t = R t = R t = R implies that a suitable witness can be found among A ∪ B ′ A \cup B' A ∪ B ′ , so (7) is satisfied. If R = 0 R = 0 R = 0 , a vertex of U ρ U_\rho U ρ cannot be skipped. A selected vertex is covered by itself, while a vertex outside U ρ U_\rho U ρ is already covered through the modulator.
At the end of the dynamic programming algorithm, B = ∅ B = \varnothing B = ∅ because L N ‾ = ∅ \overline{L_N} = \varnothing L N = ∅ . Since ∣ Y ∣ = D + 1 |Y| = D + 1 ∣ Y ∣ = D + 1 , we have q = D + 1 q = D + 1 q = D + 1 . Every s ∈ S 0 s \in S_0 s ∈ S 0 has a selected vertex of Y Y Y at distance exactly ρ s \rho_s ρ s , so W = S 0 W = S_0 W = S 0 , and the selected vertices of M M M have exactly t m t_m t m neighbors in X X X . Hence all conditions in (8) are satisfied, and the algorithm accepts.
For soundness, suppose that the dynamic programming accepts. Follow the stored predecessors and let X X X be the set of selected vertices of H H H . We first establish the intended meanings of the state components.
The meanings of A A A , c c c , and q q q follow by forward induction on the layers. The update rules directly maintain the last three selected processed vertices, the number of selected neighbors seen so far for each m ∈ M m \in M m ∈ M , and the number of selected vertices in M ∪ L i M \cup L_i M ∪ L i .
For W W W , once a vertex s ∈ S 0 s \in S_0 s ∈ S 0 has a witness x x x with d ( s , x ) = ρ s d(s,x) = \rho_s d ( s , x ) = ρ s , that equality remains true after further vertices are selected: every subsequently selected vertex belongs to E ρ E_\rho E ρ and therefore has distance at least ρ s \rho_s ρ s from s s s . Thus the update of W W W maintains exactly W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i ) ) = ρ s } W = \{s \in S_0 : d(s, M \cup(X \cap L_i)) = \rho_s\} W = { s ∈ S 0 : d ( s , M ∪ ( X ∩ L i )) = ρ s } .
It remains to justify the meaning of B B B . At the final layer, B N = ∅ = L 3 ( X ∩ L N ‾ ) B_N = \varnothing= L_3(X \cap\overline{L_N}) B N = ∅ = L 3 ( X ∩ L N ) . Suppose that B i + 1 = L 3 ( X ∩ L i + 1 ‾ ) B_{i+1} = L_3(X \cap\overline{L_{i+1}}) B i + 1 = L 3 ( X ∩ L i + 1 ) . At layer i i i , the unprocessed selected vertices consist of X ∩ L i + 1 ‾ X \cap\overline{L_{i+1}} X ∩ L i + 1 together with v v v if v v v is selected. Therefore, by (5), B i = L 3 ( B i + 1 ∪ Z ) = L 3 ( X ∩ L i ‾ ) B_i = L_3(B_{i+1} \cup Z) = L_3(X \cap\overline{L_i}) B i = L 3 ( B i + 1 ∪ Z ) = L 3 ( X ∩ L i ) . Backward induction proves the claimed meaning of B B B at every layer. Consequently, every degree and coverage test uses actual selected vertices rather than nonexistent future vertices.
Put Y = M ∪ X Y = M \cup X Y = M ∪ X . The endpoint conditions imply a , b ∈ Y a,b \in Y a , b ∈ Y , and the final cardinality gives ∣ Y ∣ = D + 1 |Y| = D + 1 ∣ Y ∣ = D + 1 . The exact meanings of A A A and B B B make the set in (6) precisely the relevant selected vertices before and after v v v . Hence this test certifies the true degree of every selected vertex of X X X . The final counters certify the exact degrees of the vertices in M M M . Together with the endpoint and cardinality conditions we can conclude that G [ Y ] G[Y] G [ Y ] is an a a a –b b b geodesic.
It remains to show that the guessed distance profile ρ \rho ρ is the actual distances. The preliminary inequalities give d ( s , Y ) ≥ ρ s ( s ∈ S ) d(s,Y) \ge\rho_s \quad(s \in S) d ( s , Y ) ≥ ρ s ( s ∈ S ) . For every s ∈ S 0 s \in S_0 s ∈ S 0 , the condition W = S 0 W = S_0 W = S 0 gives a vertex of Y Y Y at distance exactly ρ s \rho_s ρ s from s s s . For every m ∈ M m \in M m ∈ M , we have ρ m = 0 \rho_m = 0 ρ m = 0 ... and m ∈ Y m \in Y m ∈ Y itself. Thus d ( s , Y ) = ρ s d(s,Y)=\rho_s d ( s , Y ) = ρ s for all s ∈ S s \in S s ∈ S .
Finally, consider any vertex v ∈ V ( H ) v \in V(H) v ∈ V ( H ) . If v ∉ U ρ v \notin U_\rho v ∈ / U ρ , then there is some s ∈ S s \in S s ∈ S with d ( v , s ) + ρ s ≤ R d(v,s)+\rho_s \le R d ( v , s ) + ρ s ≤ R , and the exactness of ρ \rho ρ together with Lemma 10 shows that v v v is within distance R R R of Y Y Y . If v ∈ U ρ v \in U_\rho v ∈ U ρ , then either v v v is selected, or (7) provides a selected vertex of X X X within distance R R R of v v v . Thus every vertex of H H H is within distance R R R of Y Y Y . Every vertex of S S S is also within distance R R R of Y Y Y because ρ s ≤ R \rho_s \le R ρ s ≤ R . Therefore ecc G ( Y ) ≤ R \operatorname{ecc}_G(Y) \le R ecc G ( Y ) ≤ R . Hence Y Y Y is an a a a –b b b geodesic of eccentricity at most R R R . ◀
We now give the running time of the algorithm. For a fixed candidate ( M , ρ ) (M,\rho) ( M , ρ ) with m = ∣ M ∣ m=|M| m = ∣ M ∣ , each of the summaries A A A and B B B has O ( n 3 ) O(n^3) O ( n 3 ) possible values, since it contains at most three vertices. For each m ∈ M m \in M m ∈ M , the counter c ( m ) c(m) c ( m ) has at most three possible values, giving at most 3 m 3^m 3 m counter vectors. There are O ( n ) O(n) O ( n ) possible values of q q q , and there are 2 k − m 2^{k-m} 2 k − m possible witness sets W ⊆ S 0 W \subseteq S_0 W ⊆ S 0 . Hence each layer contains at most 3 m 2 k − m n O ( 1 ) 3^m2^{k-m}n^{O(1)} 3 m 2 k − m n O ( 1 ) states. From each state, there are two choices for whether the current vertex is selected and O ( n 3 ) O(n^3) O ( n 3 ) choices for the new promise B ′ B' B ′ . All tests and updates take polynomial time. Since there are N ≤ n N \le n N ≤ n layers, the total time for the sweep for one fixed candidate is 3 m 2 k − m n O ( 1 ) 3^m2^{k-m}n^{O(1)} 3 m 2 k − m n O ( 1 ) .
For a prescribed zero set M M M of size m m m , Corollary 9 gives at most 5 k − m 5^{k-m} 5 k − m candidates. Therefore, summing over all choices of M M M gives
∑ M ⊆ S 0 5 k − ∣ M ∣ 3 ∣ M ∣ 2 k − ∣ M ∣ = ∑ m = 0 k ( k m ) 3 m 10 k − m = 13 k . (9) \sum_{M\subseteq S_0}5^{k-|M|}3^{|M|}2^{k-|M|}
=\sum_{m=0}^{k}\binom{k}{m}3^m10^{k-m}
=13^k. \tag*{(9)} M ⊆ S 0 ∑ 5 k − ∣ M ∣ 3 ∣ M ∣ 2 k − ∣ M ∣ = m = 0 ∑ k ( m k ) 3 m 1 0 k − m = 1 3 k . (9)
The n 2 n^2 n 2 choices of the endpoint pair ( a , b ) (a,b) ( a , b ) and all polynomial-time preprocessing are absorbed into the n O ( 1 ) n^{O(1)} n O ( 1 ) factor. Since the running time for finding the interval vertex deletion set S S S is 10 k n O ( 1 ) 10^k n^{O(1)} 1 0 k n O ( 1 ) , we can conclude that the algorithm runs in 13 k n O ( 1 ) 13^k n^{O(1)} 1 3 k n O ( 1 ) time.
Bandwidth
Recall that bw ( G ) \operatorname{bw}(G) bw ( G ) is the minimum, over all vertex orderings, of the maximum distance between the positions of adjacent vertices. We use the bandwidth, treewidth, and path-decomposition conventions from Subsection 2.1.
Theorem 14. ESP can be solved in 2 O ( b 2 log ( b + 1 ) ) n O ( 1 ) 2^{O(b^2\log(b+1))}n^{O(1)} 2 O ( b 2 l o g ( b + 1 )) n O ( 1 ) time, where b = bw ( G ) b=\operatorname{bw}(G) b = bw ( G ) . The algorithm returns a witnessing path and does not require a bandwidth ordering. The optimization version has the same running-time bound.
The known algorithm parameterized by treewidth and R R R [40 ] does not suffice here, since the optimum eccentricity can be unbounded even on cycles. We instead bound the number of attainable distance values. Throughout, put
L = 1 + ⌊ log 2 n ⌋ , M 0 = 1 , M b = ( 40 b L ) b ( b ≥ 1 ) . L=1+\lfloor\log_2 n\rfloor,\qquad M_0=1,\qquad M_b=(40bL)^b\quad(b\ge1). L = 1 + ⌊ log 2 n ⌋ , M 0 = 1 , M b = ( 40 b L ) b ( b ≥ 1 ) .
Separated vertices in a rooted tree
Let T T T be a tree rooted at a vertex r r r . The depth of a vertex x ∈ V ( T ) x \in V(T) x ∈ V ( T ) is h T ( x ) = d T ( r , x ) h_T(x)=d_T(r,x) h T ( x ) = d T ( r , x ) , the number of edges on the unique r r r –x x x path in T T T . In particular, h T ( r ) = 0 h_T(r)=0 h T ( r ) = 0 . Call A ⊆ V ( T ) A \subseteq V(T) A ⊆ V ( T ) separated if
d T ( x , y ) ≥ 2 ∣ h T ( x ) − h T ( y ) ∣ ( x , y ∈ A ) . (10) d_T(x,y)\ge2\lvert h_T(x)-h_T(y)\rvert\qquad(x,y\in A). \tag*{(10)} d T ( x , y ) ≥ 2 ∣ h T ( x ) − h T ( y )∣ ( x , y ∈ A ) . (10)
The following argument adapts the spine-removal and dyadic-grouping arguments of Eppstein, Goodrich, and Liu [29 Lemmas 12 and 13] .
Lemma 15. If a rooted tree T T T has at most n n n vertices and bandwidth at most b b b , then every separated set has size at most M b M_b M b .
Proof. Let A ⊆ V ( T ) A \subseteq V(T) A ⊆ V ( T ) be an arbitrary separated set. We prove that ∣ A ∣ ≤ M b |A| \le M_b ∣ A ∣ ≤ M b by induction on b b b . If b = 0 b = 0 b = 0 , then T T T has exactly one vertex, so ∣ A ∣ ≤ 1 = M 0 |A| \le1 = M_0 ∣ A ∣ ≤ 1 = M 0 . Assume now that b ≥ 1 b \ge1 b ≥ 1 . If A = ∅ A = \varnothing A = ∅ , the claim is immediate, so assume that A ≠ ∅ A \ne\varnothing A = ∅ .
No member of A A A is a proper ancestor of another, since their distance would equal their positive depth difference, contradicting (10) . Prune T T T to the union of the paths from its root to vertices of A A A , retaining the root and the notation T T T . This preserves the depths and pairwise distances of vertices of A A A , does not increase bandwidth, and makes A A A exactly the set of vertices with no children.
Fix an ordering π \pi π of bandwidth at most b b b . Choose a − , a + ∈ A a_-,a_+ \in A a − , a + ∈ A whose root paths contain its first and last vertices, respectively; such choices exist by the pruning. Let S S S be the union of these paths. Then S S S is connected, contains both ordering extremes, and contains at most two members of A A A .
Deleting S S S from the ordering and closing the gaps reduces bandwidth to at most b − 1 b-1 b − 1 . Indeed, every edge x y xy x y outside S S S whose span is b b b has a vertex of S S S strictly between its endpoints: otherwise the path in S S S between the ordering extremes would cross this gap using an edge of span greater than b b b . Deleting that intervening vertex reduces the span of x y xy x y ; edges of smaller span already satisfy the bound.
Each component K K K of T − S T-S T − S is joined to S S S by exactly one edge: at least one exists because T T T is connected, and two would create a cycle since both K K K and S S S are connected. Let u ∈ S u \in S u ∈ S be the endpoint of this edge. Different components may have the same attachment vertex u u u . Assign K K K to one of the two root paths containing u u u , with terminal vertex a ∈ { a − , a + } a \in\{a_-,a_+\} a ∈ { a − , a + } . Choose x ∈ A ∩ V ( K ) x \in A \cap V(K) x ∈ A ∩ V ( K ) , which exists by the pruning. The lowest common ancestor of a , x a,x a , x is u u u , so (10) gives
d T ( u , a ) + d T ( u , x ) ≥ 2 ∣ d T ( u , a ) − d T ( u , x ) ∣ , d T ( u , a ) ≤ 3 d T ( u , x ) ≤ 3 ∣ V ( K ) ∣ . d_T(u,a) + d_T(u,x) \ge2|d_T(u,a) - d_T(u,x)|,\qquad d_T(u,a) \le3d_T(u,x) \le3|V(K)|. d T ( u , a ) + d T ( u , x ) ≥ 2∣ d T ( u , a ) − d T ( u , x ) ∣ , d T ( u , a ) ≤ 3 d T ( u , x ) ≤ 3∣ V ( K ) ∣. Consequently, d T ( a , y ) ≤ 4 ∣ V ( K ) ∣ d_T(a,y) \le4|V(K)| d T ( a , y ) ≤ 4∣ V ( K ) ∣ for every y ∈ V ( K ) y \in V(K) y ∈ V ( K ) .
For each terminal a a a , group its assigned components by 2 j ≤ ∣ V ( K ) ∣ < 2 j + 1 2^j \le|V(K)| < 2^{j+1} 2 j ≤ ∣ V ( K ) ∣ < 2 j + 1 , for j = 0 , … , ⌊ log 2 n ⌋ j = 0,\ldots,\lfloor\log_2 n \rfloor j = 0 , … , ⌊ log 2 n ⌋ . Set ℓ = 2 j \ell= 2^j ℓ = 2 j in one such group. Every vertex of these components is within distance 8 ℓ 8\ell 8 ℓ of a a a , so its position differs from π ( a ) \pi(a) π ( a ) by at most 8 b ℓ 8b\ell 8 b ℓ . Their union therefore has at most 16 b ℓ + 1 ≤ 17 b ℓ 16b\ell+1 \le17b\ell 16 b ℓ + 1 ≤ 17 b ℓ vertices. Since each component has at least ℓ \ell ℓ vertices, there are at most 17 b 17b 17 b components in the group. There are at most L L L groups for each terminal, giving at most 34 b L 34bL 34 b L components in total.
Root each component at its vertex adjacent to S S S . Its vertices of A A A remain separated, since their distances and depth differences are unchanged. Each component has bandwidth at most b − 1 b-1 b − 1 , so induction gives
∣ A ∣ ≤ 2 + 34 b L M b − 1 ≤ 2 + 34 b L ( 40 b L ) b − 1 ≤ ( 40 b L ) b = M b . |A| \le2 + 34bL M_{b-1} \le2 + 34bL(40bL)^{b-1} \le(40bL)^b = M_b. ∣ A ∣ ≤ 2 + 34 b L M b − 1 ≤ 2 + 34 b L ( 40 b L ) b − 1 ≤ ( 40 b L ) b = M b .
Bounding the distance spectra
Fix distinct vertices s , t s,t s , t , put D = d ( s , t ) D=d(s,t) D = d ( s , t ) and a ( x ) = d ( s , x ) a(x)=d(s,x) a ( x ) = d ( s , x ) , and let
I = { x : d ( s , x ) + d ( x , t ) = D } . I=\{x:d(s,x)+d(x,t)=D\}. I = { x : d ( s , x ) + d ( x , t ) = D } .
On vertex set I I I , form the directed graph H H H with an arc x → y x\to y x → y whenever x y ∈ E ( G ) xy \in E(G) x y ∈ E ( G ) and a ( y ) = a ( x ) + 1 a(y)=a(x)+1 a ( y ) = a ( x ) + 1 . Its directed s s s -t t t paths are exactly the shortest s s s -t t t paths of G G G . For each vertex v v v , define its distance spectrum
D s , t ( v ) = { d ( v , V ( P ) ) : P is a shortest s – t path } . \mathcal{D}_{s,t}(v)=\{d(v,V(P)):P\text{ is a shortest }s\text{--}t\text{ path}\}. D s , t ( v ) = { d ( v , V ( P )) : P is a shortest s – t path } .
Lemma 16. Once graph distances are available, D s , t ( v ) \mathcal{D}_{s,t}(v) D s , t ( v ) can be computed in O ( n + m ) O(n+m) O ( n + m ) time. If bw ( G ) ≤ b \operatorname{bw}(G)\le b bw ( G ) ≤ b , then ∣ D s , t ( v ) ∣ ≤ M b 3 |\mathcal{D}_{s,t}(v)|\le M_b^3 ∣ D s , t ( v ) ∣ ≤ M b 3 .
Proof. Put w ( x ) = d ( v , x ) w(x)=d(v,x) w ( x ) = d ( v , x ) . For x ∈ I x\in I x ∈ I , let A ( x ) A(x) A ( x ) be the maximum possible minimum w w w -value on a directed s s s –x x x path in H H H ; define B ( x ) B(x) B ( x ) analogously for directed x x x –t t t paths. These values are computed in forward and reverse layer order by
A ( s ) = w ( s ) , A ( x ) = min { w ( x ) , max y → x A ( y ) } ( x ≠ s ) , A(s)=w(s),\qquad A(x)=\min\{w(x),\max_{y\to x}A(y)\}\quad(x\ne s), A ( s ) = w ( s ) , A ( x ) = min { w ( x ) , y → x max A ( y )} ( x = s ) ,
B ( t ) = w ( t ) , B ( x ) = min { w ( x ) , max x → y B ( y ) } ( x ≠ t ) . B(t)=w(t),\qquad B(x)=\min\{w(x),\max_{x\to y}B(y)\}\quad(x\ne t). B ( t ) = w ( t ) , B ( x ) = min { w ( x ) , x → y max B ( y )} ( x = t ) .
We have
D s , t ( v ) = { w ( x ) : x ∈ I , A ( x ) = B ( x ) = w ( x ) } . (11) \mathcal{D}_{s,t}(v)=\{w(x):x\in I,\ A(x)=B(x)=w(x)\}. \tag*{(11)} D s , t ( v ) = { w ( x ) : x ∈ I , A ( x ) = B ( x ) = w ( x )} . (11)
Indeed, a minimum-weight vertex x x x of a shortest path satisfies these equalities. Conversely, witnessing prefix and suffix paths concatenate to a path with minimum weight w ( x ) w(x) w ( x ) : their strictly increasing layers ensure that they meet only at x x x . This proves the computation claim.
List the spectrum as r 1 < ⋯ < r q r_1<\cdots<r_q r 1 < ⋯ < r q and, using (11), choose x i x_i x i with w ( x i ) = A ( x i ) = B ( x i ) = r i w(x_i)=A(x_i)=B(x_i)=r_i w ( x i ) = A ( x i ) = B ( x i ) = r i . Write a i = a ( x i ) a_i=a(x_i) a i = a ( x i ) . For each x ∈ I ∖ { s } x\in I\setminus\{s\} x ∈ I ∖ { s } , choose a predecessor attaining the maximum in the recurrence for A A A . The chosen edges form a tree T s T_s T s rooted at s s s , with depths a ( x ) a(x) a ( x ) , whose root-to-x x x path attains A ( x ) A(x) A ( x ) . The analogous successor choices give a tree T t T_t T t rooted at t t t , with depths D − a ( x ) D-a(x) D − a ( x ) , whose root-to-x x x path attains B ( x ) B(x) B ( x ) . Finally, let T v T_v T v be a breadth-first-search tree of G G G rooted at v v v . All three trees have bandwidth at most b b b , being subgraphs of G G G .
For i < j i<j i < j , put Δ r = r j − r i > 0 \Delta r=r_j-r_i>0 Δ r = r j − r i > 0 and Δ a = a j − a i \Delta a=a_j-a_i Δ a = a j − a i . If z z z is the lowest common ancestor of x i , x j x_i,x_j x i , x j in T s T_s T s , then w ( z ) ≥ r j w(z)\ge r_j w ( z ) ≥ r j . Since distances from v v v change by at most one along an edge, d T s ( z , x i ) ≥ Δ r d_{T_s}(z,x_i)\ge\Delta r d T s ( z , x i ) ≥ Δ r . Using the depths in T s T_s T s , and arguing symmetrically in T t T_t T t , gives
d T s ( x i , x j ) ≥ Δ a + 2 Δ r , d T t ( x i , x j ) ≥ − Δ a + 2 Δ r . (12) d_{T_s}(x_i,x_j)\ge\Delta a+2\Delta r,\qquad d_{T_t}(x_i,x_j)\ge-\Delta a+2\Delta r. \tag*{(12)} d T s ( x i , x j ) ≥ Δ a + 2Δ r , d T t ( x i , x j ) ≥ − Δ a + 2Δ r . (12)
Also, the depth of x i x_i x i in T v T_v T v is r i r_i r i , and
d T v ( x i , x j ) ≥ d ( x i , x j ) ≥ ∣ Δ a ∣ . (13) d_{T_v}(x_i,x_j)\ge d(x_i,x_j)\ge|\Delta a|. \tag*{(13)} d T v ( x i , x j ) ≥ d ( x i , x j ) ≥ ∣Δ a ∣. (13)
Call indices i 1 < ⋯ < i k i_1<\cdots<i_k i 1 < ⋯ < i k an increasing chain if each consecutive pair satisfies 0 ≤ Δ a ≤ 2 Δ r 0\le\Delta a\le2\Delta r 0 ≤ Δ a ≤ 2Δ r , and a decreasing chain if each satisfies − 2 Δ r ≤ Δ a ≤ 0 -2\Delta r\le\Delta a\le0 − 2Δ r ≤ Δ a ≤ 0 . Summation extends these inequalities to every pair in the chain. By (12), increasing chains give separated sets in T s T_s T s , and decreasing chains give separated sets in T t T_t T t . Thus each has length at most M b M_b M b by Lemma 15.
Let p i + p_i^+ p i + and p i − p_i^- p i − be the maximum lengths of increasing and decreasing chains ending at i i i . Both lie in { 1 , … , M b } \{1,\ldots,M_b\} { 1 , … , M b } . If i < j i<j i < j and ∣ a j − a i ∣ ≤ 2 ( r j − r i ) |a_j-a_i|\le2(r_j-r_i) ∣ a j − a i ∣ ≤ 2 ( r j − r i ) , appending j j j to a suitable chain ending at i i i increases at least one rank. Hence equal rank pairs imply
( p i + , p i − ) = ( p j + , p j − ) ⟹ ∣ a j − a i ∣ > 2 ( r j − r i ) . (p_i^+,p_i^-)=(p_j^+,p_j^-)\quad\Longrightarrow\quad|a_j-a_i|>2(r_j-r_i). ( p i + , p i − ) = ( p j + , p j − ) ⟹ ∣ a j − a i ∣ > 2 ( r j − r i ) .
By (13), each class with the same rank pair is separated in T v T_v T v , so it contains at most M b M_b M b representatives. There are at most M b 2 M_b^2 M b 2 classes, proving q ≤ M b 3 q\le M_b^3 q ≤ M b 3 .
The algorithm
First test all single-vertex paths. For each pair of distinct endpoints s , t s,t s , t , construct H H H and the spectra above, and allow the labels
Λ ( v ) = D s , t ( v ) ∩ { 0 , … , R } . \Lambda(v)=\mathcal{D}_{s,t}(v)\cap\{0,\ldots,R\}. Λ ( v ) = D s , t ( v ) ∩ { 0 , … , R } .
If any domain is empty, reject this pair. Otherwise put q = max v ∣ Λ ( v ) ∣ q=\max_v|\Lambda(v)| q = max v ∣Λ ( v ) ∣ .
Lemma 17. A shortest s s s –t t t path of eccentricity at most R R R exists if and only if there are labels λ ( v ) ∈ Λ ( v ) \lambda(v)\in\Lambda(v) λ ( v ) ∈ Λ ( v ) such that, writing Z = { v : λ ( v ) = 0 } Z=\{v:\lambda(v)=0\} Z = { v : λ ( v ) = 0 } ,
s , t ∈ Z s,t\in Z s , t ∈ Z and ∣ Z ∣ ≤ D + 1 |Z|\le D+1 ∣ Z ∣ ≤ D + 1 ;
every vertex of Z ∖ { s } Z\setminus\{s\} Z ∖ { s } has a predecessor in Z Z Z in H H H ;
every vertex v ∈ V ( G ) ∖ Z v\in V(G)\setminus Z v ∈ V ( G ) ∖ Z has a neighbor u u u in G G G such that λ ( u ) = λ ( v ) − 1 \lambda(u)=\lambda(v)-1 λ ( u ) = λ ( v ) − 1 .
Proof. For a witnessing path P P P , take λ ( v ) = d ( v , V ( P ) ) \lambda(v)=d(v,V(P)) λ ( v ) = d ( v , V ( P )) . Then Z = V ( P ) Z=V(P) Z = V ( P ) , and all three conditions hold.
Conversely, follow zero-labeled predecessors from t t t . Each step decreases the distance from s s s by one, yielding a directed s s s –t t t path P P P in H H H with D + 1 D+1 D + 1 vertices. Since V ( P ) ⊆ Z V(P)\subseteq Z V ( P ) ⊆ Z and ∣ Z ∣ ≤ D + 1 |Z|\le D+1 ∣ Z ∣ ≤ D + 1 , we have Z = V ( P ) Z=V(P) Z = V ( P ) . From any positive label, repeatedly following a neighbor of label one smaller reaches Z Z Z after exactly the starting label many steps. Thus P P P is shortest and has eccentricity at most R R R .
Lemma 18. Given a tree decomposition of width w w w , the certificate in Lemma 17 can be found, or its existence ruled out, in 2 O ( w ) q O ( w + 1 ) n O ( 1 ) 2^{O(w)}q^{O(w+1)}n^{O(1)} 2 O ( w ) q O ( w + 1 ) n O ( 1 ) time.
Proof. Use a rooted nice tree decomposition of width w w w with empty root and leaves, processed bottom up. At node x x x , let B x B_x B x be its bag, U x U_x U x the union of bags in its subtree, and F x = U x ∖ B x F_x=U_x\setminus B_x F x = U x ∖ B x . All labels belong to their domains, and s , t s,t s , t receive label zero whenever present. For a labeling λ \lambda λ , a support for v ≠ s v\ne s v = s is a zero-labeled predecessor in H H H when λ ( v ) = 0 \lambda(v)=0 λ ( v ) = 0 , and a neighbor in G G G of label λ ( v ) − 1 \lambda(v)-1 λ ( v ) − 1 otherwise.
A state at x x x consists of a label ℓ ( v ) ∈ Λ ( v ) \ell(v)\in\Lambda(v) ℓ ( v ) ∈ Λ ( v ) for each v ∈ B x v\in B_x v ∈ B x and a Boolean flag σ ( v ) \sigma(v) σ ( v ) for each v ∈ B x ∖ { s } v\in B_x\setminus\{s\} v ∈ B x ∖ { s } . A labeling λ \lambda λ of U x U_x U x realizes the state if it obeys the label restrictions, agrees with ℓ \ell ℓ on B x B_x B x , and, for every v ∈ B x ∖ { s } v\in B_x\setminus\{s\} v ∈ B x ∖ { s } , σ ( v ) = 1 \sigma(v)=1 σ ( v ) = 1 exactly when v v v has a support in F x F_x F x under λ \lambda λ . A false flag therefore allows a support in the current bag or outside U x U_x U x . The state’s value is
min λ ∣ { u ∈ F x : λ ( u ) = 0 } ∣ , \min_{\lambda}\left|\{u\in F_x:\lambda(u)=0\}\right|, λ min ∣ { u ∈ F x : λ ( u ) = 0 } ∣ , over all realizing labelings for which every vertex of F x ∖ { s } F_x\setminus\{s\} F x ∖ { s } has a support in U x U_x U x . Thus forgotten vertices other than s s s must already have support, while requirements for bag vertices may be deferred. Bag vertices do not contribute to the value until they are forgotten. If no such labeling exists, the value is + ∞ +\infty + ∞ .
The empty-leaf state has value zero. At every node, retain the minimum value over transitions producing the same state.
At an introduce node x x x with child y y y , let B x = B y ∪ { v } B_x=B_y\cup\{v\} B x = B y ∪ { v } . Extend each child state by an allowed label for v v v , preserving its other labels, flags, and value. If v ≠ s v\ne s v = s , initialize its flag to false. This is correct because F x = F y F_x=F_y F x = F y and v v v has no neighbor in F y F_y F y , by the decomposition axioms.
At a forget node x x x with child y y y , let B x = B y ∖ { v } B_x=B_y\setminus\{v\} B x = B y ∖ { v } . Here U x = U y U_x=U_y U x = U y and F x = F y ∪ { v } F_x=F_y\cup\{v\} F x = F y ∪ { v } , so v v v is the only newly forgotten vertex. Consider a child state ( ℓ , σ ) (\ell,\sigma) ( ℓ , σ ) with finite value c c c . If v ≠ s v\ne s v = s , its support requirement must now be satisfied: σ ( v ) = 1 \sigma(v)=1 σ ( v ) = 1 certifies a support in F y F_y F y ; if σ ( v ) = 0 \sigma(v)=0 σ ( v ) = 0 ,
we require a support in B x B_x B x under ℓ \ell ℓ . If neither exists, discard the transition. These checks are exhaustive: since v v v occurs in no bag outside the subtree rooted at y y y , every neighbor of v v v lies in F y ∪ B x F_y \cup B_x F y ∪ B x . For each remaining vertex u ∈ B x ∖ { s } u \in B_x \setminus\{s\} u ∈ B x ∖ { s } , set its new flag to true exactly when σ ( u ) = 1 \sigma(u) = 1 σ ( u ) = 1 or v v v supports u u u under ℓ \ell ℓ . The first possibility accounts for supports in F y F_y F y , and the second accounts for the newly forgotten vertex v v v ; together they record precisely whether u u u has support in F x F_x F x . The parent labels are ℓ ∣ B x \ell|_{B_x} ℓ ∣ B x , and the candidate value is c + 1 c + 1 c + 1 if ℓ ( v ) = 0 \ell(v) = 0 ℓ ( v ) = 0 , and c c c otherwise, because only v v v is newly counted. When v = s v = s v = s , omit its support check, but still update the remaining flags and add one for its zero label.
At a join node x x x with children y y y , z z z , combine child states with identical bag labels, OR corresponding flags, and add their values. The sets F y , F z F_y, F_z F y , F z are disjoint, have no edges between them, and their union is F x F_x F x . Hence their realizing labelings combine consistently, and their zero counts add without duplication.
The decomposition axioms also ensure that vertices of F x F_x F x have no neighbors outside U x U_x U x . Consequently, these transitions preserve valid realizations, and every valid realization restricts to child states included in the transitions. Induction therefore proves that the stored minima are exact.
At the empty root, the value is the minimum ∣ Z ∣ |Z| ∣ Z ∣ under the local conditions of Lemma 17 ; accept if it is at most D + 1 D + 1 D + 1 . There are at most ( 2 q ) w + 1 (2q)^{w+1} ( 2 q ) w + 1 states per bag. Pairwise enumeration at joins gives the claimed running time. Backpointers recover the labels and hence a witnessing path.
Proof of Theorem 14 . The case n = 1 n = 1 n = 1 is immediate, as is R ≥ n − 1 R \ge n - 1 R ≥ n − 1 , so assume b ≥ 1 b \ge1 b ≥ 1 and R < n − 1 R < n - 1 R < n − 1 . Precompute all graph distances. Lemma 16 computes all spectra over all endpoint pairs in O ( n 3 ( n + m ) ) O(n^3(n + m)) O ( n 3 ( n + m )) time.
A bandwidth-b b b ordering gives a path decomposition of width at most b b b using consecutive windows of b + 1 b + 1 b + 1 vertices, so tw ( G ) ≤ b \operatorname{tw}(G) \le b tw ( G ) ≤ b . To obtain a decomposition without the ordering, use Korhonen’s algorithm [39 ] : on input G , k G, k G , k , it takes 2 O ( k ) n 2^{O(k)}n 2 O ( k ) n time and either returns a decomposition of width at most 2 k + 1 2k + 1 2 k + 1 or certifies tw ( G ) > k \operatorname{tw}(G) > k tw ( G ) > k . Trying k = 1 , 2 , … k = 1, 2, \ldots k = 1 , 2 , … until a decomposition is returned therefore gives width at most 2 b + 1 2b + 1 2 b + 1 in 2 O ( b ) n 2^{O(b)}n 2 O ( b ) n time.
For each pair of endpoints, Lemma 16 gives q ≤ M b 3 q \le M_b^3 q ≤ M b 3 . The computed decomposition has width w ≤ 2 b + 1 w \le2b + 1 w ≤ 2 b + 1 , so w + 1 = O ( b ) w + 1 = O(b) w + 1 = O ( b ) , since b ≥ 1 b \ge1 b ≥ 1 . Lemma 18 therefore gives running time 2 O ( b ) ( M b 3 ) O ( b ) n O ( 1 ) 2^{O(b)}(M_b^3)^{O(b)}n^{O(1)} 2 O ( b ) ( M b 3 ) O ( b ) n O ( 1 ) for this pair. The O ( n 2 ) O(n^2) O ( n 2 ) endpoint choices and the polynomial-time distance and spectrum computations are absorbed into the factor n O ( 1 ) n^{O(1)} n O ( 1 ) . Substituting M b = ( 40 b L ) b M_b = (40bL)^b M b = ( 40 b L ) b , the total time is consequently
2 O ( b ) ( M b 3 ) O ( b ) n O ( 1 ) = 2 O ( b ) ( 40 b L ) O ( b 2 ) n O ( 1 ) = 2 O ( b 2 log ( b + 1 ) ) L O ( b 2 ) n O ( 1 ) . \begin{aligned}
2^{O(b)}(M_b^3)^{O(b)}n^{O(1)} = 2^{O(b)}(40bL)^{O(b^2)}n^{O(1)} \\
&= 2^{O(b^2 \log(b+1))}L^{O(b^2)}n^{O(1)}.
\end{aligned} 2 O ( b ) ( M b 3 ) O ( b ) n O ( 1 ) = 2 O ( b ) ( 40 b L ) O ( b 2 ) n O ( 1 ) = 2 O ( b 2 l o g ( b + 1 )) L O ( b 2 ) n O ( 1 ) .
Here the last equality separates the factors involving b b b and L L L , using ( 40 b ) O ( b 2 ) = 2 O ( b 2 log ( b + 1 ) ) (40b)^{O(b^2)} = 2^{O(b^2 \log(b+1))} ( 40 b ) O ( b 2 ) = 2 O ( b 2 l o g ( b + 1 )) .
We next absorb the remaining power of L L L into a factor depending only on b b b and one additional factor of n n n . For an integer K ≥ 1 K \ge1 K ≥ 1 , consider f K ( x ) = ( 1 + x ) K e − x f_K(x) = (1 + x)^K e^{-x} f K ( x ) = ( 1 + x ) K e − x for x ≥ 0 x \ge0 x ≥ 0 . Its derivative is
f K ′ ( x ) = ( 1 + x ) K − 1 e − x ( K − 1 − x ) , f'_K(x) = (1 + x)^{K-1}e^{-x}(K - 1 - x), f K ′ ( x ) = ( 1 + x ) K − 1 e − x ( K − 1 − x ) ,
so its maximum is attained at x = K − 1 x = K - 1 x = K − 1 and equals K K e 1 − K K^K e^{1-K} K K e 1 − K . Substituting x = ln n x = \ln n x = ln n gives
( 1 + ln n ) K n = f K ( ln n ) ≤ K K e 1 − K ≤ e K K . \frac{(1 + \ln n)^K}{n} = f_K(\ln n) \le K^K e^{1-K} \le eK^K. n ( 1 + ln n ) K = f K ( ln n ) ≤ K K e 1 − K ≤ e K K .
Since L = 1 + ⌊ log 2 n ⌋ ≤ 2 ( 1 + ln n ) L = 1 + \lfloor\log_2 n \rfloor\le2(1 + \ln n) L = 1 + ⌊ log 2 n ⌋ ≤ 2 ( 1 + ln n ) , we obtain
L K ≤ 2 K ( 1 + ln n ) K ≤ e ( 2 K ) K n = 2 O ( K log ( K + 1 ) ) n . L^K \le2^K(1+\ln n)^K \le e(2K)^K n = 2^{O(K\log(K+1))}n. L K ≤ 2 K ( 1 + ln n ) K ≤ e ( 2 K ) K n = 2 O ( K l o g ( K + 1 )) n .
Choose an absolute constant C ≥ 1 C \ge1 C ≥ 1 large enough that the exponent hidden in L O ( b 2 ) L^{O(b^2)} L O ( b 2 ) is at most C b 2 Cb^2 C b 2 , and put K = ⌈ C b 2 ⌉ K = \lceil Cb^2\rceil K = ⌈ C b 2 ⌉ . Since L ≥ 1 L \ge1 L ≥ 1 , the remaining factor is bounded by L K L^K L K . Moreover, K log ( K + 1 ) = O ( b 2 log ( b + 1 ) ) K\log(K+1) = O(b^2\log(b+1)) K log ( K + 1 ) = O ( b 2 log ( b + 1 )) , and hence
L O ( b 2 ) ≤ 2 O ( b 2 log ( b + 1 ) ) n . L^{O(b^2)} \le2^{O(b^2\log(b+1))}n. L O ( b 2 ) ≤ 2 O ( b 2 l o g ( b + 1 )) n .
Substituting this estimate into the running time above proves the bound 2 O ( b 2 log ( b + 1 ) ) n O ( 1 ) 2^{O(b^2\log(b+1))}n^{O(1)} 2 O ( b 2 l o g ( b + 1 )) n O ( 1 ) . In particular, the exponent of n n n is independent of b b b .
Backtracking from an accepting dynamic-programming state returns a witnessing path. Feasibility is monotone in R R R , so binary search over R ∈ { 0 , … , n − 1 } R \in\{0,\ldots,n-1\} R ∈ { 0 , … , n − 1 } finds the optimum using O ( log n ) O(\log n) O ( log n ) decision calls. Running the algorithm at the optimum threshold and backtracking then returns an optimal path. These additional calls contribute only a polynomial factor in n n n , so the optimization version has the same running-time bound. ◀
Treedepth
Recall that td ( G ) \operatorname{td}(G) td ( G ) is the minimum height of a rooted forest whose closure contains G G G , with height counted in vertices. The notation cl ( F ) \operatorname{cl}(F) cl ( F ) , tw ( G ) \operatorname{tw}(G) tw ( G ) , and diam ( G ) \operatorname{diam}(G) diam ( G ) is as in Subsection 2.1. We use the following known result directly.
Proposition 19 (Kučera and Suchý [40 ] , Corollary 26). For some computable function A A A , ESP on an n n n -vertex graph G G G with desired eccentricity r r r can be solved in time A ( tw ( G ) , r ) n 3 A(\operatorname{tw}(G),r)n^3 A ( tw ( G ) , r ) n 3 . If a solution exists, a witnessing shortest path can be found within the same bound.
Allowing singleton paths does not affect this bound: their eccentricities can all be computed in O ( n 3 ) O(n^3) O ( n 3 ) time. By enlarging A A A if necessary, we may assume that it is nondecreasing in both arguments.
Lemma 20. If d = td ( G ) d = \operatorname{td}(G) d = td ( G ) , then
tw ( G ) ≤ d − 1 and diam ( G ) ≤ 2 d − 2. \operatorname{tw}(G) \le d - 1 \qquad\text{and}\qquad\operatorname{diam}(G) \le2^d - 2. tw ( G ) ≤ d − 1 and diam ( G ) ≤ 2 d − 2.
Proof. Let F F F be a treedepth decomposition of height d d d . Since G G G is connected, F F F is a rooted tree. Use F F F as the decomposition tree, with each bag B x B_x B x consisting of x x x and its ancestors. Every vertex belongs to its own bag. For every edge of G G G , its endpoints are comparable in the ancestor order and hence belong to the bag indexed by the lower endpoint. The bags containing a fixed vertex v v v are exactly those indexed by v v v and its descendants, so they form a connected subtree. Thus these bags form a tree decomposition, and ∣ B x ∣ ≤ d |B_x| \le d ∣ B x ∣ ≤ d gives tw ( G ) ≤ d − 1 \operatorname{tw}(G) \le d - 1 tw ( G ) ≤ d − 1 .
For the second bound, we prove by induction on h ≥ 1 h \ge1 h ≥ 1 that the closure of any rooted tree of height at most h h h contains no path with more than 2 h − 1 2^h - 1 2 h − 1 vertices. The case h = 1 h = 1 h = 1 is immediate. For h ≥ 2 h \ge2 h ≥ 2 , deleting the root from a path leaves at most two path segments. Each segment lies in a single child subtree, since there are no edges between different child subtrees. By induction, each segment has at most 2 h − 1 − 1 2^{h-1} - 1 2 h − 1 − 1 vertices. The original path therefore has at most
1 + 2 ( 2 h − 1 − 1 ) = 2 h − 1 1 + 2(2^{h-1} - 1) = 2^h - 1 1 + 2 ( 2 h − 1 − 1 ) = 2 h − 1
vertices. This also covers a path avoiding the root, which lies in one child subtree. Every path in G G G is a path in cl ( F ) \operatorname{cl}(F) cl ( F ) , so every shortest path has at most 2 d − 2 2^d - 2 2 d − 2 edges. Hence diam ( G ) ≤ 2 d − 2 \operatorname{diam}(G) \le2^d - 2 diam ( G ) ≤ 2 d − 2 . ◀
Theorem 21. For some computable function F F F , ESP can be solved in time F ( td ( G ) ) n 3 F(\operatorname{td}(G))n^3 F ( td ( G )) n 3 . A shortest path of minimum eccentricity can also be found within such a running time. No treedepth decomposition is required as part of the input.
Proof. Given ( G , r ) (G,r) ( G , r ) , compute Δ : = diam ( G ) \Delta:= \operatorname{diam}(G) Δ := diam ( G ) by breadth-first search from every vertex, in O ( n 3 ) O(n^3) O ( n 3 ) time. If r ≥ Δ r \ge\Delta r ≥ Δ , return any singleton path: it is shortest and has eccentricity at most Δ ≤ r \Delta\le r Δ ≤ r .
Otherwise, let d : = td ( G ) d := \operatorname{td}(G) d := td ( G ) . Lemma 20 gives
tw ( G ) ≤ d − 1 , 0 ≤ r < Δ ≤ 2 d − 2. \operatorname{tw}(G) \le d-1,\qquad0 \le r < \Delta\le2^d-2. tw ( G ) ≤ d − 1 , 0 ≤ r < Δ ≤ 2 d − 2.
Apply Proposition 19. Its running time is at most A ( d − 1 , 2 d − 2 ) n 3 A(d-1,2^d-2)n^3 A ( d − 1 , 2 d − 2 ) n 3 , which has the required form. The algorithm uses neither d d d nor a treedepth decomposition; these are needed only for the running-time analysis.
For optimization, apply the decision algorithm for r = 0 , 1 , … , Δ r=0,1,\ldots,\Delta r = 0 , 1 , … , Δ and return the witness from the first successful call. The first such value is the minimum eccentricity of a shortest path, and a successful call exists because r = Δ r=\Delta r = Δ always suffices. There are at most Δ + 1 ≤ 2 d − 1 \Delta+1 \le2^d-1 Δ + 1 ≤ 2 d − 1 calls, so their total running time is still F ( d ) n 3 F(d)n^3 F ( d ) n 3 for a computable function F F F .
XP algorithms
Diameter
Recall that diam ( G ) \operatorname{diam}(G) diam ( G ) is the maximum distance between two vertices of the connected graph G G G , and r ( G ) r(G) r ( G ) is its optimum ESP eccentricity; see Subsection 2.1.
Lemma 22. Let G G G be connected and let r ( G ) r(G) r ( G ) be the optimum ESP eccentricity. Then r ( G ) ≤ diam ( G ) r(G) \le\operatorname{diam}(G) r ( G ) ≤ diam ( G ) .
Proof. Choose an arbitrary vertex v ∈ V ( G ) v \in V(G) v ∈ V ( G ) . By definition,
ecc G ( { v } ) = max x ∈ V ( G ) dist G ( v , x ) . \operatorname{ecc}_G(\{v\})=\max_{x\in V(G)}\operatorname{dist}_G(v,x). ecc G ({ v }) = x ∈ V ( G ) max dist G ( v , x ) .
Every pairwise distance in G G G , including dist G ( v , x ) \operatorname{dist}_G(v,x) dist G ( v , x ) , is at most diam ( G ) \operatorname{diam}(G) diam ( G ) . Taking the maximum over x x x gives ecc G ( { v } ) ≤ diam ( G ) \operatorname{ecc}_G(\{v\}) \le\operatorname{diam}(G) ecc G ({ v }) ≤ diam ( G ) . The one-vertex path P = ( v ) P=(v) P = ( v ) is a shortest path of length zero. By optimality of r ( G ) r(G) r ( G ) , we have r ( G ) ≤ ecc G ( P ) = ecc G ( { v } ) ≤ diam ( G ) r(G) \le\operatorname{ecc}_G(P)=\operatorname{ecc}_G(\{v\}) \le\operatorname{diam}(G) r ( G ) ≤ ecc G ( P ) = ecc G ({ v }) ≤ diam ( G ) .
Proposition 23 (Corollary 12, [28 ] ). If the optimum eccentricity of a shortest path in G G G is r r r , then the optimization version of ESP can be solved in O ( n 2 r + 2 m ) O(n^{2r+2}m) O ( n 2 r + 2 m ) time, even if r r r is not known in advance.
We can now state the main result.
Theorem 24. ESP is in XP when parameterized by the maximum diameter d d d of a connected component.
Proof. By Proposition 23 ESP is in XP parameterized by r ( G ) r(G) r ( G ) and by Lemma 22 r ( G ) ≤ diam ( G ) r(G) \le\operatorname{diam}(G) r ( G ) ≤ diam ( G ) , hence ESP is in XP parameterized by diameter.
Distance to chordal graphs
Recall that the distance to chordal graphs is the minimum size of a set S S S such that G − S G-S G − S is chordal; see Subsection 2.1.
The ESP problem is polynomial-time solvable on chordal graphs [27 ] . On the other hand, Bhyravarapu et al. showed that the problem is W [ 2 ] W[2] W [ 2 ] -hard when parameterized by deletion distance to chordal graphs [4 ] . We complement this hardness result by showing that ESP is in XP parameterized by the distance to chordal graphs.
Clique bags and distance profiles
We have a graph G G G with ∣ V ( G ) ∣ = n |V(G)|=n ∣ V ( G ) ∣ = n and a set S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , ∣ S ∣ ≤ k |S| \leq k ∣ S ∣ ≤ k such that H = G − S H=G-S H = G − S is chordal. If S S S is not given, we enumerate all subsets of V ( G ) V(G) V ( G ) of size at most k k k and test whether the resulting graph is chordal. This takes n O ( k ) n^{O(k)} n O ( k ) time. Hence, for the XP running time, we may assume that such a set S S S is given. We have the following lemma.
Lemma 25. Let G G G be a graph on n n n vertices, let S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , and let H = G − S H=G-S H = G − S be chordal. From G G G and S S S one can construct in polynomial time a rooted nice tree decomposition ( T , B ) (T,\mathcal{B}) ( T , B ) of G G G with the following properties.
The root and every leaf have bag S S S .
Every bag has the form B t = S ∪ ˙ C t B_t=S\mathbin{\dot\cup} C_t B t = S ∪ ˙ C t , where C t C_t C t is a clique of H H H .
Only vertices of H H H are introduced or forgotten.
The decomposition has O ( n 2 ) O(n^2) O ( n 2 ) nodes.
Proof. Since H H H is a chordal graph, a tree decomposition of H H H whose bags are cliques can be constructed in polynomial time and has O ( ∣ V ( H ) ∣ ) O(|V(H)|) O ( ∣ V ( H ) ∣ ) bags [33 , 8 ] . Add S S S to every bag. This gives a tree decomposition of G G G in which every bag is S S S together with a clique of H H H .
Apply the standard conversion to a nice tree decomposition [37 ] . Along an original tree edge with endpoint bags S ∪ ˙ C S\mathbin{\dot\cup} C S ∪ ˙ C and S ∪ ˙ C ′ S\mathbin{\dot\cup} C' S ∪ ˙ C ′ , first forget the vertices of C ∖ C ′ C \setminus C' C ∖ C ′ one at a time and then introduce the vertices of C ′ ∖ C C' \setminus C C ′ ∖ C one at a time. Every intermediate non-S S S part in the bag is a subset of C C C or of C ′ C' C ′ , and hence remains a clique. Duplicate bags to create join nodes and attach the usual chains ending in the bag S S S at the root and the leaves. Thus only vertices of H H H are introduced or forgotten. There are O ( ∣ V ( H ) ∣ ) O(|V(H)|) O ( ∣ V ( H ) ∣ ) original bags and at most O ( ∣ V ( G ) ∣ ) O(|V(G)|) O ( ∣ V ( G ) ∣ ) new nodes per original tree edge, so the resulting decomposition has O ( ∣ V ( G ) ∣ 2 ) O(|V(G)|^2) O ( ∣ V ( G ) ∣ 2 ) nodes. ◀
Our algorithm is a dynamic programming algorithm on the above nice tree decomposition of G G G . The decomposition is useful only if distances from a potentially large clique to a candidate geodesic can be summarized compactly. The next lemma provides exactly such a summary: one vertex of the geodesic simultaneously realizes the minimum distance from every vertex of the clique.
Lemma 26. Let J J J be a chordal graph, C ⊆ V ( J ) C \subseteq V(J) C ⊆ V ( J ) be a clique, and Q Q Q be a geodesic in J J J disjoint from C C C . There exists a vertex q ∈ V ( Q ) q \in V(Q) q ∈ V ( Q ) such that ∀ c ∈ C \forall c \in C ∀ c ∈ C , dist J ( c , q ) = dist J ( c , V ( Q ) ) \operatorname{dist}_J(c,q)=\operatorname{dist}_J(c,V(Q)) dist J ( c , q ) = dist J ( c , V ( Q )) .
Proof. We will prove by induction on ∣ V ( J ) ∣ |V(J)| ∣ V ( J ) ∣ . The statement is immediate when ∣ V ( J ) ∣ = 1 |V(J)|=1 ∣ V ( J ) ∣ = 1 , ∣ V ( Q ) ∣ = 1 |V(Q)|=1 ∣ V ( Q ) ∣ = 1 , or if J J J is a clique. Since C ⊂ V ( J ) C \subset V(J) C ⊂ V ( J ) , there is a simplicial vertex v ∉ C v \notin C v ∈ / C : this follows from Dirac’s theorem that a noncomplete chordal graph has two nonadjacent simplicial vertices [24 ] .
Since v v v is simplicial, no shortest path between two other vertices can use v v v as an internal vertex: if it did, its two neighbors on the path would be adjacent, yielding a shorter path. Thus, deleting v v v does not change the distances between any two vertices of V ( J ) ∖ { v } V(J) \setminus\{v\} V ( J ) ∖ { v } . If v ∉ V ( Q ) v \notin V(Q) v ∈ / V ( Q ) , the statement follows by applying induction on the graph J − v J-v J − v . Since distances between vertices of Q Q Q are unchanged, Q Q Q remains a geodesic in J − v J-v J − v . As v v v is simplicial, it also cannot be an internal vertex of Q Q Q . Thus v v v is an endpoint of Q Q Q . Let u u u be unique neighbor of v v v in Q Q Q .
Suppose that v v v is a closest vertex of Q Q Q to some c ∈ C c \in C c ∈ C . Look at the shortest path from c c c to Q Q Q ending at v v v . Let x x x be the penultimate vertex of this shortest path. If x = u x=u x = u , then we have a shorter path from c c c to Q Q Q ending at u u u . Thus x ≠ u x \ne u x = u . Then since v v v is simplicial and x , u ∈ N ( v ) x,u \in N(v) x , u ∈ N ( v ) , x u ∈ E ( J ) xu \in E(J) xu ∈ E ( J ) . Then we can replace x v xv xv by x u xu xu giving a c c c -u u u path of the same length as the c c c -v v v path. Hence u u u is also a closest vertex of Q Q Q to c c c . Thus, ∀ c ∈ C \forall c \in C ∀ c ∈ C , dist J ( c , V ( Q − v ) ) = dist J ( c , V ( Q ) ) \operatorname{dist}_{J}(c,V(Q-v))=\operatorname{dist}_{J}(c,V(Q)) dist J ( c , V ( Q − v )) = dist J ( c , V ( Q )) .
Now Q − v Q-v Q − v is a geodesic in J − v J-v J − v : it is a subpath of the geodesic Q Q Q , and the distances between its endpoints are unchanged after deleting v v v . Since C ⊆ V ( J − v ) C \subseteq V(J-v) C ⊆ V ( J − v ) is still a clique, the induction hypothesis applied to J − v J-v J − v and Q − v Q-v Q − v gives a vertex q ∈ V ( Q − v ) q \in V(Q-v) q ∈ V ( Q − v ) such that ∀ c ∈ C \forall c \in C ∀ c ∈ C , dist J − v ( c , q ) = dist J − v ( c , V ( Q − v ) ) \operatorname{dist}_{J-v}(c,q)=\operatorname{dist}_{J-v}(c,V(Q-v)) dist J − v ( c , q ) = dist J − v ( c , V ( Q − v )) . Using distance preservation and the above claim, we obtain ∀ c ∈ C \forall c \in C ∀ c ∈ C , dist J ( c , q ) = dist J ( c , V ( Q ) ) \operatorname{dist}_{J}(c,q)=\operatorname{dist}_{J}(c,V(Q)) dist J ( c , q ) = dist J ( c , V ( Q )) . This proves the lemma.
We have the following lemma.
Lemma 27. Let C C C be a clique of H = G − S H=G-S H = G − S . Suppose X ⊆ V ( H ) ∖ C X \subseteq V(H)\setminus C X ⊆ V ( H ) ∖ C is the union of at most h h h geodesics of H H H . Then there is a set W ⊆ X W \subseteq X W ⊆ X with ∣ W ∣ ≤ h + k |W| \le h+k ∣ W ∣ ≤ h + k such that d ( b , W ) = d ( b , X ) d(b,W)=d(b,X) d ( b , W ) = d ( b , X ) for every b ∈ S ∪ C b \in S \cup C b ∈ S ∪ C .
Proof. If X = ∅ X=\emptyset X = ∅ , take W = ∅ W=\emptyset W = ∅ . Otherwise, for each of the at most h h h geodesics Q Q Q , clique C C C and chordal graph H H H , apply Lemma 26 to obtain vertices q ∈ Q q \in Q q ∈ Q and add it to W W W . For every s ∈ S s \in S s ∈ S , choose a vertex x s ∈ X x_s \in X x s ∈ X minimizing d ( s , x s ) d(s,x_s) d ( s , x s ) , and add it to W W W . Then ∣ W ∣ ≤ h + k |W| \le h+k ∣ W ∣ ≤ h + k , and d ( s , W ) = d ( s , X ) d(s,W)=d(s,X) d ( s , W ) = d ( s , X ) for every s ∈ S s \in S s ∈ S .
Fix c ∈ C c \in C c ∈ C . If X X X is unreachable from c c c , then both d ( c , X ) d(c,X) d ( c , X ) and d ( c , W ) d(c,W) d ( c , W ) are infinite. Otherwise, take a shortest c c c –X X X path. If it avoids S S S , it lies in H H H and ends in one of the geodesic pieces of X X X ; the vertex obtained from applying Lemma 26 for that piece is no farther from c c c . If the path meets a vertex s ∈ S s \in S s ∈ S , then d ( c , x s ) ≤ d ( c , s ) + d ( s , X ) ≤ d ( c , X ) d(c,x_s) \le d(c,s)+d(s,X) \le d(c,X) d ( c , x s ) ≤ d ( c , s ) + d ( s , X ) ≤ d ( c , X ) . In either case d ( c , W ) ≤ d ( c , X ) d(c,W) \le d(c,X) d ( c , W ) ≤ d ( c , X ) . The reverse inequality follows from W ⊆ X W \subseteq X W ⊆ X , and hence the equality holds for every c ∈ C c \in C c ∈ C .
Let us fix the decomposition from Lemma 25 . For a node t t t , let V t V_t V t be the union of all bags in the subtree rooted at t t t , and let I t = V t ∖ B t I_t=V_t\setminus B_t I t = V t ∖ B t and O t = V ( G ) ∖ V t O_t=V(G)\setminus V_t O t = V ( G ) ∖ V t . The separator property of tree decompositions implies that there is no edge between I t I_t I t and O t O_t O t .
Let P P P be a geodesic of G G G . Since P P P is induced and C t C_t C t is a clique, P ∩ C t P\cap C_t P ∩ C t consists of at most two consecutive vertices. Delete this block, together with the at most k k k vertices of P ∩ S P\cap S P ∩ S . At most k + 2 k+2 k + 2 subpaths remain. Each lies entirely in I t I_t I t or O t O_t O t , because there is no edge between the two sets. Moreover, every such subpath is a geodesic subpath of P P P , and a shorter route in H H H would also be a shorter route in G G G . Therefore Lemma 27 applies to each of V ( P ) ∩ I t V(P)\cap I_t V ( P ) ∩ I t and V ( P ) ∩ O t V(P)\cap O_t V ( P ) ∩ O t with h = k + 2 h=k+2 h = k + 2 .
We use the convention d ( v , ∅ ) = ∞ d(v,\emptyset)=\infty d ( v , ∅ ) = ∞ . For Z ∈ { I t , O t } Z \in\{I_t,O_t\} Z ∈ { I t , O t } , enumerate the following family of vectors on B t B_t B t :
P t ( Z ) = { ( d ( b , W ) ) b ∈ B t : W ⊆ Z , ∣ W ∣ ≤ 2 k + 2 } . (14) \mathcal{P}_t(Z)=\left\{(d(b,W))_{b\in B_t}: W\subseteq Z,\ |W|\le2k+2\right\}. \tag*{(14)} P t ( Z ) = { ( d ( b , W ) ) b ∈ B t : W ⊆ Z , ∣ W ∣ ≤ 2 k + 2 } . (14)
We call the vectors ( d ( b , W ) ) b ∈ B t (d(b,W))_{b\in B_t} ( d ( b , W ) ) b ∈ B t as distance profiles . Include the all-∞ \infty ∞ vector, obtained from W = ∅ W=\emptyset W = ∅ , and discard duplicate vectors. Each family has at most ( n + 1 ) 2 k + 2 (n+1)^{2k+2} ( n + 1 ) 2 k + 2 members and can be enumerated from one all-pairs distance matrix of G G G . Let P t − : = P t ( I t ) \mathcal{P}_t^{-} := \mathcal{P}_t(I_t) P t − := P t ( I t ) and P t + : = P t ( O t ) \mathcal{P}_t^{+} := \mathcal{P}_t(O_t) P t + := P t ( O t ) .
For a geodesic P P P and a side Z ∈ { I t , O t } Z \in\{I_t, O_t\} Z ∈ { I t , O t } , Lemma 27 provide a set W ⊆ V ( P ) ∩ Z W \subseteq V(P) \cap Z W ⊆ V ( P ) ∩ Z of size at most 2 k + 2 2k+2 2 k + 2 such that for all b ∈ B t b \in B_t b ∈ B t , d ( b , W ) = d ( b , V ( P ) ∩ Z ) d(b,W) = d(b,V(P) \cap Z) d ( b , W ) = d ( b , V ( P ) ∩ Z ) . Thus the vector recording the distances from the bag vertices to V ( P ) ∩ I t V(P) \cap I_t V ( P ) ∩ I t belongs to P t − \mathcal{P}_t^{-} P t − , and the corresponding vector for V ( P ) ∩ O t V(P) \cap O_t V ( P ) ∩ O t belongs to P t + \mathcal{P}_t^{+} P t + . Explicitly, ( d ( b , V ( P ) ∩ I t ) ) b ∈ B t ∈ P t − \bigl(d(b,V(P) \cap I_t)\bigr)_{b \in B_t} \in\mathcal{P}_t^{-} ( d ( b , V ( P ) ∩ I t ) ) b ∈ B t ∈ P t − , ( d ( b , V ( P ) ∩ O t ) ) b ∈ B t ∈ P t + \bigl(d(b,V(P) \cap O_t)\bigr)_{b \in B_t} \in\mathcal{P}_t^{+} ( d ( b , V ( P ) ∩ O t ) ) b ∈ B t ∈ P t + .
The dynamic program will also need to transfer a distance vector across a separator. For a vector p p p indexed by a set K K K , define its extension by
( T K p ) ( v ) = min b ∈ K ( d ( v , b ) + p ( b ) ) , (15) (T_Kp)(v) = \min_{b \in K} \bigl(d(v,b) + p(b)\bigr), \tag*{(15)} ( T K p ) ( v ) = b ∈ K min ( d ( v , b ) + p ( b ) ) , (15)
Suppose that p ( b ) = d ( b , X ) p(b) = d(b,X) p ( b ) = d ( b , X ) for every b ∈ K b \in K b ∈ K and that every v v v -X X X path meets K K K . Then we can prove that
d ( v , X ) = ( T K p ) ( v ) . (16) d(v,X) = (T_Kp)(v). \tag*{(16)} d ( v , X ) = ( T K p ) ( v ) . (16)
Indeed, concatenating a shortest v v v -b b b path with a shortest b b b -X X X path gives for all b ∈ K b \in K b ∈ K , d ( v , X ) ≤ d ( v , b ) + p ( b ) d(v,X) \le d(v,b) + p(b) d ( v , X ) ≤ d ( v , b ) + p ( b ) . Conversely, a shortest v v v -X X X path meets K K K at some vertex b b b , and splitting the path at b b b gives d ( v , X ) ≥ d ( v , b ) + d ( b , X ) ≥ ( T K p ) ( v ) d(v,X) \ge d(v,b) + d(b,X) \ge(T_Kp)(v) d ( v , X ) ≥ d ( v , b ) + d ( b , X ) ≥ ( T K p ) ( v ) .
Certifying a geodesic
The algorithm guesses distinct endpoints a , b a,b a , b , put D = d ( a , b ) D = d(a,b) D = d ( a , b ) . Let F = { v ∈ V ( G ) : d ( a , v ) + d ( v , b ) = D } F = \{v \in V(G) : d(a,v) + d(v,b) = D\} F = { v ∈ V ( G ) : d ( a , v ) + d ( v , b ) = D } and ℓ ( v ) = d ( a , v ) \ell(v) = d(a,v) ℓ ( v ) = d ( a , v ) . The set F F F consists exactly of the vertices that lie on some a a a -b b b geodesic, so only vertices of F F F need to be selected. Moreover, if x y ∈ E ( G ) xy \in E(G) x y ∈ E ( G ) , then ∣ ℓ ( x ) − ℓ ( y ) ∣ ≤ 1 |\ell(x) - \ell(y)| \le1 ∣ ℓ ( x ) − ℓ ( y ) ∣ ≤ 1 .
For a selected set Y ⊆ F Y \subseteq F Y ⊆ F , forbid edges of G [ Y ] G[Y] G [ Y ] whose endpoints belong to the same layer. Orient every remaining edge from the smaller layer to the larger layer, and define the required degree pair
τ ( v ) = { ( 0 , 1 ) , v = a , ( 1 , 0 ) , v = b , ( 1 , 1 ) , v ∉ { a , b } , \tau(v) =
\begin{cases}
(0,1), & v = a,\\
(1,0), & v = b,\\
(1,1), & v \notin\{a,b\},
\end{cases} τ ( v ) = ⎩ ⎨ ⎧ ( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 1 ) , v = a , v = b , v ∈ / { a , b } ,
where the two coordinates are indegree and outdegree.
Lemma 28. A set Y ⊆ F Y \subseteq F Y ⊆ F induces an a a a -b b b geodesic if and only if it contains a , b a,b a , b , has no same-layer edge, and every vertex v ∈ Y v \in Y v ∈ Y has degree pair τ ( v ) \tau(v) τ ( v ) in the orientation above.
Proof. If G [ Y ] G[Y] G [ Y ] is an a a a -b b b geodesic, then it is induced, and the distance from a a a increases by one along every path edge. The three conditions are therefore necessary.
Conversely, assume that Y Y Y contains a a a and b b b , that G [ Y ] G[Y] G [ Y ] has no same-layer edge, and that every vertex v ∈ Y v \in Y v ∈ Y has degree pair τ ( v ) \tau(v) τ ( v ) . For every edge x y xy x y , the triangle inequality gives ∣ ℓ ( x ) − ℓ ( y ) ∣ ≤ 1 |\ell(x) - \ell(y)| \le1 ∣ ℓ ( x ) − ℓ ( y ) ∣ ≤ 1 . Since same-layer edges are excluded, every oriented edge goes from layer i i i to layer i + 1 i+1 i + 1 . Thus the orientation of edges in Y Y Y is acyclic.
The degree conditions say that a a a has one outgoing edge and no incoming edge, b b b has one incoming edge and no outgoing edge, and every other selected vertex has one edge in each direction. Thus every component of G [ Y ] G[Y] G [ Y ] is a directed path. No second component can exist: every directed path has a first vertex with indegree zero and a last vertex with outdegree zero, but only a a a and b b b have these degree types. Hence all vertices of Y Y Y form one directed path from a a a to b b b . Each edge of this path is from layer i i i to layer i + 1 i+1 i + 1 . Since a a a is in layer zero and b b b is in layer D D D , the path has length ℓ ( b ) − ℓ ( a ) = d ( a , b ) = D \ell(b) - \ell(a) = d(a,b) = D ℓ ( b ) − ℓ ( a ) = d ( a , b ) = D . Thus G [ Y ] G[Y] G [ Y ] is an a a a -b b b geodesic.
The dynamic programming algorithm
Fix an endpoint guess ( a , b ) (a,b) ( a , b ) and a target eccentricity R R R . At a node t t t , a state consists of
a set A t ⊆ B t ∩ F A_t \subseteq B_t \cap F A t ⊆ B t ∩ F of selected bag vertices;
a pair e t ( x ) ∈ { 0 , 1 } 2 e_t(x) \in\{0,1\}^2 e t ( x ) ∈ { 0 , 1 } 2 for every x ∈ A t x \in A_t x ∈ A t ; and
distance profiles α t ∈ P t − \alpha_t \in\mathcal{P}^{-}_t α t ∈ P t − and ω t ∈ P t + \omega_t \in\mathcal{P}^{+}_t ω t ∈ P t + .
The two coordinates of e t ( x ) e_t(x) e t ( x ) are the current indegree and outdegree of x x x . For a selected solution set Y Y Y , the intended meaning of the state is
A t = Y ∩ B t , e t ( x ) = the degree pair of x in the oriented graph G [ Y ∩ V t ] ∀ x ∈ A t , α t ( x ) = d ( x , Y ∩ I t ) ∀ x ∈ B t , ω t ( x ) = d ( x , Y ∩ O t ) ∀ x ∈ B t . (17) \begin{aligned}
A_t &= Y \cap B_t,\\
e_t(x) &= \text{the degree pair of }x\text{ in the oriented graph }G[Y \cap V_t] && \forall x \in A_t,\\
\alpha_t(x) &= d(x,Y \cap I_t) && \forall x \in B_t,\\
\omega_t(x) &= d(x,Y \cap O_t) && \forall x \in B_t. \tag*{(17)}
\end{aligned} A t e t ( x ) α t ( x ) ω t ( x ) = Y ∩ B t , = the degree pair of x in the oriented graph G [ Y ∩ V t ] = d ( x , Y ∩ I t ) = d ( x , Y ∩ O t ) ∀ x ∈ A t , ∀ x ∈ B t , ∀ x ∈ B t . (17)
We keep only states satisfying the following conditions:
∣ A t ∩ C t ∣ ≤ 2 , { a , b } ∩ B t ⊆ A t , e t ( x ) ≤ τ ( x ) ∀ x ∈ A t . |A_t \cap C_t| \leq2,\qquad\{a,b\} \cap B_t \subseteq A_t,\qquad e_t(x) \leq\tau(x)\quad\forall x \in A_t. ∣ A t ∩ C t ∣ ≤ 2 , { a , b } ∩ B t ⊆ A t , e t ( x ) ≤ τ ( x ) ∀ x ∈ A t .
where the last inequality is coordinatewise. We also require that G [ A t ] G[A_t] G [ A t ] has no same-layer edge. The first condition is valid because an induced path contains at most two vertices of a clique; the second ensures that an endpoint is selected whenever it occurs in a bag; and the degree bound prevents a partial solution from already exceeding its required final degree.
Finally, for every vertex v ∈ B t v \in B_t v ∈ B t , require
min { α t ( v ) , ω t ( v ) , d ( v , A t ) } ≤ R . (18) \min\{\alpha_t(v),\omega_t(v),d(v,A_t)\} \leq R. \tag*{(18)} min { α t ( v ) , ω t ( v ) , d ( v , A t )} ≤ R . (18)
The three terms measure the distance from v v v to the selected vertices in I t I_t I t , in O t O_t O t , and in B t B_t B t , respectively. Hence this condition says that every vertex currently appearing in the bag is within distance R R R of the eventual path.
A transition is valid precisely when the parent and child states satisfy the corresponding equations below and both states satisfy all state conditions. For two vectors on the same set, let p ∧ q p \wedge q p ∧ q denote their pointwise minimum. When a transition handles a vertex v v v , let σ v ( x ) = d ( x , v ) \sigma_v(x)=d(x,v) σ v ( x ) = d ( x , v ) when v v v is selected and σ v ( x ) = ∞ \sigma_v(x)=\infty σ v ( x ) = ∞ otherwise.
Transitions
For a selected set A ⊆ F A \subseteq F A ⊆ F with no same-layer edge, let e A ( x ) e_A(x) e A ( x ) denote the degree pair of x x x in the oriented graph G [ A ] G[A] G [ A ] . All additions, subtractions, and comparisons of degree pairs are coordinate wise. We now describe how a state at a node is obtained from states at its children.
Leaf Node Let t t t be a leaf. Here B t = V t = S B_t=V_t=S B t = V t = S and I t = ∅ I_t=\varnothing I t = ∅ . Therefore α t \alpha_t α t is an all ∞ \infty ∞ vector, and no selected vertex lies strictly inside the subtree. For every admissible choice of A t A_t A t and ω t ∈ P t + \omega_t \in\mathcal{P}^{+}_t ω t ∈ P t + , set e t ( x ) = e A t ( x ) e_t(x)=e_{A_t}(x) e t ( x ) = e A t ( x ) for all x ∈ A t x \in A_t x ∈ A t . These are all leaf states.
Introduce Node Suppose that t t t introduces a vertex v v v and has child c c c . Thus B t = B c ∪ { v } B_t=B_c\cup\{v\} B t = B c ∪ { v } , I t = I c I_t=I_c I t = I c , O c = O t ∪ { v } O_c=O_t\cup\{v\} O c = O t ∪ { v } . We require A t ∩ B c = A c A_t\cap B_c=A_c A t ∩ B c = A c . If v ∉ A t v\notin A_t v ∈ / A t , the degree pairs do not change. If v ∈ A t v\in A_t v ∈ A t , then the only new selected edges are those from v v v to selected vertices in A c A_c A c ; there is no edge from v v v to I c I_c I c .
Since I t = I c I_t=I_c I t = I c , the selected solution vertices in the strict interior are the same at t t t and c c c . The values of α t \alpha_t α t on B c B_c B c therefore agree with α c \alpha_c α c . To determine the new value α t ( v ) \alpha_t(v) α t ( v ) , observe that every path from v v v to I c I_c I c meets B c B_c B c . The separator identity (16) therefore computes the distance from v v v to the selected interior using α c \alpha_c α c .
Since O c = O t ∪ { v } O_c = O_t \cup\{v\} O c = O t ∪ { v } , the selected solution vertices outside the child subtree are the selected vertices in O t O_t O t , together with v v v when v v v is selected. The distance from a vertex x ∈ B c x \in B_c x ∈ B c to this union is the smaller of ω t ( x ) \omega_t(x) ω t ( x ) and d ( x , v ) d(x,v) d ( x , v ) ; if v v v is not selected, the second value is interpreted as ∞ \infty ∞ . Thus, we require
α t ( x ) = ( T B c α c ) ( x ) ∀ x ∈ B t , \alpha_t(x) = (\mathcal{T}_{B_c}\alpha_c)(x) \qquad\forall x \in B_t, α t ( x ) = ( T B c α c ) ( x ) ∀ x ∈ B t ,
ω c ( x ) = min { ω t ( x ) , σ v ( x ) } ∀ x ∈ B c . (19) \omega_c(x) = \min\{\omega_t(x),\sigma_v(x)\} \qquad\forall x \in B_c. \tag*{(19)} ω c ( x ) = min { ω t ( x ) , σ v ( x )} ∀ x ∈ B c . (19)
Forget Node Suppose that t t t forgets a vertex v v v and has child c c c . Then
B c = B t ∪ { v } , I t = I c ∪ { v } , O c = O t . B_c = B_t \cup\{v\}, \qquad I_t = I_c \cup\{v\}, \qquad O_c = O_t. B c = B t ∪ { v } , I t = I c ∪ { v } , O c = O t .
We require A t = A c ∖ { v } A_t = A_c \setminus\{v\} A t = A c ∖ { v } and e t ( x ) = e c ( x ) e_t(x) = e_c(x) e t ( x ) = e c ( x ) for every x ∈ A t x \in A_t x ∈ A t . If v ∈ A c v \in A_c v ∈ A c , also require e c ( v ) = τ ( v ) e_c(v) = \tau(v) e c ( v ) = τ ( v ) . The latter is because after v v v is forgotten, it belongs to I t I_t I t , and the separator property implies that it has no neighbor in O t O_t O t .
If v v v is selected, it is added to the solution part of the interior; otherwise this is unchanged. The exterior is unchanged, but its distance profile must be extended from B t B_t B t to the larger child bag B c B_c B c . Hence, we require
α t ( x ) = min { α c ( x ) , σ v ( x ) } ∀ x ∈ B t , \alpha_t(x) = \min\{\alpha_c(x),\sigma_v(x)\} \qquad\forall x \in B_t, α t ( x ) = min { α c ( x ) , σ v ( x )} ∀ x ∈ B t ,
ω c ( x ) = ( T B t ω t ) ( x ) ∀ x ∈ B c . (20) \omega_c(x) = (\mathcal{T}_{B_t}\omega_t)(x) \qquad\forall x \in B_c. \tag*{(20)} ω c ( x ) = ( T B t ω t ) ( x ) ∀ x ∈ B c . (20)
The second identity is valid because B t B_t B t separates the forgotten vertex v v v from O t O_t O t .
Join Node Let t t t be a join node with children c 1 , c 2 c_1,c_2 c 1 , c 2 . All three bags are the same. Thus, we require the solution intersecting with the bag A t = A c 1 = A c 2 = : A A_t = A_{c_1} = A_{c_2} =: A A t = A c 1 = A c 2 =: A .
The two child subgraphs intersect exactly in G [ A ] G[A] G [ A ] . Consequently, each selected boundary edge is counted in both child degree pairs and must be subtracted once. Thus, we require
e t ( x ) = e c 1 ( x ) + e c 2 ( x ) − e A ( x ) ∀ x ∈ A . (21) e_t(x) = e_{c_1}(x) + e_{c_2}(x) - e_A(x) \qquad\forall x \in A. \tag*{(21)} e t ( x ) = e c 1 ( x ) + e c 2 ( x ) − e A ( x ) ∀ x ∈ A . (21)
The interior of the parent is the union of the two child interiors. From the point of view of either child, its exterior is the union of the parent exterior and the other child’s interior. Since the distances to a union are obtained by taking the pointwise minimum, we require
α t = α c 1 ∧ α c 2 , \alpha_t = \alpha_{c_1} \wedge\alpha_{c_2}, α t = α c 1 ∧ α c 2 ,
ω c 1 = ω t ∧ α c 2 , \omega_{c_1} = \omega_t \wedge\alpha_{c_2}, ω c 1 = ω t ∧ α c 2 ,
ω c 2 = ω t ∧ α c 1 . (22) \omega_{c_2} = \omega_t \wedge\alpha_{c_1}. \tag*{(22)} ω c 2 = ω t ∧ α c 1 . (22)
Root and evaluation. At the root ρ \rho ρ , the exterior is empty, so require ω ρ ≡ ∞ \omega_\rho\equiv\infty ω ρ ≡ ∞ . The root bag is S S S , and every selected vertex outside S S S has already had its final degree checked at its forget node. For the remaining selected vertices x ∈ A ρ x \in A_\rho x ∈ A ρ , require e ρ ( x ) = τ ( x ) e_\rho(x) = \tau(x) e ρ ( x ) = τ ( x ) .
A state at each node is retained when it satisfies all the required conditions at that node. The tables are computed bottom-up. The endpoint guess ( a , b ) (a,b) ( a , b ) succeeds if some retained root state satisfies the root requirements.
Correctness and running time
We now prove that for every fixed choice of endpoints a , b a,b a , b , the dynamic program accepts if only if there is an a − b a-b a − b geodesic of eccentricity at most R R R .
Completeness
Suppose that P P P is an a − b a-b a − b geodesic with ecc G ( P ) ≤ R \operatorname{ecc}_{G}(P) \le R ecc G ( P ) ≤ R , and let Y = V ( P ) Y = V(P) Y = V ( P ) . We show that there is a valid state with respect to P P P at every node of the decomposition. For a node t t t , let A t = Y ∩ B t A_t = Y \cap B_t A t = Y ∩ B t . For x ∈ A t x \in A_t x ∈ A t , let e t ( x ) e_t(x) e t ( x ) be the indegree and outdegree of x x x in the oriented graph induced by Y ∩ V t Y \cap V_t Y ∩ V t . Define α t ( x ) = d ( x , Y ∩ I t ) \alpha_t(x) = d(x, Y \cap I_t) α t ( x ) = d ( x , Y ∩ I t ) and ω t ( x ) = d ( x , Y ∩ O t ) \omega_t(x) = d(x, Y \cap O_t) ω t ( x ) = d ( x , Y ∩ O t ) for every x ∈ B t x \in B_t x ∈ B t .
Consider a bag B t = S ∪ C t B_t = S \cup C_t B t = S ∪ C t . Since P P P is a geodesic, it is induced. As C t C_t C t is a clique, P P P contains at most two vertices of C t C_t C t , and if it contains two, they are consecutive on P P P . Delete these at most two vertices together with the at most k k k vertices of P ∩ S P \cap S P ∩ S . The path P P P is then split into at most k + 2 k + 2 k + 2 subpaths. Since there are no edges between I t I_t I t and O t O_t O t , each remaining subpath lies completely in one of I t I_t I t and O t O_t O t . Moreover, every such subpath is a geodesic of H H H ; it is a subpath of the geodesic P P P , and any shorter path in H H H between the endpoints would also be a shorter path in G G G . Thus Y ∩ I t Y \cap I_t Y ∩ I t and Y ∩ O t Y \cap O_t Y ∩ O t are each the union of at most k + 2 k + 2 k + 2 geodesics of H H H . By Lemma 27, for each side there is a set of at most ( k + 2 ) + k = 2 k + 2 (k + 2) + k = 2k + 2 ( k + 2 ) + k = 2 k + 2 vertices inducing exactly the same distances to every vertex of B t B_t B t . Thus, we have α t ∈ P t − \alpha_t \in\mathcal{P}^{-}_t α t ∈ P t − and ω t ∈ P t + \omega_t \in\mathcal{P}^{+}_t ω t ∈ P t + .
We now prove the remaining conditions needed for a valid DP state. Since P P P is induced and C t C_t C t is a clique, ∣ A t ∩ C t ∣ ≤ 2 |A_t \cap C_t| \le2 ∣ A t ∩ C t ∣ ≤ 2 and since a , b ∈ Y a, b \in Y a , b ∈ Y , every occurrence of a a a or b b b in a bag belong to A t A_t A t . The orientation of P P P by increasing distance from a a a gives the required degree pair τ ( v ) \tau(v) τ ( v ) , and no edge of P P P has both endpoints in the same layer. Hence all partial degree pairs are coordinatewise at most τ \tau τ .
It remains to check the coverage condition. For every v ∈ B t v \in B_t v ∈ B t , the sets Y ∩ I t Y \cap I_t Y ∩ I t , A t A_t A t , Y ∩ O t Y \cap O_t Y ∩ O t partition Y Y Y , Therefore
d ( v , Y ) = min { d ( v , Y ∩ I t ) , d ( v , A t ) , d ( v , Y ∩ O t ) } = min { α t ( v ) , d ( v , A t ) , ω t ( v ) } . d(v,Y) = \min\{d(v,Y \cap I_t),d(v,A_t),d(v,Y \cap O_t)\} = \min\{\alpha_t(v),d(v,A_t),\omega_t(v)\}. d ( v , Y ) = min { d ( v , Y ∩ I t ) , d ( v , A t ) , d ( v , Y ∩ O t )} = min { α t ( v ) , d ( v , A t ) , ω t ( v )} .
Since ecc G ( P ) ≤ R \operatorname{ecc}_{G}(P) \le R ecc G ( P ) ≤ R , this value is at most R R R , condition 18 is satisfied at every bag.
We now have to verify the transitions. At a leaf node, I t = ∅ I_t = \varnothing I t = ∅ , so α t ≡ ∞ \alpha_t \equiv\infty α t ≡ ∞ and the stated leaf state is obtained. At an introduce node, I t = I c I_t = I_c I t = I c and B c B_c B c separates B t B_t B t from I c I_c I c . Since α c ( b ) = d ( b , Y ∩ I c ) \alpha_c(b) = d(b,Y \cap I_c) α c ( b ) = d ( b , Y ∩ I c ) for every b ∈ B c b \in B_c b ∈ B c , equation (16) , applied with K = B c K = B_c K = B c and X = Y ∩ I c X = Y \cap I_c X = Y ∩ I c , yields
α t ( x ) = d ( x , Y ∩ I t ) = d ( x , Y ∩ I c ) = min b ∈ B c { d ( x , b ) + α c ( b ) } = ( T B c α c ) ( x ) \alpha_t(x) = d(x,Y \cap I_t) = d(x,Y \cap I_c) = \min_{b \in B_c}\{d(x,b) + \alpha_c(b)\} = (T_{B_c}\alpha_c)(x) α t ( x ) = d ( x , Y ∩ I t ) = d ( x , Y ∩ I c ) = b ∈ B c min { d ( x , b ) + α c ( b )} = ( T B c α c ) ( x )
for every x ∈ B t x \in B_t x ∈ B t . This is precisely the first identity in equation (19) . The second identity in equation (19) follows from O c = O t ∪ { v } O_c = O_t \cup\{v\} O c = O t ∪ { v } .
At a forget node, the forgotten vertex v v v is added to I t I_t I t , giving the first identity in equation (20) . Moreover, O c = O t O_c = O_t O c = O t and B t B_t B t separates B c B_c B c from O t O_t O t , so the separator identity gives the second identity in equation (20) .
At a join node, the interiors of the two children are disjoint and their union is I t I_t I t , so the distance to the selected vertices in I t I_t I t is the pointwise minimum of the two child distances. Similarly, the exterior of each child is the union of the parent’s exterior and the other child’s interior, which gives the remaining two identities in equation (22) . The degree equation is equation (21) , since the common boundary edges are counted in both children and hence must be subtracted once.
Thus, the states induced by P P P are present throughout the decomposition, and the root satisfies all acceptance conditions. Hence every solution path gives an accepting computation.
Soundness.
Conversely, suppose that the dynamic program accepts for the endpoint guess ( a , b ) (a,b) ( a , b ) . Fix an accepting root state and, for every state in this accepting computation, choose the predecessor state(s) witnessing the corresponding transition. These states determine a global set Y Y Y of selected vertices. Indeed, once a vertex is introduced, its selection status is carried through all subsequent bags containing that vertex until it is forgotten; at a join node, both children are required to have the same selection on their common bag. Thus every vertex has a unique, consistent selection status, and hence Y ⊆ F Y \subseteq F Y ⊆ F with a , b ∈ Y a,b \in Y a , b ∈ Y .
We claim that, for every node t t t and every x ∈ A t x \in A_t x ∈ A t , the value e t ( x ) e_t(x) e t ( x ) is the indegree and outdegree of x x x in the oriented graph G [ Y ∩ V t ] G[Y \cap V_t] G [ Y ∩ V t ] . This follows by induction over the decomposition. At an introduce node, the transition accounts for exactly the newly exposed edges incident with the introduced vertex; at a forget node, the degree of the forgotten vertex is already final and is checked against τ ( v ) \tau(v) τ ( v ) . At a join node, the two child subgraphs intersect precisely in G [ A t ] G[A_t] G [ A t ] , so the common boundary edges are counted twice and are therefore subtracted once.
Since every edge of G G G is contained in some bag, the condition that G [ A t ] G[A_t] G [ A t ] should not contain a same-layer edge implies that G [ Y ] G[Y] G [ Y ] has no same-layer edge. Every selected vertex outside S S S is eventually forgotten, at which point its degree is final and is required to equal τ ( v ) \tau(v) τ ( v ) . For vertices of S S S , this is checked at the root. Thus every vertex of Y Y Y has degree pair τ ( v ) \tau(v) τ ( v ) .
Hence, by Lemma 28, G [ Y ] G[Y] G [ Y ] is an a a a –b b b geodesic. Its length is ℓ ( b ) − ℓ ( a ) = d ( a , b ) \ell(b)-\ell(a)=d(a,b) ℓ ( b ) − ℓ ( a ) = d ( a , b ) .
It remains to prove that the stored distance profiles have their intended meanings. More precisely, for every node t t t and every x ∈ B t x \in B_t x ∈ B t , the profiles in the states chosen above satisfy
α t ( x ) = d ( x , Y ∩ I t ) and ω t ( x ) = d ( x , Y ∩ O t ) . (23) \alpha_t(x)=d(x,Y \cap I_t) \qquad\text{and}\qquad\omega_t(x)=d(x,Y \cap O_t). \tag*{(23)} α t ( x ) = d ( x , Y ∩ I t ) and ω t ( x ) = d ( x , Y ∩ O t ) . (23)
The statement for the inside profiles α t \alpha_t α t follows by induction from the leaves towards the root. At a leaf, I t = ∅ I_t=\varnothing I t = ∅ and hence α t ≡ ∞ \alpha_t\equiv\infty α t ≡ ∞ . At an introduce node, I t = I c I_t=I_c I t = I c and B c B_c B c separates B t B_t B t from I c I_c I c , so the first identity in equation (19) follows from the separator identity. At a forget node, the forgotten vertex is added to the strict interior, and therefore the new profile is obtained by taking the pointwise minimum with its distance vector, as in equation (20). At a join node, the two strict interiors are disjoint and their union is I t I_t I t , so the first identity in equation (22) is exactly the distance to Y ∩ I t Y \cap I_t Y ∩ I t .
The statement for the outside profiles ω t \omega_t ω t is proved symmetrically from the root towards the leaves. At the root the exterior is empty. The introduce, forget, and join transitions in equations (19)–(22) update the exterior by adding the introduced vertex, extending across the separator, and taking the union with the sibling interior, respectively. Hence the second identity in equation (23) holds throughout the chosen computation.
Now let v ∈ V ( G ) v \in V(G) v ∈ V ( G ) and choose a bag B t B_t B t containing v v v . Since Y = ( Y ∩ I t ) ∪ A t ∪ ( Y ∩ O t ) Y=(Y \cap I_t)\cup A_t\cup(Y \cap O_t) Y = ( Y ∩ I t ) ∪ A t ∪ ( Y ∩ O t ) , we obtain d ( v , Y ) = min { α t ( v ) , d ( v , A t ) , ω t ( v ) } ≤ R d(v,Y)=\min\{\alpha_t(v),d(v,A_t),\omega_t(v)\}\le R d ( v , Y ) = min { α t ( v ) , d ( v , A t ) , ω t ( v )} ≤ R , where the inequality follows from condition (18). Therefore ecc G ( Y ) ≤ R \operatorname{ecc}_G(Y)\le R ecc G ( Y ) ≤ R , and the reconstructed geodesic is a solution.
Running time.
For a bag B t B_t B t , there are at most 2 k ( 1 + ∣ C t ∣ + ( ∣ C t ∣ 2 ) ) = n O ( 1 ) 2 k 2^k\left(1+|C_t|+\binom{|C_t|}{2}\right)=n^{O(1)}2^k 2 k ( 1 + ∣ C t ∣ + ( 2 ∣ C t ∣ ) ) = n O ( 1 ) 2 k choices for A t A_t A t . For each selected boundary vertex there are at most four possibilities for its degree pair, and each distance profile has at most ( n + 1 ) 2 k + 2 (n+1)^{2k+2} ( n + 1 ) 2 k + 2 possibilities. Hence the number of states at a node is n O ( k ) n^{O(k)} n O ( k ) . Since the decomposition has O ( n 2 ) O(n^2) O ( n 2 ) nodes and there are O ( n 2 ) O(n^2) O ( n 2 ) choices for the endpoints a a a , b b b , all transitions can be checked in n O ( k ) n^{O(k)} n O ( k ) time. Thus the algorithm runs in n O ( k ) n^{O(k)} n O ( k ) time.
Clique-width
Recall that cw ( G ) \operatorname{cw}(G) cw ( G ) is the minimum number of labels in an expression constructing G G G by the four operations in Subsection 2.1.
For a connected n n n -vertex input graph, we may replace R R R by min { R , n − 1 } \min\{R,n-1\} min { R , n − 1 } .
Theorem 29. Let G G G be a connected n n n -vertex graph.
(a) Given a clique-width k k k -expression τ \tau τ for G G G , ESP can be solved in ∣ τ ∣ O ( 1 ) + n O ( k ) |\tau|^{O(1)}+n^{O(k)} ∣ τ ∣ O ( 1 ) + n O ( k ) time.
(b) Without a supplied expression, ESP can be solved in f ( k ) n O ( k ) f(k)n^{O(k)} f ( k ) n O ( k ) time, where k = cw ( G ) k=\operatorname{cw}(G) k = cw ( G ) and f f f is computable.
Both algorithms return a witnessing shortest path whenever one exists.
Consequently, ESP is in XP parameterized by clique-width. We first prove the stronger intermediate result for a supplied mim-width layout.
Layouts and the model-checking theorem
Width measures. We use the cut functions mim G ( A ) \operatorname{mim}_G(A) mim G ( A ) and ρ G ( A ) \rho_G(A) ρ G ( A ) , rooted layouts L \mathcal{L} L , and rank-decompositions from Subsection 2.1. Recall that mim G ( A ) \operatorname{mim}_G(A) mim G ( A ) is the maximum size of an induced matching in the bipartite cut graph, while ρ G ( A ) \rho_G(A) ρ G ( A ) is the rank over GF ( 2 ) \operatorname{GF}(2) GF ( 2 ) of its bipartite adjacency matrix. The notation V x V_x V x and mimw G ( L ) \operatorname{mimw}_G(\mathcal{L}) mimw G ( L ) is as defined there.
Lemma 30. For every A ⊆ V ( G ) A\subseteq V(G) A ⊆ V ( G ) , mim G ( A ) ≤ ρ G ( A ) \operatorname{mim}_G(A)\leq\rho_G(A) mim G ( A ) ≤ ρ G ( A ) . Hence a rank-decomposition of width q q q yields a rooted layout of mim-width at most q q q in polynomial time.
Proof. An induced matching of size a a a across the cut gives an a × a a\times a a × a identity submatrix of the cut adjacency matrix, after ordering its rows and columns by the matched pairs. Thus its size is at most the matrix rank. To root a rank-decomposition on at least two leaves, first suppress any degree-two vertices, subdivide an edge, and make the new vertex the root. This preserves the nontrivial cuts. The one-vertex case is immediate. ◀
Distance neighborhood logic. For integers r , d ≥ 1 r,d\geq1 r , d ≥ 1 and U ⊆ V ( G ) U\subseteq V(G) U ⊆ V ( G ) , define
N d r ( U ) = { v ∈ V ( G ) : ∣ { u ∈ U : 1 ≤ dist G ( u , v ) ≤ r } ∣ ≥ d } . N^r_d(U)=\{v\in V(G):|\{u\in U:1\leq\operatorname{dist}_G(u,v)\leq r\}|\geq d\}. N d r ( U ) = { v ∈ V ( G ) : ∣ { u ∈ U : 1 ≤ dist G ( u , v ) ≤ r } ∣ ≥ d } .
The logic used below permits set variables, unary vertex predicates, Boolean set operations, comparisons between set terms, cardinality constraints such as ∣ X ∣ = a |X|=a ∣ X ∣ = a , and the operators N d r N^r_d N d r . It also permits con ( X ) \operatorname{con}(X) con ( X ) , asserting that G [ X ] G[X] G [ X ] is connected. This is a fragment of distance neighborhood logic with acyclicity and connectivity constraints (A&C DN); we do not use its acyclicity predicate.
For a formula φ \varphi φ , let d ( φ ) d(\varphi) d ( φ ) be the largest neighborhood counting threshold occurring in it, with a minimum value of two. In the formula-size convention below, numerical values in size measurements and neighborhood operators each count as one symbol.
Theorem 31 (Mim-width model checking [2 Theorem 1.2] ). Given an A&C DN formula φ ( X 1 , … , X p ) \varphi(X_1,\ldots,X_p) φ ( X 1 , … , X p ) , an n n n -vertex vertex-colored graph, and a rooted layout of mim-width w ≥ 1 w\geq1 w ≥ 1 , one can find all sets satisfying φ \varphi φ , or correctly conclude that none exist, in
n O ( d ( φ ) w ∣ φ ∣ 2 ) n^{O(d(\varphi)w|\varphi|^2)} n O ( d ( φ ) w ∣ φ ∣ 2 ) time.
The important point is that the numerical radius does not appear in this exponent. In particular, a fixed formula schema with fixed counting thresholds and a constant number of cardinality measurements bounded by n n n is handled in n O ( w ) n^{O(w)} n O ( w ) time, even when its radii depend on the input. This numerical convention is part of the cited theorem, not an assumption that R R R is constant.
A simpler certificate for a shortest path
Lemma 32 (Connected-set certificate). Let s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) and D = dist G ( s , t ) D = \operatorname{dist}_G(s,t) D = dist G ( s , t ) . For X ⊆ V ( G ) X \subseteq V(G) X ⊆ V ( G ) , the following are equivalent:
(i) G [ X ] G[X] G [ X ] is a geodesic s s s –t t t path;
(ii) s , t ∈ X s,t \in X s , t ∈ X , ∣ X ∣ = D + 1 |X| = D + 1 ∣ X ∣ = D + 1 , and G [ X ] G[X] G [ X ] is connected.
Proof. The forward implication is immediate. Conversely, let Q Q Q be a simple s s s –t t t path in the connected graph G [ X ] G[X] G [ X ] . Then
D ≤ ∣ E ( Q ) ∣ = ∣ V ( Q ) ∣ − 1 ≤ ∣ X ∣ − 1 = D . D \le|E(Q)| = |V(Q)| - 1 \le|X| - 1 = D. D ≤ ∣ E ( Q ) ∣ = ∣ V ( Q ) ∣ − 1 ≤ ∣ X ∣ − 1 = D .
All inequalities are equalities, so Q Q Q is a shortest s s s –t t t path and V ( Q ) = X V(Q) = X V ( Q ) = X . Any additional edge of G [ X ] G[X] G [ X ] would join two nonconsecutive vertices of Q Q Q and yield a shorter s s s –t t t path. Thus G [ X ] = Q G[X] = Q G [ X ] = Q . When s = t s=t s = t , the condition ∣ X ∣ = D + 1 = 1 |X| = D + 1 = 1 ∣ X ∣ = D + 1 = 1 gives the same conclusion directly.
In particular, no acyclicity, degree, or explicit path predicate is needed.
The algorithm on a supplied mim-width layout
For fixed s , t s,t s , t , give the graph two unary predicates S = { s } \mathrm{S} = \{s\} S = { s } and T = { t } \mathrm{T} = \{t\} T = { t } ; when s = t s=t s = t , both predicates hold at that vertex. These predicates do not change the graph or the layout width. With D = dist G ( s , t ) D = \operatorname{dist}_G(s,t) D = dist G ( s , t ) , define
Dom R ( X ) = { X ‾ ⊆ N 1 R ( X ) , R ≥ 1 , X ‾ = ∅ , R = 0. \operatorname{Dom}_R(X) =
\begin{cases}
\overline{X} \subseteq N_1^R(X), & R \ge1,\\
\overline{X} = \varnothing, & R = 0.
\end{cases} Dom R ( X ) = { X ⊆ N 1 R ( X ) , X = ∅ , R ≥ 1 , R = 0.
and use the formula
Φ R , D ( X ) : = ( S ∪ T ⊆ X ) ∧ ∣ X ∣ = D + 1 ∧ con ( X ) ∧ Dom R ( X ) . (24) \Phi_{R,D}(X) := (\mathrm{S} \cup\mathrm{T} \subseteq X) \land|X| = D + 1 \land\operatorname{con}(X) \land\operatorname{Dom}_R(X). \tag*{(24)} Φ R , D ( X ) := ( S ∪ T ⊆ X ) ∧ ∣ X ∣ = D + 1 ∧ con ( X ) ∧ Dom R ( X ) . (24)
By Lemma 32 , the first three conjuncts say exactly that G [ X ] G[X] G [ X ] is a geodesic s s s –t t t path. The last conjunct says exactly that ecc G ( X ) ≤ R \operatorname{ecc}_G(X) \le R ecc G ( X ) ≤ R . Conversely, the vertex set of a geodesic s s s –t t t path of eccentricity at most R R R satisfies all four conjuncts. Thus (24) is an exact certificate for the fixed-endpoint instance.
Theorem 33. Given a connected n n n -vertex graph G G G , an integer R ≥ 0 R \ge0 R ≥ 0 , and a rooted layout of mim-width w w w , ESP can be solved, with a witnessing path returned, in n O ( max { 1 , w } ) n^{O(\max\{1,w\})} n O ( m a x { 1 , w }) time. For n ≥ 2 n \ge2 n ≥ 2 , the bound is n O ( w ) n^{O(w)} n O ( w ) .
Proof. Handle n = 1 n = 1 n = 1 directly. If n ≥ 2 n \ge2 n ≥ 2 , connectivity implies w ≥ 1 w \ge1 w ≥ 1 : every singleton leaf cut has an edge. Compute all-pairs distances by breadth-first search in O ( n ( n + m ) ) O(n(n+m)) O ( n ( n + m )) time. For every ordered pair ( s , t ) ∈ V ( G ) 2 (s,t) \in V(G)^2 ( s , t ) ∈ V ( G ) 2 , compute D = dist G ( s , t ) D = \operatorname{dist}_G(s,t) D = dist G ( s , t ) , add the two singleton predicates, and apply Theorem 31 to (24) on the supplied layout. Accept if any call succeeds, and reject otherwise.
The correctness of the formula proves soundness. For completeness, every feasible geodesic path has an endpoint pair considered by the algorithm. A returned set X X X induces that path, so its vertex order is recovered by traversing G [ X ] G[X] G [ X ] from s s s (or simply returning s s s when X = { s } X = \{s\} X = { s } ).
The formula has constant length, uses only the neighborhood threshold one, and has a single cardinality constraint of value D + 1 ≤ n D + 1 \le n D + 1 ≤ n . Consequently d ( Φ R , D ) = 2 d(\Phi_{R,D}) = 2 d ( Φ R , D ) = 2 by convention, and each call takes n O ( w ) n^{O(w)} n O ( w ) time. The n 2 n^2 n 2 calls and the polynomial preprocessing are absorbed into the same bound.
If one requires distinct path endpoints, simply omit pairs ( s , s ) (s,s) ( s , s ) .
From clique-width to the required layout
Recall the definition of a k k k -expression from Subsection 2.1. Its syntax tree has vertex-creation leaves, binary disjoint-union nodes, and unary join and relabelling nodes.
We use the standard conversion underlying the inequality rw ( G ) ≤ cw ( G ) \operatorname{rw}(G) \le\operatorname{cw}(G) rw ( G ) ≤ cw ( G ) ; see Oum and Seymour [46, Proposition 6.3].
Lemma 34. From a clique-width k k k -expression τ \tau τ for G G G , one can construct in polynomial time a rooted layout L τ \mathcal{L}_{\tau} L τ whose cuts have cut-rank at most k k k and hence mim-width at most k k k . In particular, rw ( G ) ≤ cw ( G ) \operatorname{rw}(G) \le\operatorname{cw}(G) rw ( G ) ≤ cw ( G ) .
Proof. Suppress the unary nodes of the syntax tree and match each vertex with its creation leaf. This gives a rooted layout. Fix a node cut ( A , A ‾ ) (A,\overline{A}) ( A , A ) , and consider the labels just after evaluating the corresponding subexpression. Two vertices of A A A having the same label then keep the same label through all subsequent operations. Every edge from A A A to A ‾ \overline{A} A is added after the two sides first meet at an ancestor disjoint-union node, and later joins treat these two vertices identically. Therefore they have identical final neighborhoods in A ‾ \overline{A} A .
The cut adjacency matrix thus has at most k k k distinct rows, so its rank is at most k k k . By Lemma 30, the cut’s induced-matching number is also at most k k k . This holds at every layout node. Forgetting and suppressing the degree-two root gives a rank-decomposition of width at most k k k when n ≥ 2 n \ge2 n ≥ 2 ; the one-vertex case is immediate.
Proof of Theorem 29(a). Construct L τ \mathcal{L}_{\tau} L τ using Lemma 34 , and apply Theorem 33 . Processing the expression takes ∣ τ ∣ O ( 1 ) |\tau|^{O(1)} ∣ τ ∣ O ( 1 ) time, and the resulting layout has mim-width at most k k k .
Removing the expression and obtaining an optimal path
We use Oum’s algorithm [45 Theorem 5.8] : for each positive integer h h h , it either produces a rank-decomposition of width at most 3 h − 1 3h - 1 3 h − 1 or correctly certifies rw ( G ) > h \operatorname{rw}(G) > h rw ( G ) > h , in g ( h ) n 3 g(h)n^3 g ( h ) n 3 time for a computable function g g g .
Proof of Theorem 29(b). Handle n = 1 n = 1 n = 1 directly, and put q = rw ( G ) ≥ 1 q = \operatorname{rw}(G) \ge1 q = rw ( G ) ≥ 1 otherwise. Run Oum’s algorithm for h = 1 , 2 , … h = 1,2,\ldots h = 1 , 2 , … until it returns a decomposition. It must succeed by h = q h = q h = q , so the returned decomposition has width at most 3 q − 1 3q - 1 3 q − 1 , and the total preprocessing time is at most
( ∑ h = 1 q g ( h ) ) n 3 . \left(\sum_{h=1}^{q} g(h)\right)n^3. ( h = 1 ∑ q g ( h ) ) n 3 .
By Lemma 30, root it to obtain a layout of mim-width at most 3 q − 1 3q - 1 3 q − 1 . Then Theorem 33 gives an n O ( q ) n^{O(q)} n O ( q ) -time algorithm. Finally, q ≤ k = cw ( G ) q \le k = \operatorname{cw}(G) q ≤ k = cw ( G ) by Lemma 34 , so the total time is f ( k ) n O ( k ) f(k)n^{O(k)} f ( k ) n O ( k ) for a computable f f f . Neither k k k nor q q q needs to be known by the algorithm.
Corollary 35. Without a supplied decomposition, ESP is solvable in f ( q ) n O ( max { 1 , q } ) f(q)n^{O(\max\{1,q\})} f ( q ) n O ( m a x { 1 , q }) time, where q = rw ( G ) q=\operatorname{rw}(G) q = rw ( G ) . In particular, it is in XP parameterized by rank-width.
Proof. Use the preceding algorithm and bound its running time directly in terms of q q q , handling the one-vertex case separately.
Corollary 36. A minimum-eccentricity shortest path can be found within the bounds of Theorem 29 , up to an additional O ( log n ) O(\log n) O ( log n ) factor for n ≥ 2 n \ge2 n ≥ 2 .
Proof. The optimum lies in { 0 , … , n − 1 } \{0,\ldots,n-1\} { 0 , … , n − 1 } , and feasibility is monotone in R R R . Binary search finds the smallest feasible radius in O ( log n ) O(\log n) O ( log n ) decision calls. Recover a witness with one final call at this radius. The same layout and all-pairs distances can be reused throughout.
Remark 37. The mim-width step remains essential: the clique-width branch of the cited model-checking theorem depends exponentially on the numerical radius. Only the mim-width bound used here is independent of that radius.
W-hardness
Clique cover number
A set D ⊆ V ( G ) D \subseteq V(G) D ⊆ V ( G ) is a dominating set if N G [ D ] = V ( G ) N_G[D]=V(G) N G [ D ] = V ( G ) . The Dominating Set problem asks whether a graph has a dominating set of size at most k k k ; it is W[2 ] -complete parameterized by k k k [26 ] .
We show that a small vertex clique cover does not make ESP fixed-parameter tractable unless FPT = W[2 ] . Recall that ϑ ( G ) \vartheta(G) ϑ ( G ) denotes the minimum number of cliques whose vertex sets partition V ( G ) V(G) V ( G ) ; see Subsection 2.1.
Our reduction uses the choice-layer and distance-test structure of Dragan and Leitert [28 Theorem 13] , with clique layers and columns arranged to bound the vertex clique-cover number.
Theorem 38. ESP is W[2 ] -hard parameterized by ϑ ( G ) \vartheta(G) ϑ ( G ) . This remains true when a vertex clique cover is supplied and the parameter is the size of the supplied cover.
Construction
We give a parameterized reduction from Dominating Set, which is W[2 ] -complete parameterized by the solution size [26 ] . Let ( F , k ) (F,k) ( F , k ) be an instance of Dominating Set, put n = ∣ V ( F ) ∣ n=|V(F)| n = ∣ V ( F ) ∣ , and assume that 1 ≤ k ≤ n 1 \le k \le n 1 ≤ k ≤ n , as the remaining cases are trivial. Set R = k R=k R = k .
For every i ∈ [ k ] i \in[k] i ∈ [ k ] and 0 ≤ h ≤ R − 1 0 \le h \le R-1 0 ≤ h ≤ R − 1 , create the clique C i , h = { x i , h : x ∈ V ( F ) } C_{i,h}=\{x_{i,h}:x \in V(F)\} C i , h = { x i , h : x ∈ V ( F )} . For every x ∈ V ( F ) x \in V(F) x ∈ V ( F ) and i ∈ [ k ] i \in[k] i ∈ [ k ] , add the edges of the column
x i , 0 − x i , 1 − ⋯ − x i , R − 1 x_{i,0}-x_{i,1}-\cdots-x_{i,R-1} x i , 0 − x i , 1 − ⋯ − x i , R − 1
Make C i , 0 C_{i,0} C i , 0 complete to C i + 1 , 0 C_{i+1,0} C i + 1 , 0 for every i ∈ [ k − 1 ] i \in[k-1] i ∈ [ k − 1 ] . Add two vertices s s s and t t t , make s s s complete to C 1 , 0 C_{1,0} C 1 , 0 , and make t t t complete to C k , 0 C_{k,0} C k , 0 . We call the subgraph induced by s s s , t t t , and the cliques C i , 0 C_{i,0} C i , 0 the backbone. Attach the two pendant paths
s = s 0 − s 1 − ⋯ − s R , t = t 0 − t 1 − ⋯ − t R . s=s_0-s_1-\cdots-s_R,\qquad t=t_0-t_1-\cdots-t_R. s = s 0 − s 1 − ⋯ − s R , t = t 0 − t 1 − ⋯ − t R .
When R = 1 R=1 R = 1 , each column consists only of its backbone vertex.
Create the clique W = { q x : x ∈ V ( F ) } W = \{q_x : x \in V(F)\} W = { q x : x ∈ V ( F )} and add the edges
q x y i , R − 1 ∈ E ( H ) ⟺ y ∈ N F [ x ] , x , y ∈ V ( F ) , i ∈ [ k ] . q_xy_{i,R-1} \in E(H) \quad\Longleftrightarrow\quad y \in N_F[x], \qquad x,y \in V(F),\ i \in[k]. q x y i , R − 1 ∈ E ( H ) ⟺ y ∈ N F [ x ] , x , y ∈ V ( F ) , i ∈ [ k ] .
No edges other than those specified above are present. Thus q x q_x q x is adjacent to the top of every column corresponding to a vertex that dominates x x x . Since x ∈ N F [ x ] x \in N_F[x] x ∈ N F [ x ] , every vertex of W W W is connected to the backbone, and hence H H H is connected.
Figure 2 summarizes the construction. A box represents a clique, a thick horizontal segment represents a complete join, and a thin vertical segment represents the matching edges belonging to the columns.
Figure 2. Overview of the reduction from Dominating Set. Each C i , h C_{i,h} C i , h and W W W is a clique. Consecutive bottom cliques are completely joined, while the vertical edges form the columns. The path P v P_v P v stays in the backbone and selects one vertex from each clique C i , 0 C_{i,0} C i , 0 .
The graph has
( k R + 1 ) n + 2 R + 2 = ( k 2 + 1 ) n + 2 k + 2 (kR+1)n+2R+2=(k^2+1)n+2k+2 ( k R + 1 ) n + 2 R + 2 = ( k 2 + 1 ) n + 2 k + 2
vertices and can be constructed in polynomial time.
Bounding the clique cover number
The k R kR k R cliques C i , h C_{i,h} C i , h , the clique W W W , and the 2 R + 2 2R+2 2 R + 2 singleton cliques containing the vertices of the two pendant paths, including s s s and t t t , form an explicit vertex clique cover of size
k R + 1 + ( 2 R + 2 ) = k 2 + 2 k + 3. kR+1+(2R+2)=k^2+2k+3. k R + 1 + ( 2 R + 2 ) = k 2 + 2 k + 3.
Consequently, ϑ ( H ) ≤ k 2 + 2 k + 3 \vartheta(H) \le k^2+2k+3 ϑ ( H ) ≤ k 2 + 2 k + 3 . Notice that the supplied cover need not be minimum.
Correctness
Proof of Theorem 38. For a tuple v = ( v 1 , … , v k ) ∈ V ( F ) k \mathbf{v}=(v_1,\ldots,v_k)\in V(F)^k v = ( v 1 , … , v k ) ∈ V ( F ) k , where repetitions are allowed, let
P v = ( s , ( v 1 ) 1 , 0 , … , ( v k ) k , 0 , t ) , D v = { v 1 , … , v k } . P_{\mathbf{v}}=(s,(v_1)_{1,0},\ldots,(v_k)_{k,0},t), \qquad D_{\mathbf{v}}=\{v_1,\ldots,v_k\}. P v = ( s , ( v 1 ) 1 , 0 , … , ( v k ) k , 0 , t ) , D v = { v 1 , … , v k } .
Suppose first that F F F has a dominating set of size at most k k k . List its vertices in a k k k -tuple v \mathbf{v} v , repeating one vertex if necessary. We first verify that the corresponding path P v P_{\mathbf{v}} P v is a geodesic.
Claim 39. The shortest s s s –t t t paths are exactly the paths P v P_{\mathbf{v}} P v .
Proof. A shortest s s s –t t t path cannot enter either pendant path. Consider an excursion outside the backbone between two consecutive visits to it. If its endpoints belong to the same clique C i , 0 C_{i,0} C i , 0 , the excursion can be replaced by at most one edge. If they belong to distinct cliques C i , 0 C_{i,0} C i , 0 and C j , 0 C_{j,0} C j , 0 , then the excursion must reach W W W and return, since columns with different first indices have no other connection outside the backbone. This uses at least 2 R 2R 2 R edges, whereas the backbone connects the two endpoints in ∣ i − j ∣ ≤ k − 1 < 2 R |i-j| \le k-1 < 2R ∣ i − j ∣ ≤ k − 1 < 2 R edges. Hence every shortest s s s –t t t path is contained in the backbone. Its minimum length is k + 1 k+1 k + 1 , and the paths attaining this length are precisely the paths P v P_v P v .
The following claim relates the witness vertices to domination in F F F .
Claim 40. Every vertex outside W W W is within distance R R R of P v P_v P v . For every x ∈ V ( F ) x \in V(F) x ∈ V ( F ) ,
dist H ( q x , V ( P v ) ) = { R , N F [ x ] ∩ D v ≠ ∅ , R + 1 , N F [ x ] ∩ D v = ∅ (25) \operatorname{dist}_{H}(q_x,V(P_v)) =
\begin{cases}
R, & N_F[x] \cap D_v \ne\varnothing,\\
R+1, & N_F[x] \cap D_v = \varnothing
\end{cases} \tag*{(25)} dist H ( q x , V ( P v )) = { R , R + 1 , N F [ x ] ∩ D v = ∅ , N F [ x ] ∩ D v = ∅ (25) Proof. Every pendant-path vertex is within distance R R R of s s s or t t t . For a column vertex y i , h y_{i,h} y i , h , follow its column to y i , 0 y_{i,0} y i , 0 and, if necessary, use one edge of C i , 0 C_{i,0} C i , 0 to reach ( v i ) i , 0 (v_i)_{i,0} ( v i ) i , 0 . This takes at most h + 1 ≤ R h+1 \le R h + 1 ≤ R edges. Hence every vertex outside W W W is within distance R R R of P v P_v P v .
Assign level h h h to every vertex y i , h y_{i,h} y i , h , level R R R to every witness vertex, and level zero to all pendant-path vertices, including s s s and t t t . Every edge changes the level by at most one. Since every vertex of P v P_v P v has level zero, a walk of length at most R R R from q x q_x q x to P v P_v P v must have exactly R R R edges and decrease the level at every step. Its first edge goes to some y i , R − 1 y_{i,R-1} y i , R − 1 with y ∈ N F [ x ] y \in N_F[x] y ∈ N F [ x ] , and the remaining edges are forced down the same column to y i , 0 y_{i,0} y i , 0 . In particular, such a walk cannot use an edge inside W W W , inside a level clique, or inside the backbone.
It follows that dist H ( q x , V ( P v ) ) ≤ R \operatorname{dist}_{H}(q_x,V(P_v)) \le R dist H ( q x , V ( P v )) ≤ R precisely when v i ∈ N F [ x ] v_i \in N_F[x] v i ∈ N F [ x ] for some i ∈ [ k ] i \in[k] i ∈ [ k ] , and in this case the distance is exactly R R R . If no such index exists, then q x q_x q x reaches x 1 , 0 x_{1,0} x 1 , 0 in R R R steps, because x ∈ N F [ x ] x \in N_F[x] x ∈ N F [ x ] , and one additional edge of C 1 , 0 C_{1,0} C 1 , 0 reaches ( v 1 ) 1 , 0 (v_1)_{1,0} ( v 1 ) 1 , 0 . This proves (25).
In particular, ecc H ( P v ) ≤ R \operatorname{ecc}_{H}(P_v) \le R ecc H ( P v ) ≤ R if and only if D v D_v D v dominates F F F . Since D v D_v D v dominates F F F , Claim 40 gives ecc H ( P v ) ≤ R \operatorname{ecc}_{H}(P_v) \le R ecc H ( P v ) ≤ R . Together with Claim 39, this shows that P v P_v P v is a feasible solution. Hence ( H , R ) (H,R) ( H , R ) is a yes-instance of ESP.
For the reverse direction, suppose that ( H , R ) (H,R) ( H , R ) is a yes-instance of ESP, and let Q Q Q be a geodesic with ecc H ( Q ) ≤ R \operatorname{ecc}_{H}(Q) \le R ecc H ( Q ) ≤ R . We next extract from Q Q Q a path of the form P v P_v P v without increasing its eccentricity.
Claim 41. There is a tuple v ∈ V ( F ) k v \in V(F)^k v ∈ V ( F ) k such that ecc H ( P v ) ≤ R \operatorname{ecc}_{H}(P_v) \le R ecc H ( P v ) ≤ R .
Proof. The radius-R R R ball around s R s_R s R is exactly { s 0 , … , s R } \{s_0,\ldots,s_R\} { s 0 , … , s R } , and the analogous statement holds for t R t_R t R . Therefore Q Q Q meets both pendant paths. Since they attach to the rest of H H H only at s s s and t t t , respectively, the path Q Q Q contains both s s s and t t t . Its s s s –t t t subpath is shortest and, by Claim 39, is some P v P_v P v .
It remains to consider possible extensions of P v P_v P v in Q Q Q . Every geodesic is induced. An extension at s s s cannot return to ( v 1 ) 1 , 0 (v_1)_{1,0} ( v 1 ) 1 , 0 , since Q Q Q is simple, while every other vertex of C 1 , 0 C_{1,0} C 1 , 0 is adjacent to ( v 1 ) 1 , 0 (v_1)_{1,0} ( v 1 ) 1 , 0 and would create a chord. Thus any extension at s s s lies on the s s s -pendant path. Symmetrically, any extension at t t t lies on the t t t -pendant path.
For every vertex outside the two pendant paths, reaching such an extension requires passing through s s s or t t t , both of which already belong to P v P_v P v . Hence its distance to P v P_v P v equals its distance to Q Q Q and is at most R R R . Every pendant-path vertex is within distance R R R of s s s or t t t . Consequently, ecc H ( P v ) ≤ R \operatorname{ecc}_{H}(P_v) \le R ecc H ( P v ) ≤ R .
By Claim 41, some path P v P_v P v has eccentricity at most R R R . Claim 40 then shows that D v D_v D v dominates F F F and has size at most k k k . Therefore ( F , k ) (F,k) ( F , k ) is a yes-instance of Dominating Set if and only if ( H , R ) (H,R) ( H , R ) is a yes-instance of ESP. Together with the parameter bound, this completes the parameterized reduction.
Cutwidth
Recall that cutwidth ( G , π ) \operatorname{cutwidth}(G,\pi) cutwidth ( G , π ) is the maximum number of edges crossing a prefix cut of the ordering π \pi π , and cutwidth ( G ) \operatorname{cutwidth}(G) cutwidth ( G ) is its minimum over all orderings; see Subsection 2.1. The parameter is cutwidth ( G ) \operatorname{cutwidth}(G) cutwidth ( G ) alone; q q q is part of the input.
An instance of Binary CSP consists of a constraint graph F F F on a variable set V \mathcal{V} V , a finite domain D v D_v D v for each variable v v v , and a relation R u v ⊆ D u × D v R_{uv} \subseteq D_u \times D_v R uv ⊆ D u × D v for each edge u v ∈ E ( F ) uv \in E(F) uv ∈ E ( F ) . The domains and relations are explicitly listed. A satisfying assignment ρ \rho ρ chooses ρ ( v ) ∈ D v \rho(v) \in D_v ρ ( v ) ∈ D v and satisfies ( ρ ( u ) , ρ ( v ) ) ∈ R u v (\rho(u),\rho(v)) \in R_{uv} ( ρ ( u ) , ρ ( v )) ∈ R uv for every constraint. Repeated constraints on a pair can be intersected. Recall that vc ( F ) \operatorname{vc}(F) vc ( F ) denotes the vertex cover number of the constraint graph F F F .
Example. Let V = { x , y , z } \mathcal{V} = \{x,y,z\} V = { x , y , z } , let D x = D y = D z = { 0 , 1 } D_x = D_y = D_z = \{0,1\} D x = D y = D z = { 0 , 1 } , and let the constraint graph F F F be the path with edges x y xy x y and y z yz y z . Set
R x y = { ( 0 , 1 ) , ( 1 , 0 ) } , R y z = { ( 0 , 0 ) , ( 1 , 1 ) } . R_{xy} = \{(0,1),(1,0)\}, \qquad R_{yz} = \{(0,0),(1,1)\}. R x y = {( 0 , 1 ) , ( 1 , 0 )} , R y z = {( 0 , 0 ) , ( 1 , 1 )} .
Thus the constraints require ρ ( x ) ≠ ρ ( y ) \rho(x) \ne\rho(y) ρ ( x ) = ρ ( y ) and ρ ( y ) = ρ ( z ) \rho(y) = \rho(z) ρ ( y ) = ρ ( z ) . The assignment ( ρ ( x ) , ρ ( y ) , ρ ( z ) ) = ( 0 , 1 , 1 ) (\rho(x),\rho(y),\rho(z)) = (0,1,1) ( ρ ( x ) , ρ ( y ) , ρ ( z )) = ( 0 , 1 , 1 ) satisfies both constraints, whereas ( 0 , 1 , 0 ) (0,1,0) ( 0 , 1 , 0 ) violates the constraint on y z yz y z . Moreover, { y } \{y\} { y } is a minimum vertex cover of F F F , so vc ( F ) = 1 \operatorname{vc}(F) = 1 vc ( F ) = 1 . Here “binary” refers to each constraint involving two variables; the domains need not have size two.
Proposition 42 (Bodlaender, Groenland, and Pilipczuk [9 Theorem 1] ). Binary CSP parameterized by vc ( F ) \operatorname{vc}(F) vc ( F ) is W [ 3 ] W[3] W [ 3 ] -complete.
Theorem 43. ESP is W [ 3 ] W[3] W [ 3 ] -hard parameterized by cutwidth, even on connected graphs of maximum degree at most five. More precisely, a Binary CSP instance with constraint graph F F F can be transformed in polynomial time into an equivalent instance ( G , q ) (G,q) ( G , q ) together with an ordering π \pi π satisfying
Δ ( G ) ≤ 5 , cutwidth ( G , π ) ≤ 4 vc ( F ) + 7. \Delta(G) \le5,\qquad\operatorname{cutwidth}(G,\pi) \le4\operatorname{vc}(F) + 7. Δ ( G ) ≤ 5 , cutwidth ( G , π ) ≤ 4 vc ( F ) + 7. If a vertex cover of size k k k is supplied, the cutwidth bound is 2 k + 7 2k + 7 2 k + 7 .
Construction
If V = ∅ \mathcal{V} = \varnothing V = ∅ , return the yes-instance ( K 1 , 0 ) (K_1,0) ( K 1 , 0 ) . If some domain is empty, return the no-instance ( K 3 , 0 ) (K_3,0) ( K 3 , 0 ) ; a shortest path in a triangle contains at most two vertices. Both outputs satisfy the claimed bounds. Hence assume that V \mathcal{V} V and all domains are nonempty.
Let X = { x 1 , … , x k } X = \{x_1,\ldots,x_k\} X = { x 1 , … , x k } be a vertex cover of F F F , and put Y = V ∖ X = { y 1 , … , y m } Y = \mathcal{V} \setminus X = \{y_1,\ldots,y_m\} Y = V ∖ X = { y 1 , … , y m } . For now, X X X is supplied. For each variable v ∈ V v \in\mathcal{V} v ∈ V , put N v = ∣ D v ∣ − 1 N_v = |D_v| - 1 N v = ∣ D v ∣ − 1 and relabel its domain as D v = { 0 , … , N v } D_v = \{0,\ldots,N_v\} D v = { 0 , … , N v } . Set
S = ∑ v ∈ V ∣ D v ∣ = ∑ v ∈ V ( N v + 1 ) . S = \sum_{v \in\mathcal{V}} |D_v| = \sum_{v \in\mathcal{V}} (N_v + 1). S = v ∈ V ∑ ∣ D v ∣ = v ∈ V ∑ ( N v + 1 ) .
A test is a tuple τ = ( u , v , a , b ) \tau= (u,v,a,b) τ = ( u , v , a , b ) , where u v ∈ E ( F ) uv \in E(F) uv ∈ E ( F ) , a ∈ D u a \in D_u a ∈ D u , b ∈ D v b \in D_v b ∈ D v , and ( a , b ) ∉ R u v (a,b) \notin R_{uv} ( a , b ) ∈ / R uv . It records that u u u and v v v cannot simultaneously receive the values a a a and b b b . Thus an assignment ρ \rho ρ is satisfying exactly when, for every test, ρ ( u ) ≠ a \rho(u) \ne a ρ ( u ) = a or ρ ( v ) ≠ b \rho(v) \ne b ρ ( v ) = b .
Fix an arbitrary linear order on V \mathcal{V} V . For each constraint edge, write its endpoints as u , v u,v u , v with u u u preceding v v v , transposing the relation if necessary. Introduce tests only in this orientation.
List each test once, first those involving two variables of X X X , then those involving y 1 y_1 y 1 , then y 2 y_2 y 2 , and so on. Since Y Y Y is independent in F F F , every test involving a variable of Y Y Y has its other variable in X X X , so each test belongs to exactly one of these blocks. Fix an arbitrary order within each block.
Let T T T be the total number of tests. For each variable v v v , consider the sublist consisting only of tests containing v v v , preserving their order. Let t v t_v t v be the length of this sublist and, for a test τ \tau τ containing v v v , let p v ( τ ) p_v(\tau) p v ( τ ) be its position in this sublist, starting from 1. Thus
1 ≤ p v ( τ ) ≤ t v ≤ T , ∑ v t v = 2 T , T ≤ S 2 . 1 \le p_v(\tau) \le t_v \le T,\qquad\sum_v t_v = 2T,\qquad T \le S^2. 1 ≤ p v ( τ ) ≤ t v ≤ T , v ∑ t v = 2 T , T ≤ S 2 .
The test list is computable in polynomial time. Define
L = 2 ( S + T ) , q = 2 L . (26) L = 2(S+T),\qquad q = 2L. \tag*{(26)} L = 2 ( S + T ) , q = 2 L . (26)
All vertices introduced below are distinct unless explicitly identified. Every added path has new internal vertices, disjoint from all other added paths, and there are no unspecified edges.
Ladders and carriers. For every variable v v v , create two rail paths
A v , 0 ⋯ A v , N v , B v , 0 ⋯ B v , N v . A_{v,0}\cdots A_{v,N_v},\qquad B_{v,0}\cdots B_{v,N_v}. A v , 0 ⋯ A v , N v , B v , 0 ⋯ B v , N v .
For each a ∈ D v a \in D_v a ∈ D v , join A v , a A_{v,a} A v , a to B v , a B_{v,a} B v , a by a path of length N v + 1 N_v+1 N v + 1 , called *rung a a a . For N v = 0 N_v=0 N v = 0 , the ladder is a single edge. Arrange the ladders in the order x 1 , … , x k , y 1 , … , y m x_1,\ldots,x_k,y_1,\ldots,y_m x 1 , … , x k , y 1 , … , y m , adding the edge B u , N u A v , 0 B_{u,N_u}A_{v,0} B u , N u A v , 0 for consecutive variables u , v u,v u , v . Call the resulting graph C C C , the core; let s s s be its first top-rail vertex and t t t its last bottom-rail vertex.
For each variable v v v , designate the two ports
U v = A v , N v , V v = B v , 0 . U_v=A_{v,N_v},\qquad V_v=B_{v,0}. U v = A v , N v , V v = B v , 0 .
Attach a path of length t v t_v t v at each port, and denote these carrier paths by
Q v U = U v 0 U v 1 ⋯ U v t v , Q v V = V v 0 V v 1 ⋯ V v t v , Q_v^U=U_v^0U_v^1\cdots U_v^{t_v},\qquad Q_v^V=V_v^0V_v^1\cdots V_v^{t_v}, Q v U = U v 0 U v 1 ⋯ U v t v , Q v V = V v 0 V v 1 ⋯ V v t v ,
where U v 0 = U v U_v^0=U_v U v 0 = U v and V v 0 = V v V_v^0=V_v V v 0 = V v . All vertices with positive superscripts are new. If t v = 0 t_v=0 t v = 0 , each carrier path consists only of its port, so no vertices or edges are added. Let H H H consist of the core and all carrier paths.
Tests and pendants. For each test τ = ( u , v , a , b ) \tau=(u,v,a,b) τ = ( u , v , a , b ) , create a center c τ c_\tau c τ . With p = p u ( τ ) p=p_u(\tau) p = p u ( τ ) and r = p v ( τ ) r=p_v(\tau) r = p v ( τ ) , add four connection paths :
Table not numbered (PDF p. 42).
Attach a pendant path of length L L L at c τ c_\tau c τ , ending at z τ z_\tau z τ . Finally, attach pendant paths of length q + 1 q+1 q + 1 at s s s and t t t , ending at s ∗ s^* s ∗ and t ∗ t^* t ∗ , respectively. Call these the terminal pendants . This completes G G G .
Since N v ≤ S − 1 N_v \le S - 1 N v ≤ S − 1 and every attachment position is between 1 1 1 and T T T , each connection length λ \lambda λ satisfies
L 2 < L − S − T + 2 ≤ λ ≤ L . (27) \frac{L}{2} < L - S - T + 2 \le\lambda\le L. \tag*{(27)} 2 L < L − S − T + 2 ≤ λ ≤ L . (27)
In particular, every specified length is positive.
Correctness
Distances within H H H . The diameter of ladder v v v is at most 2 N v + 1 2N_v + 1 2 N v + 1 . Indeed, for any two vertices, the sums of their rung distances to the top and bottom rails add to 2 ( N v + 1 ) 2(N_v + 1) 2 ( N v + 1 ) . One of these sums is at most N v + 1 N_v + 1 N v + 1 , and the corresponding rail segment has length at most N v N_v N v . These segments give a walk of length at most 2 N v + 1 2N_v + 1 2 N v + 1 between the two vertices. Joining ladders in sequence, and using that each carrier has length at most T T T , gives
diam ( C ) ≤ ∑ v ( 2 N v + 1 ) + ∣ V ∣ − 1 = 2 S − 1 , diam ( H ) ≤ 2 S − 1 + 2 T = L − 1. (28) \operatorname{diam}(C) \le\sum_v (2N_v + 1) + |V| - 1 = 2S - 1,\qquad\operatorname{diam}(H) \le2S - 1 + 2T = L - 1. \tag*{(28)} diam ( C ) ≤ v ∑ ( 2 N v + 1 ) + ∣ V ∣ − 1 = 2 S − 1 , diam ( H ) ≤ 2 S − 1 + 2 T = L − 1. (28)
Consequently, every shortest path in G G G whose endpoints lie in H H H stays in H H H : an excursion outside H H H cannot use a non-root pendant vertex and must traverse two complete connection paths, giving a subpath of length greater than L L L by (27), whereas its endpoints are at distance at most L − 1 L - 1 L − 1 in H H H .
For an assignment ρ \rho ρ , define P ρ P_\rho P ρ to follow the first terminal pendant from s ∗ s^* s ∗ to s s s , cross each ladder along the top rail to rung ρ ( v ) \rho(v) ρ ( v ) , traverse that rung, continue along the bottom rail, and finally follow the other terminal pendant from t t t to t ∗ t^* t ∗ .
Claim 44. Every P ρ P_\rho P ρ is shortest, and
d G ( U v , P ρ ) = N v − ρ ( v ) , d G ( V v , P ρ ) = ρ ( v ) . (29) d_G(U_v, P_\rho) = N_v - \rho(v),\qquad d_G(V_v, P_\rho) = \rho(v). \tag*{(29)} d G ( U v , P ρ ) = N v − ρ ( v ) , d G ( V v , P ρ ) = ρ ( v ) . (29) Moreover, every shortest path of eccentricity at most q q q can be extended to some P ρ P_\rho P ρ without increasing its eccentricity.
Proof. A path across ladder v v v , from A v , 0 A_{v,0} A v , 0 to B v , N v B_{v,N_v} B v , N v , traverses at least one entire rung and at least N v N_v N v rail edges: rungs preserve the column index, whereas rail edges change it by one. Its minimum length is therefore 2 N v + 1 2N_v + 1 2 N v + 1 , attained exactly by choosing one rung and moving monotonically along the rails. The inter-ladder edges are bridges in C C C , so the shortest s s s –t t t paths in C C C correspond exactly to assignments and have length 2 S − 1 2S - 1 2 S − 1 . Shortest s s s –t t t paths in G G G stay in H H H by the preceding argument, and cannot traverse a carrier edge, since carriers are pendant in H H H . Hence they are precisely these core paths. It follows that every P ρ P_\rho P ρ is shortest.
For the port distances it suffices to consider routes in C C C : carriers give no shortcut in H H H , shortest paths between vertices of H H H stay in H H H , and either terminal pendant is reached through s s s or t t t , already on P ρ P_\rho P ρ . The top rail reaches P ρ P_\rho P ρ from U v U_v U v in N v − ρ ( v ) N_v - \rho(v) N v − ρ ( v ) steps. Traversing another rung takes N v + 1 N_v + 1 N v + 1 steps, and a route in C C C leaving the ladder first meets A v , 0 A_{v,0} A v , 0 or B v , N v B_{v,N_v} B v , N v , both on P ρ P_\rho P ρ . The chosen rung cannot be entered before meeting an endpoint already on P ρ P_\rho P ρ . Thus the top-rail route is shortest; the bottom-rail argument is symmetric. This proves (29).
Now let Q Q Q be shortest with ecc G ( Q ) ≤ q \operatorname{ecc}_G(Q) \le q ecc G ( Q ) ≤ q . It must meet the non-root part of each terminal pendant; otherwise its distance from the corresponding leaf is at least q + 1 q + 1 q + 1 . A simple path meeting both pendants has an endpoint in each, so Q Q Q contains a shortest s s s –t t t subpath. This subpath selects one rung in every ladder. Extending Q Q Q to both terminal leaves therefore gives the corresponding shortest path P ρ P_\rho P ρ , and adding vertices cannot increase eccentricity. ▸
Claim 45. For every assignment ρ \rho ρ , we have ecc G ( P ρ ) ≤ q \operatorname{ecc}_G(P_\rho) \le q ecc G ( P ρ ) ≤ q if and only if ρ \rho ρ satisfies the Binary CSP instance.
Proof. Fix a test τ = ( u , v , a , b ) \tau=(u,v,a,b) τ = ( u , v , a , b ) . A shortest route from c τ c_\tau c τ to P ρ P_\rho P ρ first reaches P ρ P_\rho P ρ in the core, since either terminal pendant is entered through a vertex of P ρ P_\rho P ρ . It starts with one complete connection path. Its remaining subpath has endpoints in H H H , so stays in H H H ; it follows the carrier to its port and then reaches P ρ P_\rho P ρ inside C C C . For ( w , h ) ∈ { ( u , a ) , ( v , b ) } (w,h) \in\{(u,a),(v,b)\} ( w , h ) ∈ {( u , a ) , ( v , b )} and p = p w ( τ ) p=p_w(\tau) p = p w ( τ ) , the two possible route lengths through its carriers are, by (29) ,
( L − N w + h + 1 − p ) + p + ( N w − ρ ( w ) ) = L + 1 + h − ρ ( w ) , (L-N_w+h+1-p)+p+(N_w-\rho(w))=L+1+h-\rho(w), ( L − N w + h + 1 − p ) + p + ( N w − ρ ( w )) = L + 1 + h − ρ ( w ) , ( L − h + 1 − p ) + p + ρ ( w ) = L + 1 + ρ ( w ) − h . (L-h+1-p)+p+\rho(w)=L+1+\rho(w)-h. ( L − h + 1 − p ) + p + ρ ( w ) = L + 1 + ρ ( w ) − h . Taking the minimum of these four values and adding the test pendant’s length L L L yields
d G ( z τ , P ρ ) = q + 1 − max { ∣ ρ ( u ) − a ∣ , ∣ ρ ( v ) − b ∣ } . (30) d_G(z_\tau,P_\rho)=q+1-\max\{|\rho(u)-a|,|\rho(v)-b|\}. \tag*{(30)} d G ( z τ , P ρ ) = q + 1 − max { ∣ ρ ( u ) − a ∣ , ∣ ρ ( v ) − b ∣ } . (30) This distance exceeds q q q exactly when ( ρ ( u ) , ρ ( v ) ) = ( a , b ) (\rho(u),\rho(v))=(a,b) ( ρ ( u ) , ρ ( v )) = ( a , b ) . Thus all test leaves are within distance q q q exactly when ρ \rho ρ avoids every forbidden pair.
It remains to check other vertices. Every vertex of H H H is within L − 1 L-1 L − 1 of P ρ P_\rho P ρ by (28) . Every connection-path vertex, including its center, is within L L L of H H H , so its distance from P ρ P_\rho P ρ is at most 2 L − 1 < q 2L-1<q 2 L − 1 < q . The terminal pendants belong to P ρ P_\rho P ρ . Finally, on a test pendant the distance from P ρ P_\rho P ρ increases with the distance from its center, and is largest at its leaf. Hence covering all test leaves covers all of G G G .
Claims 44 and 45 prove that the source instance is satisfiable if and only if ( G , q ) (G,q) ( G , q ) is a yes-instance of ESP.
Cutwidth and completion of the proof
We construct an ordering π \pi π . First list the terminal pendant from s ∗ s^* s ∗ towards s s s , omitting s s s .
To process a ladder v v v , list, for a = 0 , … , N v a=0,\ldots,N_v a = 0 , … , N v ,
A v , a A_{v,a} A v , a , the internal vertices of rung a a a from top to bottom, B v , a B_{v,a} B v , a .
To process a test τ = ( u , v , a , b ) \tau=(u,v,a,b) τ = ( u , v , a , b ) , first list its four carrier attachments
U a p u ( τ ) , V a p u ( τ ) , U b p v ( τ ) , V b p v ( τ ) U_a^{p_u(\tau)},\ V_a^{p_u(\tau)},\ U_b^{p_v(\tau)},\ V_b^{p_v(\tau)} U a p u ( τ ) , V a p u ( τ ) , U b p v ( τ ) , V b p v ( τ ) .
Next list the internal vertices of its four connection paths, one path at a time from its carrier attachment towards c τ c_\tau c τ ; then list c τ c_\tau c τ and its pendant vertices in order towards z τ z_\tau z τ .
Process the ladders of x 1 , … , x k x_1,\ldots,x_k x 1 , … , x k , followed by all tests internal to X X X . For j = 1 , … , m j=1,\ldots,m j = 1 , … , m , process ladder y j y_j y j and then all tests containing y j y_j y j . Within each block use the previously fixed test order. Finally, list the terminal pendant from the neighbor of t t t to t ∗ t^* t ∗ . Every non-root carrier vertex belongs to exactly one test, and these tests are processed in increasing order of their positions on each carrier. Thus every vertex is listed exactly once.
Claim 46. The ordering π \pi π satisfies cutwidth( G , π ) ≤ 2 k + 7 (G,\pi)\le2k+7 ( G , π ) ≤ 2 k + 7 .
Proof. Fix a cut in the ordering, and call the vertices before the cut listed. The root of each carrier is listed when its ladder is processed, before any of its non-root vertices. The non-root vertices are subsequently listed in increasing order of their positions on the carrier, because tests are processed in the order used to define p v ( τ ) p_v(\tau) p v ( τ ) . Thus the listed vertices of each carrier form an initial segment, possibly empty or the whole path. Consequently, at most one
edge of that carrier crosses the cut: the edge joining its last listed vertex to its first unlisted vertex, when both exist.
The two carriers of each variable in X X X therefore contribute at most 2 k 2k 2 k crossing edges altogether. For each y j ∈ Y y_j \in Y y j ∈ Y , its block consists of its ladder followed by all tests containing y j y_j y j . Before this block, none of its carrier vertices, including the roots, is listed; after the block, all of them are listed. Hence a variable of Y Y Y can contribute crossing carrier edges only if the cut lies within its block. At most one such block contains the cut, and its two carriers contribute at most two crossing edges. Therefore, at most 2 k + 2 2k + 2 2 k + 2 carrier edges cross the cut.
During a ladder, no test is partially processed. At most one edge of each rail and one edge of the current rung cross. The incoming inter-ladder edge stops crossing when the first ladder vertex is listed, and the outgoing edge starts crossing only when its last vertex is listed; the terminal-pendant edges behave likewise. Thus at most three non-carrier edges cross.
During a test, a whole initial segment of the ladder sequence has been listed, so at most one core or terminal-pendant edge crosses. Each of the test’s four connection paths contributes at most one crossing edge. When its center is listed, all four paths are complete, and at most one edge of its pendant crosses. Earlier tests are complete; later tests and their carrier attachments are unlisted. Thus at most four test edges cross, giving at most ( 2 k + 2 ) + 1 + 4 = 2 k + 7 (2k + 2) + 1 + 4 = 2k + 7 ( 2 k + 2 ) + 1 + 4 = 2 k + 7 edges altogether. Cuts between operations obey the same bounds. During the initial and final terminal-pendant operations only one edge crosses.
Completion of the proof of Theorem 43 . The graph is simple and connected by construction. Each test center has degree five, and all other vertices have degree at most three. This includes N v = 0 N_v = 0 N v = 0 : the coinciding port and ladder terminal then has one rung neighbor, at most one carrier neighbor, and one inter-ladder or terminal-pendant neighbor. The core has O ( S 2 ) O(S^2) O ( S 2 ) vertices, the carriers add 2 ∑ v t v = 4 T 2\sum_v t_v = 4T 2 ∑ v t v = 4 T , each test adds O ( L ) O(L) O ( L ) , and the terminal pendants add O ( L ) O(L) O ( L ) . Consequently,
∣ V ( G ) ∣ = O ( S 2 + ( T + 1 ) L ) , |V(G)| = O(S^2 + (T + 1)L), ∣ V ( G ) ∣ = O ( S 2 + ( T + 1 ) L ) ,
which is polynomial in the source input since T ≤ S 2 T \le S^2 T ≤ S 2 and L = 2 ( S + T ) L = 2(S + T) L = 2 ( S + T ) . All lengths are realized by subdivisions. Both G G G and π \pi π can therefore be constructed in polynomial time.
If no cover is supplied, let X X X be the endpoints of a greedily computed maximal matching M M M in F F F . Maximality makes X X X a vertex cover, while every vertex cover meets each of the pairwise disjoint edges of M M M . Hence k = ∣ X ∣ = 2 ∣ M ∣ ≤ 2 vc ( F ) k = |X| = 2|M| \le2\,\operatorname{vc}(F) k = ∣ X ∣ = 2∣ M ∣ ≤ 2 vc ( F ) . The correctness claims and Claim 46 now give a polynomial-time reduction with
cutwidth ( G ) ≤ cutwidth ( G , π ) ≤ 2 k + 7 ≤ 4 vc ( F ) + 7. \operatorname{cutwidth}(G) \le\operatorname{cutwidth}(G,\pi) \le2k + 7 \le4\,\operatorname{vc}(F) + 7. cutwidth ( G ) ≤ cutwidth ( G , π ) ≤ 2 k + 7 ≤ 4 vc ( F ) + 7.
Proposition 42 proves the asserted W[3 ] -hardness, including when the ordering is supplied with the output instance.
Para-NP-hardness
Tree-independence number
Recall that tree - α ( G ) \operatorname{tree}\text{-}\alpha(G) tree - α ( G ) is the minimum, over all tree decompositions, of the largest independence number of a bag; see Subsection 2.1.
We show that ESP remains NP-hard even when the input graph has tree-independence number at most two. Moreover, the reduction produces a tree decomposition together with a partition of every bag into two cliques.
The construction is a variant of the SAT reduction of Dragan and Leitert [28 Theorem 7] : we add the literal-pair edges and make the clause vertices a clique to obtain a tree decomposition whose bags are unions of two cliques.
Theorem 47. ESP is NP-hard on connected graphs G G G with tree-α ( G ) ≤ 2 \alpha(G) \le2 α ( G ) ≤ 2 . This remains true when the input contains a tree decomposition of G G G and an explicit partition of every bag into two cliques.
Construction
We give a polynomial-time reduction from 3-SAT. Let Φ \Phi Φ be a 3-CNF formula with variables x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n and clauses D 1 , … , D m D_1,\ldots,D_m D 1 , … , D m . We may assume that n , m ≥ 1 n,m \ge1 n , m ≥ 1 and that every clause is nonempty. Repeated variables within a clause cause no difficulty. Set R = n + 1 R=n+1 R = n + 1 .
Create connector vertices a 0 , … , a n a_0,\ldots,a_n a 0 , … , a n . For every i i i with 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n , create two literal vertices p i p_i p i and q i q_i q i and add the edges
a i − 1 p i , a i − 1 q i , a i p i , a i q i , p i q i ( 1 ≤ i ≤ n ) . a_{i-1}p_i,\quad a_{i-1}q_i,\quad a_ip_i,\quad a_iq_i,\quad p_iq_i \qquad(1 \le i \le n). a i − 1 p i , a i − 1 q i , a i p i , a i q i , p i q i ( 1 ≤ i ≤ n ) .
Let H H H denote the resulting variable-chain graph. The vertices p i p_i p i and q i q_i q i represent the literals x i x_i x i and ¬ x i \neg x_i ¬ x i , respectively.
Create a clique C = { c 1 , … , c m } C=\{c_1,\ldots,c_m\} C = { c 1 , … , c m } . For every occurrence of x i x_i x i in D j D_j D j , add a path of length exactly R R R between c j c_j c j and p i p_i p i . Similarly, for every occurrence of ¬ x i \neg x_i ¬ x i in D j D_j D j , add a path of length exactly R R R between c j c_j c j and q i q_i q i . We call these paths the occurrence paths. Their internal vertices are new and pairwise distinct, and every internal vertex has degree two.
Finally, attach a pendant path of length R R R to a 0 a_0 a 0 , with other endpoint s s s , and a pendant path of length R R R to a n a_n a n , with other endpoint t t t . No further edges are added. The output instance is ( G , R ) (G,R) ( G , R ) .
Since every clause is nonempty, the graph G G G is connected. There are at most 3 m 3m 3 m occurrence paths, each of length R = n + 1 R=n+1 R = n + 1 . Hence G G G has O ( n m + n + m ) O(nm+n+m) O ( nm + n + m ) vertices and O ( n m + n + m 2 ) O(nm+n+m^2) O ( nm + n + m 2 ) edges and can be constructed in polynomial time.
Bounding the tree-independence number
We first construct a tree decomposition of G − C G-C G − C whose bags are cliques. For H H H , consider the bags
A i = { a i − 1 , p i , q i } and B i = { a i , p i , q i } ( 1 ≤ i ≤ n ) , A_i=\{a_{i-1},p_i,q_i\}\qquad\text{and}\qquad B_i=\{a_i,p_i,q_i\}\qquad(1\le i\le n), A i = { a i − 1 , p i , q i } and B i = { a i , p i , q i } ( 1 ≤ i ≤ n ) ,
arranged in the path
A 1 − B 1 − A 2 − B 2 − ⋯ − A n − B n . A_1-B_1-A_2-B_2-\cdots-A_n-B_n. A 1 − B 1 − A 2 − B 2 − ⋯ − A n − B n .
Every bag induces a triangle and every edge of H H H is covered. Each literal vertex occurs in the consecutive bags A i , B i A_i,B_i A i , B i . For 1 ≤ i < n 1 \le i < n 1 ≤ i < n , the connector a i a_i a i occurs in the consecutive bags B i , A i + 1 B_i,A_{i+1} B i , A i + 1 , whereas a 0 a_0 a 0 and a n a_n a n each occur in one bag. Thus the running-intersection condition holds.
After deleting C C C , every occurrence path is a pendant path attached to its literal endpoint. The two tails are also pendant paths attached to H H H . For each such path v 0 v 1 ⋯ v ℓ v_0v_1\cdots v_\ell v 0 v 1 ⋯ v ℓ , where v 0 ∈ V ( H ) v_0\in V(H) v 0 ∈ V ( H ) , introduce the chain of bags
{ v 0 , v 1 } , { v 1 , v 2 } , … , { v ℓ − 1 , v ℓ } . \{v_0,v_1\},\{v_1,v_2\},\ldots,\{v_{\ell-1},v_\ell\}. { v 0 , v 1 } , { v 1 , v 2 } , … , { v ℓ − 1 , v ℓ } .
and join its first bag to an existing bag containing v 0 v_0 v 0 . The new bag chains are pairwise disjoint as sets of decomposition nodes. Every new bag is a clique, every new edge is covered, and the bags containing any fixed vertex remain connected. We obtain a tree decomposition ( T , ( K u ) u ∈ V ( T ) ) (T,(K_u)_{u\in V(T)}) ( T , ( K u ) u ∈ V ( T ) ) of G − C G-C G − C with clique bags.
Replace each bag K u K_u K u by K u ′ = K u ∪ C K'_u=K_u\cup C K u ′ = K u ∪ C . All edges outside C C C remain covered, all edges inside C C C are covered, and an edge between C C C and a vertex v ∉ C v\notin C v ∈ / C is covered by any enlarged bag containing v v v . The bags containing a vertex outside C C C remain connected, while every vertex of C C C appears in every bag. This is therefore a tree decomposition of G G G .
Each bag K u ′ K'_u K u ′ is the union of the two cliques K u K_u K u and C C C . Consequently, every independent set in G [ K u ′ ] G[K'_u] G [ K u ′ ] has size at most two. The decomposition has polynomially many bags, each of size at most m + 3 m+3 m + 3 , and is produced by the reduction. Thus tree-α ( G ) ≤ 2 \alpha(G)\le2 α ( G ) ≤ 2 .
Correctness
Proof of Theorem 47. We begin with the structure of the shortest paths through the variable chain.
Claim 48. The distance between a 0 a_0 a 0 and a n a_n a n is 2 n 2n 2 n . Moreover, the shortest a 0 a_0 a 0 –a n a_n a n paths are precisely the paths
a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) (31) a_0,z_1,a_1,z_2,a_2,\ldots,z_n,a_n,\qquad z_i\in\{p_i,q_i\}\quad(1\le i\le n) \tag*{(31)} a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) (31)
Proof. Every displayed path exists and has length 2 n 2n 2 n . A simple path with both endpoints in H H H cannot enter a pendant tail, since it would have to leave through the same attachment vertex. If an a 0 a_0 a 0 –a n a_n a n path leaves H H H through an occurrence path, then it must traverse that path completely to reach C C C and traverse another occurrence path completely to return to H H H . This uses at least 2 R = 2 n + 2 2R=2n+2 2 R = 2 n + 2 edges. Hence every shortest a 0 a_0 a 0 –a n a_n a n path is contained in H H H . The consecutive variable gadgets meet only at their connector vertices. An a 0 a_0 a 0 –a n a_n a n path in H H H must therefore visit a 0 , a 1 , … , a n a_0,a_1,\ldots,a_n a 0 , a 1 , … , a n in this order. Crossing the i i i th gadget requires at least two edges, with equality precisely for the paths a i − 1 p i a i a_{i-1}p_i a_i a i − 1 p i a i and a i − 1 q i a i a_{i-1}q_i a_i a i − 1 q i a i . Summing over all gadgets proves the claim.
For a path L L L of the form (31), define the assignment σ L \sigma_L σ L by
σ L ( x i ) = t r u e ⟺ p i ∈ V ( L ) . \sigma_L(x_i)=\mathrm{true}\quad\Longleftrightarrow\quad p_i\in V(L). σ L ( x i ) = true ⟺ p i ∈ V ( L ) .
Exactly one of p i , q i p_i,q_i p i , q i lies on L L L , so this assignment is well-defined. A literal is true under σ L \sigma_L σ L precisely when its corresponding literal vertex lies on L L L .
Suppose first that Φ \Phi Φ is satisfiable, and fix a satisfying assignment. Choose z i = p i z_i=p_i z i = p i when x i x_i x i is true and z i = q i z_i=q_i z i = q i when x i x_i x i is false, and let L σ = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n L_\sigma=a_0,z_1,a_1,z_2,a_2,\ldots,z_n,a_n L σ = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n . By Claim 48, the path L σ L_\sigma L σ is shortest. We show that its eccentricity is at most R R R .
Every connector vertex belongs to L σ L_\sigma L σ . For each i i i , the literal vertex not chosen by L σ L_\sigma L σ is adjacent to the chosen one through the edge p i q i p_iq_i p i q i . Hence every vertex of H H H has distance at most one from V ( L σ ) V(L_\sigma) V ( L σ ) . Every vertex of the left tail is at distance at most R R R from a 0 ∈ V ( L σ ) a_0\in V(L_\sigma) a 0 ∈ V ( L σ ) , and the analogous statement holds for the right tail and a n a_n a n .
Consider an internal vertex w w w of an occurrence path and let z z z be the literal endpoint of this path. The w w w –z z z segment has length at most R − 1 R-1 R − 1 , while dist G ( z , V ( L σ ) ) ≤ 1 \operatorname{dist}_G(z,V(L_\sigma))\le1 dist G ( z , V ( L σ )) ≤ 1 . Hence
dist G ( w , V ( L σ ) ) ≤ dist G ( w , z ) + dist G ( z , V ( L σ ) ) ≤ ( R − 1 ) + 1 = R . \operatorname{dist}_G(w,V(L_\sigma))\le\operatorname{dist}_G(w,z)+\operatorname{dist}_G(z,V(L_\sigma))\le(R-1)+1=R. dist G ( w , V ( L σ )) ≤ dist G ( w , z ) + dist G ( z , V ( L σ )) ≤ ( R − 1 ) + 1 = R .
We have now accounted for every vertex outside C C C , and each of them is at distance at most R R R from V ( L σ ) V(L_\sigma) V ( L σ ) . It remains to consider the clause vertices. Since the fixed assignment satisfies D j D_j D j , some literal of D j D_j D j is true. Its literal vertex belongs to L σ L_\sigma L σ , and the corresponding occurrence path joins it to c j c_j c j in exactly R R R edges. Thus dist G ( c j , V ( L σ ) ) ≤ R \operatorname{dist}_G(c_j,V(L_\sigma)) \le R dist G ( c j , V ( L σ )) ≤ R for every j ∈ { 1 , … , m } j \in\{1,\ldots,m\} j ∈ { 1 , … , m } . Consequently, ecc G ( L σ ) ≤ R \operatorname{ecc}_G(L_\sigma) \le R ecc G ( L σ ) ≤ R , and ( G , R ) (G,R) ( G , R ) is a yes-instance of ESP.
For the reverse direction, suppose that ( G , R ) (G,R) ( G , R ) is a yes-instance. Let Q Q Q be a shortest path with ecc G ( Q ) ≤ R \operatorname{ecc}_G(Q) \le R ecc G ( Q ) ≤ R . The next claim extracts from Q Q Q the path encoding the desired assignment.
Claim 49. After possibly reversing Q Q Q , the path Q Q Q contains a shortest a 0 a_0 a 0 –a n a_n a n path
P = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) P = a_0, z_1, a_1, z_2, a_2, \ldots, z_n, a_n,\qquad z_i \in\{p_i,q_i\}\quad(1 \le i \le n) P = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) as a subpath. Moreover, every vertex of Q Q Q outside P P P lies on one of the two pendant tails.
Proof. Let T s T_s T s and T t T_t T t denote the two pendant tails, including their attachment vertices a 0 a_0 a 0 and a n a_n a n , respectively. Since dist G ( s , a 0 ) = dist G ( t , a n ) = R \operatorname{dist}_G(s,a_0)=\operatorname{dist}_G(t,a_n)=R dist G ( s , a 0 ) = dist G ( t , a n ) = R , every vertex outside T s T_s T s is at distance at least R + 1 R+1 R + 1 from s s s , and every vertex outside T t T_t T t is at distance at least R + 1 R+1 R + 1 from t t t . As ecc G ( Q ) ≤ R \operatorname{ecc}_G(Q) \le R ecc G ( Q ) ≤ R , the path Q Q Q meets both T s T_s T s and T t T_t T t . The two tails attach to the rest of G G G only at a 0 a_0 a 0 and a n a_n a n . Since Q Q Q is connected, it follows that a 0 , a n ∈ V ( Q ) a_0,a_n \in V(Q) a 0 , a n ∈ V ( Q ) .
Let P P P be the a 0 a_0 a 0 –a n a_n a n subpath of Q Q Q . Since every subpath of a shortest path is shortest, Claim 48 shows that, after reversing Q Q Q if necessary,
P = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) . P = a_0, z_1, a_1, z_2, a_2, \ldots, z_n, a_n,\qquad z_i \in\{p_i,q_i\}\quad(1 \le i \le n). P = a 0 , z 1 , a 1 , z 2 , a 2 , … , z n , a n , z i ∈ { p i , q i } ( 1 ≤ i ≤ n ) .
It remains to locate the vertices of Q Q Q outside P P P . Since every shortest path is induced, Q Q Q cannot extend P P P at a 0 a_0 a 0 through the unselected vertex of { p 1 , q 1 } \{p_1,q_1\} { p 1 , q 1 } : that vertex is adjacent to the selected one through the edge p 1 q 1 p_1q_1 p 1 q 1 and would create a chord. Thus an extension at a 0 a_0 a 0 must enter the left tail, whose degree-two vertices force the extension to remain on that tail. The same argument, using the edge p n q n p_nq_n p n q n , shows that an extension at a n a_n a n lies on the right tail. Hence every vertex of V ( Q ) ∖ V ( P ) V(Q) \setminus V(P) V ( Q ) ∖ V ( P ) lies on one of the two pendant tails. ◀
Let P P P be the subpath given by Claim 49. Any path from a clause vertex to the left tail passes through a 0 a_0 a 0 , and any path to the right tail passes through a n a_n a n . Since a 0 , a n ∈ V ( P ) a_0,a_n \in V(P) a 0 , a n ∈ V ( P ) and V ( Q ) ∖ V ( P ) V(Q) \setminus V(P) V ( Q ) ∖ V ( P ) contains only tail vertices, we have dist G ( c j , V ( P ) ) = dist G ( c j , V ( Q ) ) ≤ R \operatorname{dist}_G(c_j,V(P))=\operatorname{dist}_G(c_j,V(Q)) \le R dist G ( c j , V ( P )) = dist G ( c j , V ( Q )) ≤ R for every j ∈ { 1 , … , m } j \in\{1,\ldots,m\} j ∈ { 1 , … , m } . It remains to translate this distance bound back into a truth assignment.
Claim 50. For every j ∈ { 1 , … , m } j \in\{1,\ldots,m\} j ∈ { 1 , … , m } ,
dist G ( c j , V ( P ) ) ≤ R ⟹ σ P satisfies D j (32) \operatorname{dist}_G(c_j,V(P)) \le R \quad\Longrightarrow\quad\sigma_P\text{ satisfies }D_j \tag*{(32)} dist G ( c j , V ( P )) ≤ R ⟹ σ P satisfies D j (32)
Proof. Fix j j j and let W W W be a shortest c j c_j c j –V ( P ) V(P) V ( P ) path of length at most R R R . The path W W W starts in C C C and ends in H H H . Consider the last vertex of C C C and the first vertex of H H H on W W W . The segment between them is a complete occurrence path of length R R R , since every internal vertex of an occurrence path has degree two. As W W W has length at most R R R , this segment is the whole path W W W . In particular, W W W starts at c j c_j c j and ends at a literal vertex of P P P . The corresponding literal occurs in D j D_j D j and is true under σ P \sigma_P σ P . Hence σ P \sigma_P σ P satisfies D j D_j D j . ◀
Applying Claim 50 to every clause shows that σ P \sigma_P σ P satisfies Φ \Phi Φ . Hence Φ \Phi Φ is satisfiable.
This proves the theorem, including the version in which the tree decomposition and the clique partition of every bag are supplied. ◀
Corollary 51. ESP parameterized by tree-independence number is para-NP-hard .
Proof. Theorem 47 gives NP-hardness already when the parameter is at most two. ◀
Kernelization
This section presents a polynomial kernel for ESP parameterized by maximum leaf number, followed by kernel lower bounds for distance to clique, feedback edge number, vertex cover number, and bandwidth.
Cross-composition framework
We first recall the definitions used by the cross-composition framework [10 ] . An equivalence relation R \mathcal{R} R on Σ ∗ \Sigma^* Σ ∗ is a polynomial equivalence relation if it has the following properties.
Given strings x x x and y y y , one can decide in time polynomial in ∣ x ∣ + ∣ y ∣ |x|+|y| ∣ x ∣ + ∣ y ∣ whether x R y x\mathrel{\mathcal{R}}y x R y .
For every finite set S ⊆ Σ ∗ S\subseteq\Sigma^* S ⊆ Σ ∗ , the number of equivalence classes of R \mathcal{R} R represented in S S S is bounded by a polynomial in the size of the largest string in S S S .
Let L ⊆ Σ ∗ L\subseteq\Sigma^* L ⊆ Σ ∗ be a language, let R \mathcal{R} R be a polynomial equivalence relation, and let Q ⊆ Σ ∗ × N Q\subseteq\Sigma^*\times\mathbb{N} Q ⊆ Σ ∗ × N be a parameterized problem. An OR-cross-composition of L L L into Q Q Q with respect to R \mathcal{R} R is a polynomial-time algorithm that receives t t t instances x 1 , … , x t x_1,\ldots,x_t x 1 , … , x t of L L L from the same equivalence class and outputs an instance ( y , k ) (y,k) ( y , k ) of Q Q Q with the following properties.
The parameter k k k is bounded by a polynomial in max i ∈ [ t ] ∣ x i ∣ + log t \max_{i\in[t]}|x_i|+\log t max i ∈ [ t ] ∣ x i ∣ + log t .
The instance ( y , k ) (y,k) ( y , k ) is a yes-instance if and only if at least one input instance x i x_i x i is a yes-instance.
Theorem 52 (Bodlaender, Jansen, and Kratsch [10 ] , Corollary 3.6). If an NP-hard language OR-cross-composes into a parameterized problem Q Q Q , then Q Q Q admits no polynomial kernelization or polynomial compression unless NP ⊆ \subseteq ⊆ coNP/poly and the polynomial hierarchy collapses.
Maximum leaf number
Recall that ℓ = ml ( G ) \ell=\operatorname{ml}(G) ℓ = ml ( G ) is the maximum number of leaves in a spanning tree of G G G , as defined in Subsection 2.1.
We prove that ESP admits a polynomial kernel when parameterized by maximum leaf number. The main idea is to suppress maximal degree-two chains and store their lengths in binary. A small-core representation gives a polynomial compression, and an explicit certificate shows that the compressed language belongs to NP.
Theorem 53. ESP admits a polynomial kernel parameterized by maximum leaf number. More precisely, it admits an O ( ℓ 4 ) O(\ell^4) O ( ℓ 4 ) -bit polynomial compression into a fixed language in NP, and consequently an ESP kernel of encoding length ℓ O ( 1 ) \ell^{O(1)} ℓ O ( 1 ) .
A small weighted core
A weighted multigraph may contain parallel edges and loops. If every edge e e e is assigned a positive integer length L e L_e L e , its subdivision is obtained by replacing e e e by an internally vertex-disjoint path of length L e L_e L e ; a loop is replaced by a cycle of length L e L_e L e based at its incident vertex.
Lemma 54. Let G G G be connected, let n ≥ 2 n\ge2 n ≥ 2 , and let ml ( G ) = ℓ \operatorname{ml}(G)=\ell ml ( G ) = ℓ . In polynomial time, one can construct a connected multigraph H H H , possibly with loops, and positive integer lengths ( L e ) e ∈ E ( H ) (L_e)_{e\in E(H)} ( L e ) e ∈ E ( H ) such that replacing every edge e e e by a path of length L e L_e L e reconstructs G G G . Moreover, writing p = ∣ V ( H ) ∣ p=|V(H)| p = ∣ V ( H ) ∣ and q = ∣ E ( H ) ∣ q=|E(H)| q = ∣ E ( H ) ∣ , we have
p < 4 ℓ , 1 ≤ q < 2 ℓ 2 , L e ≤ n . p < 4\ell,\qquad1\le q < 2\ell^2,\qquad L_e\le n. p < 4 ℓ , 1 ≤ q < 2 ℓ 2 , L e ≤ n .
For 0 ≤ R < n 0 \le R < n 0 ≤ R < n , the tuple ( H , ( L e ) , R ) (H,(L_e),R) ( H , ( L e ) , R ) has an encoding of length O ( q log n ) O(q \log n) O ( q log n ) bits.
Proof. Let B = { v ∈ V ( G ) : deg G ( v ) ≠ 2 } B = \{v \in V(G) : \deg_G(v) \ne2\} B = { v ∈ V ( G ) : deg G ( v ) = 2 } . If B = ∅ B = \varnothing B = ∅ , then G G G is a cycle; in this case, choose an arbitrary vertex and add it to B B B . Suppress the internal vertices of every maximal path whose endpoints belong to B B B and whose internal vertices have degree two in G G G . Replace each such path by a single edge of a multigraph H H H , and assign to this edge the length of the corresponding path in G G G . If both endpoints of such a path coincide, the resulting edge is a loop; distinct paths with the same pair of endpoints give parallel edges. The internal vertices of distinct maximal degree-two paths are disjoint, and every edge of G G G belongs to exactly one such path. Therefore, replacing each edge of H H H by its corresponding path reconstructs G G G exactly. These paths and their lengths can be found in polynomial time by a traversal of G G G . By Bouland’s subdivision bound, as restated by Kučera and Suchý [40 Lemma 28] , a connected graph of maximum leaf number ℓ \ell ℓ is a subdivision of a multigraph on fewer than 4 ℓ 4\ell 4 ℓ vertices. Hence p < 4 ℓ p < 4\ell p < 4 ℓ . We also have Δ ( G ) ≤ ℓ \Delta(G) \le\ell Δ ( G ) ≤ ℓ . Indeed, a breadth-first spanning tree rooted at a vertex of degree d d d has at least one leaf in each of its d d d branches. Degrees at the retained vertices are unchanged, with a loop counted twice. Consequently,
2 q = ∑ v ∈ B deg G ( v ) ≤ ∣ B ∣ ℓ < 4 ℓ 2 . 2q = \sum_{v \in B} \deg_G(v) \le|B|\ell< 4\ell^2. 2 q = v ∈ B ∑ deg G ( v ) ≤ ∣ B ∣ ℓ < 4 ℓ 2 .
Thus q < 2 ℓ 2 q < 2\ell^2 q < 2 ℓ 2 . Since G G G is connected and has at least two vertices, it has at least one edge and therefore at least one maximal degree-two path. Hence q ≥ 1 q \ge1 q ≥ 1 . Moreover, every vertex of H H H is incident with at least one edge because H H H is connected and has at least one edge. Double-counting vertex–edge incidences, with each loop contributing two incidences, gives
p ≥ ∑ v ∈ V ( H ) deg H ( v ) = 2 q . p \ge\sum_{v \in V(H)} \deg_H(v) = 2q. p ≥ v ∈ V ( H ) ∑ deg H ( v ) = 2 q .
Finally, every edge e ∈ E ( H ) e \in E(H) e ∈ E ( H ) represents a maximal degree-two path in G G G . Since such a path contains at least one and at most n n n edges, we have 1 ≤ L e ≤ n 1 \le L_e \le n 1 ≤ L e ≤ n for every e ∈ E ( H ) e \in E(H) e ∈ E ( H ) . Relabel the retained vertices by 1 , … , p 1,\ldots,p 1 , … , p . Every length is at most n n n , every vertex label uses O ( log n ) O(\log n) O ( log n ) bits, and R < n R < n R < n . Storing the edge list, the lengths, and R R R therefore uses O ( q log n ) O(q \log n) O ( q log n ) bits.
Lemma 55. Given an explicit graph G G G and a representation from Lemma 54 with q q q edges, ESP can be decided in 2 q n O ( 1 ) 2^q n^{O(1)} 2 q n O ( 1 ) time.
Proof. First test the n n n one-vertex paths. Next enumerate all pairs of distinct vertices s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) . Retain s s s and t t t as additional vertices of the multigraph representation, splitting their chains when necessary. Let H s , t H_{s,t} H s , t be the resulting weighted multigraph. It has at most q + 2 q+2 q + 2 edges, and its subdivision is still exactly G G G .
Every simple s s s –t t t path in G G G traverses each chain of H s , t H_{s,t} H s , t either completely or not at all: the endpoints are retained vertices, and every other internal chain vertex has degree two. Thus the path is the expansion of a simple s s s –t t t path in H s , t H_{s,t} H s , t .
Enumerate all subsets F ⊆ E ( H s , t ) F \subseteq E(H_{s,t}) F ⊆ E ( H s , t ) , of which there are at most 2 q + 2 2^{q+2} 2 q + 2 . Keep a subset only if its nonisolated subgraph is a simple s s s –t t t path. This can be checked using connectivity and degrees, while rejecting loops and cycles. The expanded path is shortest precisely when ∑ e ∈ F L e = dist G ( s , t ) \sum_{e \in F} L_e = \operatorname{dist}_G(s,t) ∑ e ∈ F L e = dist G ( s , t ) . For every surviving choice, expand the path in G G G and compute its eccentricity by a multi-source breadth-first search. Every feasible path is considered, and every accepted path satisfies the required conditions. There are O ( n 2 2 q ) O(n^2 2^q) O ( n 2 2 q ) candidates, and each is processed in polynomial time.
Note that the FPT-ness of ESP parameterized by maximum leaf number is already established in [40 ] . Since q < 2 ℓ 2 q < 2\ell^2 q < 2 ℓ 2 , Lemma 55 also gives an 2 O ( ℓ 2 ) n O ( 1 ) 2^{O(\ell^2)}n^{O(1)} 2 O ( ℓ 2 ) n O ( 1 ) -time FPT algorithm for ESP parameterized by the maximum leaf number. We next use the same enumeration algorithm to obtain a polynomial compression.
A polynomial-size compression
Define the language Subdivision-ESP as follows. An input consists of a connected multigraph H H H , a positive integer L e L_e L e for every e ∈ E ( H ) e \in E(H) e ∈ E ( H ) , and a nonnegative integer R R R , with all numbers written in binary. Replace each edge by an internally vertex-disjoint path of the specified length; a loop is replaced by a cycle based at its incident vertex. Denote the expanded unweighted graph by Sub ( H , L ) \operatorname{Sub}(H,L) Sub ( H , L ) . The input belongs to Subdivision-ESP exactly when the expansion is simple and has a shortest path of eccentricity at most R R R .
Simplicity can be checked without performing the expansion: each loop must have length at least three, and there cannot be two length-one edges with the same pair of distinct endpoints. Malformed inputs are rejected. Retained vertices may have arbitrary degree.
Proposition 56. There is a polynomial-time compression of ESP parameterized by maximum leaf number ℓ \ell ℓ into Subdivision-ESP with O ( ℓ 4 ) O(\ell^4) O ( ℓ 4 ) output bits.
Proof. Let n = ∣ V ( G ) ∣ n = |V(G)| n = ∣ V ( G ) ∣ . If n = 1 n = 1 n = 1 or R ≥ n R \ge n R ≥ n , return a fixed yes-instance of Subdivision-ESP; in the latter case any one-vertex path has eccentricity at most n − 1 ≤ R n - 1 \le R n − 1 ≤ R . Hence assume that n ≥ 2 n \ge2 n ≥ 2 and R < n R < n R < n . Compute the representation from Lemma 54, and let q = ∣ E ( H ) ∣ q = |E(H)| q = ∣ E ( H ) ∣ .
If q ≤ log 2 n q \le\log_2 n q ≤ log 2 n , run the algorithm of Lemma 55. Since 2 q ≤ n 2^q \le n 2 q ≤ n , this takes polynomial time. Return a fixed yes- or no-instance of Subdivision-ESP according to the answer. For example, use ( K 2 , L ≡ 1 , R = 0 ) (K_2, L \equiv1, R = 0) ( K 2 , L ≡ 1 , R = 0 ) and ( K 3 , L ≡ 1 , R = 0 ) (K_3, L \equiv1, R = 0) ( K 3 , L ≡ 1 , R = 0 ) , respectively.
Otherwise, output ( H , ( L e ) , R ) (H,(L_e),R) ( H , ( L e ) , R ) itself. Its expansion is exactly G G G , so the output is equivalent to the input. Since log 2 n < q \log_2 n < q log 2 n < q , its encoding length is O ( q log n ) = O ( q 2 ) = O ( ℓ 4 ) O(q \log n) = O(q^2) = O(\ell^4) O ( q log n ) = O ( q 2 ) = O ( ℓ 4 ) .
The exhaustive algorithm is used only in the branch in which it runs in polynomial time; the other branch merely constructs the representation. The value of ℓ \ell ℓ need not be computed. ◀
The compressed language belongs to NP
The implicit subdivision may be exponentially larger than its encoding. Thus, membership of ordinary ESP in NP does not by itself imply that Subdivision-ESP belongs to NP. The next lemma gives a polynomial-size certificate and an explicit verifier.
Lemma 57. Subdivision-ESP ∈ \in ∈ NP.
Proof. An endpoint of a proposed solution is specified either by a vertex of H H H , or by an edge identifier and an integer offset strictly between 0 and the length of that edge. Fix an orientation of every edge, including loops, for the purpose of specifying offsets. Specify both endpoints s s s and t t t in this way, and split their edges at those positions. Identical endpoints are identified. The resulting multigraph H ′ H' H ′ has at most two additional vertices and two additional edges, and its subdivision is the original expanded graph.
The rest of the certificate is a simple path Q Q Q in H ′ H' H ′ from s s s to t t t , specified by its vertices and edge identifiers; it may consist of one vertex. This description has polynomial length. As in Lemma 55, every simple path in the expansion has such a certificate after its endpoints are retained.
Compute weighted shortest-path distances D D D in H ′ H' H ′ . The expansion P P P of Q Q Q is shortest if and only if
∑ e ∈ E ( Q ) L e = D ( s , t ) . (33) \sum_{e \in E(Q)} L_e = D(s,t). \tag*{(33)} e ∈ E ( Q ) ∑ L e = D ( s , t ) . (33)
All weights are positive integers, so these computations take polynomial time in the binary input size.
To verify the eccentricity, put S = V ( Q ) S = V(Q) S = V ( Q ) and define
δ ( v ) = min z ∈ S D ( v , z ) ( v ∈ V ( H ′ ) ) . \delta(v) = \min_{z \in S} D(v,z) \qquad(v \in V(H')). δ ( v ) = z ∈ S min D ( v , z ) ( v ∈ V ( H ′ )) .
For a retained vertex v v v , this is its distance to P P P in the expanded graph. Indeed, reaching an internal vertex of a selected edge requires first reaching one of its endpoints, both of which lie in S S S , while all internal vertices of a selected edge already belong to P P P .
Consider an unselected edge e = u v e = uv e = uv of length L L L . The vertex at integer position i i i on its chain, where 0 ≤ i ≤ L 0 \le i \le L 0 ≤ i ≤ L , has distance
min { δ ( u ) + i , δ ( v ) + L − i } (34) \min\{\delta(u) + i,\delta(v) + L - i\} \tag*{(34)} min { δ ( u ) + i , δ ( v ) + L − i } (34)
from P P P . The same formula applies to loops. Distances to a set are Lipschitz along edges, and hence ∣ δ ( u ) − δ ( v ) ∣ ≤ L |\delta(u) - \delta(v)| \le L ∣ δ ( u ) − δ ( v ) ∣ ≤ L . The two affine functions in (34) therefore intersect inside [ 0 , L ] [0,L] [ 0 , L ] . Evaluating at the nearest integer or integers gives
max i ∈ { 0 , … , L } min { δ ( u ) + i , δ ( v ) + L − i } = ⌊ L + δ ( u ) + δ ( v ) 2 ⌋ (35) \max_{i \in\{0,\ldots,L\}} \min\{\delta(u) + i,\delta(v) + L - i\} =
\left\lfloor\frac{L + \delta(u) + \delta(v)}{2} \right\rfloor \tag*{(35)} i ∈ { 0 , … , L } max min { δ ( u ) + i , δ ( v ) + L − i } = ⌊ 2 L + δ ( u ) + δ ( v ) ⌋ (35)
Consequently, ecc ( P ) ≤ R \operatorname{ecc}(P) \le R ecc ( P ) ≤ R holds exactly when
δ ( v ) ≤ R for every v ∈ V ( H ′ ) (36) \delta(v) \le R \quad\text{for every } v \in V(H') \tag*{(36)} δ ( v ) ≤ R for every v ∈ V ( H ′ ) (36)
and
L e + δ ( u ) + δ ( v ) ≤ 2 R + 1 for every e = u v ∉ E ( Q ) (37) L_e + \delta(u) + \delta(v) \le2R + 1 \quad\text{for every } e = uv \notin E(Q) \tag*{(37)} L e + δ ( u ) + δ ( v ) ≤ 2 R + 1 for every e = uv ∈ / E ( Q ) (37)
The constant 1 in (37) accounts for the discrete subdivision vertices.
Thus the verifier can check path validity, (33) , (36) , and (37) in time polynomial in the compressed input size, without expanding a chain. Every accepted certificate yields a feasible path, and every feasible path supplies an accepted certificate. Hence Subdivision-ESP ∈ \in ∈ NP. ◀
From compression to an ordinary ESP kernel
We finish by translating the compressed instance back to an ordinary unweighted ESP instance.
Proof of Theorem 53 . Proposition 56 and Lemma 57 give a polynomial compression into a fixed language in NP. The ordinary decision version of ESP is NP-complete, already on connected unweighted simple graphs [28 Theorem 7] . Hence there is a fixed polynomial-time many-one reduction
f : Subdivision-ESP ⟶ ESP . f : \text{Subdivision-ESP} \longrightarrow\text{ESP}. f : Subdivision-ESP ⟶ ESP .
Apply f f f to the compressed output y y y . There is a constant c c c such that the encoding length of the resulting ordinary instance ( G ′ , R ′ ) (G', R') ( G ′ , R ′ ) is at most O ( ∣ y ∣ c ) = ℓ O ( 1 ) O(|y|^c) = \ell^{O(1)} O ( ∣ y ∣ c ) = ℓ O ( 1 ) . Moreover,
( G , R ) ∈ ESP ⟺ y ∈ Subdivision-ESP ⟺ ( G ′ , R ′ ) ∈ ESP . (G, R) \in\text{ESP}
\quad\Longleftrightarrow\quad
y \in\text{Subdivision-ESP}
\quad\Longleftrightarrow\quad
(G', R') \in\text{ESP}. ( G , R ) ∈ ESP ⟺ y ∈ Subdivision-ESP ⟺ ( G ′ , R ′ ) ∈ ESP .
The output parameter is automatically bounded, since ml ( G ′ ) ≤ ∣ V ( G ′ ) ∣ ≤ ℓ O ( 1 ) \operatorname{ml}(G') \le|V(G')| \le\ell^{O(1)} ml ( G ′ ) ≤ ∣ V ( G ′ ) ∣ ≤ ℓ O ( 1 ) . If the formulation includes a promised upper bound on maximum leaf number, use ∣ V ( G ′ ) ∣ |V(G')| ∣ V ( G ′ ) ∣ as the output bound. The entire mapping runs in polynomial time in the original input size and returns one unweighted ESP instance. It is therefore a polynomial many-one kernelization, rather than merely a weighted compression or a Turing kernelization. ◀
Distance to clique
We prove a kernel lower bound for ESP parameterized by distance to clique via an OR-cross-composition from CNF-SAT. Recall that dtc ( G ) \operatorname{dtc}(G) dtc ( G ) is the minimum size of a clique modulator, namely a set X X X such that G − X G-X G − X is a clique; see Subsection 2.1.
Theorem 58. The problem ESP parameterized by distance to clique has no polynomial kernel unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly . It also holds when the input includes a clique modulator and is parameterized by its size.
To prove Theorem 58, we give an OR-cross-composition from CNF-SAT. We restrict the source language to formulas that explicitly list at least one variable, contain at least one clause, and contain no empty clause. This restriction remains NP-hard. We define a polynomial equivalence relation R \mathcal{R} R such that all strings that do not encode a valid source instance are equivalent. Of the remaining instances, two formulas are equivalent if and only if they contain the same number of variables. Before comparing formulas, we relabel their variables as x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n . Any set of valid inputs of encoding length at most L L L is partitioned into at most L L L equivalence classes, so R \mathcal{R} R is a polynomial equivalence relation. If the input instances are malformed, then we output a fixed no-instance.
Let Φ 1 , … , Φ t \Phi_1,\ldots,\Phi_t Φ 1 , … , Φ t be valid equivalent instances, each on the variables x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n . Set q = ⌈ log 2 t ⌉ q=\lceil\log_2 t\rceil q = ⌈ log 2 t ⌉ and duplicate Φ 1 \Phi_1 Φ 1 until the list contains 2 q 2^q 2 q formulas. This does not change whether at least one input formula is satisfiable. Introduce selector variables y 1 , … , y q y_1,\ldots,y_q y 1 , … , y q . For every i ∈ [ 2 q ] i\in[2^q] i ∈ [ 2 q ] , let L i L_i L i be the disjunction of selector literals that is false exactly when the selector variables encode i − 1 i-1 i − 1 in binary. Replace every clause D D D of Φ i \Phi_i Φ i by D ∨ L i D\lor L_i D ∨ L i , and let Ψ \Psi Ψ be the conjunction of all resulting clauses. If q = 0 q=0 q = 0 , then L 1 L_1 L 1 is the empty disjunction and is false. Fixing the selector variables to the encoding of i − 1 i-1 i − 1 leaves precisely the clauses originating from Φ i \Phi_i Φ i to be satisfied; every other clause contains a true selector literal. Thus a satisfying assignment of Φ i \Phi_i Φ i extends to a satisfying assignment of Ψ \Psi Ψ by setting the selector variables to encode i − 1 i-1 i − 1 . Conversely, consider any satisfying assignment of Ψ \Psi Ψ . Its values on y 1 , … , y q y_1,\ldots,y_q y 1 , … , y q encode a unique index i ∈ [ 2 q ] i\in[2^q] i ∈ [ 2 q ] , for which L i L_i L i is false. For every clause D D D of Φ i \Phi_i Φ i , the clause D ∨ L i D\lor L_i D ∨ L i belongs to Ψ \Psi Ψ and must be true. Since L i L_i L i is false, D D D itself must be true. Hence the restriction of the assignment to x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n satisfies every clause of Φ i \Phi_i Φ i . If i > t i>t i > t , then Φ i \Phi_i Φ i is a copy of Φ 1 \Phi_1 Φ 1 , so in either case an original input formula is satisfiable. Consequently,
Ψ is satisfiable ⟺ at least one of Φ 1 , … , Φ t is satisfiable . (38) \Psi\text{ is satisfiable}\quad\Longleftrightarrow\quad\text{at least one of }\Phi_1,\ldots,\Phi_t\text{ is satisfiable}. \tag*{(38)} Ψ is satisfiable ⟺ at least one of Φ 1 , … , Φ t is satisfiable . (38)
Graph construction
The formula Ψ \Psi Ψ has N : = n + q N:=n+q N := n + q variables, all its clauses are nonempty, and it can be constructed in time polynomial in the total input size. Rename the variables of Ψ \Psi Ψ as x 1 , … , x N x_1,\ldots,x_N x 1 , … , x N , write its clauses as D 1 , … , D m D_1,\ldots,D_m D 1 , … , D m , and set R = N + 2 R=N+2 R = N + 2 . We construct an instance ( G , R ) (G,R) ( G , R ) of ESP as follows (see Figure 3 ).
Figure 3. A sketch of the graph construction used in the proof of Theorem 58 .
Create vertices s , t s,t s , t and, for every i ∈ [ N ] i\in[N] i ∈ [ N ] , a layer U i = { u i 0 , u i 1 } U_i=\{u_i^0,u_i^1\} U i = { u i 0 , u i 1 } . Join s s s to both vertices of U 1 U_1 U 1 , make consecutive layers complete to each other, and join both vertices of U N U_N U N to t t t . Let B = { s , t } ∪ ⋃ i = 1 N U i B=\{s,t\}\cup\bigcup_{i=1}^{N}U_i B = { s , t } ∪ ⋃ i = 1 N U i , and call the subgraph induced by B B B the assignment backbone . For an assignment α ∈ { 0 , 1 } N \alpha\in\{0,1\}^N α ∈ { 0 , 1 } N , define its assignment path as P α = ( s , u 1 α 1 , … , u N α N , t ) P_\alpha=(s,u_1^{\alpha_1},\ldots,u_N^{\alpha_N},t) P α = ( s , u 1 α 1 , … , u N α N , t ) .
For every i ∈ [ N ] i\in[N] i ∈ [ N ] and b ∈ { 0 , 1 } b\in\{0,1\} b ∈ { 0 , 1 } , add a path of length R − 1 R-1 R − 1 from u i b u_i^b u i b to a new vertex w i b w_i^b w i b . These paths are the literal tails . Create a clique C = { c 1 , … , c m } C=\{c_1,\ldots,c_m\} C = { c 1 , … , c m } . Join c j c_j c j to w i 1 w_i^1 w i 1 if
x i ∈ D j x_i \in D_j x i ∈ D j , and join c j c_j c j to w i 0 w_i^0 w i 0 if ¬ x i ∈ D j \neg x_i \in D_j ¬ x i ∈ D j . Thus c j c_j c j is adjacent precisely to the endpoints of literal tails that represent literals satisfying D j D_j D j .
Attach a path s = a 0 , a 1 , … , a R s = a_0, a_1, \ldots, a_R s = a 0 , a 1 , … , a R at s s s , and a path t = b 0 , b 1 , … , b R t = b_0, b_1, \ldots, b_R t = b 0 , b 1 , … , b R at $t. These paths are the forcing tails . All internal and pendant vertices introduced in the construction are distinct.
Each labeled line in Figure 3 represents a path of the indicated number of edges, with its internal subdivision vertices suppressed. The drawing is not to scale, and unmarked crossings are not vertices.
Parameter and size bounds
We define the parameter bound
k ′ : = ∣ X ∣ = 2 + 2 N + 2 N ( R − 1 ) + 2 R = 2 N 2 + 6 N + 6 = O ( ( n + log t ) 2 ) . (39) k' := |X| = 2 + 2N + 2N(R - 1) + 2R
= 2N^2 + 6N + 6 = O\left((n + \log t)^2\right). \tag*{(39)} k ′ := ∣ X ∣ = 2 + 2 N + 2 N ( R − 1 ) + 2 R = 2 N 2 + 6 N + 6 = O ( ( n + log t ) 2 ) . (39)
where X = V ( G ) ∖ C X = V(G) \setminus C X = V ( G ) ∖ C . Since G − X = C G - X = C G − X = C is a clique, X X X is a clique modulator and dtc ( G ) ≤ k ′ \operatorname{dtc}(G) \le k' dtc ( G ) ≤ k ′ . The four terms in ∣ X ∣ |X| ∣ X ∣ count, respectively, the vertices s , t s,t s , t , the assignment-layer vertices, the vertices introduced on the literal tails, and the vertices introduced on the forcing tails. Since n ≤ max i ∈ [ t ] ∣ Φ i ∣ n \le\max_{i \in[t]} |\Phi_i| n ≤ max i ∈ [ t ] ∣ Φ i ∣ and q = ⌈ log 2 t ⌉ q = \lceil\log_2 t \rceil q = ⌈ log 2 t ⌉ , the value k ′ k' k ′ is polynomial in the size of the largest input instance plus log t \log t log t . The cross-composition outputs the instance ( G , R ) (G,R) ( G , R ) of ESP, whose parameter value is at most k ′ k' k ′ . If a clique modulator must be supplied with the input, we supply X X X , whose size is k ′ k' k ′ .
The graph G G G can be constructed in polynomial time. Let L : = ∑ i = 1 t ∣ Φ i ∣ L := \sum_{i=1}^{t} |\Phi_i| L := ∑ i = 1 t ∣ Φ i ∣ denote the total input length. Since every input formula has positive length and contains all n n n variables, we have t ≤ L t \le L t ≤ L and n ≤ L n \le L n ≤ L . Hence q = O ( log L ) q = O(\log L) q = O ( log L ) and N = O ( L ) N = O(L) N = O ( L ) . The padded list contains exactly 2 q < 2 t 2^q < 2t 2 q < 2 t formulas. Padding only duplicates Φ 1 \Phi_1 Φ 1 , and adding selector literals does not change the number of clauses. Since every input formula has at most L L L clauses, we have m < 2 t L ≤ 2 L 2 m < 2tL \le2L^2 m < 2 t L ≤ 2 L 2 . The graph has m + 2 + 2 N + 2 N ( R − 1 ) + 2 R = m + O ( N 2 ) m + 2 + 2N + 2N(R - 1) + 2R = m + O(N^2) m + 2 + 2 N + 2 N ( R − 1 ) + 2 R = m + O ( N 2 ) vertices. Its assignment backbone, literal tails, and forcing tails contribute O ( N 2 ) O(N^2) O ( N 2 ) edges; there are at most 2 N m 2Nm 2 N m clause–literal edges; and the clause clique contributes O ( m 2 ) O(m^2) O ( m 2 ) edges. Hence G G G has O ( N 2 + N m + m 2 ) = O ( L 4 ) O(N^2 + Nm + m^2) = O(L^4) O ( N 2 + N m + m 2 ) = O ( L 4 ) edges, so the output size is polynomial in the total input length. The algorithm expands every path explicitly, and therefore G G G is unweighted. Since every clause of Ψ \Psi Ψ is nonempty, every clause vertex has a neighbor outside C C C , and hence G G G is connected. The description also shows that G G G is simple and undirected.
Canonical paths and clause distances
We now argue that ( G , R ) (G,R) ( G , R ) is a yes-instance of ESP if and only if at least one input formula Φ i \Phi_i Φ i is satisfiable. We first establish two structural properties of the constructed graph. All distances below are measured in G G G .
Lemma 59. The shortest s s s –t t t paths are exactly the assignment paths. Moreover, if ( G , R ) (G,R) ( G , R ) is a yes-instance, then some assignment path is a solution path.
Proof. Every assignment path has length N + 1 N + 1 N + 1 . Consider an s s s –t t t path that contains a clause vertex. It contains a maximal subpath whose endpoints lie in the assignment backbone B = { s , t } ∪ ⋃ i = 1 N U i B = \{s,t\} \cup\bigcup_{i=1}^{N} U_i B = { s , t } ∪ ⋃ i = 1 N U i , whose internal vertices lie outside B B B , and which contains a clause vertex. This subpath traverses two entire literal tails and two clause-literal edges, and hence has length at least 2 ( R − 1 ) + 2 = 2 R 2(R - 1) + 2 = 2R 2 ( R − 1 ) + 2 = 2 R . Its endpoints are assignment-layer vertices, so the original path also uses at least one edge from s s s before this subpath and at least one edge to t t t after it. Its total length is therefore at least 2 R + 2 > N + 1 2R + 2 > N + 1 2 R + 2 > N + 1 . A shortest s s s –t t t path that avoids C C C cannot enter a literal tail or a forcing tail, since each such path is pendant in G − C G - C G − C . It therefore lies in B B B . Within B B B , an s s s –t t t path has length at least N + 1 N + 1 N + 1 , with equality exactly when it visits one vertex of each layer in order. Hence the shortest s s s –t t t paths are precisely the assignment paths.
Suppose that Q Q Q is a solution path. Let A s = { a 1 , … , a R } A_s = \{a_1,\ldots,a_R\} A s = { a 1 , … , a R } and A t = { b 1 , … , b R } A_t = \{b_1,\ldots,b_R\} A t = { b 1 , … , b R } . Every vertex outside A s ∪ { s } A_s \cup\{s\} A s ∪ { s } is at distance greater than R R R from a R a_R a R . If s ∉ V ( Q ) s \notin V(Q) s ∈ / V ( Q ) , then the eccentricity bound forces Q Q Q to contain a vertex of A s A_s A s . Since s s s separates A s A_s A s from the rest of G G G and Q Q Q is connected, this implies V ( Q ) ⊆ A s V(Q) \subseteq A_s V ( Q ) ⊆ A s . But then dist G ( b R , V ( Q ) ) > R \operatorname{dist}_G(b_R,V(Q)) > R dist G ( b R , V ( Q )) > R , a contradiction. Thus s ∈ V ( Q ) s \in V(Q) s ∈ V ( Q ) , and the symmetric argument gives t ∈ V ( Q ) t \in V(Q) t ∈ V ( Q ) . The s s s –t t t subpath of Q Q Q is shortest between its endpoints, so it is an assignment path P α P_\alpha P α . Orient Q Q Q so that this subpath runs from s s s to t t t . If the predecessor of s s s on Q Q Q belonged to U 1 U_1 U 1 , then it would be adjacent to the vertex two positions after s s s on P α P_\alpha P α : the selected vertex of U 2 U_2 U 2 when N ≥ 2 N \ge2 N ≥ 2 , or t t t when N = 1 N = 1 N = 1 . This would replace a three-edge subpath of Q Q Q by one edge, contradicting the shortestness of Q Q Q . Therefore any extension of Q Q Q before s s s lies in A s A_s A s . Symmetrically, any extension after t t t lies in A t A_t A t . Trim these two extensions from Q Q Q . For a vertex outside A s ∪ A t A_s \cup A_t A s ∪ A t , any path to one of the trimmed extensions first reaches s s s or t t t , both of which remain on P α P_\alpha P α . Hence its distance to P α P_\alpha P α equals its distance to Q Q Q . Every vertex of a forcing tail is within distance R R R of its attachment vertex. It follows that ecc G ( P α ) ≤ R \operatorname{ecc}_G(P_\alpha) \le R ecc G ( P α ) ≤ R , and P α P_\alpha P α is a solution path. ◁
Lemma 60. Let P α P_\alpha P α be the assignment path corresponding to an assignment α \alpha α . For every clause D j D_j D j ,
dist G ( c j , V ( P α ) ) = { R , if α satisfies D j , R + 1 , if α falsifies D j . (40) \operatorname{dist}_G(c_j,V(P_\alpha)) =
\begin{cases}
R, & \text{if }\alpha\text{ satisfies }D_j,\\
R+1, & \text{if }\alpha\text{ falsifies }D_j.
\end{cases} \tag*{(40)} dist G ( c j , V ( P α )) = { R , R + 1 , if α satisfies D j , if α falsifies D j . (40)
Every non-clause vertex is within distance R R R of P α P_\alpha P α . Consequently, P α P_\alpha P α is a solution path if and only if α \alpha α satisfies Ψ \Psi Ψ .
Proof. Every selected layer vertex lies on P α P_\alpha P α . Every unselected layer vertex is adjacent to P α P_\alpha P α : for the first layer, use s s s , and for each later layer, use the selected vertex of the preceding layer. A vertex on a literal tail is therefore within distance ( R − 1 ) + 1 = R (R-1)+1=R ( R − 1 ) + 1 = R of P α P_\alpha P α . Every forcing-tail vertex is within distance R R R of s s s or t t t . Thus every non-clause vertex is within distance R R R of P α P_\alpha P α . Consider a path from c j c_j c j to its first vertex in B B B . After its last clause vertex, it traverses a clause–literal edge and an entire literal tail, which costs 1 + ( R − 1 ) = R 1+(R-1)=R 1 + ( R − 1 ) = R edges. Therefore a path from c j c_j c j to P α P_\alpha P α of length at most R R R must use an edge c j w i b c_jw_i^b c j w i b followed by the literal tail to a selected vertex u i b u_i^b u i b , where b = α i b=\alpha_i b = α i . Such a path exists exactly when α \alpha α satisfies D j D_j D j , and then its length is exactly R R R . If α \alpha α falsifies D j D_j D j , the distance is therefore at least R + 1 R+1 R + 1 . Since D j D_j D j is nonempty, choose one of its literals. The corresponding literal tail ends at an unselected layer vertex, which is adjacent to P α P_\alpha P α . This gives a path of length R + 1 R+1 R + 1 from c j c_j c j to P α P_\alpha P α , proving (40). The final claim follows because the vertices of C C C correspond to all clauses of Ψ \Psi Ψ .
Correctness of the cross-composition
Lemma 61. The constructed instance ( G , R ) (G,R) ( G , R ) is a yes-instance if and only if at least one of Φ 1 , … , Φ t \Phi_1,\ldots,\Phi_t Φ 1 , … , Φ t is satisfiable.
Proof. Suppose that ( G , R ) (G,R) ( G , R ) is a yes-instance. By Lemma 59 , some assignment path P α P_\alpha P α is a solution path. Lemma 60 implies that α \alpha α satisfies Ψ \Psi Ψ . By Equation (38) , at least one input formula Φ i \Phi_i Φ i is satisfiable.
Suppose that some input formula Φ i \Phi_i Φ i is satisfiable. By Equation (38) , the formula Ψ \Psi Ψ has a satisfying assignment α \alpha α . The corresponding assignment path P α P_\alpha P α is a shortest path by Lemma 59 , and Lemma 60 gives ecc G ( P α ) ≤ R \operatorname{ecc}_G(P_\alpha)\le R ecc G ( P α ) ≤ R . Hence ( G , R ) (G,R) ( G , R ) is a yes-instance.
Proof of Theorem 58. The construction can be performed in polynomial time, and Equation (39) bounds the output parameter by a polynomial in the maximum input size plus log t \log t log t . Lemma 61 establishes the required OR-property. Consequently, the construction is an OR-cross-composition of CNF-SAT into ESP parameterized by distance to clique. Theorem 52 therefore yields the claimed kernel lower bound. Since the construction explicitly provides the clique modulator X X X , the same conclusion holds when such a modulator is included in the input and its size is the parameter.
Feedback edge number
We prove a kernel lower bound for ESP parameterized by feedback edge number via an OR-cross-composition from Distinct 3-SAT. Recall that fen ( G ) \operatorname{fen}(G) fen ( G ) is the minimum number of edges whose deletion leaves a forest and equals ∣ E ( G ) ∣ − ∣ V ( G ) ∣ + 1 |E(G)|-|V(G)|+1 ∣ E ( G ) ∣ − ∣ V ( G ) ∣ + 1 for connected G G G ; see Subsection 2.1.
We use Distinct 3-SAT as the source language. In this problem, every clause contains three literals on distinct variables. This restriction of 3-SAT is NP-hard; stronger restrictions are also known [22 ] .
Theorem 62. The problem ESP parameterized by feedback edge number has no polynomial kernel unless N P ⊆ c o N P / p o l y \mathrm{NP}\subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly . It also holds when the input includes a minimum feedback edge set.
Source instances and preprocessing
To prove Theorem 62 , we show that Distinct 3-Sat OR-cross-composes into ESP parameterized by feedback edge number. By Theorem 52 , this is sufficient to establish the claim.
We define a polynomial equivalence relation R \mathcal{R} R such that all bitstrings that do not encode a valid instance of Distinct 3-Sat are equivalent. Of the remaining instances, any two well-formed formulas are equivalent if and only if they contain the same number of variables. Before comparing two formulas, we relabel the variables that occur as x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n . From this definition, it follows that any set of well-formed instances of encoding length at most N N N is partitioned into at most N N N equivalence classes. Thus R \mathcal{R} R is a polynomial equivalence relation.
We now give a cross-composition algorithm that composes t t t input instances that are equivalent under R \mathcal{R} R into a single instance of ESP parameterized by feedback edge number. If the input instances are malformed, then we may output a fixed no-instance. Hence, in the remainder, we may assume that all inputs are well-formed and encode formulas Φ 1 , … , Φ t \Phi_1,\ldots,\Phi_t Φ 1 , … , Φ t , each on the variables x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n . We delete repeated clauses. If n < 3 n<3 n < 3 , then every input formula has no clause and is satisfiable, so we may output a fixed yes-instance. Hence assume that n ≥ 3 n\ge3 n ≥ 3 and t ≥ 1 t\ge1 t ≥ 1 . Let C C C be the set of all clauses that use three distinct variables from { x 1 , … , x n } \{x_1,\ldots,x_n\} { x 1 , … , x n } , with arbitrary signs. The number of such clauses is c : = ∣ C ∣ = 8 ( n 3 ) c:=|C|=8\binom{n}{3} c := ∣ C ∣ = 8 ( 3 n ) . We construct a single instance ( G , R ) (G,R) ( G , R ) of ESP parameterized by feedback edge number. It consists of a connected graph G G G , a nonnegative integer R R R , and parameter value fen ( G ) \operatorname{fen}(G) fen ( G ) .
Graph construction
Every path introduced below has new internal vertices, and its length is its number of edges. Define
s = 4 t , K = n s + 1 = 4 n t + 1 , A = K + 2 , D = K + t , r = K + 2 t , R = K + 10 t = r + 8 t . (41) \begin{aligned}
s&=4t,\qquad K=ns+1=4nt+1,\qquad A=K+2,\\
D&=K+t,\qquad r=K+2t,\qquad R=K+10t=r+8t. \tag*{(41)}
\end{aligned} s D = 4 t , K = n s + 1 = 4 n t + 1 , A = K + 2 , = K + t , r = K + 2 t , R = K + 10 t = r + 8 t . (41)
We construct the graph G G G as follows (see Figure 4 and Figure 5 ).
Figure 4. A sketch of the construction used in the proof of Theorem 62 . Incidence paths and test hairs are omitted here and shown in Figure 5 .
Figure 5. A sketch of one of the test paths T C T_C T C and one of the possible test hairs.
Create the assignment selector with vertices z 0 , … , z n z_0,\ldots,z_n z 0 , … , z n and, for each i ∈ [ n ] i\in[n] i ∈ [ n ] , literal vertices v i + v_i^+ v i + and v i − v_i^- v i − . For each sign σ ∈ { + , − } \sigma\in\{+,-\} σ ∈ { + , − } , add a path of length s s s from z i − 1 z_{i-1} z i − 1 to v i σ v_i^\sigma v i σ and a path of length s s s from v i σ v_i^\sigma v i σ to z i z_i z i . Add vertices a a a and b b b , together with an edge between a a a and z 0 z_0 z 0 and an edge between z n z_n z n and b b b . Denote the selector by S S S . Every a , b a,b a , b -path in S S S chooses one branch in each variable gadget and has length 1 + 2 n s + 1 = 2 K 1+2ns+1=2K 1 + 2 n s + 1 = 2 K . We call such a path an assignment path . It encodes a truth assignment: the positive branch in the i i i th gadget represents the value true for x i x_i x i .
Create vertices u u u and v v v . Join a a a to u u u by a connector path of length A A A , and join b b b to v v v by another connector path of length A A A . Add a guard path of length K + 6 t − 1 K+6t-1 K + 6 t − 1 from u u u to z n z_n z n , and add a guard path of length K + 4 t − 3 K+4t-3 K + 4 t − 3 from v v v to z 0 z_0 z 0 .
For each clause C ∈ C C\in\mathcal{C} C ∈ C , add a test path T C T_C T C of length 8 t 8t 8 t from u u u to v v v . Let c C c_C c C be its midpoint. For each literal of C C C , add an incidence path of length D D D from c C c_C c C to the corresponding literal vertex in S S S . For every j ∈ [ t ] j\in[t] j ∈ [ t ] , let w C , j w_{C,j} w C , j be the vertex of T C T_C T C at distance 4 t + j 4t+j 4 t + j from u u u .
Attach a path of length R R R at a a a and another path of length R R R at $b; these paths are the forcing tails . For each j ∈ [ t ] j\in[t] j ∈ [ t ] and each clause C ∈ Φ j C\in\Phi_j C ∈ Φ j , attach a path of length $8t$ at w C , j w_{C,j} w C , j . This path is the test hair for ( C , j ) (C,j) ( C , j ) , and its leaf is denoted by λ C , j \lambda_{C,j} λ C , j .
Each labeled line in Figure 4 and Figure 5 represents a path of the indicated number of edges, with its internal subdivision vertices suppressed. The drawings are not to scale, and unmarked crossings are not vertices.
Parameter and size bounds
We define the parameter value
k ′ : = fen ( G ) = n + 2 + 4 c = n + 2 + 32 ( n 3 ) = O ( n 3 ) . (42) k' := \operatorname{fen}(G) = n + 2 + 4c = n + 2 + 32\binom{n}{3} = O(n^3). \tag*{(42)} k ′ := fen ( G ) = n + 2 + 4 c = n + 2 + 32 ( 3 n ) = O ( n 3 ) . (42)
The selector contributes n n n to the feedback edge number, one for each variable gadget. Each connector path is attached at one existing vertex and creates no cycle. Each guard path joins two vertices already in the connected graph and therefore contributes one. For each clause C C C , the test path contributes one, and the three incidence paths contribute three. The forcing tails and the test hairs are pendant paths and contribute nothing. This proves (42). The value k ′ k' k ′ is the parameter of the output instance. Since every variable occurs in a well-formed input formula, n ≤ max j ∈ [ t ] ∣ Φ j ∣ n \le\max_{j\in[t]}|\Phi_j| n ≤ max j ∈ [ t ] ∣ Φ j ∣ . Thus k ′ k' k ′ is polynomial in the size of the largest input instance, and hence in max j ∈ [ t ] ∣ Φ j ∣ + log t \max_{j\in[t]}|\Phi_j| + \log t max j ∈ [ t ] ∣ Φ j ∣ + log t . The cross-composition outputs the instance x ′ : = ( G , R ) x' := (G,R) x ′ := ( G , R ) of ESP, whose parameter value is k ′ k' k ′ . The graph G G G can be constructed in polynomial time. Indeed, the construction has O ( n + c ) O(n+c) O ( n + c ) nonpendant paths, each of length O ( n t ) O(nt) O ( n t ) . It has at most c t ct c t test hairs, each of length 8 t 8t 8 t , and two forcing tails of length O ( n t ) O(nt) O ( n t ) . Hence the numbers of vertices and edges are O ( n 4 t + n 3 t 2 ) O(n^4t+n^3t^2) O ( n 4 t + n 3 t 2 ) . Let L : = ∑ j = 1 t ∣ Φ j ∣ L := \sum_{j=1}^{t}|\Phi_j| L := ∑ j = 1 t ∣ Φ j ∣ denote the total input length. Since each input formula has positive length and contains all n n n variables, we have t ≤ L t \le L t ≤ L and n ≤ L n \le L n ≤ L . Consequently, n 4 t + n 3 t 2 ≤ L 5 + L 5 = 2 L 5 n^4t+n^3t^2 \le L^5+L^5=2L^5 n 4 t + n 3 t 2 ≤ L 5 + L 5 = 2 L 5 , so the output size is polynomial in the total input length. The algorithm expands every path explicitly, and therefore G G G is unweighted. The description also shows that G G G is connected, simple, and undirected.
Metric properties and canonical paths
We now argue that x ′ x' x ′ is a yes-instance of ESP if and only if at least one input formula Φ j \Phi_j Φ j is satisfiable. We first establish three structural properties of the constructed graph.
Lemma 63. The selector S S S and the union J J J of all test paths T C T_C T C are isometric in G G G . Every shortest a a a –b b b path is an assignment path of length 2 K 2K 2 K . Moreover,
dist G ( a , b ) = 2 K , dist G ( u , v ) = 8 t , dist G ( a , u ) = A , dist G ( b , v ) = A , dist G ( u , b ) = K + 6 t , dist G ( v , a ) = K + 4 t − 2. (43) \begin{aligned}
\operatorname{dist}_G(a,b) &= 2K, & \operatorname{dist}_G(u,v) &= 8t, \\
\operatorname{dist}_G(a,u) &= A, & \operatorname{dist}_G(b,v) &= A, \\
\operatorname{dist}_G(u,b) &= K+6t, & \operatorname{dist}_G(v,a) &= K+4t-2. \tag*{(43)}
\end{aligned} dist G ( a , b ) dist G ( a , u ) dist G ( u , b ) = 2 K , = A , = K + 6 t , dist G ( u , v ) dist G ( b , v ) dist G ( v , a ) = 8 t , = A , = K + 4 t − 2. (43)
Proof. Let P P P be a shortest path in G G G whose endpoints lie in S S S . Suppose that P P P is not contained in S S S . Then P P P contains a maximal subpath whose endpoints lie in S S S and whose internal vertices lie outside S S S . This subpath traverses at least two connector, guard, or incidence paths. Each of these paths has one of the lengths A = K + 2 A=K+2 A = K + 2 , D = K + t D=K+t D = K + t , K + 6 t − 1 K+6t-1 K + 6 t − 1 , and K + 4 t − 3 K+4t-3 K + 4 t − 3 , all strictly larger than K K K . Hence the subpath has length greater than 2 K 2K 2 K . Its endpoints can instead be joined within S S S by a path of length at most diam ( S ) ≤ 2 K \operatorname{diam}(S)\le2K diam ( S ) ≤ 2 K . This replacement yields a shorter walk with the same endpoints, from which a shorter path is obtained by deleting cycles, contradicting the choice of P P P . Thus S S S is isometric. In particular, every shortest a a a –b b b path is contained in S S S and therefore is an assignment path of length 2 K 2K 2 K .
Similarly, let J J J be the union of all test paths. A shortest path with endpoints in J J J cannot enter a pendant path and return. Hence, if it leaves J J J , the preceding argument produces a subpath of length greater than 2 K 2K 2 K whose endpoints can be joined within J J J by a path of length at most diam ( J ) ≤ 8 t < 2 K \operatorname{diam}(J)\le8t<2K diam ( J ) ≤ 8 t < 2 K , a contradiction. Thus J J J is isometric. In particular, dist G ( u , v ) = 8 t \operatorname{dist}_G(u,v)=8t dist G ( u , v ) = 8 t , and the distances in G G G from the position-i i i vertex of any T C T_C T C to u u u and v v v are i i i and 8 t − i 8t-i 8 t − i , respectively.
It remains to determine the four distances between { u , v } \{u,v\} { u , v } and { a , b } \{a,b\} { a , b } . Consider a shortest such path and its first entry into S S S . Once it enters S S S , it remains there by isometry. We distinguish the following cases.
If the path first enters at a literal vertex, then it spends at least 4 t 4t 4 t edges reaching a clause midpoint, D D D edges on an incidence path, and at least s + 1 s+1 s + 1 edges inside S S S before reaching a a a or b b b . Its length is at least 4 t + D + s + 1 = K + 9 t + 1 4t+D+s+1=K+9t+1 4 t + D + s + 1 = K + 9 t + 1 , which exceeds all four claimed distances.
The connector paths give routes of length A A A from u u u to a a a and from v v v to b b b . A route using the opposite connector already spends more than A A A edges before traversing S S S , and every guard route has length greater than A A A . Hence dist G ( a , u ) = dist G ( b , v ) = A \operatorname{dist}_G(a,u)=\operatorname{dist}_G(b,v)=A dist G ( a , u ) = dist G ( b , v ) = A .
The guards followed by the adjacent selector edges give routes of lengths K + 6 t K+6t K + 6 t from u u u to b b b and K + 4 t − 2 K+4t-2 K + 4 t − 2 from v v v to a a a . In both cases, the connector alternatives have lengths A + 2 K A+2K A + 2 K and 8 t + A 8t+A 8 t + A , while routes using the opposite guard are longer. Therefore, dist G ( u , b ) = K + 6 t \operatorname{dist}_G(u,b)=K+6t dist G ( u , b ) = K + 6 t and dist G ( v , a ) = K + 4 t − 2 \operatorname{dist}_G(v,a)=K+4t-2 dist G ( v , a ) = K + 4 t − 2 .
For an assignment path Q Q Q , and integers 0 ≤ x , y ≤ A 0\le x,y\le A 0 ≤ x , y ≤ A , let P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) be the path obtained by extending Q Q Q a distance x x x from a a a along its connector path toward u u u , and a distance y y y from b b b along its connector path toward v v v .
Lemma 64. If ( G , R ) (G,R) ( G , R ) is a yes-instance, then it has a solution path of the form P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) . For such a path, shortness is equivalent to
x ≤ 3 t + 1 , y ≤ 2 t , x + y ≤ 4 t + 2. (44) x\le3t+1,\qquad y\le2t,\qquad x+y\le4t+2. \tag*{(44)} x ≤ 3 t + 1 , y ≤ 2 t , x + y ≤ 4 t + 2. (44)
Proof. Every vertex outside the pendant path attached at a a a is at distance greater than R R R from its pendant vertex; the same holds at b b b . Hence any solution path must contain a vertex on each of these two pendant paths. Since they are attached to the graph only at a a a and b b b , respectively, the solution path contains both a a a and b b b . Its a a a –b b b subpath is therefore an assignment path Q Q Q by Lemma 63. An extension of Q Q Q at a a a can enter only the forcing tail or the connector path towards u u u . The extension cannot reach u u u , since its u , b u,b u , b -subpath would have length A + 2 K A+2K A + 2 K , which exceeds dist G ( u , b ) = K + 6 t \operatorname{dist}_G(u,b)=K+6t dist G ( u , b ) = K + 6 t , contradicting the shortness of the solution path. A similar argument holds at b b b . Any extension of the solution path into a forcing tail may be truncated at a a a or b b b , respectively. This preserves shortness and the eccentricity bound: every vertex outside the relevant forcing tail does not become farther from the path, while every vertex on that tail remains within distance R R R of the path. The resulting path is P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) for some integers x x x and y y y with 0 ≤ x ≤ A 0\le x\le A 0 ≤ x ≤ A and 0 ≤ y ≤ A 0\le y\le A 0 ≤ y ≤ A .
Let p x p_x p x and q y q_y q y be the endpoints of P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) on the two connector paths. Since the internal vertices of these paths have degree two, every p x p_x p x –q y q_y q y path leaves each connector path through one of its endpoints. Between these endpoints, the four possibilities use Q Q Q , a shortest u u u –b b b path, a shortest a a a –v v v path, or a test path from u u u to v v v . Consequently,
dist G ( p x , q y ) = min { x + 2 K + y , ( A − x ) + ( K + 6 t ) + y , \operatorname{dist}_G(p_x,q_y)=\min\left\{x+2K+y,\ (A-x)+(K+6t)+y,\right. dist G ( p x , q y ) = min { x + 2 K + y , ( A − x ) + ( K + 6 t ) + y ,
x + ( K + 4 t − 2 ) + ( A − y ) , ( A − x ) + 8 t + ( A − y ) } . \left.x+(K+4t-2)+(A-y),\ (A-x)+8t+(A-y)\right\}. x + ( K + 4 t − 2 ) + ( A − y ) , ( A − x ) + 8 t + ( A − y ) } .
The path P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) realizes the first term, so it is shortest exactly when this term is no larger than each of the other three. Simplifying these inequalities gives (44).
Lemma 65. Let Q Q Q be an assignment path that encodes an assignment β \beta β . For every clause C ∈ C C \in\mathcal{C} C ∈ C and every j ∈ [ t ] j \in[t] j ∈ [ t ] ,
{ dist G ( w C , j , V ( Q ) ) ≤ r , if β satisfies C , dist G ( w C , j , V ( Q ) ) > r , if β falsifies C . (45) \begin{cases}
\operatorname{dist}_{G}(w_{C,j}, V(Q)) \le r, & \text{if } \beta\text{ satisfies } C,\\
\operatorname{dist}_{G}(w_{C,j}, V(Q)) > r, & \text{if } \beta\text{ falsifies } C. \tag*{(45)}
\end{cases} { dist G ( w C , j , V ( Q )) ≤ r , dist G ( w C , j , V ( Q )) > r , if β satisfies C , if β falsifies C . (45) Every nonpendant vertex is within distance R R R of Q Q Q . Furthermore, for P = P ( Q , x , y ) P = P(Q,x,y) P = P ( Q , x , y ) and i = 4 t + j i = 4t+j i = 4 t + j ,
dist G ( w C , j , V ( P ) ) = min { dist G ( w C , j , V ( Q ) ) , i + A − x , 8 t − i + A − y } . (46) \operatorname{dist}_{G}(w_{C,j}, V(P)) = \min\{\operatorname{dist}_{G}(w_{C,j}, V(Q)), i+A-x, 8t-i+A-y\}. \tag*{(46)} dist G ( w C , j , V ( P )) = min { dist G ( w C , j , V ( Q )) , i + A − x , 8 t − i + A − y } . (46) Proof. Each selected literal vertex is on Q Q Q , whereas each unselected literal vertex has distance exactly s = 4 t s=4t s = 4 t to Q Q Q . This holds in the selector and also in G G G by Lemma 63 . Fix a clause C ∈ C C \in\mathcal{C} C ∈ C and an index j ∈ [ t ] j \in[t] j ∈ [ t ] , and set i = 4 t + j i=4t+j i = 4 t + j .
Suppose that β \beta β satisfies C C C . A selected literal of C C C yields a path from w C , j w_{C,j} w C , j to Q Q Q of length j + D = K + t + j ≤ K + 2 t = r j+D=K+t+j\le K+2t=r j + D = K + t + j ≤ K + 2 t = r .
Suppose that β \beta β falsifies C C C . All three literal vertices of C C C are then unselected. Consider how a shortest path from w C , j w_{C,j} w C , j to Q Q Q first enters S S S . a. If it uses an incidence path of C C C , then its length is at least j + D + s = K + 5 t + j > r j+D+s=K+5t+j>r j + D + s = K + 5 t + j > r . b. If it uses an incidence path of another clause, then it must first reach that clause’s midpoint without entering S S S . This requires at least min { ( 4 t + j ) + 4 t , ( 4 t − j ) + 4 t } = 8 t − j ≥ 7 t \min\{(4t+j)+4t,(4t-j)+4t\}=8t-j\ge7t min {( 4 t + j ) + 4 t , ( 4 t − j ) + 4 t } = 8 t − j ≥ 7 t edges, and the incidence path increases the length to at least 7 t + D = K + 8 t > r 7t+D=K+8t>r 7 t + D = K + 8 t > r . c. If it uses a connector path or a guard path, then its length is at least one of i + A i+A i + A , 8 t − i + A 8t-i+A 8 t − i + A , i + ( K + 6 t − 1 ) i+(K+6t-1) i + ( K + 6 t − 1 ) and 8 t − i + ( K + 4 t − 3 ) 8t-i+(K+4t-3) 8 t − i + ( K + 4 t − 3 ) . Each quantity exceeds r = K + 2 t r=K+2t r = K + 2 t for 1 ≤ j ≤ t 1\le j\le t 1 ≤ j ≤ t .
These subcases exhaust all possible first entries into S S S , proving (45). A selector vertex is within distance s s s of Q Q Q . A connector-path vertex is within distance A A A of a a a or b b b . A guard-path vertex is within the corresponding guard length of z 0 z_0 z 0 or z n z_n z n . An incidence-path vertex is within distance D + s D+s D + s of Q Q Q . A test-path vertex reaches Q Q Q through its midpoint and an incident literal in at most 4 t + D + s = K + 9 t < R 4t+D+s=K+9t<R 4 t + D + s = K + 9 t < R edges. All these bounds are at most R R R . A shortest path from w C , j w_{C,j} w C , j to P ( Q , x , y ) P(Q,x,y) P ( Q , x , y ) ends either on Q Q Q or on one of the two connector-path prefixes.
If it ends on Q Q Q , its length is dist G ( w C , j , V ( Q ) ) \operatorname{dist}_{G}(w_{C,j}, V(Q)) dist G ( w C , j , V ( Q )) .
A path to the prefix on the a a a –u u u connector enters through a a a or u u u . Entering through a a a already reaches Q Q Q , whereas entering through u u u gives length dist G ( w C , j , u ) + A − x = i + A − x \operatorname{dist}_{G}(w_{C,j},u)+A-x=i+A-x dist G ( w C , j , u ) + A − x = i + A − x .
Similarly, entering the other connector prefix through v v v gives length 8 t − i + A − y 8t-i+A-y 8 t − i + A − y .
Here the distances to u u u and v v v follow from the isometry of J J J in Lemma 63 . Taking the minimum of these proves (46).
Correctness of the cross-composition
Lemma 66. The constructed instance ( G , R ) (G,R) ( G , R ) is a yes-instance if and only if at least one of Φ 1 , … , Φ t \Phi_1,\ldots,\Phi_t Φ 1 , … , Φ t is satisfiable.
Proof. Suppose that ( G , R ) (G,R) ( G , R ) is a yes-instance. By Lemma 64 , it has a solution path P = P ( Q , x , y ) P=P(Q,x,y) P = P ( Q , x , y ) . Let β \beta β be the assignment encoded by Q Q Q , and define L 0 = x + 2 t − 2 L_0=x+2t-2 L 0 = x + 2 t − 2 and U 0 = 6 t + 2 − y U_0=6t+2-y U 0 = 6 t + 2 − y . For a position i i i on a test path, the left connector-path term i + A − x i+A-x i + A − x
is at most r r r exactly when i ≤ L 0 i \le L_0 i ≤ L 0 , and the right connector-path term 8 t − i + A − y 8t-i+A-y 8 t − i + A − y is at most r r r exactly when i ≥ U 0 i \ge U_0 i ≥ U 0 . The inequalities in (44) imply L 0 ≤ 5 t − 1 L_0 \le5t-1 L 0 ≤ 5 t − 1 , U 0 ≥ 4 t + 2 U_0 \ge4t+2 U 0 ≥ 4 t + 2 , and U 0 − L 0 ≥ 2 U_0-L_0 \ge2 U 0 − L 0 ≥ 2 . Hence there is an integer i ∈ { 4 t + 1 , … , 5 t } i \in\{4t+1,\ldots,5t\} i ∈ { 4 t + 1 , … , 5 t } with L 0 < i < U 0 L_0 < i < U_0 L 0 < i < U 0 ; for example, take i = max { 4 t + 1 , L 0 + 1 } i=\max\{4t+1,L_0+1\} i = max { 4 t + 1 , L 0 + 1 } . Write i = 4 t + j i=4t+j i = 4 t + j with j ∈ [ t ] j \in[t] j ∈ [ t ] . This index is the same for every clause test path. Suppose that a clause C ∈ Φ j C \in\Phi_j C ∈ Φ j is falsified by β \beta β . Lemma 65 gives dist G ( w C , j , V ( Q ) ) > r \operatorname{dist}_G(w_{C,j},V(Q))>r dist G ( w C , j , V ( Q )) > r , while L 0 < i < U 0 L_0<i<U_0 L 0 < i < U 0 makes both connector-path terms in (46) greater than r r r . Therefore dist G ( w C , j , V ( P ) ) > r \operatorname{dist}_G(w_{C,j},V(P))>r dist G ( w C , j , V ( P )) > r . The path P P P does not enter a test hair, so dist G ( λ C , j , V ( P ) ) = 8 t + dist G ( w C , j , V ( P ) ) > 8 t + r = R \operatorname{dist}_G(\lambda_{C,j},V(P))=8t+\operatorname{dist}_G(w_{C,j},V(P))>8t+r=R dist G ( λ C , j , V ( P )) = 8 t + dist G ( w C , j , V ( P )) > 8 t + r = R , contradicting that P P P is a solution path. Thus β \beta β satisfies every clause of Φ j \Phi_j Φ j , and Φ j \Phi_j Φ j is satisfiable.
Suppose that Φ j \Phi_j Φ j is satisfied by an assignment β \beta β , and let Q Q Q be the corresponding assignment path. Set x = 2 t + j + 1 x=2t+j+1 x = 2 t + j + 1 and y = 2 t − j + 1 y=2t-j+1 y = 2 t − j + 1 . These values satisfy (44) , with x + y = 4 t + 2 x+y=4t+2 x + y = 4 t + 2 , so P = P ( Q , x , y ) P=P(Q,x,y) P = P ( Q , x , y ) is shortest. Its length is $2K+4t+2=2r+2$. Every nonpendant vertex and both forcing tails are within distance R R R of P P P , by Lemma 65 and because a , b ∈ P a,b \in P a , b ∈ P . Consider a test hair attached at w C , h w_{C,h} w C , h , where h ∈ [ t ] h \in[t] h ∈ [ t ] and C ∈ Φ h C \in\Phi_h C ∈ Φ h . The two connector-path terms in (46) become ( 4 t + h ) + A − x = r + h − j + 1 (4t+h)+A-x=r+h-j+1 ( 4 t + h ) + A − x = r + h − j + 1 and ( 4 t − h ) + A − y = r + j − h + 1 (4t-h)+A-y=r+j-h+1 ( 4 t − h ) + A − y = r + j − h + 1 . If h ≠ j h \ne j h = j , at least one of these terms is at most r r r . If h = j h=j h = j , then β \beta β satisfies C C C because C ∈ Φ j C \in\Phi_j C ∈ Φ j , and (45) gives dist G ( w C , j , V ( Q ) ) ≤ r \operatorname{dist}_G(w_{C,j},V(Q)) \le r dist G ( w C , j , V ( Q )) ≤ r . Thus every attachment vertex w C , h w_{C,h} w C , h of a test hair is within distance r r r of P P P . Since each test hair has length 8 t 8t 8 t and r + 8 t = R r+8t=R r + 8 t = R , all its vertices are within distance R R R of $P. Therefore P P P is a solution path, and ( G , R ) (G,R) ( G , R ) is a yes-instance. ◀
Proof of Theorem 62. The construction can be performed in polynomial time, and equation (42) bounds the output parameter by a polynomial in the maximum input size plus log t \log t log t . Lemma 66 establishes the required OR-property. Consequently, the construction is an OR-cross-composition of Distinct 3-Sat into ESP parameterized by feedback edge number. Theorem 52 therefore yields the claimed kernel lower bound. A minimum feedback edge set can be supplied by computing a spanning tree and taking the edges outside it, without changing the parameter or the equivalence. ◀
Vertex cover number
We transfer the kernel lower bound for Small Universe Set Cover to ESP parameterized by vertex cover and related vertex-deletion distances. Recall that vc ( G ) \operatorname{vc}(G) vc ( G ) is the minimum size of a vertex set meeting every edge, as defined in Subsection 2.1.
Theorem 67. The problem ESP parameterized by vertex cover number has no polynomial kernel unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly . It also holds when the input includes a vertex cover and is parameterized by its size.
We use a polynomial parameter transformation from Small Universe Set Cover. An instance of Small Universe Set Cover consists of a universe U U U , a family F ⊆ 2 U \mathcal{F} \subseteq2^U F ⊆ 2 U , and an integer b b b . It is a yes-instance if at most b b b members of F \mathcal{F} F cover U U U . The parameter is ∣ U ∣ + b |U|+b ∣ U ∣ + b . This problem has no polynomial kernel unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly [25 ] .
Let P P P and Q Q Q be parameterized problems. A polynomial parameter transformation from P P P to Q Q Q is a polynomial-time algorithm that maps an instance ( x , k ) (x,k) ( x , k ) of P P P to an instance ( x ′ , k ′ ) (x',k') ( x ′ , k ′ ) of Q Q Q such that ( x , k ) (x,k) ( x , k ) is a yes-instance if and only if ( x ′ , k ′ ) (x',k') ( x ′ , k ′ ) is a yes-instance, and k ′ k' k ′ is bounded by a polynomial in k k k .
Theorem 68 (Bodlaender, Thomassé, and Yeo [12]). Let P P P and Q Q Q be parameterized problems such that the unparameterized version of P P P is NP-hard and the unparameterized version of
Q Q Q belongs to NP. If P P P admits no polynomial kernel and there is a polynomial parameter transformation from P P P to Q Q Q , then Q Q Q admits no polynomial kernel.
Graph construction
Let ( U , F , b ) (U,\mathcal{F},b) ( U , F , b ) be an instance of Small Universe Set Cover, and set n : = ∣ U ∣ n := |U| n := ∣ U ∣ . We may assume that
U ≠ ∅ , ⋃ F ∈ F F = U , 1 ≤ b ≤ n . (47) U \ne\varnothing,\qquad\bigcup_{F\in\mathcal{F}} F = U,\qquad1 \le b \le n. \tag*{(47)} U = ∅ , F ∈ F ⋃ F = U , 1 ≤ b ≤ n . (47)
Indeed, an empty universe gives a yes-instance. An element that occurs in no set, or a zero budget with a nonempty universe, gives a no-instance. If every element occurs in some set and b > n b > n b > n , then choosing one set for each element gives a cover of size at most b b b . These cases can be mapped to fixed yes- and no-instances of ESP, with fixed vertex covers when required. Hence assume (47) in the remainder.
Set L = b L = b L = b and R = b + 1 R = b + 1 R = b + 1 . We construct an instance ( G , R ) (G,R) ( G , R ) of ESP as follows (see Figure 6 ).
Figure 6. A sketch of the graph construction used in the proof of Theorem 67.
Create connector vertices z 0 , … , z b z_0,\ldots,z_b z 0 , … , z b . For every i ∈ [ b ] i \in[b] i ∈ [ b ] , create an independent candidate layer I i = { c i , F : F ∈ F } I_i = \{c_{i,F}: F \in\mathcal{F}\} I i = { c i , F : F ∈ F } . Join every candidate in I i I_i I i to both z i − 1 z_{i-1} z i − 1 and z i z_i z i . There are no edges between candidate vertices, including candidates in distinct layers. Let B = { z 0 , … , z b } ∪ ⋃ i = 1 b I i B = \{z_0,\ldots,z_b\} \cup\bigcup_{i=1}^{b} I_i B = { z 0 , … , z b } ∪ ⋃ i = 1 b I i , and call the subgraph induced by B B B the selection backbone . For a sequence F 1 , … , F b ∈ F F_1,\ldots,F_b \in\mathcal{F} F 1 , … , F b ∈ F , define the corresponding selection path as z 0 , c 1 , F 1 , z 1 , c 2 , F 2 , … , z b − 1 , c b , F b , z b z_0,c_{1,F_1},z_1,c_{2,F_2},\ldots,z_{b-1},c_{b,F_b},z_b z 0 , c 1 , F 1 , z 1 , c 2 , F 2 , … , z b − 1 , c b , F b , z b . Here F i F_i F i denotes the set selected in layer I i I_i I i , not the i i i th member of a fixed ordering of F \mathcal{F} F . The sets F 1 , … , F b F_1,\ldots,F_b F 1 , … , F b need not be distinct.
Attach a path z 0 = a 0 , a 1 , … , a R z_0 = a_0,a_1,\ldots,a_R z 0 = a 0 , a 1 , … , a R at z 0 z_0 z 0 , and a path z b = d 0 , d 1 , … , d R z_b = d_0,d_1,\ldots,d_R z b = d 0 , d 1 , … , d R at z b z_b z b . These paths are the forcing tails .
For every element u ∈ U u \in U u ∈ U , create a terminal vertex x u x_u x u . For every i ∈ [ b ] i \in[b] i ∈ [ b ] , create a hub h i , u h_{i,u} h i , u and a path Q i , u Q_{i,u} Q i , u of length L = b L = b L = b from h i , u h_{i,u} h i , u to x u x_u x u . For a fixed element u u u , these paths share only the terminal x u x_u x u ; paths belonging to distinct elements are disjoint. We call the subgraph formed by x u x_u x u , the hubs h i , u h_{i,u} h i , u , and the paths Q i , u Q_{i,u} Q i , u the element gadget for u u u . Finally, join c i , F c_{i,F} c i , F to h i , u h_{i,u} h i , u exactly when u ∈ F u \in F u ∈ F .
Each labeled line in Figure 6 represents a path of the indicated number of edges, with its internal subdivision vertices suppressed. The drawing is not to scale, and unmarked crossings are not vertices.
Parameter and size bounds
Let X = V ( G ) ∖ ⋃ i = 1 b I i X = V(G) \setminus\bigcup_{i=1}^{b} I_i X = V ( G ) ∖ ⋃ i = 1 b I i . The graph G − X G - X G − X is independent, so X X X is a vertex cover. Each path Q i , u Q_{i,u} Q i , u contributes b b b vertices other than its terminal, which is counted once for each u u u . Consequently,
∣ X ∣ = ( b + 1 ) + 2 R + n + n b 2 = n b 2 + n + 3 b + 3 = O ( ( n + b ) 3 ) . (48) |X| = (b+1) + 2R + n + nb^2
= nb^2 + n + 3b + 3 = O((n+b)^3). \tag*{(48)} ∣ X ∣ = ( b + 1 ) + 2 R + n + n b 2 = n b 2 + n + 3 b + 3 = O (( n + b ) 3 ) . (48)
The four terms in ∣ X ∣ |X| ∣ X ∣ count, respectively, the connector vertices, the vertices introduced on the two forcing tails, the element terminals, and the nonterminal vertices of the paths Q i , u Q_{i,u} Q i , u . The bound is independent of ∣ F ∣ |\mathcal{F}| ∣ F ∣ and polynomial in the source parameter n + b n+b n + b . If a vertex cover must be supplied with the output, we supply X X X . The graph G G G can be constructed in polynomial time. Let ℓ \ell ℓ denote the encoding length of ( U , F , b ) (U,\mathcal{F},b) ( U , F , b ) . Then n n n , b b b , ∣ F ∣ ≤ ℓ |\mathcal{F}| \le\ell ∣ F ∣ ≤ ℓ . Besides the vertices of X X X , the graph has b ∣ F ∣ b|\mathcal{F}| b ∣ F ∣ candidate vertices. The selection backbone contributes 2 b ∣ F ∣ 2b|\mathcal{F}| 2 b ∣ F ∣ edges, the forcing tails contribute 2 R 2R 2 R edges, and the paths Q i , u Q_{i,u} Q i , u contribute n b 2 nb^2 n b 2 edges. There are at most n b ∣ F ∣ nb|\mathcal{F}| nb ∣ F ∣ candidate-hub edges. Hence G G G has O ( n b 2 + b ∣ F ∣ ) = O ( ℓ 3 ) O(nb^2+b|\mathcal{F}|)=O(\ell^3) O ( n b 2 + b ∣ F ∣ ) = O ( ℓ 3 ) vertices and O ( n b 2 + n b ∣ F ∣ ) = O ( ℓ 3 ) O(nb^2+nb|\mathcal{F}|)=O(\ell^3) O ( n b 2 + nb ∣ F ∣ ) = O ( ℓ 3 ) edges. Thus the output size and the running time are polynomial in the source input length. The algorithm expands every path explicitly, and therefore G G G is unweighted. By Equation (47) , every element gadget has an edge to the selection backbone, so G G G is connected. The description also shows that G G G is simple and undirected.
Canonical paths and correctness
We now argue that ( G , R ) (G,R) ( G , R ) is a yes-instance of ESP if and only if ( U , F , b ) (U,\mathcal{F},b) ( U , F , b ) is a yes-instance of Small Universe Set Cover. We first establish two structural properties of the constructed graph.
Lemma 69. The shortest z 0 z_0 z 0 –z b z_b z b paths are exactly the selection paths, and each has length 2 b 2b 2 b . Moreover, if ( G , R ) (G,R) ( G , R ) is a yes-instance, then some selection path is a solution path.
Proof. Every selection path has length 2 b 2b 2 b , so a shortest z 0 z_0 z 0 –z b z_b z b path has length at most 2 b 2b 2 b . Let P P P be such a shortest path. Since each forcing tail is pendant at its attachment vertex, P P P cannot enter its interior. Suppose that P P P contains an element terminal x u x_u x u or an internal vertex of a path Q i , u Q_{i,u} Q i , u . Since the endpoints of P P P lie in the selection backbone B B B , the path P P P contains a maximal subpath whose endpoints lie in B B B , whose internal vertices lie outside B B B , and which contains this vertex. This subpath enters and leaves the element gadget through candidate–hub edges. Since every internal vertex of a path Q i , u Q_{i,u} Q i , u has degree two, returning to B B B without repeating a vertex requires traversing two distinct length-b b b paths Q i , u Q_{i,u} Q i , u and Q j , u Q_{j,u} Q j , u through x u x_u x u . Together with the two candidate–hub edges, this subpath has length at least 2 b + 2 2b+2 2 b + 2 , contradicting the length of P P P . Hence P P P contains no element terminal or internal vertex of a path Q i , u Q_{i,u} Q i , u . After the terminals and the internal vertices of the paths Q i , u Q_{i,u} Q i , u are excluded, every hub is adjacent only to candidates from one layer. Thus, for every i ∈ [ b − 1 ] i \in[b-1] i ∈ [ b − 1 ] , the connector z i z_i z i separates the layers I 1 , … , I i I_1,\ldots,I_i I 1 , … , I i from the layers I i + 1 , … , I b I_{i+1},\ldots,I_b I i + 1 , … , I b . Any z 0 z_0 z 0 –z b z_b z b path must therefore visit z 0 , z 1 , … , z b z_0,z_1,\ldots,z_b z 0 , z 1 , … , z b in this order. Between z i − 1 z_{i-1} z i − 1 and z i z_i z i , it uses at least two edges, with equality exactly when it uses one candidate of I i I_i I i . Since the total length is at most 2 b 2b 2 b , equality holds for every layer. Hence the shortest z 0 z_0 z 0 –z b z_b z b paths are precisely the selection paths.
Suppose that P P P is a solution path. Let A 0 = { a 1 , … , a R } A_0=\{a_1,\ldots,a_R\} A 0 = { a 1 , … , a R } and A b = { d 1 , … , d R } A_b=\{d_1,\ldots,d_R\} A b = { d 1 , … , d R } . Every vertex outside A 0 ∪ { z 0 } A_0 \cup\{z_0\} A 0 ∪ { z 0 } is at distance greater than R R R from a R a_R a R . If z 0 ∉ V ( P ) z_0 \notin V(P) z 0 ∈ / V ( P ) , then the eccentricity bound forces P P P to contain a vertex of A 0 A_0 A 0 . Since z 0 z_0 z 0 separates A 0 A_0 A 0 from the rest of G G G and P P P is connected, this implies V ( P ) ⊆ A 0 V(P) \subseteq A_0 V ( P ) ⊆ A 0 . But then dist G ( d R , V ( P ) ) > R \operatorname{dist}_G(d_R,V(P))>R dist G ( d R , V ( P )) > R , a contradiction. Thus z 0 ∈ V ( P ) z_0 \in V(P) z 0 ∈ V ( P ) , and the symmetric argument gives z b ∈ V ( P ) z_b \in V(P) z b ∈ V ( P ) . The z 0 z_0 z 0 –z b z_b z b subpath of P P P is shortest between its endpoints and is therefore a selection path S S S . Orient P P P so that this subpath runs from z 0 z_0 z 0 to z b z_b z b . If the predecessor of z 0 z_0 z 0 on P P P belonged to I 1 I_1 I 1 , then it would be adjacent to z 1 z_1 z 1 . This would replace the three-edge subpath consisting of that predecessor, z 0 z_0 z 0 , the selected candidate of I 1 I_1 I 1 , and z 1 z_1 z 1 by one edge, contradicting the shortestness of P P P . Therefore any extension before z 0 z_0 z 0 lies in A 0 A_0 A 0 . Symmetrically, any extension after z b z_b z b lies in A b A_b A b . Trim these extensions. For a vertex outside A 0 ∪ A b A_0 \cup A_b A 0 ∪ A b , any path to one of the trimmed extensions first reaches z 0 z_0 z 0 or z b z_b z b , both of which remain on S S S . Hence its distance to S S S equals its distance to P P P . Every forcing-tail vertex is within distance R R R of its attachment vertex. It follows that ecc G ( S ) ≤ R \operatorname{ecc}_G(S) \le R ecc G ( S ) ≤ R , so S S S is a solution path.
Lemma 70. Let P P P be a selection path that chooses F 1 , … , F b F_1,\ldots,F_b F 1 , … , F b . For every element u ∈ U u \in U u ∈ U ,
dist G ( x u , V ( P ) ) = { b + 1 = R , if u ∈ ⋃ i = 1 b F i , b + 2 = R + 1 , otherwise. (49) \operatorname{dist}_G(x_u,V(P)) =
\begin{cases}
b+1=R, & \text{if } u \in\bigcup_{i=1}^{b} F_i, \\
b+2=R+1, & \text{otherwise.}
\end{cases} \tag*{(49)} dist G ( x u , V ( P )) = { b + 1 = R , b + 2 = R + 1 , if u ∈ ⋃ i = 1 b F i , otherwise. (49) Every nonterminal vertex is within distance R R R of P P P . Consequently, P P P is a solution path if and only if F 1 , … , F b F_1,\ldots,F_b F 1 , … , F b cover U U U .
Proof. Every connector lies on P P P , every candidate is adjacent to a connector, and every forcing-tail vertex is within distance R R R of its attachment vertex. Consider a vertex y ∈ V ( Q i , u ) ∖ { x u } y \in V(Q_{i,u}) \setminus\{x_u\} y ∈ V ( Q i , u ) ∖ { x u } , and let r r r be its distance from h i , u h_{i,u} h i , u along Q i , u Q_{i,u} Q i , u . Then 0 ≤ r ≤ b − 1 0 \le r \le b-1 0 ≤ r ≤ b − 1 . By (47) , there is a set F ∈ F F \in\mathcal{F} F ∈ F containing u u u . The route from y y y through h i , u h_{i,u} h i , u and c i , F c_{i,F} c i , F to z i − 1 z_{i-1} z i − 1 has length r + 2 ≤ b + 1 = R r+2 \le b+1=R r + 2 ≤ b + 1 = R . Thus every nonterminal vertex is within distance R R R of P P P . Every path from x u x_u x u to P P P first traverses one of the length-b b b paths Q i , u Q_{i,u} Q i , u to a hub h i , u h_{i,u} h i , u . The hub h i , u h_{i,u} h i , u has distance one from P P P exactly when the selected set F i F_i F i contains u u u . Otherwise its distance from P P P is two: choose any set F ∈ F F \in\mathcal{F} F ∈ F containing u u u , and use the path h i , u , c i , F , z i − 1 h_{i,u},c_{i,F},z_{i-1} h i , u , c i , F , z i − 1 . Taking the minimum of dist G ( h i , u , V ( P ) ) \operatorname{dist}_G(h_{i,u},V(P)) dist G ( h i , u , V ( P )) over all layers proves (49) : it is one if some selected set F i F_i F i contains u u u , and two otherwise.
The final claim follows because the vertices x u x_u x u are the only vertices that can lie farther than R R R from P P P . ◀
Lemma 71. The constructed instance ( G , R ) (G, R) ( G , R ) is a yes-instance if and only if ( U , F , b ) (U, \mathcal{F}, b) ( U , F , b ) is a yes-instance of Small Universe Set Cover.
Proof. Suppose that ( G , R ) (G, R) ( G , R ) is a yes-instance. By Lemma 69, some selection path is a solution path. Let F 1 , … , F b F_1,\ldots,F_b F 1 , … , F b be its selected sets. Lemma 70 implies that these sets cover U U U . Hence ( U , F , b ) (U,\mathcal{F},b) ( U , F , b ) is a yes-instance.
Suppose that at most b b b sets from F \mathcal{F} F cover U U U . Since U U U is nonempty, the cover contains at least one set. Repeat a selected set if necessary to obtain a sequence F 1 , … , F b F_1,\ldots,F_b F 1 , … , F b . The corresponding selection path is shortest by Lemma 69, and Lemma 70 gives its eccentricity at most R R R . Therefore ( G , R ) (G,R) ( G , R ) is a yes-instance. ◀
Proof of Theorem 67. The construction is polynomial-time, and (48) bounds ∣ X ∣ |X| ∣ X ∣ by a polynomial in the source parameter n + b n+b n + b . Since X X X is a vertex cover, vc ( G ) ≤ ∣ X ∣ \operatorname{vc}(G) \le|X| vc ( G ) ≤ ∣ X ∣ , so the target parameter has the same polynomial bound. Lemma 71 establishes equivalence of the source and target instances. The unparameterized version of Small Universe Set Cover is NP-complete, and ESP belongs to NP because shortestness and eccentricity of a given path can be checked in polynomial time. Theorem 68 and the kernel lower bound for Small Universe Set Cover therefore yield the claimed result. For the version with a supplied vertex cover, we include X X X in the output. For the minimum vertex cover parameter, we omit X X X and use vc ( G ) ≤ ∣ X ∣ \operatorname{vc}(G) \le|X| vc ( G ) ≤ ∣ X ∣ . ◀
Consequences for deletion parameters
For the following consequence, recall the vertex-deletion distances to cluster, split, proper interval, and interval graphs from Subsection 2.1.
Corollary 72. Unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly , ESP has no polynomial kernel parameterized by deletion distance to cluster graphs, split graphs, proper interval graphs, or interval graphs. The same holds when a deletion set to any of these graph classes is supplied and its size is the parameter.
Proof. Every edgeless graph belongs to each of the four graph classes. Since G − X G-X G − X is independent, every listed deletion parameter is at most ∣ X ∣ = O ( ( n + b ) 3 ) |X| = O((n+b)^3) ∣ X ∣ = O (( n + b ) 3 ) . The construction therefore gives the same polynomial parameter transformation for each parameter. If a deletion set is required as part of the input, we supply X X X . ◀
Bandwidth
Recall that the bandwidth bw ( G ) \operatorname{bw}(G) bw ( G ) minimizes the maximum distance between the positions of adjacent vertices in an ordering; see Subsection 2.1. We use the notation for distances, path eccentricity, and ESP fixed in the preliminaries.
Theorem 73. Unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP}/\mathrm{poly} NP ⊆ coNP / poly , ESP has no polynomial kernel when parameterized by the bandwidth of the input graph.
The cross-composition construction
We give an OR-cross-composition from 3-SAT, which is NP-complete [35 ] . We use formulas with at least one variable and one to three literals per clause. Two well-formed formulas are equivalent when they have the same number of variables; all malformed strings form one additional class. This is a polynomial equivalence relation: it is polynomial-time decidable and has at most N + 1 N + 1 N + 1 classes on strings of length at most N N N . For the malformed class, output the fixed no-instance ( K 3 , 0 ) (K_3, 0) ( K 3 , 0 ) .
Let F 1 , … , F q F_1,\ldots,F_q F 1 , … , F q be formulas in one well-formed class, each on variables X 1 , … , X n X_1,\ldots,X_n X 1 , … , X n , where n ≥ 1 n \ge1 n ≥ 1 . Write m i m_i m i for the number of clauses of F i F_i F i , and set
A = 2 n + 1 , L = A + 1 = 2 n + 2 , R = 2 A − 1 = 4 n + 1. (50) A = 2n + 1,\qquad L = A + 1 = 2n + 2,\qquad R = 2A - 1 = 4n + 1. \tag*{(50)} A = 2 n + 1 , L = A + 1 = 2 n + 2 , R = 2 A − 1 = 4 n + 1. (50)
We construct an ESP instance ( H , R ) (H,R) ( H , R ) . A private path of length ℓ \ell ℓ has ℓ \ell ℓ edges and new internal vertices. All private paths below have mutually disjoint interiors, and no edges other than those specified are added.
Construction.
Create boundary vertices a 0 a_0 a 0 , b 0 , … , a q b_0,\ldots,a_q b 0 , … , a q , b q b_q b q . For each i ∈ { 1 , … , q } i \in\{1,\ldots,q\} i ∈ { 1 , … , q } , construct a module M i M_i M i as follows. Its upper rail T i T_i T i is a private a i − 1 a_{i-1} a i − 1 –a i a_i a i path of length L L L ; its lower rail B i B_i B i is a private b i − 1 b_{i-1} b i − 1 –b i b_i b i path of length L L L . Let x i x_i x i be the neighbor of a i a_i a i on T i T_i T i , and let y i y_i y i be the neighbor of b i − 1 b_{i-1} b i − 1 on B i B_i B i . Thus
dist T i ( a i − 1 , x i ) = A , dist B i ( y i , b i ) = A . \operatorname{dist}_{T_i}(a_{i-1},x_i)=A,\qquad\operatorname{dist}_{B_i}(y_i,b_i)=A. dist T i ( a i − 1 , x i ) = A , dist B i ( y i , b i ) = A .
The variable chain D i D_i D i has new vertices w i , 0 , … , w i , n w_{i,0},\ldots,w_{i,n} w i , 0 , … , w i , n and u i , j + , u i , j − u_{i,j}^{+},u_{i,j}^{-} u i , j + , u i , j − , for 1 ≤ j ≤ n 1 \le j \le n 1 ≤ j ≤ n . Add the edges a i − 1 w i , 0 a_{i-1}w_{i,0} a i − 1 w i , 0 and w i , n b i w_{i,n}b_i w i , n b i , and, for each j j j , the four edges forming the two paths
w i , j − 1 , u i , j + , w i , j and w i , j − 1 , u i , j − , w i , j . w_{i,j-1},u_{i,j}^{+},w_{i,j}\qquad\text{and}\qquad w_{i,j-1},u_{i,j}^{-},w_{i,j}. w i , j − 1 , u i , j + , w i , j and w i , j − 1 , u i , j − , w i , j .
The vertices u i , j + u_{i,j}^{+} u i , j + and u i , j − u_{i,j}^{-} u i , j − represent X j X_j X j and ¬ X j \neg X_j ¬ X j , respectively. Traversing D i D_i D i from a i − 1 a_{i-1} a i − 1 to b i b_i b i by choosing one literal vertex for each variable takes exactly 2 n + 2 = L 2n + 2 = L 2 n + 2 = L edges.
Add two helper paths , each of length L L L : one from a i − 1 a_{i-1} a i − 1 to y i y_i y i and one from x i x_i x i to b i b_i b i . For each clause occurrence C C C of F i F_i F i , create a vertex c i , C c_{i,C} c i , C . For each distinct literal occurring in C C C , add a path of length R R R from c i , C c_{i,C} c i , C to its corresponding vertex in D i D_i D i : use u i , j + u_{i,j}^{+} u i , j + for the literal X j X_j X j and u i , j − u_{i,j}^{-} u i , j − for the literal ¬ X j \neg X_j ¬ X j . Each such path is called a clause path , and all its internal vertices are new and used only by that path. Also join c i , C c_{i,C} c i , C to each of x i , y i x_i,y_i x i , y i by a private path of length A A A , called a hub link . The helper paths, clause paths, and hub links are the auxiliary paths . Different modules share only their common boundary vertices.
Finally, attach a pendant path of length R + 1 R + 1 R + 1 at each of a 0 a_0 a 0 and b q b_q b q , with respective far endpoints α \alpha α and β \beta β . These are the forcing tails . The resulting graph H H H is connected (see Figure 7 ).
Figure 7. A sketch of the graph construction used in the proof of Theorem 73 .
Each labeled line in Figure 7 represents a path of the indicated number of edges, with its internal subdivision vertices suppressed. The drawing is not to scale, and unmarked crossings are not vertices.
Canonical shortest paths and domination
Claim 74. The distance from a 0 a_0 a 0 to b q b_q b q is q L qL q L . Every shortest a 0 a_0 a 0 –b q b_q b q path uses upper rails before a unique module M i M_i M i , traverses D i D_i D i through exactly one literal vertex for each variable, and uses lower rails afterwards. Conversely, every such path is shortest.
Proof. For each i ∈ { 1 , … , q } i \in\{1,\ldots,q\} i ∈ { 1 , … , q } , define a real-valued local level function λ i \lambda_i λ i on V ( M i ) V(M_i) V ( M i ) . Assign level 0 0 0 to a i − 1 , b i − 1 a_{i-1},b_{i-1} a i − 1 , b i − 1 and level L L L to a i , b i a_i,b_i a i , b i . Along each rail, increase the level by one at each step from left to right. In particular, λ i ( x i ) = A \lambda_i(x_i)=A λ i ( x i ) = A and λ i ( y i ) = 1 \lambda_i(y_i)=1 λ i ( y i ) = 1 . For the variable-chain and clause vertices, set
λ i ( w i , j ) = 2 j + 1 ( 0 ≤ j ≤ n ) , λ i ( u i , j ± ) = 2 j ( 1 ≤ j ≤ n ) , λ i ( c i , C ) = n + 1. \lambda_i(w_{i,j})=2j+1\quad(0\le j\le n),\qquad\lambda_i(u_{i,j}^{\pm})=2j\quad(1\le j\le n),\qquad\lambda_i(c_{i,C})=n+1. λ i ( w i , j ) = 2 j + 1 ( 0 ≤ j ≤ n ) , λ i ( u i , j ± ) = 2 j ( 1 ≤ j ≤ n ) , λ i ( c i , C ) = n + 1.
Thus the levels at the endpoints of every rail or variable-chain edge differ by exactly one.
It remains to assign levels to the internal vertices of auxiliary paths. For an auxiliary path z 0 , z 1 , … , z ℓ z_0,z_1,\ldots,z_\ell z 0 , z 1 , … , z ℓ , whose endpoint levels have already been assigned, set
λ i ( z t ) = λ i ( z 0 ) + t ℓ ( λ i ( z ℓ ) − λ i ( z 0 ) ) ( 1 ≤ t < ℓ ) . \lambda_i(z_t)=\lambda_i(z_0)+\frac{t}{\ell}\bigl(\lambda_i(z_\ell)-\lambda_i(z_0)\bigr)\quad(1\le t<\ell). λ i ( z t ) = λ i ( z 0 ) + ℓ t ( λ i ( z ℓ ) − λ i ( z 0 ) ) ( 1 ≤ t < ℓ ) .
This is well-defined because auxiliary paths have disjoint interiors. The absolute level change across each edge of this path is therefore ∣ λ i ( z ℓ ) − λ i ( z 0 ) ∣ / ℓ \lvert\lambda_i(z_\ell)-\lambda_i(z_0)\rvert/\ell ∣ λ i ( z ℓ ) − λ i ( z 0 )∣ / ℓ . For a helper path, the endpoint levels differ by 1 1 1 and its length is L L L . For a hub link, they differ by n n n and its length is A A A . For a clause path ending at u i , j ± u_{i,j}^{\pm} u i , j ± , they differ by ∣ 2 j − ( n + 1 ) ∣ ≤ n − 1 \lvert2j-(n+1)\rvert\le n-1 ∣ 2 j − ( n + 1 )∣ ≤ n − 1 and its length is R R R . Since 1 < L 1<L 1 < L , n < A n<A n < A , and n − 1 < R n-1<R n − 1 < R , every auxiliary edge changes the level by strictly less than one. Consequently, every edge of M i M_i M i changes the level by at most one.
Adding ( i − 1 ) L (i-1)L ( i − 1 ) L to the levels in M i M_i M i gives a well-defined global function Λ \Lambda Λ , since the levels agree on shared boundaries. Any a 0 a_0 a 0 –b q b_q b q path avoids the pendant tails and therefore has length at least Λ ( b q ) − Λ ( a 0 ) = q L \Lambda(b_q)-\Lambda(a_0)=qL Λ ( b q ) − Λ ( a 0 ) = q L . A path of the stated form has length q L qL q L . Equality forces every edge to increase Λ \Lambda Λ by exactly one, so no auxiliary edge can be used. The only possible transitions through a module are its upper rail, its lower rail, or its variable chain, corresponding to
a ⟶ a , b ⟶ b , a ⟶ b . a\longrightarrow a,\qquad b\longrightarrow b,\qquad a\longrightarrow b. a ⟶ a , b ⟶ b , a ⟶ b .
Starting at a 0 a_0 a 0 and ending at b q b_q b q therefore requires exactly one variable-chain transition. Along that chain, increasing levels force exactly one literal choice per variable.
Call this unique module selected , and interpret its literal choices as a truth assignment: X j X_j X j is true precisely when u i , j + u_{i,j}^{+} u i , j + is chosen.
Claim 75. If a shortest a 0 a_0 a 0 –b q b_q b q path P P P selects M i M_i M i , then
dist H ( x i , P ) = dist H ( y i , P ) = A . \operatorname{dist}_{H}(x_i,P)=\operatorname{dist}_{H}(y_i,P)=A. dist H ( x i , P ) = dist H ( y i , P ) = A . Proof. The rail segments to a i − 1 ∈ V ( P ) a_{i-1}\in V(P) a i − 1 ∈ V ( P ) and b i ∈ V ( P ) b_i\in V(P) b i ∈ V ( P ) give the respective upper bounds A A A . A path of length less than A A A from either hub to P P P cannot traverse an auxiliary path: every such path has length at least A A A , its internal vertices have degree two, and neither endpoint of the proposed short path is an auxiliary internal vertex. Hence such a path would lie in the graph consisting only of the rails, variable chains, and forcing tails.
In this graph, the part of the upper rail belonging to P P P ends at a i − 1 a_{i-1} a i − 1 , at rail distance A A A from x i x_i x i . Before meeting P P P , a route from x i x_i x i that leaves the upper rail must traverse a nonselected variable chain to the lower rail, which costs at least L > A L>A L > A edges. It cannot enter D i D_i D i before meeting P P P , because both attachments of D i D_i D i belong to P P P ; entering a forcing tail likewise requires first meeting a 0 a_0 a 0 or b q b_q b q . Thus no x i x_i x i –P P P path has length less than A A A . The same argument on the lower rail, whose part in P P P starts at b i b_i b i , applies to y i y_i y i .
Claim 76. Let P P P be a shortest a 0 a_0 a 0 –b q b_q b q path selecting M i M_i M i . Every vertex of every nonselected module is within distance R R R of P P P . Every vertex of M i M_i M i is within distance R R R of P P P if and only if its selected assignment satisfies F i F_i F i .
Proof. First consider the selected module M i M_i M i . Each literal vertex is on P P P or adjacent to a vertex w i , j w_{i,j} w i , j on P P P . A route from a clause vertex c i , C c_{i,C} c i , C to P P P must first traverse either a hub link or a clause path. By Claim 75, going through a hub costs at least A + A = R + 1 A+A=R+1 A + A = R + 1 . A clause path already has length R R R , so it reaches P P P within distance R R R exactly when its literal endpoint is chosen. In fact,
dist H ( c i , C , P ) = { R , if the selected assignment satisfies C , R + 1 , otherwise. (51) \operatorname{dist}_{H}(c_{i,C},P)=
\begin{cases}
R, & \text{if the selected assignment satisfies } C,\\
R+1, & \text{otherwise.}
\end{cases} \tag*{(51)} dist H ( c i , C , P ) = { R , R + 1 , if the selected assignment satisfies C , otherwise. (51) All other vertices of M i M_i M i are automatically within distance R R R : variable-chain vertices are within distance one, and rail vertices and helper-path vertices are within distance L L L via a i − 1 a_{i-1} a i − 1 or b i b_i b i . An internal clause-path vertex is at most R − 1 R-1 R − 1 edges from its literal endpoint, hence at distance at most R R R from P P P . An internal hub-link vertex is at most A − 1 A-1 A − 1 edges from its hub, hence at distance at most ( A − 1 ) + A = R (A-1)+A=R ( A − 1 ) + A = R from P P P . This proves the assertion for M i M_i M i .
Now consider a nonselected module, suppressing its index. By symmetry, suppose P P P uses its upper rail. Then x x x and the upper-left boundary are on P P P . Every nonboundary vertex of its variable chain is within distance A A A of that boundary, and every clause vertex is within distance A A A of x x x . Thus both endpoints of each clause path are within distance A A A of P P P . On a path of length ℓ \ell ℓ whose endpoints are within distance D D D of P P P , every vertex is within distance D + ⌊ ℓ / 2 ⌋ D+\lfloor\ell/2\rfloor D + ⌊ ℓ /2 ⌋ of P P P . Consequently, all clause-path vertices are within distance
A + ⌊ R 2 ⌋ = R . A+\left\lfloor\frac{R}{2}\right\rfloor=R. A + ⌊ 2 R ⌋ = R . Each helper path has an endpoint on P P P , so all its vertices, including y y y and the lower-right boundary, are within distance L L L . Every hub link has length A A A and both endpoints within distance L L L ; the same holds for the lower-rail segment from y y y to the lower-right boundary. Their vertices are therefore within distance
L + ⌊ A 2 ⌋ = 3 n + 2 ≤ 4 n + 1 = R . L+\left\lfloor\frac{A}{2}\right\rfloor=3n+2\le4n+1=R. L + ⌊ 2 A ⌋ = 3 n + 2 ≤ 4 n + 1 = R . The lower-left boundary is adjacent to y y y , giving distance at most L + 1 = 2 n + 3 ≤ R L+1=2n+3\le R L + 1 = 2 n + 3 ≤ R . This covers the whole module. For the lower-rail case, interchange the two rails and use that every nonboundary variable-chain vertex is also within distance A A A of the lower-right boundary.
Correctness of the cross-composition
If F i F_i F i is satisfiable, choose the path of Claim 74 that selects M i M_i M i and its satisfying assignment, and extend it along both entire forcing tails. The extension is a shortest α \alpha α –β \beta β path, since the tails are pendant. Claim 76 dominates all module vertices within distance R R R , and all tail vertices lie on the path. Thus ( H , R ) (H, R) ( H , R ) is a yes-instance.
Conversely, let Q Q Q be a shortest path with ecc H ( Q ) ≤ R \operatorname{ecc}_H(Q) \le R ecc H ( Q ) ≤ R . To come within distance R R R of either forcing leaf, Q Q Q must contain a nonattachment vertex of its tail, because the tail is pendant and has length R + 1 R+1 R + 1 . Thus Q Q Q meets both tails away from their attachments. Because the tails are pendant, the endpoints of Q Q Q lie in different tails, and its central subpath P P P is a shortest a 0 a_0 a 0 –b q b_q b q path. For every module vertex v v v , we have dist H ( v , Q ) = dist H ( v , P ) \operatorname{dist}_H(v,Q) = \operatorname{dist}_H(v,P) dist H ( v , Q ) = dist H ( v , P ) : any route to a tail first reaches its attachment, which already belongs to P P P . Claim 76 now implies that the assignment in the selected module satisfies its formula. Therefore
( H , R ) ∈ E S P ⟺ at least one of F 1 , … , F q is satisfiable . (H, R) \in\mathrm{ESP} \quad\Longleftrightarrow\quad\text{at least one of } F_1,\ldots,F_q\text{ is satisfiable}. ( H , R ) ∈ ESP ⟺ at least one of F 1 , … , F q is satisfiable .
Bandwidth bound and completion of the proof
Proof of Theorem 73. Let N N N be the maximum encoding length of a source formula. Each module has O ( n ) O(n) O ( n ) rail, variable-chain, and helper-path vertices. Each of its m i m_i m i clauses adds at most three length-R R R clause paths and two length-A A A hub links, hence O ( n ) O(n) O ( n ) vertices. Consequently,
∣ V ( M i ) ∣ = O ( n ( m i + 1 ) ) = O ( N 2 ) . \lvert V(M_i)\rvert= O\bigl(n(m_i+1)\bigr) = O(N^2). ∣ V ( M i )∣ = O ( n ( m i + 1 ) ) = O ( N 2 ) .
The entire construction is polynomial in the total input length.
Let W i W_i W i be the vertices of M i M_i M i other than its four boundary vertices. Order V ( H ) V(H) V ( H ) by listing the left tail from α \alpha α towards a 0 a_0 a 0 , then b 0 b_0 b 0 , then, for i = 1 , … , q i=1,\ldots,q i = 1 , … , q , the vertices of W i W_i W i in any order followed by a i , b i a_i,b_i a i , b i , and finally the right tail from the neighbor of b q b_q b q to β \beta β . Every module edge has both endpoints in the consecutive block
{ a i − 1 , b i − 1 } , W i , { a i , b i } , \{a_{i-1},b_{i-1}\},\ W_i,\ \{a_i,b_i\}, { a i − 1 , b i − 1 } , W i , { a i , b i } ,
which has size O ( N 2 ) O(N^2) O ( N 2 ) ; every tail edge has span one. Thus bw ( H ) = O ( N 2 ) \operatorname{bw}(H) = O(N^2) bw ( H ) = O ( N 2 ) , independently of q q q . This ordering is explicitly constructed. One may therefore use the formulation with a supplied ordering and its width as parameter: a kernel parameterized by bw ( H ) \operatorname{bw}(H) bw ( H ) would also kernelize that formulation by ignoring the supplied ordering and equipping the output with an arbitrary ordering.
We have obtained an OR-cross-composition from an NP-hard language with output parameter polynomial in N + log q N+\log q N + log q . The cross-composition theorem of Bodlaender, Jansen, and Kratsch [10 ] therefore excludes a polynomial kernel unless N P ⊆ c o N P / p o l y \mathrm{NP} \subseteq\mathrm{coNP/poly} NP ⊆ coNP/poly .
Declaration of AI use.
All results obtained in this paper were developed using OpenAI’s GPT-5.6/6 Pro. These models were also used to generate, refine, and write the proofs and exposition. The authors take full responsibility for the correctness, originality, and attribution of the results and for the final content of the paper.