arXiv:2610.30458cs.DMOct 2026

Manuscript Offprint

arXiv:2610.30458

Polynomial pathwidth for graphs vertex-coverable by few shortest paths and algorithms for quasi-shortest path covers

Li-Hsuan Chen, Florent Foucaud, Ling-Ju Hung, Ralf Klasing, Lucas Lorieau, Peter Rossmanith

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study how covering a graph by a small number of shortest or approximately shortest paths/walks constrains its treewidth and pathwidth. A path or walk is (α,β)(\alpha, \beta)-quasi-shortest for α≥1\alpha \geq 1 and β≥0\beta \geq 0 if each contiguous segment has length at most α\alpha times the distance between its endpoints plus β\beta. This relaxation forms a reasonable model of approximate shortest paths permitting local detours, closer to applications.

For graphs vertex-covered by kk shortest paths, an exponential upper bound on pathwidth was known [Dumas et al., ISAAC 2022/SIDMA 2024]. We establish the first known polynomial pathwidth bound of O(k3)O(k^3). For edge-coverage, we improve the previously known O(k4)O(k^4) upper bound [Baste et al., STACS 2026] to O(k2log⁡k)O(k^2 \log k). As a main ingredient of the proofs, we first show that if the vertices of a graph can be covered by kk (α,β\alpha, \beta)-quasi-shortest paths or walks, then its treewidth is Oα,β(k2)O_{\alpha, \beta}(k^2); this is a consequence of the fact that such graphs have linear metric growth and the technique developed in [Campbell et al., E-JC 2023]. To obtain the above pathwidth upper bounds, we combine this result with techniques from the literature in a nontrivial way. The metric growth toolkit also implies improved upper bounds for HH-minor-free graphs.

On the other hand, we show that there exist connected bipartite cubic graph whose edges can be covered by at most kk shortest paths and whose treewidth and pathwidth are in Ω(klog⁡k)\Omega(k\log k), providing the first superlinear lower bound for the problem. For graphs covered by k=2k=2 (α,0\alpha,0)-quasi-shortest paths with α>1\alpha>1, we show that, unlike treewidth and unlike the case α=1\alpha=1 and β=0\beta=0 of exact shortest paths, the pathwidth may be unbounded.

Finally, for every fixed rationals α≥1\alpha \geq 1 and β≥0\beta \geq 0, we give XP algorithms with a running time of nf(k,α,β)n^{f(k,\alpha,\beta)} for some function ff that decide whether the vertices of a graph can be covered by at most kk ( α,β\alpha, \beta)-quasi-shortest paths or walks and return such a family whenever one exists. The algorithms combine our treewidth upper bounds with exact evaluation of Blocked-CMSO queries using the algorithmic meta-theorem from [Dreier et al., LICS 2025]. These algorithms extend a similar result for exact shortest paths from [Dumas et al., ISAAC 2022/SIDMA 2024].

2012 ACM Subject Classification Theory of computation → Graph algorithms analysis; Theory of computation → Parameterized complexity and exact algorithms; Mathematics of computing →

Polynomial pathwidth and algorithms for graphs coverable by few shortest paths

Graph theory

Keywords and phrases shortest paths, quasi-shortest paths, geodesics, quasi-geodesics, isometric path cover, walks, treewidth, pathwidth, parameterized complexity, Blocked CMSO

Funding This research was partially supported by the NSTC–CNRS International Emerging Action (IEA) 2024–2025 “Quasi-Polynomial Time Approximation Algorithms for Some Network Design Optimization Problems” under grants 113–2927–I–141–501 and 114–2927–I–141–501.

Florent Foucaud: ANR project GRALMECO (ANR-21-CE48-0004), French government IDEX-ISITE initiative 16-IDEX-0001 (CAP 20-25), International Research Center “Innovation Transportation and Production Systems” of the I-SITE CAP 20-25.

Ralf Klasing: ANR project TEMPOGRAL (ANR-22-CE48-0001).

Lucas Lorieau: This author has received financial support from the CNRS through the MITI interdisciplinary programs.

Acknowledgements We thank Philip Whittington for bringing the metric-growth theorem of Campbell et al. [12] to our attention.

1 Introduction

