alphaFeedback

WorksComputer Science

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

AI contributions
Not recorded for this paper
View details

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 (α,β)(α,β)-quasi-shortest for α≥1α\geq1 and β≥0β\geq 0 if each contiguous segment has length at most αα times the distance between its endpoints plus ββ. For graphs vertex-covered by kk shortest paths, 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 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 (α,β)(α,β)-quasi-shortest paths or walks, then its treewidth is Oα,β(k2)O_{α,β}(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. On the other hand, we show that there exist connected bipartite cubic graph whose edges can be covered by kk shortest paths and whose pathwidth is Ω(klog⁡k)Ω(k\log k), providing the first superlinear lower bound. For graphs covered by k=2k=2 (α,0)(α,0)-quasi-shortest paths with α>1α>1, we show that, unlike treewidth and unlike the case α=1α=1 and β=0β=0 of exact shortest paths, the pathwidth may be unbounded. Finally, for every fixed rationals α≥1α\geq1 and β≥0β\geq 0, we give XP algorithms with a running time of nf(k,α,β)n^{f(k,α,β)} for some function~ff that decide whether the vertices of a graph can be covered by at most kk (α,β)(α,β)-quasi-shortest paths or walks. The algorithms combine our treewidth upper bounds with an algorithmic meta-theorem from [Dreier et al., LICS 2025]. [abstract shortened to meet the arXiv requirements]

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

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.

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]; nn is the input size, kk the parameter, and ff 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 xx adjacent to an internal vertex vv. 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 vv, make the short excursion to xx, 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\ge1 and β≥0\beta\ge0, 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≤α⋅dist⁡G(vi,vj)+β.j-i \le\alpha\cdot\operatorname{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, dist⁡H(x,y)≤α⋅dist⁡G(x,y)+β\operatorname{dist}_{H}(x,y) \le\alpha\cdot\operatorname{dist}_{G}(x,y) + \beta. The main difference is that in a spanner, the distortion condition may not apply to all xx–yy 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 \cdot3^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.

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)\operatorname{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(\operatorname{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 § 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 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 kk 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\operatorname{tw}(G)\le w and deleting rr vertices leaves a graph with pathwidth at most pp, then pw⁡(G)=O((w+p)log⁡r)\operatorname{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.

coveragecovering objectslower bound^1upper bound^2
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)

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

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 § 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.

Preliminaries

All graphs are finite, simple, undirected, and unweighted. We allow paths of length zero, consisting of one vertex. Every route budget kk is a positive integer. For vertices x,yx,y of a graph GG, let dist⁡G(x,y)\operatorname{dist}_G(x,y) denote the minimum number of edges in an xx–yy path. A path is shortest if its length equals the distance between its endpoints; every subpath of a shortest path is shortest.

A walk is a sequence W=w0e1w1⋯etwtW = w_0e_1w_1 \cdots e_tw_t, where ej=wj−1wje_j = w_{j-1}w_j. Its length is tt, counting edge occurrences, so repeated uses of an edge are counted separately. A subwalk W[a,b]W[a,b] is the contiguous sequence from the occurrence waw_a to wbw_b. A path is a walk with pairwise distinct vertices.

Definition 1. Let α≥1\alpha\ge1 and β≥0\beta\ge0. A walk WW in GG is (α,β)(\alpha,\beta)-quasi-shortest if every subwalk W[a,b]W[a,b] satisfies b−a≤α⋅dist⁡G(wa,wb)+βb-a \le\alpha\cdot\operatorname{dist}_G(w_a,w_b) + \beta. An (α,β)(\alpha,\beta)-quasi-shortest path is an (α,β)(\alpha,\beta)-quasi-shortest walk that is a simple path.

A path is shortest precisely when it is (1,0)(1,0)-quasi-shortest. A (1,0)(1,0)-quasi-shortest walk cannot repeat a vertex, because the subwalk between two consecutive occurrences would have positive length and endpoint distance zero. Thus, it is also a shortest path.

A family P\mathcal{P} of paths is called a vertex path cover if V(G)=⋃P∈PV(P)V(G) = \bigcup_{P\in\mathcal{P}} V(P), and an edge path cover if E(G)=⋃P∈PE(P)E(G) = \bigcup_{P\in\mathcal{P}} E(P). Different paths may share vertices and edges. A vertex walk cover is defined analogously using the distinct vertices visited by each walk. For fixed α≥1\alpha\ge1 and β≥0\beta\ge0 (α,β\alpha,\beta may be real, or rational for practical purposes), we define the two following problems.

(α,β)(\alpha,\beta)-Quasi-Shortest Path Cover

Input: A graph GG and an integer kk.

Task: Determine whether at most kk (α,β)(\alpha,\beta)-quasi-shortest paths cover V(G)V(G). For positive instances, return the path cover.

(α,β)(\alpha,\beta)-Quasi-Shortest Walk Cover

Input: A graph GG and an integer kk.

Task: Determine whether at most kk (α,β)(\alpha,\beta)-quasi-shortest walks cover V(G)V(G). For positive instances, return the walk cover.

For a connected graph HH, let rad⁡(H)=min⁡z∈V(H)max⁡v∈V(H)dist⁡H(z,v)\operatorname{rad}(H) = \min_{z\in V(H)} \max_{v\in V(H)} \operatorname{dist}_H(z,v) be the radius of HH. The metric growth of a graph GG is the following function mg⁡G:N→N\operatorname{mg}_G : \mathbb{N} \to\mathbb{N}: mg⁡G(r)=sup⁡{∣V(H)∣∣H⊆G, H connected,rad⁡(H)≤r}\operatorname{mg}_G(r) = \sup\{ |V(H)| \mid H \subseteq G,\ H\text{ connected},\operatorname{rad}(H) \le r \}. For v∈V(G)v \in V(G) and r≥0r \ge0, we denote the ball of radius rr centered at vv by BG(v,r)={u∣dist⁡G(u,v)≤r}B_G(v,r) = \{u \mid\operatorname{dist}_G(u,v) \le r\}.

A tree decomposition of GG is a tree TT with bags (Bt)t∈V(T)(B_t)_{t\in V(T)} such that every graph vertex is in a bag, the endpoints of every graph edge occur together in a bag, and the bags containing any fixed graph vertex induce a connected subtree of TT. Its width is max⁡t∣Bt∣−1\max_t |B_t| - 1, and the treewidth tw⁡(G)\operatorname{tw}(G) is the minimum width. A path decomposition is a tree decomposition whose decomposition tree is a path; its minimum width is the pathwidth pw⁡(G)\operatorname{pw}(G). Both parameters are subgraph-monotone, and tw⁡(G)≤pw⁡(G)\operatorname{tw}(G) \le\operatorname{pw}(G). These are the standard width parameters; see, for example, Cygan et al. [23]. For the sake of clarity, we will sometimes consider that a path decomposition is an ordered sequence of bags. In this case, the concatenation of two path decompositions is simply the concatenation of the two sequences of bags. Note that in general, the concatenation of two path decompositions does not yield a path decomposition.

A graph HH is a minor of GG if it can be obtained from GG by vertex- and edge-deletions and edge-contractions.

Treewidth upper bounds

We show next how Theorem 2 yields a polynomial treewidth upper bound for our problem, when few paths cover the vertices of a graph GG. (Notice that when the paths cover E(G)E(G), except isolated vertices, they also cover V(G)V(G) and all results from this section apply as well.) We will use the following theorems relating metric growth and treewidth.

Theorem 2 (Campbell, Distel, Gollin, Harvey, Hendrey, Hickingbotham, Mohar, Wood [12 Theorem 1]). For any graph GG, if there exists a c≥1c \ge1 such that the metric growth mg⁡G\operatorname{mg}_G of GG satisfies mg⁡G(r)≤cr\operatorname{mg}_G(r) \le cr for every integer r≥1r \ge1, then tw⁡(G)≤49c2+30c\operatorname{tw}(G) \le49c^2 + 30c.

The same authors also used grid minors to prove the following.

Theorem 3 (Campbell, Distel, Gollin, Harvey, Hendrey, Hickingbotham, Mohar, Wood [12 Corollaries 10 and 11]). For any fixed graph HH and any graph GG excluding HH as a minor, if there exists an integer c>1c > 1 such that the metric growth mg⁡G\operatorname{mg}_G of GG satisfies mg⁡G(r)≤cr\operatorname{mg}_G(r) \le cr for every integer r≥1r \ge1, then tw⁡(G)=OH(c)\operatorname{tw}(G) = O_H(c). In particular, if GG is planar, then tw⁡(G)≤12c+1\operatorname{tw}(G) \le12c + 1.

The key element to apply these results to our setting is the following lemma.

Lemma 4. Let PP be an (α,β)(\alpha,\beta)-quasi-shortest path in GG. For every z∈V(G)z \in V(G) and r≥0r \ge0, ∣V(P)∩BG(z,r)∣≤2αr+β+1|V(P) \cap B_G(z,r)| \le2\alpha r + \beta+ 1.

Proof. If the intersection between V(P)V(P) and BG(z,r)B_G(z,r) is nonempty, let xx and yy be its first and last vertices in the order along PP, and let s=∣E(P[x,y])∣s = |E(P[x,y])|. Quasi-shortness and the triangle inequality give s≤α⋅dist⁡G(x,y)+β≤α(dist⁡G(x,z)+dist⁡G(z,y))+β≤2αr+βs \le\alpha\cdot\operatorname{dist}_G(x,y) + \beta\le\alpha(\operatorname{dist}_G(x,z) + \operatorname{dist}_G(z,y)) + \beta\le2\alpha r + \beta. Every vertex of PP in BG(z,r)B_G(z,r) lies on P[x,y]P[x,y], which has s+1≤2αr+β+1s + 1 \le2\alpha r + \beta+ 1 vertices, and the bound follows.

We now prove the main result of this section, which is a direct corollary of Lemma 4 and Theorem 2 by Campbell, Distel, Gollin, Harvey, Hendrey, Hickingbotham, Mohar, and Wood [12 Theorem 1].

Theorem 5. Let α≥1\alpha\ge1 and β≥0\beta\ge0, and set a=2α+β+1a = 2\alpha+ \beta+ 1. If V(G)V(G) is covered by kk (α,β)(\alpha,\beta)-quasi-shortest paths, then tw⁡(G)≤49a2k2+30ak\operatorname{tw}(G) \le49a^2k^2 + 30ak.

Proof. Let H⊆GH \subseteq G be connected with radius at most r≥1r \ge1, and choose a center zz of HH. Distances in GG can only be shorter than in HH, so V(H)⊆BG(z,r)V(H) \subseteq B_G(z,r). If P1,…,PkP_1,\ldots,P_k cover V(G)V(G), then Lemma 4 and r≥1r \ge1 give ∣V(H)∣≤∑i=1k∣V(Pi)∩BG(z,r)∣≤akr|V(H)| \le\sum_{i=1}^{k}|V(P_i) \cap B_G(z,r)| \le akr. Thus, the metric growth of GG satisfies mg⁡G(r)≤akr\operatorname{mg}_G(r) \le akr, and Theorem 2 with c=akc = ak proves the claim.

Corollary 6. If V(G)V(G) is covered by kk shortest paths, then tw⁡(G)≤441k2+90k\operatorname{tw}(G) \le441k^2 + 90k.

Proof. A shortest path is (1,0)(1,0)-quasi-shortest, so we can apply Theorem 5 with a=3a = 3.

We next show how to apply the same proof idea to walks.

Theorem 7. Let α≥1\alpha\ge1 and β≥0\beta\ge0, and set a=2α+β+1a = 2\alpha+ \beta+ 1. If V(G)V(G) is covered by kk (α,β)(\alpha,\beta)-quasi-shortest walks, then tw⁡(G)≤49a2k2+30ak\operatorname{tw}(G) \le49a^2k^2 + 30ak.

Proof. We extend the proof of Lemma 4 and Theorem 5. Let z∈V(G)z \in V(G) and r≥0r \ge0 and consider one of the kk covering walks WW. Take the first and last occurrences of vertices of WW in BG(z,r)B_G(z,r) and let ss be the length of the subwalk between them. Every distinct vertex of V(W)∩BG(z,r)V(W) \cap B_G(z,r) occurs in this interval. If x,yx,y are the endpoint vertices, then as in Lemma 4, s≤α⋅dist⁡G(x,y)+β≤2αr+βs \le\alpha\cdot\operatorname{dist}_G(x,y) + \beta\le2\alpha r + \beta. Thus, the bound of Lemma 4 holds for the distinct vertices of every covering walk. Repeating the proof of Theorem 5 gives mg⁡G(r)≤akr\operatorname{mg}_G(r) \le akr and hence the claimed bound by Theorem 2.

We can also use Theorem 3 to obtain a linear upper bound for graphs excluding a fixed minor, in particular planar graphs.

Corollary 8. Let HH be a fixed graph, α≥1\alpha\ge1, β≥0\beta\ge0, and a=2α+β+1a = 2\alpha+ \beta+ 1. If an HH-minor-free graph GG is vertex-covered by kk (α,β)(\alpha,\beta)-quasi-shortest paths or walks, then tw⁡(G)=OH(ak)\operatorname{tw}(G) = O_H(ak). In particular, if GG is planar and is vertex-covered by kk exact shortest paths, then tw⁡(G)≤36k+1\operatorname{tw}(G) \le36k+1.

Proof. The proofs of Theorems 5 and 7 give mg⁡G(r)≤akr\operatorname{mg}_G(r) \le akr and mg⁡G(r)≤3kr\operatorname{mg}_G(r) \le3kr for exact shortest paths. Thus, the bounds follow immediately from Theorem 3. ◀

Polynomial upper bound for pathwidth when covering the vertices

In this section, we improve the existing upper bound for pathwidth when shortest paths cover the vertex set of the input graph GG, deriving the first polynomial upper bound. Note that Theorem 2 cannot extend to pathwidth [12 Section 5], so the method used for proving Theorem 5 cannot be used to directly obtain a similar bound for pathwidth. We combine Corollary 6 with an extension of the construction of Dumas et al. [26 Section 4]. The results in this section apply only to shortest paths and not to quasi-shortest ones.

A layering of a graph GG is a function λ:V(G)→Z\lambda: V(G) \to\mathbb{Z} such that ∣λ(u)−λ(v)∣≤1|\lambda(u) - \lambda(v)| \le1 for every edge uvuv, and its layers are the sets λ−1(i)\lambda^{-1}(i). For example, the distances to a fixed root vertex of GG forms a layering of GG.

We will also need the notion of well-colored paths from [26]. Given a graph GG whose vertices are covered by kk shortest paths, these covering paths are called the base paths of GG in [26]. We orient these base paths from one arbitrary endpoint to the other, and assign color ii to the vertices of the ii-th base path. Let Colors⁡(v)\operatorname{Colors}(v) be the set of colors assigned in this way to vertex vv.1 A coloring of an arbitrary path PP of GG is the coloring of the vertices of PP obtained by choosing, for every vertex vv of PP, any color in Colors⁡(v)\operatorname{Colors}(v). A colored path PP is well-colored if for each color that occurs in PP, the vertices of PP of this color form a connected monochromatic subpath of PP. The well-coloring lemma [26 Lemma 4.1] ensures the existence of a well-colored, shortest aa–bb path for every a,b∈V(G)a,b \in V(G).

As one of the basic tools of this section, we argue that a slight extension of a construction used to prove [26 Lemma 4.2] also yields the following lemma.

Lemma 9. Let GG be a connected graph whose vertices are covered by kk shortest paths, and let a∈V(G)a \in V(G). There exists a family P\mathcal{P} of O(3k)O(3^k) well-colored paths starting at aa such that every vertex in V(G)V(G) belongs to a path in P\mathcal{P}. Moreover, every path P∈PP \in\mathcal{P} ending at a vertex bb satisfies ∣E(P)∣≤dist⁡G(a,b)+2k|E(P)| \le\operatorname{dist}_G(a,b) + 2k.

Proof. We first give an outline of Dumas et al.’s construction [26 Section 4], and at the end, we explain how we modify their approach. The authors provide a recursive encoding of a set of well-colored paths. The goal of this recursive encoding is to upper-bound the size of the final set by a single-exponential function in kk (a simpler counting argument yields an upper bound that is factorial in kk; [25 Section 4]). The set of paths initially contains, for each vertex bb of the layer λa−1(i)\lambda_a^{-1}(i) (with λa=dist⁡G(a,⋅)\lambda_a = \operatorname{dist}_G(a,\cdot)), a well-colored shortest aa–bb path. At the end of the construction, the set will contain a well-colored aa–bb path, that is not necessarily shortest, but (1,2k)(1,2k)-quasi-shortest.

Informally, they define a tree structure, called kk-labeled branching tree [26 Definition 3.5], whose nodes represent sets of paths. The following invariant is preserved throughout the construction: each node xx is associated to a well-colored representative path PxP_x, defined as the longest path associated to xx, and such that any other path associated to xx is either included in PxP_x, or admits PxP_x as a prefix. This representative path is defined before Step 2.1 of [26 Lemma 4.2].

For any internal node xx, every path is copied to a child, either unchanged or after undergoing a canonization operation that preserves its endpoints (Step 2.3 in [26 Lemma 4.2]). All paths that share the same color cc and orientation after their current representative path prefix are grouped together in a child node x′x' of xx, and the representative path of x′x' is obtained by appending to PxP_x a subpath of the base path whose color is cc. An additional operation is carried out on the root node, in order to define the representative path of its child nodes (see Steps 1.1 to 1.3 in [26 Lemma 4.2]). Since all representative paths are well-colored, and each split fixes a new color segment in the representative path, the height of the kk-labeled branching tree is at most kk [26 Claim 4.4]. This splitting stops when all paths of a node are included in its representative path. In this case, the considered node is a leaf of the kk-labeled branching tree.

Furthermore, at depth dd, the construction maintains the invariant

∣E(P)∣≤dist⁡G(a,b)+2d(1)|E(P)| \le\operatorname{dist}_G(a,b) + 2d \tag*{(1)}

for every current aa–bb path PP [26 Claim 4.3].2 In other words, any aa–bb path associated to a node of depth dd is a well-colored (1,2d)(1,2d)-quasi-shortest aa–bb path. The authors finally prove that the number of leaves of a kk-labeled branching tree is O(3k)O(3^k) in [26 Lemma 3.9 and Claim 4.5]. Note that this whole construction can be started with any set of well-colored shortest paths, all starting at a common vertex aa.

We next prove the lemma statement by applying the same construction to a different starting set of paths. Consider the set Q\mathcal{Q} containing, for any vertex b∈V(G)−ab \in V(G)-a, a well-colored shortest aa–bb path. (In [26], only paths to vertices of a fixed distance layer were considered.) Recall that the existence of such paths is justified in [26 Lemma 4.1]. We create a root node, to which we associate Q\mathcal{Q}, and we apply the previous construction. By construction, a path towards each vertex b∈V(G)−ab \in V(G)-a is included in one of the representative paths of a leaf of the obtained kk-labeled branching tree, as the construction preserves path endpoints. Thus, by defining P\mathcal{P} as the set of all representative paths of leaves of the kk-labeled branching tree, the (endpoints of) paths of P\mathcal{P} cover the vertices of GG. The bound on the number of leaves yields ∣P∣=O(3k)|\mathcal{P}| = O(3^k), and the maintained invariant (1) ensures that ∣E(P)∣≤dist⁡G(a,b)+2k|E(P)| \le\operatorname{dist}_G(a,b) + 2k for all aa–bb paths of P\mathcal{P}.

We next show how to apply Lemma 9 to a partition into kk shortest paths, to obtain another path partition with desirable properties.3

Lemma 10. Let GG be a connected graph whose vertices are partitioned into kk shortest paths. For every vertex a∈V(G)a \in V(G), there is a partition of V(G)V(G) into O(k3k)O(k3^k) paths, each containing at most one vertex at any given distance from aa.

Proof. By Lemma 9, there is a set P\mathcal{P} of O(3k)O(3^k) well-colored paths starting at aa that cover V(G)V(G), each having length at most the distance between its endpoints plus 2k2k.

For each path P∈PP \in\mathcal{P}, consider the edges of PP sequentially, from aa towards the other endpoint of PP. Let xyxy be an edge of PP such that xx is closer to aa than yy on PP. Cut PP at edge xyxy if one of the following two cases occur: (i) if xx and yy have different colors in the coloring of PP, and (ii) if dist⁡(a,y)≤dist⁡(a,x)\operatorname{dist}(a,y) \le\operatorname{dist}(a,x), that is, the distance to aa fails to increase along xyxy. There are at most k−1k-1 color changes in PP, since it is well-colored. Moreover, the distance from aa changes by at most 1 along each edge. An edge on which this distance stays constant contributes 1 to the length excess, and an edge on which it decreases contributes 2, thus there are at most 2k2k such edges. Hence, PP is cut at most 3k−13k-1 times, producing at most 3k3k subpaths. Each subpath is monochromatic, as we have cut it along all edges whose endpoints have different colors. The distance from aa strictly increases along each subpath, so each piece meets every distance layer at most once. Repeating this procedure for every path in P\mathcal{P}, let S\mathcal{S} be the family of all obtained subpaths. We have ∣S∣=O(k3k)|\mathcal{S}| = O(k3^k), and S\mathcal{S} covers V(G)V(G) (but may not be a partition). Since each base path is shortest and hence induced, a monochromatic subpath is necessarily a shortest path.

It remains to remove overlaps between the members of S\mathcal{S}. Since all paths in S\mathcal{S} are monochromatic and the base paths are pairwise vertex-disjoint, only subpaths of the same base path may overlap. Fix such a base path BB. The members of S\mathcal{S} contained in BB are subpaths of BB that together cover V(B)V(B), but may overlap because they come from different paths supplied by Lemma 9. Consider two such overlapping subpaths PP and QQ. If one of them is included in the other, say V(P)⊆V(Q)V(P) \subseteq V(Q), remove PP from S\mathcal{S}. Otherwise, remove V(P)∩V(Q)V(P) \cap V(Q) from, say, PP: this simply shortens PP. Repeat this until no overlapping paths remain; at the end, we obtain the desired partition of size O(k3k)O(k3^k).

The next lemma shows how to use a path partition as the one from Lemma 10 and a tree decomposition to obtain a path decomposition.

Lemma 11. Let GG be a graph of treewidth at most w≥1w \ge1. If V(G)V(G) is partitioned into N≥1N \ge1 paths, each containing at most one vertex of each layer of a fixed layering λ\lambda, then pw⁡(G)=O(wlog⁡(N+1))\operatorname{pw}(G) = O(w \log(N+1)).

Proof. Let P\mathcal{P} be the given path partition of V(G)V(G) and call f(N)f(N) the maximum possible pathwidth of a graph partitioned into NN paths satisfying the hypotheses of the lemma (treewidth at most ww and layering condition). We proceed by induction on NN.

Suppose first that N≤4w+5N \le4w+5. This means that each layer of the considered layering λ\lambda is of size at most 4w+54w+5. Let α\alpha be the maximum integer such that λ−1(α)≠∅\lambda^{-1}(\alpha) \ne\varnothing, and define for i≤α−1i \le\alpha-1 the bag Bi=λ−1(i)∪λ−1(i+1)B_i = \lambda^{-1}(i) \cup\lambda^{-1}(i+1). The decomposition B0,B1,…,Bα−1B_0,B_1,\ldots,B_{\alpha-1} is a path decomposition of GG, since any edge of GG has its endpoints in the same layer of λ\lambda, or in two consecutive ones. Thus, f(N)≤8w+9f(N) \le8w+9.

Suppose now that N>4w+5N > 4w+5, and let (T,B)(T,\mathcal{B}) be a tree decomposition of GG of width at most ww. For each path PiP_i of P\mathcal{P}, we define TiT_i as the subgraph of TT containing all nodes whose bags contain vertices of PiP_i. Let T={Ti∣1≤i≤N}\mathcal{T} = \{T_i \mid1 \le i \le N\}. Since PiP_i is connected, TiT_i is connected as well. Select, for each PiP_i, a node xix_i in TiT_i. Assign to any node yy the weight w(y)=∣{i∣xi=y}∣w(y) = |\{i \mid x_i = y\}|. The total weight of TT is NN. Consider a weighted centroid cTc_T of TT, that is, a node of TT such that each component of T−cTT-c_T has weight at most N2\frac{N}{2}. Call one of these components CC. If some subtree TiT_i intersects CC, since TiT_i is connected, it is either entirely included in CC, or cTc_T is a node of TiT_i. Call GCG_C the subgraph of GG induced by the vertex set (⋃x∈V(C)Bx)∖BcT\left(\bigcup_{x\in V(C)} B_x\right) \setminus B_{c_T}. Since P\mathcal{P} is a partition, at most w+1w+1 of the subtrees of TT contain cTc_T (thus, at most w+1w+1 paths of P\mathcal{P} can intersect BcTB_{c_T}). Moreover, since the weight of CC is at most N2\frac{N}{2}, at most N2\frac{N}{2} subtrees of TT are entirely contained in CC (they correspond to at most N2\frac{N}{2} paths of P\mathcal{P}). Thus, there are at most N2+w+1\frac{N}{2}+w+1 paths of P\mathcal{P} that intersect GCG_C. We consider the collection P′\mathcal{P}' of paths obtained from the intersection of the paths of P\mathcal{P} with V(GC)V(G_C). Note that a path of P\mathcal{P}, if it intersects BcTB_{c_T}, may correspond to several paths in P′\mathcal{P}'. However, each vertex of BcTB_{c_T} may only increase the number of paths in P′\mathcal{P}' by 1. Thus, ∣P′∣=N′≤N2+2w+2|\mathcal{P}'|=N'\leq\frac{N}{2}+2w+2. The paths in P′\mathcal{P}' also meet each layer of λ\lambda (when restricted to GCG_C) at most once, and λ\lambda is still a layering of GCG_C. Because N>4w+4N>4w+4, N′<NN'<N, and we can consider by induction a path decomposition of GCG_C of width at most f(N′)≤f(N2+2w+2)f(N')\leq f\left(\frac{N}{2}+2w+2\right).

We do this for each component of T−cTT-c_T. We order these components arbitrarily and concatenate the path decompositions following this ordering. Then, we add to each bag, the vertices of BcTB_{c_T}. It is clear that this forms a valid path decomposition of GG, of width at most

f(N)≤f(N2+2w+2)+w+1.f(N)\leq f\left(\frac{N}{2}+2w+2\right)+w+1.

Apply this recursive identity d=⌈log⁡2(N+1)⌉d=\lceil\log_2(N+1)\rceil times to get

f(N)≤f(4w+5−2w+22d)+(w+1)d,f(N)\leq f\left(4w+5-\frac{2w+2}{2^d}\right)+(w+1)d,

which gives f(N)=O(wlog⁡(N+1))f(N)=O(w\log(N+1)), by using that f(N)≤8w+9f(N)\leq8w+9 when N≤4w+5N\leq4w+5.

Theorem 12. For any graph GG, if V(G)V(G) is covered by kk shortest paths, then pw⁡(G)=O(k3)\operatorname{pw}(G)=O(k^3).

Proof. Without loss of generality, consider GG to be connected. Let P1,…,PkP_1,\ldots,P_k be the shortest paths covering the vertices of GG. Replace each vertex vv by a clique Fv={(v,i):v∈V(Pi)}F_v=\{(v,i):v\in V(P_i)\} and each edge uvuv by all edges between FuF_u and FvF_v. Call the obtained graph HH. Notice that the paths P1,…,PkP_1,\ldots,P_k now partition V(H)V(H) and remain shortest paths in HH. Furthermore, choosing one vertex in each of the created cliques gives an induced copy of GG in HH, so pw⁡(G)≤pw⁡(H)\operatorname{pw}(G)\leq\operatorname{pw}(H).

By Corollary 6, tw⁡(H)=O(k2)\operatorname{tw}(H)=O(k^2). Lemma 10 applied to P={P1,…,Pk}\mathcal{P}=\{P_1,\ldots,P_k\} gives a partition into N=O(k3)N=O(k^3) paths containing at most one vertex of each distance layer from a fixed root. The distance from that root is a layering of HH. Since log⁡(N+1)=O(k)\log(N+1)=O(k), Lemma 11 yields pw⁡(G)≤pw⁡(H)=O(k3)\operatorname{pw}(G)\leq\operatorname{pw}(H)=O(k^3).

:::

Improving the pathwidth upper bound when covering the edges

We will use the polynomial pathwidth-modulator of Baste et al. [4] together with the results in § 3 to improve the O(k4)O(k^4) upper bound for pathwidth from Baste et al. [4] when the graph is edge-covered by kk shortest paths. The results of this section do not apply to quasi-shortest paths. We restate the structural result at the core of the work in [4].

Theorem 13 (Baste, De Meyer, Giocanti, Objois, Picavet [4 Theorem 8]). Let GG be a graph whose edges are covered by shortest paths P1,…,PkP_1,\ldots,P_k. For each ii with 1≤i≤k1\leq i\leq k, there is a set XiX_i of at most 720k3+4k720k^3+4k vertices of GG such that every component of G−XiG-X_i meeting PiP_i has pathwidth at most 6k6k.

To prove the results in this section, we start from a tree decomposition (T,B)(T,\mathcal{B}) of our input graph GG given by Corollary 6 or Corollary 8, and transform it using Theorem 13 and Lemmas 15 and 17 so that the obtained tree TT has bounded pathwidth. Then, we use Lemma 14 below that gives a bound on the pathwidth of GG with respect to the pathwidth of TT. Note that this lemma applies to semi-tree decompositions, a generalization of tree decompositions defined in [9]. In particular, any tree decomposition is a semi-tree decomposition.

Lemma 14 (Bodlaender and Fomin [9 Lemma 8]). If a graph GG has a semi-tree decomposition (T,B)(T,\mathcal{B}) of width kk, then pw⁡(G)≤(k+1)(pw⁡(T)+1)−1\operatorname{pw}(G) \le(k+1)(\operatorname{pw}(T)+1)-1.

A complete binary tree of height hh is a rooted tree in which every non-leaf vertex has two children and every leaf is at distance hh from the root.

Lemma 15 (Marshall and Wood [38 Lemma 6]). Let TT be a forest and let t≥1t \ge1. If pw⁡(T)≥t\operatorname{pw}(T) \ge t, then TT contains a complete binary tree of height t−1t-1 as a minor. [. . .]

Corollary 16. Any tree TT with qq leaves has pathwidth at most ⌊log⁡2q⌋+1\lfloor\log_2 q\rfloor+1.

Proof. A tree TT with qq leaves cannot contain a binary tree of height ⌊log⁡2q⌋+1\lfloor\log_2 q\rfloor+1 as a minor. By contraposition of Lemma 15, the pathwidth of TT is then at most ⌊log⁡2q⌋+1\lfloor\log_2 q\rfloor+1.

Lemma 17. Let TT be a subcubic tree and T0T_0 a subtree of TT with qq leaves such that T−T0T-T_0 is a forest of paths. Then, pw⁡(T)≤⌊log⁡2q⌋+5\operatorname{pw}(T) \le\lfloor\log_2 q\rfloor+5.

Proof. Each path PP in T−T0T-T_0, is connected to T0T_0 by an edge, which can originate from an internal vertex of PP or from an endpoint of PP. Since TT is subcubic, at most two such paths are connected to each leaf of T0T_0. Denote by T′T' the subtree of TT obtained from T0T_0 by adding all paths of T−T0T-T_0 connected by an edge to a leaf of T0T_0. Notice that T′T' has at most 4q4q leaves. By Corollary 16, pw⁡(T′)≤⌊log⁡2(4q)⌋+1=⌊log⁡2q⌋+3\operatorname{pw}(T') \le\lfloor\log_2(4q)\rfloor+1=\lfloor\log_2 q\rfloor+3.

Consider a path decomposition (T∗,B∗)(T^*,\mathcal{B}^*) of T′T' of width at most ⌊log⁡2q⌋+3\lfloor\log_2 q\rfloor+3. We show how to transform it into one for TT by increasing the bag size by at most 2. To do so, consider the paths of T−T0T-T_0 connected to internal vertices of T0/T′T_0/T'. Since TT is subcubic, at most one path PvP_v of T−T0T-T_0 is connected to each internal vertex vv of T0/T′T_0/T'. Consider the natural path decomposition of width at most 1 of PvP_v. Consider any bag BB of (T∗,B∗)(T^*,\mathcal{B}^*) containing vv. Make a copy of BB and insert, between the two copies of BB, the sequence of bags of the path decomposition of PvP_v, where we add to each bag, the vertices of BB. Repeating this for every internal vertex of T0T_0 that has an edge to some path in T−T0T-T_0, we obtain a path decomposition of TT of width at most ⌊log⁡2q⌋+5\lfloor\log_2 q\rfloor+5, as claimed.

Lemma 18. Let tw⁡(G)≤w\operatorname{tw}(G)\le w and XX be a non-empty vertex set of GG of size rr such that pw⁡(G−X)≤p\operatorname{pw}(G-X)\le p. Then, pw⁡(G)≤(w+p+2)(⌊log⁡2r⌋+6)−1\operatorname{pw}(G)\le(w+p+2)(\lfloor\log_2 r\rfloor+6)-1.

Proof. Take a subcubic tree decomposition T=(T,B)\mathcal{T}=(T,\mathcal{B}) of GG (for instance a classic nice tree decomposition, see [8]) of width ww, that is, where TT is subcubic. For each vertex x∈Xx\in X, fix a bag BxB_x of B\mathcal{B} containing xx. Define T0T_0 as the inclusion-wise minimal subtree of TT containing BxB_x for all x∈Xx\in X. By minimality, T0T_0 has at most rr leaves. Notice that T−T0T-T_0 is a forest. We call a connected component of T−T0T-T_0 a hanging subtree. TT can thus be decomposed into a set of hanging subtrees attached to T0T_0. Let T′T' be one of those hanging subtrees, call α\alpha the node of T0T_0 connected to T′T', and call BαB_\alpha its corresponding bag. Denote by V′V' the set of vertices of GG that are present in bags corresponding to nodes of T′T' except vertices of XX. Since pw⁡(G−X)=p\operatorname{pw}(G-X)=p, we have that pw⁡(G[V′])≤p\operatorname{pw}(G[V'])\le p. By considering a path decomposition of G[V′]G[V'] and adding vertices of BαB_\alpha to all bags of this decomposition, we get a path decomposition of G[V′∪Bα]G[V' \cup B_\alpha] of width at most p+w+1p+w+1. Replace T′T' by the path underlying this path decomposition, and attach its first node to α\alpha. Since BαB_\alpha is contained in every bag of the path decomposition, tree decomposition properties are preserved across the attachment. Repeat this for each component of T−T0T-T_0, and call the resulting tree T‾\overline{T}. This tree decomposition has now width at most w+p+1w+p+1 with T‾\overline{T} being subcubic, and T‾−T0\overline{T}-T_0 is a forest of paths. Thus, we have that pw⁡(T‾)≤⌊log⁡2r⌋+5\operatorname{pw}(\overline{T}) \le\lfloor\log_2 r\rfloor+5 by Lemma 17. We finally use Lemma 14 to get that pw⁡(G)≤(w+p+2)(pw⁡(T‾)+1)−1\operatorname{pw}(G) \le(w+p+2)(\operatorname{pw}(\overline{T})+1)-1, which yields the claim. ◀

Theorem 19. If E(G)E(G) is covered by k≥1k \ge1 shortest paths and tw⁡(G)≤w\operatorname{tw}(G) \le w, then pw⁡(G)≤(w+6k+2)(⌊4log⁡2k⌋+16)−1\operatorname{pw}(G) \le(w+6k+2)(\lfloor4\log_2 k\rfloor+16)-1. Consequently, every graph edge-covered by kk shortest paths satisfies pw⁡(G)=O(k2log⁡k)\operatorname{pw}(G)=O(k^2\log k). Moreover, for a fixed graph HH, if GG is HH-minor-free, then pw⁡(G)=OH(klog⁡k)\operatorname{pw}(G)=O_H(k\log k).

Proof. We may assume without loss of generality that GG is connected and has at least one edge. Let P1,…,PkP_1,\ldots,P_k be the covering paths. By Theorem 13, for each ii with 1≤i≤k1 \le i \le k, there is a set XiX_i of at most 720k3+4k720k^3+4k vertices such that every component of G−XiG-X_i meeting PiP_i has pathwidth at most 6k6k.

Let X=⋃iXiX=\bigcup_i X_i. Then ∣X∣≤720k4+4k2≤724k4|X|\le720k^4+4k^2\le724k^4. Every component KK of G−XG-X contains a vertex of some PiP_i, because the paths cover all edges and there are no isolated vertices. Since Xi⊆XX_i\subseteq X, the component KK lies in a component of G−XiG-X_i meeting PiP_i. Hence, we have pw⁡(G−X)≤6k\operatorname{pw}(G-X)\le6k.

We apply Lemma 18: the bound on ∣X∣|X| gives ⌊log⁡2∣X∣⌋≤⌊4log⁡2k⌋+10\lfloor\log_2|X|\rfloor\le\lfloor4\log_2 k\rfloor+10 and proves the sought inequality. Note that if the paths cover the edges, they also cover the vertices (we disregard isolated vertices as GG was assumed to be connected with at least one edge). We may therefore apply the above upper bound with w=tw⁡(G)w=\operatorname{tw}(G). By Corollary 6, tw⁡(G)≤441k2+90k\operatorname{tw}(G)\le441k^2+90k, and we obtain pw⁡(G)=O(k2log⁡k)\operatorname{pw}(G)=O(k^2\log k). For HH-minor-free graphs, we have tw⁡(G)=OH(k)\operatorname{tw}(G)=O_H(k) by Corollary 8 and thus, pw⁡(G)=OH(klog⁡k)\operatorname{pw}(G)=O_H(k\log k). ◀

A superlinear lower bound for edge-covering by shortest paths

We now show that existing constructions provide a new superlinear lower bound for the treewidth of graphs coverable with kk shortest paths, answering a question of Baste et al. [4]. Our construction is inspired by the one in [12 Theorem 8].

Theorem 20. There is an absolute constant c>0c>0 such that, for infinitely many kk, there is a cubic graph GkG_k whose edges are covered by at most kk shortest paths and which satisfies pw⁡(Gk)≥tw⁡(Gk)≥cklog⁡k\operatorname{pw}(G_k)\ge\operatorname{tw}(G_k)\ge ck\log k.

Proof. There exist arbitrarily large cubic bipartite Ramanujan graphs (a Ramanujan graph is a regular graph with specific spectral properties) with girth g=Θ(log⁡n)g=\Theta(\log n) [20 Theorem 5.4]. Ramanujan graphs are expanders and thus have linear treewidth (because expanders do not have sublinear separators [34]).

Every bipartite cubic graph can be 3-edge-colored (König’s Line Coloring Theorem). Hence, the edges can be partitioned into three matchings M1,M2,M3M_1,M_2,M_3. Together, two of them form a collection of disjoint cycles (because each vertex has two incident edges from them) with nn edges in total. Consider one of these cycles CC in M1∪M2M_1\cup M_2 or M1∪M3M_1\cup M_3 of length q≥g=Ω(log⁡n)q\ge g=\Omega(\log n). E(C)E(C) can be covered by O(q/g)=O(1/log⁡n)O(q/g)=O(1/\log n) edge-disjoint paths, each of length less than g/2g/2. These paths are automatically shortest paths, because a shortcut would imply the existence of a cycle of length less than the girth, which is impossible. Overall, we have Θ(n/log⁡n)\Theta(n/\log n) shortest paths covering the edges of M1∪M2M_1\cup M_2, and the same for M1∪M3M_1\cup M_3. Hence, taking the union of all these shortest paths covering M1∪M2M_1 \cup M_2 and M1∪M3M_1 \cup M_3, we have k=Θ(n/log⁡n)k = \Theta(n/\log n) shortest paths covering all edges of the graph. Hence, klog⁡k=Θ(n)k \log k = \Theta(n), and the treewidth of GG is Ω(n)\Omega(n), which is thus Ω(klog⁡k)\Omega(k \log k).

Small quasi-shortest path covers can have unbounded pathwidth

We now show that when α>1\alpha> 1, pathwidth cannot be bounded in terms of kk when the graph is covered by (α,β)(\alpha,\beta)-quasi-shortest paths, even for k=2k = 2 and β=0\beta= 0.

Theorem 21. For every α>1\alpha> 1 and every integer w≥0w \ge0, there is a graph GG of order 2Oα(w)2^{O_\alpha(w)} whose edges are covered by two (α,0)(\alpha,0)-quasi-shortest paths and whose pathwidth is at least ww.

Proof. Fix α>1\alpha> 1. For each h≥0h \ge0, we construct a connected graph GhG_h edge-covered by two (α,0)(\alpha,0)-quasi-shortest paths Ph,QhP_h,Q_h of equal length with a common final endpoint.

For h=0h = 0, take a single vertex and paths that consist of that vertex. Suppose Gh−1G_{h-1} has been constructed, and its two paths have length dd. Take two disjoint copies AA, BB of Gh−1G_{h-1} and a new vertex zz. Choose l≥2l \ge2 as the smallest integer satisfying the first inequality below, and then choose m≥2m \ge2 as the smallest integer satisfying the second:

l+2d≤αl,m+l+2d≤αm.(2)l + 2d \le\alpha l,\qquad m + l + 2d \le\alpha m. \tag*{(2)}

Join the corresponding path endpoints according to Figure 1 by new paths of length ll or mm to obtain

Construction of $G_h$ from two copies of $G_{h-1}$

Figure 1. Construction of GhG_h from two copies of Gh−1G_{h-1}. The blue path is PhP_h and the red one QhQ_h. Labels indicate the lengths of new connecting paths, whose internal vertices are pairwise distinct. Blue and red terminals are the endpoints of the respective covering paths, with inputs on the left and outputs on the right of each box. The outputs of the two paths are always identical.

Ph=PA→lPB→mz,Qh=QB→lQA→mz.P_h = P_A \xrightarrow{l} P_B \xrightarrow{m} z,\qquad Q_h = Q_B \xrightarrow{l} Q_A \xrightarrow{m} z.

Let Gh=Ph∪QhG_h = P_h \cup Q_h. Both PhP_h and QhQ_h have length 2d+l+m2d + l + m and final endpoint zz.

We first prove quasi-shortness of PhP_h and QhQ_h. For any two distinct vertices x,yx,y lying on both PhP_h and QhQ_h, we claim that their distance along these paths differs by a factor of at most α\alpha. If x,yx,y belong to the same copy AA or BB, this follows from induction. If they belong to AA and BB, both distances lie in [l,l+2d][l,l+2d]. If one is zz and the other belongs to AA or BB, both distances lie in [m,m+l+2d][m,m+l+2d]. (2) proves the quasi-shortness condition of the subpaths of PhP_h or QhQ_h with endpoints xx and yy.

Now let x,y∈V(Ph)x,y \in V(P_h), and take a shortest xx–yy path RR in GhG_h. Every excursion of RR outside PhP_h is a subpath of QhQ_h with endpoints common to both covering paths. Replace each excursion by the corresponding subpath of PhP_h that is at most by a factor α\alpha longer because of the preceding paragraph. The resulting walk is contained in PhP_h and has length at most α∣R∣\alpha|R| and therefore dist⁡Ph(x,y)≤α⋅dist⁡Gh(x,y)\operatorname{dist}_{P_h}(x,y) \le\alpha\cdot\operatorname{dist}_{G_h}(x,y). Thus PhP_h is (α,0)(\alpha,0)-quasi-shortest and the same argument applies to QhQ_h. Finally, deleting the two length-ll connecting paths, but retaining their endpoints, at every recursive level, leaves a subdivision of the complete binary tree of height hh, rooted at the common final endpoint. The case h=0h=0 is a single vertex, and at each step the two length-mm connecting paths join the new root zz to the roots of the subdivisions in AA and BB. According to [7 Theorem 67], the complete binary tree of height hh has pathwidth ⌈h/2⌉\lceil h/2\rceil. Thus, GhG_h contains the complete binary tree of height hh as a minor, and since pathwidth is minor-monotone, taking h=2wh=2w gives us the required graph GhG_h with pathwidth at least ww. By our choices of ll and mm, both are in Oα(d)O_\alpha(d), and therefore dd grows geometrically with every recursive construction, implying that GhG_h has order 2Oα(w)2^{O_\alpha(w)}.

Exponential size is optimal up to the constant in the exponent: by Theorem 5, every graph covered by two quasi-shortest paths has constant treewidth. Since every nn-vertex graph of treewidth t>0t>0 has pathwidth O(tlog⁡n)O(t\log n) [7], pathwidth ww implies n=2Ωα(w)n=2^{\Omega_\alpha(w)}.

XP recognition for quasi-shortest path/walk covers

Counting Monadic Second-Order (CMSO) logic refers to Monadic Second-Order (MSO) logic augmented with fixed modular-cardinality predicates (that is, checking whether a given set has size aa modulo bb, for fixed values a,ba,b). When considering graphs as inputs, CMSO1_1 quantifies over vertex sets, while CMSO2_2 also quantifies over edge sets. It can express paths, incidence, and connectivity, but cannot compare the cardinalities of two quantified sets. We recall the precise CMSO2_2 fragment of Dreier, Ganian, and Hamm [24 Section 3.3 and Definition 2] that we will use. To do so, we fix nonnegative integer vertex and edge weight symbols wiw_i (given as inputs along with the graph).

A linear weight term has the form a+∑i,jaijwi(Xj)a+\sum_{i,j}a_{ij}w_i(X_j), where wi(X)=∑x∈Xwi(x)w_i(X)=\sum_{x\in X}w_i(x), and the terms aa and aija_{ij} are constants called coefficients. A coefficient is nonnegative if aa and all aija_{ij} are nonnegative real numbers, and natural if they are all natural numbers, including zero. The logic CMSO[⪯\preceq] extends classical CMSO [22] by allowing atomic comparisons between weight terms.

A block formula has the form ∀Y‾ ϕ(X‾,Y‾)\forall\overline{Y}\ \phi(\overline{X},\overline{Y}), where ϕ\phi is a CMSO[⪯\preceq] formula containing only nonnegative weight terms. All but at most one exceptional weight term depend only on the outer variables X‾\overline{X}. This exceptional term, if present, may also depend on Y‾\overline{Y}, but it occurs only on one side of a single comparison. Blocked CMSO, denoted ∀\forallCMSO, is the closure of block formulas under conjunction, disjunction, and existential first- and second-order quantification. For the sake of readability, we will slightly abuse notation when quantifiers and weight functions are applied to single variables. In particular, we will write ∀x\forall x instead of ∀x′∈{x}\forall x'\in\{x\}, and w(x)w(x) instead of w({x})w(\{x\}).

A ∀\forallCMSO query pairs a constraint using natural weight comparisons with an integral linear optimization target. An assignment for a query is a set of values for the free variables involved in it, and it is satisfying if the query constraints hold when using the assigned values. Every query used here is a feasibility query with the constant-zero target; it returns either a satisfying assignment or a report that none exists.

Lemma 22. For every fixed rationals α≥1\alpha\ge1 and β≥0\beta\ge0, there is a ∀\forallCMSO2_2 formula φα,β(P)\varphi_{\alpha,\beta}(P) with one free edge-set variable PP such that G⊨φα,β(P)G\models\varphi_{\alpha,\beta}(P) if and only if PP is the edge set of a positive-length (α,β)(\alpha,\beta)-quasi-shortest path.

Proof. Let α=pq\alpha=\frac{p}{q} and β=rs\beta=\frac{r}{s} with nonnegative integers p,q,r,sp,q,r,s. Let Path⁡(P)\operatorname{Path}(P) be the standard MSO2_2 predicate that PP is the edge set of a nonempty positive-length simple path. It asks that PP forms a connected subgraph, no vertex of GG is incident to three edges of PP, and PP is acyclic (every subset of PP has a leaf), see [23 Chapter 7]. Moreover, let RootedPath(R,x,y)(R,x,y) say that RR is the edge set of an xx–yy path (same as Path(R)(R) but x,yx,y are distinct and have degree 1 when considering only edges of RR), AllEdges(F)(F) say that F=E(G)F=E(G), and Complement(S,F,R)(S,F,R) say that S=F∖RS=F\setminus R. These are all ordinary MSO2_2 predicates.

Let SubPath(Q,P,x,y)(Q,P,x,y) be the predicate saying that Q⊆PQ\subseteq P is a subpath of PP with endpoints x,yx,y. It is expressed as RootedPath(Q,x,y)(Q,x,y) together with the fact that Q⊆PQ\subseteq P. Hence, SubPath(Q,P,x,y)(Q,P,x,y) is MSO2_2.

For a subpath QQ with endpoints xx and yy, quasi-shortness requires ∣Q∣≤α∣R∣+β=pq∣R∣+rs|Q|\leq\alpha|R|+\beta=\frac{p}{q}|R|+\frac{r}{s} for any shortest xx–yy path RR (and thus, for any xx–yy path RR), that is, sq∣Q∣≤sp∣R∣+rqsq|Q|\leq sp|R|+rq. Blocked CMSO does not allow this comparison because both sides depend on universally quantified sets QQ and RR. However, by using S=E(G)∖R=F∖RS=E(G)\setminus R=F\setminus R, we get ∣R∣=∣F∣−∣S∣|R|=|F|-|S|, and so the above condition can be reformulated as

sq∣Q∣+sp∣S∣≤sp∣F∣+rq,(3)sq|Q|+sp|S|\leq sp|F|+rq, \tag*{(3)}

which is allowed in Blocked CMSO because only QQ and SS are universally quantified (since F=E(G)F=E(G) is fixed), and these universally quantified terms appear only on one side of the comparison. This is a crucial point. Formally, let φα,β(P)\varphi_{\alpha,\beta}(P) be the following query:

Path⁡(P)∧∃F(AllEdges⁡(F)∧∀Q∀R∀S∀x∀y [¬SubPath⁡(Q,P,x,y)∨¬RootedPath⁡(R,x,y)∨¬Complement⁡(S,F,R)∨sq∣Q∣+sp∣S∣≤sp∣F∣+rq]).\begin{aligned} \operatorname{Path}(P)\land\exists F\bigl(&\operatorname{AllEdges}(F)\land\forall Q\forall R\forall S\forall x\forall y\,[\neg\operatorname{SubPath}(Q,P,x,y)\\ &\lor\neg\operatorname{RootedPath}(R,x,y)\\ &\lor\neg\operatorname{Complement}(S,F,R)\\ &\lor sq|Q|+sp|S|\leq sp|F|+rq]\bigr). \end{aligned}

Requiring (3) for every xx–yy path RR and subpath QQ is equivalent to ∣Q∣≤α⋅dist⁡G(x,y)+β|Q|\leq\alpha\cdot\operatorname{dist}_{G}(x,y)+\beta. Universally quantifying Q,x,yQ,x,y therefore gives exactly Definition 1.

In φα,β(P)\varphi_{\alpha,\beta}(P), PP and FF are fixed outside the universal block. Hence sp∣F∣+rqsp|F|+rq is an outer term, while sq∣Q∣+sp∣S∣sq|Q|+sp|S| is the unique term depending on block variables and occurs on only one side of one comparison. Both are nonnegative natural weight terms, and all predicates are pure MSO2_2. Thus the formula belongs to ∀\forallCMSO2_2.

Lemma 23. For fixed rationals α≥1\alpha\geq1 and β≥0\beta\geq0, and every k≥1k\geq1, there is a ∀\forallCMSO2_2 formula ψk,α,β(X1,…,Xk,P1,…,Pk)\psi_{k,\alpha,\beta}(X_1,\ldots,X_k,P_1,\ldots,P_k) of size O(k)O(k) whose satisfying assignments encode precisely the vertex covers by at most kk (α,β)(\alpha,\beta)-quasi-shortest paths.

Proof. For every label ii, the vertex set XiX_i and edge set PiP_i encode one path. An ordinary MSO2_2 predicate distinguishes two cases. If PiP_i is empty, then XiX_i is empty or a singleton. If PiP_i is nonempty, then XiX_i is exactly the set of vertices incident with PiP_i, and φα,β(Pi)\varphi_{\alpha,\beta}(P_i) holds. Finally, require X1∪⋯∪Xk=V(G)X_1\cup\cdots\cup X_k=V(G). Empty labels allow fewer than kk paths. The obtained formula is closed under the required conjunctions, disjunctions, and existential quantifiers, and each of the kk copies has constant size for fixed α,β\alpha,\beta.

We use the following XP algorithmic meta-theorem to get the main result of this section.

Theorem 24 (Dreier, Ganian, Hamm [24, Theorem 5]). There exists a computable function hh such that for any ∀\forallCMSO2_2 query ψ\psi with maximum coefficient or input weight MM, and any graph GG of treewidth ww and order nn, one can check in time (M+n)h(∣ψ∣,w)(M+n)^{h(|\psi|,w)} whether ψ\psi is satisfied by GG. If yes, one can also obtain the corresponding values of the free variables in ψ\psi.

We apply Theorem 24 to obtain the following.

Theorem 25. For every fixed rationals α≥1\alpha\ge1 and β≥0\beta\ge0, there is a computable function fα,βf_{\alpha,\beta} such that the following holds. Given a simple graph GG with n>0n > 0 vertices and an integer k≥1k \ge1, one can solve (α,β)(\alpha,\beta)-Quasi-Shortest Path Cover in XP time nfα,β(k)n^{f_{\alpha,\beta}(k)}.

Proof. Let a=2α+β+1a = 2\alpha+ \beta+ 1 and w=49a2k2+30akw = 49a^2k^2 + 30ak. Apply the single-exponential 22-approximation for treewidth due to Korhonen [35]. It either correctly reports tw⁡(G)>w\operatorname{tw}(G) > w, in which case we answer no due to Theorem 5, or returns a tree decomposition of width at most w′=2w+1w' = 2w + 1. The standard nice tree decomposition conversion transforms it into a nice tree decomposition of at most 4n4n nodes and width at most w′w' in time O(wn)O(wn) [8 Lemma 6].

By Lemma 23, the formula ψ^k,α,β\hat{\psi}_{k,\alpha,\beta} has size O(k)O(k) and its assignments are exactly the required quasi-shortest path covers. Evaluate the corresponding feasibility query exactly on the width-w′w' decomposition using Theorem 24. If it is infeasible, answer no. Otherwise, return the paths encoded by the free sets (Xi,Pi)(X_i,P_i).

With α=pq\alpha= \frac{p}{q} and β=rs\beta= \frac{r}{s}, the weight bound from Theorem 24 is the constant M=max⁡{sq,sp,rq}M = \max\{sq,sp,rq\}. Exact evaluation therefore takes time (M+(w+1)n)h(O(k),2w+1)(M + (w+1)n)^{h(O(k),2w+1)}.

The treewidth approximation takes 2O(w)n2^{O(w)}n time, the nice tree decomposition conversion takes O(wn)O(wn) time, and writing the kk paths takes O(kn)O(kn) time. Since w=Oα,β(k2)w = O_{\alpha,\beta}(k^2) by Theorem 5 and MM is constant for fixed α,β\alpha,\beta, these costs have the claimed form, by aggregating all parameter-only factors into the exponent fα,βf_{\alpha,\beta}. ◀

We next prove that the XP algorithm from Theorem 25 can be extended to walks, by a reduction to a slightly constrained version of (α,β)(\alpha,\beta)-Quasi-Shortest Path Cover.

Theorem 26. For every fixed rationals α≥1\alpha\ge1 and β≥0\beta\ge0, there is a computable function fα,βf_{\alpha,\beta} such that the following holds. Given a simple graph GG with n>0n > 0 vertices and an integer k≥1k \ge1, one can solve (α,β)(\alpha,\beta)-Quasi-Shortest Walk Cover in XP time nfα,β(k)n^{f_{\alpha,\beta}(k)}.

Proof. Notice that, if β<1\beta< 1, any (α,β)(\alpha,\beta)-quasi-shortest walk is actually a simple path, because repeating a vertex (which is at distance 00 from itself) would violate the (α,β)(\alpha,\beta)-quasi-shortness condition. Hence, in that case, the statement follows from Theorem 25.

Assume next β≥1\beta\ge1 and let b=⌊β⌋+1b = \lfloor\beta\rfloor+ 1. Construct a graph HH from GG by replacing every vertex uu by a clique CuC_u of size bb and adding all possible edges connecting a vertex of CuC_u to a vertex of CvC_v, whenever uv∈E(G)uv \in E(G). Let C={Cu∣u∈V(G)}\mathcal{C} = \{C_u \mid u \in V(G)\}. Color all the edges inside replacement cliques. We will use a slightly modified version of the formulas in the proof of Theorem 25. To this end, we show that GG has a vertex-covering by kk (α,β)(\alpha,\beta)-quasi-shortest walks if and only if HH has a set P={P1,…,Pk}\mathcal{P} = \{P_1,\ldots,P_k\} of at most kk (α,β)(\alpha,\beta)-quasi-shortest (simple) paths satisfying the following three conditions:

  1. none of the paths in P\mathcal{P} uses a colored edge;

  2. no subpath of any path in P\mathcal{P} with at least bb edges has both endpoints in the same clique of C\mathcal{C};

  3. every clique of C\mathcal{C} is intersected by some path in P\mathcal{P}.

We now show that P\mathcal{P} indeed encodes exactly the desired walk covers of GG. Consider a set of (α,β)(\alpha,\beta)-quasi-shortest walks of GG covering V(G)V(G). We may assume without loss of generality, that the same vertex does not occur consecutively in the walk, as otherwise, we may remove one of these occurrences. Notice that in an (α,β)(\alpha,\beta)-quasi-shortest walk WW of GG, the first and last occurrences of any vertex are fewer than bb steps apart, so each vertex occurs at most bb times. Thus, replacing WW by a path PP of HH by assigning distinct vertices of the same clique CuC_u of C\mathcal{C} to the occurrences of uu in WW turns WW into a simple path in HH. For the same reason, no subpath of such a path with at least bb edges has both endpoints in the same clique of C\mathcal{C}, so

(2) is satisfied. Since WW did not contain two consecutive occurrences of the same vertex, (1) is satisfied. Every clique of CC is intersected since the walks cover all vertices of GG. Finally, for vertices x∈Cux \in C_u, y∈Cvy \in C_v with u≠vu \ne v, we have dist⁡H(x,y)=dist⁡G(u,v)\operatorname{dist}_H(x,y) = \operatorname{dist}_G(u,v), so, a subpath between xx and yy is (α,β)(\alpha,\beta)-quasi-shortest since the walks are as well. If x,yx,y are in the same clique CvC_v, dist⁡H(x,y)=1\operatorname{dist}_H(x,y) = 1, and as we proved (2), it has at most b−1≤β≤α⋅dist⁡H(x,y)+βb - 1 \le\beta\le\alpha\cdot\operatorname{dist}_H(x,y) + \beta edges, so it is also (α,β)(\alpha,\beta)-quasi-shortest.

Conversely, let PP be a set of (α,β)(\alpha,\beta)-quasi-shortest (simple) paths of HH satisfying all three conditions. In each path, we replace each vertex of say CvC_v by vv, to obtain a collection of walks of GG of the same size as PP. Condition (2) guarantees that a subpath with at least bb edges in any path of PP is projected into a subwalk in GG with distinct endpoints, hence subwalks with the same starting and ending vertex are (α,β)(\alpha,\beta)-quasi-shortest. For vertices x∈Cux \in C_u, y∈Cvy \in C_v with u≠vu \ne v, we have dist⁡H(x,y)=dist⁡G(u,v)\operatorname{dist}_H(x,y) = \operatorname{dist}_G(u,v), so, subwalks with distinct endpoints are (α,β)(\alpha,\beta)-quasi-shortest since the paths of PP do as well. Since every clique in CC is intersected by a path of PP, every vertex of GG is covered by one of the walks.

For fixed β\beta, the three additional conditions are ordinary MSO2_2 predicates. Combine them with the path formulas of Lemma 22, treating empty and singleton paths as in Lemma 23. This gives a ∀\forallCMSO2_2 query of size O(k)O(k) on the colored graph HH. As in the proof of Theorem 25, by Theorem 7 and running Korhonen’s treewidth 2-approximation [35], we may reject if the treewidth is too large for a yes-instance, or obtain a tree decomposition of GG of width w=Oα,β(k2)w = O_{\alpha,\beta}(k^2). Replacing each bag BB by ⋃u∈BCu\bigcup_{u \in B} C_u gives a decomposition of HH of width O(bw)O(bw). Moreover, ∣V(H)∣=bn|V(H)| = bn. Adapting the proof of Theorem 25, Exact Blocked-CMSO evaluation therefore has the stated XP running time. ◀

Conclusion

For graphs GG covered by kk exact shortest paths, our results establish that tw⁡(G)=O(k2)\operatorname{tw}(G) = O(k^2) and pw⁡(G)=O(k3)\operatorname{pw}(G) = O(k^3). For covering the edges, the treewidth upper bound remains, and we obtained pw⁡(G)=O(k2log⁡k)\operatorname{pw}(G) = O(k^2 \log k). For all these cases, we provide an Ω(klog⁡k)\Omega(k \log k) lower bound for infinitely many graphs, showing that a linear upper bound is impossible (negatively answering a question from Baste et al. [4]).

The polynomial pathwidth upper bound for the vertex-covering case answers the most intriguing formerly open question in the area, since previously, only an exponential upper bound was known. The other bounds improve those from the literature.

The gaps between the lower and upper bounds come from the quadratic treewidth upper bound, and the additional cost from the pathwidth-modulator and the well-colored path partition, respectively. Note that improving the Ω(klog⁡k)\Omega(k \log k) lower bound in treewidth would also improve the treewidth lower bound with respect to linear growth from [12 Theorem 8].

The main open question is to obtain tight bounds for the above problems.

▶ Open Problem 27. What are the maximum treewidth and pathwidth of a graph covered by kk shortest paths? Is O(k2)O(k^2) optimal, or even O(klog⁡k)O(k \log k)? Do the optimal bounds for vertices and edges differ? What about HH-minor-free graphs?

We introduced the problems (α,β)(\alpha,\beta)-Quasi-Shortest Path/Walk Cover, which can arguably better model real-world applications. Vertex-covering by quasi-shortest paths/walks also implies quadratic treewidth, enabling XP recognition and construction algorithms. The use of the Blocked-CMSO-based meta-theorem yields XP bounds whose exponents depend on the formula and treewidth, but explicit exponents and FPT algorithms remain open.

Open Problem 28. For fixed rationals α≥1\alpha\ge1 and β≥0\beta\ge0, are (α,β)(\alpha,\beta)-Quasi-Shortest Path Cover and (α,β)(\alpha,\beta)-Quasi-Shortest Walk Cover FPT when parameterized by the treewidth, or by the number kk of solution paths?

Note that this is already open for Shortest Path Cover (α=1\alpha= 1 and β=0\beta= 0) [26, 28]. The related Shortest Path Partition problem is W[1]-hard for pathwidth [15] (but the solution size parameterization remains open). The edge-disjoint version of Shortest Path Cover for oriented graphs is W[1]-hard for solution size [28].

Disclosure of generative-AI assistance.

We used generative AI (GPT 5 and 6) for initial language drafting, literature search and review of our candidate proofs. In particular, it assisted with examining the applicability of cited results, suggesting alternative arguments, and checking inequalities and boundary cases. These were treated as suggestions and carefully verified by us. The core ideas, proofs and final manuscript are due to the authors: we entirely reviewed, rewrote and verified proofs, citations, final text and retain full responsibility for the content.

References

  1. [1]Ittai Abraham, Daniel Delling, Andrew V. Goldberg, and Renato F. Werneck. Alternative routes in road networks. ACM J. Exp. Algorithmics, 18, 2013. doi:10.1145/2444016.2444019.DOI
  2. [2]Ittai Abraham, Cyril Gavoille, Anupam Gupta, Ofer Neiman, and Kunal Talwar. Cops, robbers, and threatening skeletons: Padded decomposition for minor-free graphs. SIAM Journal on Computing, 48(3):1120–1145, 2019.arxiv.org/abs/1311.3048
  3. [3]Martin Aigner and M. Fromme. A game of cops and robbers. Discrete Applied Mathematics, 8(1):1–12, 1984.DOI
  4. [4]Julien Baste, Lucas De Meyer, Ugo Giocanti, Etienne Objois, and Timothé Picavet. A polynomial bound on the pathwidth of graphs edge-coverable by k shortest paths. In 43rd International Symposium on Theoretical Aspects of Computer Science (STACS 2026), volume 364 of Leibniz International Proceedings in Informatics, pages 10:1–10:17, 2026. doi:10.4230/LIPIcs.STACS.2026.10.DOI
  5. [5]Paul Bastide, Julien Duron, Jędrzej Hodor, Weichan Liu, and Xiangxiang Nie. Counterexamples to statements on isometric graph coverings, 2025. URL: https://arxiv.org/abs/2511.03524, arXiv:2511.03524.
  6. [6]Dimitris Bertsimas, Yee Sian Ng, and Julia Yan. Data-driven transit network design at scale. Operations Research, 69(4):1118–1133, 2021. doi:10.1287/opre.2020.2057.DOI
  7. [7]Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theoretical Computer Science, 209(1):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.DOI
  8. [8]Hans L. Bodlaender, Paul Bonsma, and Daniel Lokshtanov. The fine details of fast dynamic programming over tree decompositions. In Parameterized and Exact Computation: 8th International Symposium, IPEC 2013, Sophia Antipolis, France, September 4-6, 2013, Revised Selected Papers 8, pages 41–53. Springer, 2013.DOI
  9. [9]Hans L. Bodlaender and Fedor V. Fomin. Approximation of pathwidth of outerplanar graphs. Journal of Algorithms, 43(2):190–200, 2002. doi:10.1016/S0196-6774(02)00001-9.DOI
  10. [10]Martin R. Bridson and André Haefliger. Metric Spaces of Non-Positive Curvature, volume 319 of Grundlehren der mathematischen Wissenschaften. Springer-Verlag, Berlin, 1999. doi:10.1007/978-3-662-12494-9.DOI
  11. [11]M. Cáceres, M. Cairo, B. Mumey, R. Rizzi, and A. I. Tomescu. Sparsifying, shrinking and splicing for minimum path cover in parameterized linear time. In Proceedings of the 2022 ACM-SIAM Symposium on Discrete Algorithms, SODA 2022, Virtual Conference, January 9 - 12, 2022, pages 359–376. SIAM, 2022.arxiv.org/abs/2107.05717
  12. [12]Rutger Campbell, Marc Distel, J. Pascal Gollin, Daniel J. Harvey, Kevin Hendrey, Robert Hickingbotham, Bojan Mohar, and David R. Wood. Graphs of linear growth have bounded treewidth. The Electronic Journal of Combinatorics, 30(3):P3.1, 2023. doi:10.37236/11657.DOI
  13. [13]Dibyayan Chakraborty, Jérémie Chalopin, Florent Foucaud, and Yann Vaxès. Isometric path complexity of graphs. Discret. Math., 349(2):114743, 2026. doi:10.1016/J.DISC.2025.114743.DOI
  14. [14]Dibyayan Chakraborty, Antoine Dailly, Sandip Das, Florent Foucaud, Harmender Gahlawat, and Subir Kumar Ghosh. Complexity and algorithms for ISOMETRIC PATH COVER on chordal graphs and beyond. In Sang Won Bae and Heejin Park, editors, 33rd International Symposium on Algorithms and Computation, ISAAC 2022, Seoul, South Korea, December 19-21, 2022, volume 248 of LIPIcs, pages 12:1–12:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ISAAC.2022.12.DOI
  15. [15]Dibyayan Chakraborty, Oscar Defrain, Florent Foucaud, Mathieu Mari, and Prafullkumar Tale. Parameterized complexity of isometric path partition: Treewidth and diameter. In 52nd International Workshop on Graph-Theoretic Concepts in Computer Science, volume 376 of LIPIcs, pages 11:1–11:18, 2026. doi:10.4230/LIPIcs.WG.2026.11.DOI
  16. [16]Dibyayan Chakraborty, Haiko Müller, Sebastian Ordyniak, Fahad Panolan, and Mateusz Rychlicki. Covering and partitioning of split, chain and cographs with isometric paths. Theor. Comput. Sci., 1075:115910, 2026. doi:10.1016/J.TCS.2026.115910.DOI
  17. [17]Jérémie Chalopin, Victor Chepoi, and Guylslain Naves. Isometric embedding of Busemann surfaces into l1. Discrete & Computational Geometry, 53(1):16–37, 2015. doi:10.1007/s00454-014-9647-2.
  18. [18]Huanfa Chen, Tao Cheng, and John Shawe-Taylor. A balanced route design for min-max multiple-depot rural postman problem (MMDRPP): a police patrolling case. International Journal of Geographical Information Science, 32:169–190, 2017. doi:10.1080/13658816.2017.1380201.DOI
  19. [19]Victor Chepoi, Feodor F. Dragan, Bertrand Estellon, Michel Habib, and Yann Vaxès. Diameters, centers, and approximating trees of δ-hyperbolic geodesic spaces and graphs. In Proceedings of the Twenty-Fourth Annual Symposium on Computational Geometry (SCG ’08), pages 59–68. ACM, 2008. doi:10.1145/1377676.1377687.DOI
  20. [20]Patrick Chiu. Cubic Ramanujan graphs. Combinatorica, 12(3):275–285, 1992. doi:10.1007/BF01285816.DOI
  21. [21]D. G. Corneil, B. Dalton, and M. Habib. LDFS-based certifying algorithm for the minimum path cover problem on cocomparability graphs. SIAM Journal on Computing, 42(3):792–807, 2013.DOI
  22. [22]Bruno Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finite graphs. Information and Computation, 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H.DOI
  23. [23]Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.DOI
  24. [24]Jan Dreier, Robert Ganian, and Thekla Hamm. Approximate evaluation of quantitative second order queries. In 40th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 664–677, 2025. doi:10.1109/LICS65433.2025.00056.DOI
  25. [25]Maël Dumas, Florent Foucaud, Anthony Perez, and Ioan Todinca. On graphs coverable by k shortest paths. In Sang Won Bae and Heejin Park, editors, 33rd International Symposium on Algorithms and Computation, ISAAC 2022, Seoul, South Korea, December 19-21, 2022, volume 248 of LIPIcs, pages 40:1–40:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL: https://doi.org/10.4230/LIPIcs.ISAAC.2022.40, doi:10.4230/LIPIcs.ISAAC.2022.40.
  26. [26]Maël Dumas, Florent Foucaud, Anthony Perez, and Ioan Todinca. On graphs coverable by k shortest paths. SIAM Journal on Discrete Mathematics, 38(2):1840–1862, 2024. doi:10.1137/23M1654511.
  27. [27]David Eppstein, Michael T. Goodrich, and Songyu Liu. Bandwidth vs BFS width in matrix reordering, graph reconstruction, and graph drawing. In Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman, editors, 33rd Annual European Symposium on Algorithms, ESA 2025, Warsaw, Poland, September 15-17, 2025, volume 351 of LIPIcs, pages 691:69–17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. URL: https://doi.org/10.4230/LIPIcs.ESA.2025.69, doi:10.4230/LIPIcs.ESA.2025.69.
  28. [28]Henning Fernau, Florent Foucad, Kevin Mann, Utkarsh Padariya, and Rajath Rao K. N. Parameterizing path partitions. Theoretical Computer Science, 1028:115029, 2025. doi: 10.1016/j.tcs.2024.115029.DOI
  29. [29]D. C. Fisher and S. L. Fitzpatrick. The isometric number of a graph. Journal of Combinatorial Mathematics and Combinatorial Computing, 38(1):97–110, 2001.
  30. [30]S. L. Fitzpatrick, R. J. Nowakowski, D. A. Holton, and I. Caines. Covering hypercubes by isometric path. Discrete Mathematics, 240(1-3):253–260, 2001.DOI
  31. [31]Agelos Georgakopoulos and Panos Papasoglu. Graph minors and metric spaces. Combinatorica, 45:33, 2025. doi:10.1007/s00493-025-00136-3.arxiv.org/abs/2305.07456
  32. [32]Mikhail Gromov. Asymptotic invariants of infinite groups. In Graham A. Niblo and Martin A. Roller, editors, Geometric Group Theory, Vol. 2 (Sussex, 1991), volume 182 of London Mathematical Society Lecture Note Series, pages 1–295. Cambridge University Press, Cambridge, 1993.
  33. [33]Meike Hatzel and Michal Pilipczuk. On graphs coverable by chubby shortest paths. In Graph-Theoretic Concepts in Computer Science: 51st International Workshop, WG 2025, Revised Selected Papers, volume 16124 of Lecture Notes in Computer Science, pages 244–257. Springer, 2026. URL: https://arxiv.org/abs/2503.02160, doi: 10.1007/978-3-032-11835-6_18.
  34. [34]Shlomo Hoory, Nathan Linial, and Avi Wigderson. Expander graphs and their applications. Bulletin of the American Mathematical Society, 43(4):439–561, 2006. doi:10.1090/S0273-0979-06-01126-8.DOI
  35. [35]Tuukka Korhonen. A single-exponential time 2-approximation algorithm for treewidth. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS 2021), pages 184–192, 2022. doi:10.1109/FOCS52979.2021.00026.DOI
  36. [36]Paul Manuel. Revisiting path-type covering and partitioning problems. arXiv e-print, 2018. https://arxiv.org/abs/1807.10613.
  37. [37]Paul Manuel. On the isometric path partition problem. Discussiones Mathematicae Graph Theory, 41(4):1077–1089, 2021. doi:10.7151/dmgt.2236.DOI
  38. [38]Emily A. Marshall and David R. Wood. Circumference and pathwidth of highly connected graphs. Journal of Graph Theory, 79(3):222–232, 2015. doi:10.1002/jgt.21825.
  39. [39]Laura Merker, Lena Scherzer, and Samuel Schneider. Separating Geodesic Structure and Product Structure. In Philip Bille, Seth Pettie, and Sabine Storandt, editors, 34th Annual European Symposium on Algorithms (ESA 2026), volume 388 of Leibniz International Proceedings in Informatics (LIPIcs), pages 126:1–126:18, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik.
  40. [40]Tung Nguyen, Alex Scott, and Paul Seymour. Asymptotic structure. I. Coarse tree-width, 2025. Revised Sept. 2025. URL: https://arxiv.org/abs/2501.09839, arXiv:2501.09839.
  41. [41]Jun-Jie Pan and Gerard J. Chang. Isometric-path numbers of block graphs. Information processing letters, 93(2):99–102, 2005.DOI
  42. [42]Jun-Jie Pan and Gerard J. Chang. Isometric path numbers of graphs. Discret. Math., 306(17):2091–2096, 2006. doi:10.1016/J.DISC.2006.04.003.DOI
  43. [43]Barna Saha and Christopher Ye. Faster approximate all pairs shortest paths. In David P. Woodruff, editor, Proceedings of the 2024 ACM-SIAM Symposium on Discrete Algorithms, SODA 2024, Alexandria, VA, USA, January 7-10, 2024, pages 4758–4827. SIAM, 2024. doi:10.1137/1.9781611977912.170.DOI
  44. [44]Maximilian Thiessen and Thomas Gärtner. Active learning of convex halfspaces on graphs. In Advances in Neural Information Processing Systems, volume 34, pages 23413–23425, 2021. URL: https://proceedings.neurips.cc/paper/2021/hash/c4bf1e24f3e6f92ca9dfd9a7a1a049c–Abstract.html.

Paper details

vlnc:W_hqx4g89f
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Not recorded for this paper · View statement →

Looking for related papers…
Contents