Shortest paths in graphs (also called geodesics or isometric paths) are a fundamental concept in graph theory and computer science. We are interested in the problem of covering the vertices or the edges of a given graph by a small number of shortest paths, a natural optimization problem that recently attracted a lot of attention [4, 13, 14, 15, 16, 26]. Such covers provide a simplified model for network design problems of planning small collections of transportation routes that collectively visit the network while limiting detours, such as bus lines [6] or patrolling rounds [18]. Shortest-path covers also arise in active learning on graphs, where geodesic convexity allows labels along each covering path to be recovered through binary search [44]. It was recently shown that a graph whose vertices can be covered by few shortest paths has bounded (exponential) pathwidth [26]. Subsequently, a polynomial bound when also the edges are covered was proved [4]. Whether polynomial bounds also hold for vertex-coverage remained open.

We generalize this line of work by providing the first polynomial upper bound on the pathwidth of a graph when the vertices are covered (and no restriction on also covering the edges). This settles the main open problem in the area [4, 26]. We also give several improved upper bounds for the edge-covering case, for graphs excluding a fixed minor, or when the treewidth is considered, as well as a nontrivial lower bound. Motivated by real-world scenarios, we then relax the requirement of considering shortest paths only, and consider settings where the paths are “almost shortest” paths or walks (allowing a fixed multiplicative and additive distortion for every segment of the path/walk). We show that treewidth is bounded in this setting as well, however pathwidth is not. We use this to generalize the existing algorithmic results for covering graphs by shortest paths [26], providing XP algorithms for covering a graph in this more realistic scenario. (We use the standard terminology that an FPT running time has the form f(k)nO(1)f(k)n^{O(1)}, while an XP running time has the form nf(k)n^{f(k)}, up to parameter-dependent factors [23]; n is the input size, k the parameter, and f a computable function.)

Quasi-shortest paths for traffic connections and patrol rounds. Requiring shortest paths can be unnecessarily rigid in applications: suppose for example that the paths represent bus or patrol routes: it is unrealistic that every itinerary is precisely a shortest path, and small detours can be allowed in order to reduce the total number of routes [6]. Similarly, it may be useful to allow crossing the same location several times, and to consider walks instead of paths [18]: consider a long path with an additional leaf x adjacent to an internal vertex v. The resulting tree has three leaves, so no single simple path covers all its vertices. However, one patrol officer can instead follow the long path and, on reaching v, make the short excursion to x, before continuing along the path. We therefore consider a relaxation of the problem, similar to the definition of quasi-geodesics from coarse geometry and geometric group theory (and related to the quasi-isometries from these fields, also transposed to graphs in coarse graph theory), as follows.

For fixed reals α≥1\alpha \geq 1 and β≥0\beta \geq 0, a path or walk in a graph GG with vertex occurrences v1…vtv_1 \ldots v_t is (α,β)(\alpha, \beta)-quasi-shortest if for any i,ji, j with i<ji < j,

j−i≤α⋅distG(vi,vj)+β.j-i\leq\alpha\cdot\mathrm{dist}_{G}(v_{i},v_{j})+\beta.

If α=1\alpha = 1 and β=0\beta = 0, the above definition simply describes shortest paths. Unlike a guarantee that applies only to the route's endpoints, the above condition imposes a distortion for every segment of the path/walk. This definition is inspired by classic works in coarse geometry and geometric group theory on quasi-geodesics and quasi-isometries [10, 32]. The notion of a quasi-isometry was recently extended to coarse graph theory [31, 40], following earlier works on the similar notion of distance-approximating embeddings [19]. The definition of quasi-shortest paths we use is also similar to the notion of (α,β)(\alpha, \beta)-spanners; such a spanner is a spanning subgraph HH of a host graph GG such that, for every pair x,yx, y of vertices, distH(x,y)≤α⋅distG(x,y)+β\text{dist}_H(x, y) \leq \alpha \cdot \text{dist}_G(x, y) + \beta. The main difference is that in a spanner, the distortion condition may not apply to all x−yx-y paths, but only to the shortest ones. Less constrained distortion conditions, allowing a multiplicative distortion factor for the whole path, have been used in the context of approximate all-pairs-shortest paths [43]. Local geodesics (where every small subpath must be a shortest path, but without a global condition) are also considered in discrete geometry [17]. These two conditions (global distortion together with local optimality) have been combined in works considering alternative routes [1].

Further related work. Covering a graph by a minimum number of (unrestricted) paths is a fundamental and extensively studied problem, called PATH COVER [11, 21, 36]; think of HAMILTONIAN PATH as a prominent special case. The shortest path requirement that we consider is substantially stronger than an ordinary path cover: a Hamiltonian graph is covered by one path but may require arbitrarily many shortest paths to be fully covered (consider for example a square grid or a complete graph).

The problem of covering a graph by a minimum number of shortest paths arose in the context of the Cops and Robber pursuit-evasion game [3]. Covering by shortest paths still plays an important role in more modern techniques in the area, see for example the concept of cop-decompositions, which are special tree decompositions whose definition involves shortest path covers [2]. The problem was also studied for its own sake from a graph-theoretic perspective, see for example [29, 30, 42], and refer to the survey [36] on various types of path covering problems.

Dumas, Foucaud, Perez, and Todinca [26] proved that a graph vertex-covered by kk shortest paths has BFS-width (the maximum size of a BFS distance-layer [27]), and thus pathwidth, O(k⋅3k)O(k \cdot 3^k), while the more constrained setting of also covering the edges gives O(3k)O(3^k) [26].

Baste, De Meyer, Giocanti, Objois, and Picavet [4] subsequently proved that a graph edge-covered by kk shortest paths has pathwidth O(k4)O(k^{4}). More precisely, their proof constructs a polynomial-size vertex set whose deletion leaves pathwidth O(k)O(k). They asked whether the pathwidth might in fact be linear in kk.

Polynomial pathwidth and algorithms for graphs coverable by few shortest paths

The (non-)existence of similar bounds when the graph is covered by isometric trees was also investigated, see [4, 5].

Hatzel and Pilipczuk [33] study a relaxation of the question in the realm of coarse graph theory: the kk routes remain shortest paths, but it is enough for every vertex to lie within distance ρ\rho of one of them. They proved that such graphs are (3,12ρ)(3, 12\rho)-quasi-isometric to graphs of pathwidth kO(k)k^{O(k)}.

The problem of covering a graph with a minimum possible number of exact shortest paths (often called ISOMETRIC PATH COVER [13, 36] or SHORTEST PATH COVER [28, 44]) is NP-hard, even for chordal graphs of diameter 2 [14] and 5-degenerate bipartite graphs of diameter 4 [28]. On the other hand, it is polynomial-time solvable on block graphs [41], chain graphs [16] and cographs [16]. FPT algorithms for the neighborhood diversity and the dual parameter n−kn - k were designed in [28].

In the fixed-terminal version of SHORTEST PATH COVER, the kk endpoint pairs are part of the input, and the authors in [26] give an FPT algorithm in kk for deciding whether the input graph is coverable by kk shortest paths. When the algorithm must also choose the endpoints, enumerating the 2k2k endpoints and invoking the fixed-terminal algorithm gives time f(k)n2k+O(1)f(k)n^{2k+O(1)}, hence XP [26].

On chordal graphs (and more generally graphs of bounded treelength [14] or hyperbolicity [13]), on outerstring graphs [13] and on (theta, prism, pyramid)-free graphs [13], SHORTEST PATH COVER was shown to admit a constant-factor approximation algorithm based on Dilworth's theorem on poset chain coverings. For a connected graph, write diam(G) for the maximum distance between two vertices. Thiessen and Gärtner [44, Theorem 11] proved that SHORTEST PATH COVER can be approximated within a factor of 1+ln⁡(diam(G)+1)1 + \ln(\text{diam}(G) + 1) in O(∣V(G)∣4)O(|V(G)|^4) time.

The version where the paths must be vertex-disjoint, which is used in the recent definition of geodesic treewidth [39] (which minimizes the treewidth of the graph obtained by contracting each path of a shortest path partition), has also been studied [15, 28, 37]. Notably, this variant is W[1]-hard when parameterized by pathwidth, but open for solution size [15]. The edge-disjoint variant is W[1]-hard on oriented graphs (in fact, DAGs) when parameterized by solution size [28].

Our results. Our main results concern improved upper and lower bounds on treewidth and pathwidth for graphs coverable by kk (quasi-)shortest paths, which answer open problems from [4, 26]. We first prove a quadratic O(k2)O(k^2) bound on the treewidth, which we then use to obtain our upper bounds on pathwidth.

To this end, we observe that the concept of metric growth (see Section 2 for the definition) can be applied to such graphs: roughly speaking, the maximum intersection of any quasi-shortest path with any rr-ball grows only linearly with the radius rr. Hence, graphs whose vertices are coverable by kk (α,β\alpha, \beta)-quasi-shortest paths have metric growth Oα,β(k)O_{\alpha, \beta}(k), which directly implies treewidth Oα,β(k2)O_{\alpha, \beta}(k^2) using a result from Campbell et al. [12]. This bound is reduced to Oα,β,H(k)O_{\alpha, \beta, H}(k) for graphs excluding a graph HH as a minor.

Then, we focus on pathwidth and on exact shortest paths. We use the above treewidth upper bound in conjunction with the technique of Dumas et al. [26] to obtain an O(k3)O(k^{3}) upper bound on pathwidth when the vertices (and not necessarily the edges) of the graph are covered by k exact shortest paths. This shows that also pathwidth is polynomially bounded in this case, and solves the main open problem in the area.

We next improve the upper bound in the case where the kk shortest paths cover the edges. To this end, we prove a general conversion lemma: if tw(G)≤w\text{tw}(G) \leq w and deleting rr vertices leaves a graph with pathwidth at most pp, then pw(G)=O((w+p)log⁡r)\text{pw}(G) = O((w + p) \log r). We apply this lemma to the pathwidth-modulator of Baste et al. [4] and our treewidth upper bound, to yield the quadratic-logarithmic bound O(k2log⁡k)O(k^2 \log k) on pathwidth. This improves the previous O(k4)O(k^4) bound from Baste et al. [4]. For graphs excluding a graph HH as a minor, we obtain OH(klog⁡k)O_H(k \log k).

Regarding lower bounds, we prove that both the vertex-cover and the edge-cover pathwidth and treewidth upper bounds cannot be linear. Indeed, we show that certain cubic expanders of order nn with large girth have treewidth Ω(n)\Omega(n) and can be edge-covered by O(n/log⁡n)O(n/\log n) shortest paths. This implies an Ω(klog⁡k)\Omega(k \log k) treewidth (and pathwidth) lower bound, which is the first known superlinear lower bound. This answers negatively a question from Baste et al. [4].

When α>1\alpha > 1, we also provide a construction of graphs covered by two (α,0)(\alpha, 0)-quasi-shortest paths but with arbitrarily large pathwidth, showing that the quasi-shortest setting behaves differently than the exact shortest setting.

A summary of the bounds we obtain can be found in Table 1.

Table 1 Summary of our bounds for general graphs coverable by kk (quasi-)shortest paths.

coveragecovering objectslower bound1^{1}upper bound2^{2}
treewidthpathwidth
vertices/edges(α,β)(\alpha, \beta)-quasi-shortest paths/walksΩ(klog⁡k)\Omega(k \log k)Oα,β(k2)O_{\alpha,\beta}(k^{2})unbounded in kk when α>1\alpha > 1
verticesexact shortest pathsΩ(klog⁡k)\Omega(k \log k)O(k2)O(k^{2})O(k3)O(k^{3})
edgesexact shortest pathsΩ(klog⁡k)\Omega(k \log k)O(k2)O(k^{2})O(k2log⁡k)O(k^{2} \log k)

1^{1} The lower bounds hold for both treewidth and pathwidth. See Theorem 20.

2^{2} See Theorems 5, 7, 19, and 21 and Corollaries 6 and 8.

Then, we apply the treewidth upper bound for quasi-shortest paths to obtain XP algorithms for (α,β)(\alpha, \beta)-QUASI-SHORTEST PATH COVER and (α,β)(\alpha, \beta)-QUASI-SHORTEST WALK COVER (formally defined in Section 2) parameterized by the number kk of paths. The main algorithmic ingredient is the logic introduced by Dreier, Ganian, and Hamm [24]. Their Blocked CMSO permits restricted cardinality comparisons under universal quantification and admits both approximate and exact evaluation theorems on bounded-treewidth graphs. We use their theorem as a black-box. The exponent of the running time depends on the formula and the width. The former depends on kk, α\alpha and β\beta, and the latter is in Oα,β(k2)O_{\alpha, \beta}(k^2); hence, we obtain a running time that is XP in kk for fixed rationals α\alpha and β\beta. These algorithms generalize the XP algorithm for exact shortest paths obtained by Dumas et al. [26], to the setting of quasi-shortest paths and walks.

Outline. After the preliminaries, Section 3 contains the treewidth upper bounds, Section 4 the pathwidth upper bound for the vertex-covering case, Section 5 proves the pathwidth upper bound for the edge-covering case, Section 6 contains the pathwidth lower bound for exact shortest paths, Section 7 contains the unbounded pathwidth construction for quasi-shortest paths, and Section 8 gives the XP algorithms. We conclude in Section 9.

References (44)