Abstract 1 Introduction 2 Preliminaries 3 Uncapacitated Vehicle Routing 4 Capacitated Vehicle Routing 5 Conclusion References

Parameterized Complexity of Vehicle Routing

Michelle Döring ORCID Hasso Plattner Institute, University of Potsdam, Germany Jan Fehse ORCID Hasso Plattner Institute, University of Potsdam, Germany Tobias Friedrich ORCID Hasso Plattner Institute, University of Potsdam, Germany Paula Marten ORCID Hasso Plattner Institute, University of Potsdam, Germany Niklas Mohrin ORCID Hasso Plattner Institute, University of Potsdam, Germany Kirill Simonov ORCID Department of Informatics, University of Bergen, Norway Farehe Soheil ORCID Hasso Plattner Institute, University of Potsdam, Germany Jakob Timm ORCID Hasso Plattner Institute, University of Potsdam, Germany Shaily Verma ORCID Hasso Plattner Institute, University of Potsdam, Germany
Abstract

The Vehicle Routing Problem (𝖵𝖱𝖯) is a popular generalization of the Traveling Salesperson Problem. Instead of one salesperson traversing the entire weighted, undirected graph G, there are k vehicles available to jointly cover the set of clients CV(G). Every vehicle must start at one of the depot vertices DV(G) and return to its start. Capacitated Vehicle Routing (𝖢𝖵𝖱𝖯) additionally restricts the route of each vehicle by limiting the number of clients it can cover, the distance it can travel, or both.

In this work, we study the complexity of 𝖵𝖱𝖯 and the three variants of 𝖢𝖵𝖱𝖯 for several parameterizations, in particular focusing on the treewidth of G. We present an 𝖥𝖯𝖳 algorithm for 𝖵𝖱𝖯 parameterized by treewidth. For 𝖢𝖵𝖱𝖯, we prove 𝗉𝖺𝗋𝖺𝖭𝖯- and 𝖶[]-hardness for various parameterizations, including treewidth, thereby rendering the existence of 𝖥𝖯𝖳 algorithms unlikely. In turn, we provide an 𝖷𝖯 algorithm for 𝖢𝖵𝖱𝖯 when parameterized by both treewidth and the vehicle capacity.

Keywords and phrases:
Vehicle Routing Problem, Treewidth, Parameterized Complexity
Funding:
Michelle Döring: German Federal Ministry for Education and Research (BMBF) through the project “KI Servicezentrum Berlin Brandenburg” (01IS22092).
Copyright and License:
[Uncaptioned image] © Michelle Döring, Jan Fehse, Tobias Friedrich, Paula Marten, Niklas Mohrin, Kirill Simonov,
Farehe Soheil, Jakob Timm, and Shaily Verma; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Fixed parameter tractability
Related Version:
Full Version: https://arxiv.org/abs/2509.10361 [8]
Editors:
Akanksha Agrawal and Erik Jan van Leeuwen

1 Introduction

Optimizing logistics has been an important driver of the theory of computing since its very dawn, and, with the ever-growing digitalization and decentralization of services, it remains a productive direction to this day. One of the canonical challenges in the area, the Vehicle Routing Problem (𝖵𝖱𝖯), introduced by George Dantzig and John Ramser in 1959 [6], can be informally summarized as follows: “What is the optimal set of routes for a fleet of vehicles to traverse in order to deliver to a given set of customers?”

To model this question, it is natural to use a weighted graph to represent the relevant locations and the travel costs between them, with particular vertices marked as the depots, where the vehicles and the goods are originally located, and with some other vertices marked as the clients that await the delivery. Formally, we consider 𝖵𝖱𝖯 to be the following computational problem: Given an edge-weighted undirected graph (G,w), subsets C,DV(G), and integers k, r, determine whether there exists a collection of at most k closed walks in G, such that each walk starts and ends at a vertex of D, the walks cover all vertices in C, and their total weight is at most r.

Defined in this way, 𝖵𝖱𝖯 also becomes interesting from the theoretical point of view, as it generalizes several important 𝖭𝖯-hard problems. Notably, the famous Traveling Salesperson Problem is a special case of 𝖵𝖱𝖯 with one vehicle and every vertex being a client, i.e., k=1, C=D=V(G). On the other hand, since 𝖵𝖱𝖯 allows for multiple vehicles, it also captures packing and covering problems on graphs. For example, the Maximum Cycle Cover problem, where the task is to find a collection of k vertex-disjoint cycles in the given graph G that covers all vertices [5], is modeled by 𝖵𝖱𝖯 with C=D=V(G) and r=|V(G)|.

Based on the immediate hardness of the problem in the classical sense, practical solvers for vehicle routing are mostly based on heuristics, which provide guarantees on neither the quality of the solution nor on the running time. We refer to surveys by Braekers et al. [4] and by Mor and Speranza [11] for an in-depth introduction to the vast area of practical research on solving the vehicle routing problem, as well as for listing various variants of the vehicle routing problem that received practical interest. Stemming from numerous research works and the efficiency of the developed solvers, the vehicle routing problem itself sees applications to other domains, for example, routing traffic in computer networks [1].

On the other hand, theoretical results regarding 𝖵𝖱𝖯 have been much scarcer, especially with respect to solving the problem exactly. The immediate 𝖭𝖯-hardness of the problem together with the diversity of explicit (such as number of vehicles and tour lengths) and implicit parameters (such as treewidth that may be small in certain applications [1]) makes 𝖵𝖱𝖯 a natural target for parameterized complexity. However, to the best of our knowledge, this avenue was largely unexplored until now, although 𝖳𝖲𝖯 itself [3, 7] and other related problems such as cycle packing [2] are well-studied in the area.

Our contribution.

In this work, we aim to close this gap and initiate the parameterized complexity study of 𝖵𝖱𝖯 and its variants. First, based on the different variants of vehicle routing found in the literature [4, 11], we define a general vehicle routing setting 𝖦𝖵𝖱𝖲 that provides a unified interface to the individual problems. We then focus on two important special cases: the 𝖵𝖱𝖯 problem, as defined above, and its capacitated variant, where each route is additionally subject to a size constraint. Specifically, in 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, the input also contains the parameter , and each route in the solution can only serve at most clients. This is motivated by real-life constraints, such as the limited cargo space of vehicles and the limited working hours of drivers. On the other hand, the capacity constraint allows to encapsulate even more fundamental theoretical problems within the vehicle routing framework, such as Triangle Packing, corresponding to =3, and -Cycle Packing. Similarly, we define 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, where there is a limit on the edge-weight of each route, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯, where both edge-weight and number of clients are limited. The problem classification is covered in detail in Section 2.1.

We then proceed to investigate the parameterized complexity of these problems with respect to the parameters such as the number of vehicles k, the number of depots |D|, the number of clients |C|, the total weight of the solution r, the treewidth of the graph tw, and the maximum load in case of 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯. Our findings are summarized in Table 1.

We start in Section 3 with the uncapacitated case, i.e., the 𝖵𝖱𝖯 problem. As this problem presents a generalization of 𝖳𝖲𝖯, we can rule out tractability even for a constant number of vehicles and depots in Theorem 3.1. In Theorem 3.2 we also quickly conclude that the number of clients is a sufficient parameter for an 𝖥𝖯𝖳 algorithm. This result directly implies that deciding whether a routing of weight at most r exists can be done in 𝖥𝖯𝖳-time in r.

Table 1: Overview of our results for Vehicle Routing variants. We omit the results for 𝖦𝖺𝗌𝖢𝖵𝖱𝖯 and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 that are analogous to the listed results for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯.
VRP Variant Parameter Complexity Reference
𝖵𝖱𝖯 |D|+k 𝗉𝖺𝗋𝖺𝖭𝖯-hard Theorem 3.1 (𝖬𝖾𝗍𝗋𝗂𝖼𝖳𝖲𝖯)
|C| 𝖥𝖯𝖳 Theorem 3.2
r 𝖥𝖯𝖳 Corollary 3.3 (r|C|)
tw 𝖥𝖯𝖳 Theorem 3.9
𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 𝗉𝖺𝗋𝖺𝖭𝖯-hard Theorem 4.12 (𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀)
|C| 𝖥𝖯𝖳 Theorem 4.1
r 𝖥𝖯𝖳 if 0-edges disallowed Corollary 4.3 (r|C|)
k+ 𝖥𝖯𝖳 Theorem 4.4 (k|C|)
tw+|D| 𝗉𝖺𝗋𝖺𝖭𝖯-hard Theorem 4.8 (𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀)
tw+k+|D| 𝖶[1]-hard Theorem 4.8 (𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀)
tw+ 𝖷𝖯 Corollary 4.25
𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 tw++|D| 𝗉𝖺𝗋𝖺𝖭𝖯-hard Theorem 4.15 (𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀)
tw+g+|D| 𝗉𝖺𝗋𝖺𝖭𝖯-hard Corollary 4.16 (𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀)

The main result of Section 3 deals with structural properties of our network, namely its treewidth. While there are many known 𝖥𝖯𝖳 algorithms parameterized by treewidth for various graph problems, the 𝖵𝖱𝖯 problem presents a unique combination of several challenging aspects. The solution is composed of arbitrarily many individual objects, i.e., walks, which may use edges and vertices multiple times and can have arbitrary length. Neither the number of walks in the solution, nor the length of the individual walk, nor the multiplicity of an edge or a vertex in a walk is bound by the treewidth. The closest known starting point on the approach to 𝖵𝖱𝖯 is the 𝖥𝖯𝖳 algorithm by Schierreich and Suchý [14] for the Waypoint Routing Problem parameterized by treewidth, which is effectively a single-vehicle case of 𝖵𝖱𝖯. While resolving some of the challenges outlined above, their algorithm does not readily allow for the incorporation of the partitioning aspect as well, i.e., to deal with multiple vehicles, over which the clients need to be partitioned. We generalize this approach further and obtain an 𝖥𝖯𝖳 algorithm for 𝖵𝖱𝖯 parameterized by treewidth (Theorem 3.9). In fact, the result we obtain holds for the more general Edge-Capacitated Vehicle Routing Problem (𝖤𝖵𝖱𝖯), which additionally allows to specify arbitrary capacities on the edges, so that each edge can be used by the solution at most the specified number of times. One of the key ingredients behind the algorithm is the combinatorial observation that allows us to restrict the number of times an edge can be used by the solution. Based on this, we introduce an equivalent reformulation of 𝖵𝖱𝖯 that only considers Eulerian submultigraphs. This reformulation can, in turn, be solved efficiently via dynamic programming over the tree decomposition. Unfortunately, the operations in dynamic programming required for dealing with multiple walks extend beyond the established single-exponential-time machinery developed by Bodlaender et al. [3]. The running time that our algorithm achieves is thus of the form 2𝒪(twlogtw)n𝒪(1); improving this to purely single-exponential running time remains a challenging open question. Nevertheless, this result completes the classification with respect to the outlined parameters.

We then focus on capacitated vehicle routing in Section 4. Recall that 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 result from adding to 𝖵𝖱𝖯 the restriction on the maximum number of clients per vehicle , the maximum length of a tour g, or both simultaneously. As our work shows, these three versions largely behave in the same way with respect to the parameters in question; therefore we mainly focus on 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 in order to introduce our results.

The additional constraints allow us to model different packing problems as capacitated vehicle routing problems, and by showing such inclusions, we derive several intractability results. In Section 4.2, we show that 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 is 𝖭𝖯-hard even for maximum load =3, by providing a reduction from 𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀. More surprisingly, by reduction from 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀, we can also show that treewidth alone is not enough for fixed-parameter tractability in the presence of the capacity constraints, even when combined with the number of vehicles k and the number of depot vertices |D|.

Based on this hardness result, we move on to consider treewidth in combination with the capacity parameters. We show complete intractability for 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯, even when combining treewidth, the maximum load, and the number of depots as a parameter, using 𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀 in Section 4.3. However, 𝖷𝖯 tractability can be achieved by combining treewidth and the capacity parameter in 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 and 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, as well as combining both capacity parameters with treewidth in 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯. These algorithms are the main results of Section 4. To obtain these, we first introduce a generalization of the 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 problem that acts as an interface to the capacitated vehicle routing problems, and prove tractability of this problem for a combination of parameters. Finally, in Section 4.4 we present a dynamic programming algorithm that solves 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 by modeling the optimal combination of partial solutions as instances of generalized 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀.

The proofs of some theorems are omitted and can be found in the full version of this paper [8]. These theorems are marked with ().

2 Preliminaries

Let ={0,1,2,} be the set of natural numbers, including zero. For n, we abbreviate [n]={1,2,,n} and [n]0={0}[n]. A multiset is an unordered collection of elements of some universe U, where each element can occur multiple times. Formally, we model multisets as functions mapping each possible element to the number of occurrences. Alternatively, we use set notations with modified brackets as in these examples: 1,2,2,3 (the multiset containing 1 and 3 once, and 2 twice), n/2|n (the multiset containing each natural number twice). The cardinality of a multiset A is denoted as |A|=uUA(u). For some sub-universe UU, we denote the restriction of A to U as AU. For two multisets A,B over the same universe U, we denote by A+B the multiset union defined by (A+B)(u)=A(u)+B(u) for every uU. For n, we denote by nA the multiset obtained by uniting n copies of A. Let G be an undirected (multi-)graph. By convention, we usually abbreviate n=|V(G)|. A walk p in a graph G is defined as a sequence of vertices and edges (v1,e1,v2,e2,,e1,v), where the sequence begins at a vertex and traverses edges of the graph, allowing for the repetition of both vertices and edges. The length of a walk is given by the number of edges it contains, counted with multiplicity. For simplicity, we may represent a walk of length 1 by the sequence of its vertices, i.e., (v1,v2,,v). A walk is closed if the first and last visited vertices are equal, otherwise it is open.

A (multi-)graph G is called Eulerian if all vertices in G have even degree. Equivalently, G is Eulerian when it is the (multiset-)union of closed walks. Note that, unlike the classic (connected) notion of Eulerian graphs, this definition does not require G to be connected. Given an edge eE(G) and number k, we denote by Gke the multigraph G with k occurrences of e removed.

Let w:E(G) be a weight function for the edges of G. For a walk p=(v1,v2,,v) in G we define the weight of p as w(p)=i=11w(vi,vi+1). For a submultigraph HG we define the weight of H as w(H)=eE(H)w(e), where parallel edges in H should appear separately in the sum, that is, the weight of H accounts for the multiplicity of the edges.

Finally, we recall the definitions of tree decompositions, treewidth, and nice tree decompositions, which we will use for our treewidth-based algorithms.

Definition 2.1 (Tree Decomposition, [13, 5]).

A tree decomposition of an undirected graph G is a pair 𝒯=(T,{Xt}tV(T)) consisting of a tree T and for each vertex t of T a set of vertices XtV(G), so that

  • tV(T)Xt=V(G),

  • for all {u,v}E(G), there is tV(T) such that u,vXt, and

  • for all vV(G), the vertices tV(T) with vXt form a connected subtree of T.

The sets Xt are called bags. We abbreviate tV(T) as t𝒯. The width of 𝒯 is defined as width(𝒯)=maxt𝒯|Xt|1 and the treewidth of G is the minimum width of any tree decomposition of G.

Definition 2.2 (Nice Tree Decomposition, [5]).

A tree decomposition 𝒯=(T,{Xt}tV(T)) is called nice if T is rooted at a vertex rV(T) with Xr= and all vertices tV(T) are of one of the following kinds:

  • Leaf Node: t has no children and Xt=.

  • Introduce Vertex Node: t has exactly one child t and there is a vertex vXt such that Xt=Xt{v}.

  • Introduce Edge Node: t has exactly one child t, Xt=Xt, and t is labeled with an edge {u,v}E(G) with u,vXt.

  • Forget Node: t has exactly one child t and there is a vertex vXt such that Xt=Xt{v}.

  • Join Node: t has exactly two children t1,t2 and Xt=Xt1=Xt2.

For each edge eE(G), there must be exactly one Introduce Edge Node labeled with e. If G is a multigraph, each copy of an edge is introduced separately.

For t𝒯, let S be the set of all descendants of t in T (including t itself). We denote the set of all introduced vertices up until t as Vt=tSXt. Similarly, we define Et to be the (multi-)set of all introduced edges up until t and Gt=(Vt,Et).

2.1 Classifying Vehicle Routing Problems

The literature deals with many variants of vehicle routing problems [4, 11]. To incorporate those in a single notion, we introduce the following Generalized Vehicle Routing Setting.

Definition 2.3 (Generalized Vehicle Routing Setting).

An instance of the Generalized Vehicle Routing Setting (𝖦𝖵𝖱𝖲) consists of a graph G with edge weights w:E(G), a nonempty set of depots DV(G), a set of clients CV(G), an integer k representing the number of vehicles, and a predicate Γ modeling additional constraints. We call a set of k walks R={p1,p2,,pk} together with an assignment of vehicles A:C[k] a routing for (G,w,D,C,k,Γ) if

  1. 1.

    kk (the routing uses at most k vehicles),

  2. 2.

    p=(v1,v2,,v)R:v1D (every walk starts in one of the depots),

  3. 3.

    cC:cpA(c) (every client is visited by its assigned vehicle), and

  4. 4.

    Γ(R,A) (the additional constraints are satisfied).

The weight of a routing R is defined as w(R)=pRw(p).

A problem instance may ask whether a feasible routing exists or whether there exists a routing R with w(R)r, for some r. A routing of minimum weight is called optimal.

This paper studies four vehicle routing problems, denoted here as 𝖵𝖱𝖯, 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 for undirected graphs. The problem definitions will contain the additional constraint that each vehicle must return to the depot at which it started. More formally, we will use

Γclosed(R,A)pR:p is closed.
Definition 2.4 (𝖵𝖱𝖯).

The (Uncapacitated) Vehicle Routing Problem (𝖵𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with an additional parameter r. It asks whether there exists a routing (R,A) with w(R)r, subject to Γ=Γclosed.

In Section 3, we obtain the main result for 𝖵𝖱𝖯, a parameterized algorithm for instances with bounded treewidth, by considering 𝖤𝖵𝖱𝖯, a slightly generalized version of 𝖵𝖱𝖯.

Definition 2.5 (𝖤𝖵𝖱𝖯).

The Edge-Capacitated Vehicle Routing Problem (𝖤𝖵𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with additional parameters r and κ:E(G). It asks whether there exists a routing (R,A) with w(R)r, subject to Γ=ΓclosedΓκ, where

Γκ(R,A)eE:e is used at most κ(e) times in R.

The literature on vehicle routing problems often considers capacitated variants [4, 11], usually denoted as 𝖢𝖵𝖱𝖯. In contrast to 𝖤𝖵𝖱𝖯, these capacities are placed on the vehicles individually. However, the term 𝖢𝖵𝖱𝖯 can refer to different kinds of capacities: load and gas capacities. In this paper, we consider both interpretations of 𝖢𝖵𝖱𝖯.

In 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, each client c has a demand for Λ(c) units of some good, which must be delivered by its assigned vehicle. The vehicles, in turn, have a capacity on the load they can carry on their trip. Notably, this capacity is equal for all vehicles.

Definition 2.6 (𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯).

The Load-Capacitated Vehicle Routing Problem (𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with additional parameters r, , and Λ:C+. It asks whether there exists a routing (R,A) with w(R)r, subject to Γ=ΓclosedΓ,Λ, where

Γ,Λ(R,A)i[|R|]:cA1(i)Λ(c).

A similar restriction is given in 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, where each route is limited by the amount g of gas (fuel) a vehicle can carry. Similar to 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, the capacity g is equal for all vehicles.

Definition 2.7 (𝖦𝖺𝗌𝖢𝖵𝖱𝖯).

The Gas-Capacitated Vehicle Routing Problem (𝖦𝖺𝗌𝖢𝖵𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with additional parameters r and g. It asks whether there exists a routing (R,A) with w(R)r, subject to Γ=ΓclosedΓg, where

Γg(R,A)pR:w(p)g.

Finally, 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 combines the constraints of 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 and 𝖦𝖺𝗌𝖢𝖵𝖱𝖯.

Definition 2.8 (𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯).

The Load-and-Gas-Capacitated Vehicle Routing Problem (𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with additional parameters r, , Λ:C+, and g. It asks whether there exists a routing (R,A) with w(R)r, subject to Γ=ΓclosedΓ,ΛΓg.

3 Uncapacitated Vehicle Routing

In this section, we establish the parameterized landscape around the Uncapacitated Vehicle Routing Problem. We show hardness of 𝖵𝖱𝖯 when parameterized by the number of depots |D| and vehicles k. In turn, we show that 𝖵𝖱𝖯 is tractable when parameterized by the number of clients |C|. Finally, we present an algorithm which proves that 𝖤𝖵𝖱𝖯 (and thereby 𝖵𝖱𝖯) is tractable on graphs of bounded treewidth tw.

Note that for 𝖵𝖱𝖯 routings, it suffices to find a set R of at most k closed walks that connect every client to a depot. This is because the predicate Γ does not pose any requirements on the assignment of vehicles A. In fact, an assignment A can be chosen based on R by arbitrarily selecting one of the vehicles which visit a given client. We thus do not mention the assignment A any further in this section.

Since 𝖬𝖾𝗍𝗋𝗂𝖼𝖳𝖲𝖯 is a special case of 𝖵𝖱𝖯 where C=V(G), D={v}, and k=1, we obtain the following result:

Theorem 3.1 ().

𝖵𝖱𝖯 parameterized by |D|+k is 𝗉𝖺𝗋𝖺𝖭𝖯-hard.

Note that the above observation still requires a large number of clients. In the next theorem, we see that we can efficiently solve 𝖵𝖱𝖯 instances for constant numbers of clients.

Theorem 3.2 ().

There is an algorithm that computes an optimal 𝖵𝖱𝖯 routing in |C|𝒪(|C|)n𝒪(1) steps.

While the above algorithm outputs an optimal routing, it can also be used to solve the decision variant of 𝖵𝖱𝖯 as defined in Definition 2.4. It also yields the following corollary:

Corollary 3.3 ().

There is an algorithm that, given r, decides whether there exists a 𝖵𝖱𝖯 routing of weight at most r in f(r)n𝒪(1) steps, for some computable function f.

Next, we present an 𝖥𝖯𝖳 algorithm for 𝖵𝖱𝖯 parameterized by the treewidth. Our algorithm generalizes the prior work by Schierreich and Sućhy [14] on the Waypoint Routing Problem (𝖶𝖱𝖯). 𝖶𝖱𝖯 can be formulated in terms of 𝖦𝖵𝖱𝖲 as follows:

Definition 3.4 (𝖶𝖱𝖯).

The Waypoint Routing Problem (𝖶𝖱𝖯) is a 𝖦𝖵𝖱𝖲 with k=1, D={s}, a designated vertex tV(G), and additional parameters r and κ:E(G). It asks whether there exists a routing R (consisting of a single walk, due to k=1) with w(R)r, subject to Γ=ΓtΓκ, where

Γt(R,A)pR:p ends at t,Γκ(R,A)eE:e is used at most κ(e) times in R.
Theorem 3.5 ([14]).

There is an algorithm that computes an optimal 𝖶𝖱𝖯 routing in 2𝒪(tw)n𝒪(1) steps, where tw denotes the treewidth of G.

Schierreich and Sućhy [14] obtain this result by reducing 𝖶𝖱𝖯 to a normal form where s=t, effectively replacing the constraint Γt by Γclosed. Next, they reformulate the problem to remove the parameter κ: Every edge eE(G) is replaced by κ(e) many parallel edges e1,e2,,eκ(e), each with weight w(e). Given the obtained multigraph G, 𝖶𝖱𝖯 now asks to find a connected, Eulerian subgraph HG, which contains the depot s and all clients C.

Since 𝖶𝖱𝖯 is very similar to a single-vehicle case of 𝖵𝖱𝖯, we aim to adapt the techniques from [14] to our work. In particular, we slightly generalize the 𝖵𝖱𝖯 problem and consider 𝖤𝖵𝖱𝖯 that incorporates edge capacities (see Definition 2.5), making 𝖶𝖱𝖯 a proper special case of our problem. The introduction of edge capacities κ to 𝖵𝖱𝖯 yields the same reformulation to multigraphs as found for 𝖶𝖱𝖯.

Lemma 3.6 ().

Let G be the multigraph obtained by replacing all edges e of G by κ(e) parallel edges as described above. There is an 𝖤𝖵𝖱𝖯 routing R of weight r in G if and only if there is an Eulerian subgraph HG of weight w(H)=r with CV(H) and at most k connected components, so that every client cC is reachable from a depot dD.

Based on Lemma 3.6, we reuse the term routing to refer to Eulerian subgraphs HG that connect every client to a depot and contain at most k connected components. Furthermore, we shift the goal of our algorithm to finding a suitable subgraph HG. Before we can move on from G and κ, we need to make one more simplification to the problem: Although replicating all edges e by κ(e) copies greatly increases the size of the input graph, this increase can be avoided by the following observation, which can be proven easily.

Lemma 3.7.

Let HG be an 𝖤𝖵𝖱𝖯 routing and eE(H) be an edge with multiplicity greater than 2. Then H2e is an 𝖤𝖵𝖱𝖯 routing and w(H2e)w(H).

By repeatedly applying Lemma 3.7, we see that it suffices to solve 𝖤𝖵𝖱𝖯 instances with κ(e)2 for all edges e. In this case, the introduction of κ(e) copies of an edge e can only increase the input size by a factor of 2. Therefore, we will not mention the simple graph G and the edge capacities κ anymore. Instead, we work on multigraphs where each edge can only be used once.

It seems like the algorithm from Theorem 3.5 cannot be used directly to solve 𝖤𝖵𝖱𝖯. However, its general approach still applies to vehicle routing problems. The main difference is that in 𝖶𝖱𝖯, all partial solutions eventually merge to a connected subgraph containing the source vertex s, whereas in 𝖤𝖵𝖱𝖯, there are multiple connected components, each of which contains one of the depots. It turns out that this observation directly translates to an 𝖥𝖯𝖳-algorithm for 𝖤𝖵𝖱𝖯 parameterized by treewidth and the number of connected components.

Theorem 3.8 ().

There is an algorithm that computes an optimal 𝖤𝖵𝖱𝖯 routing in (|D|d)(tw+d)𝒪(tw+d)n𝒪(1) steps where d=min{|D|,k}.

Importantly, the optimization employed by [14] to improve the running time from tw𝒪(tw)n𝒪(1) to 2𝒪(tw)n𝒪(1) cannot be used to improve Theorem 3.8. The optimization is based on the 𝚛𝚎𝚍𝚞𝚌𝚎 operation from [3] that merges partial solutions which are equivalent when considering that they still have to be extended to the signature {{s}} of a full solution. In Theorem 3.8, the signature at the root node is read from the partition D[], not {D}. Thus, a generalization of the setup by [3] to more complex partitions is needed to achieve a similar speedup.

While Theorem 3.8 yields that 𝖤𝖵𝖱𝖯 parameterized by tw+|D| is in 𝖥𝖯𝖳, it seems that the information tracked in the DP by [14] is almost sufficient for 𝖤𝖵𝖱𝖯. This intuition is correct: By extending the weighted-partition setup of [3] and adapting the DP by [14], we manage to develop an algorithm for 𝖤𝖵𝖱𝖯 which is 𝖥𝖯𝖳 when parameterized by just the treewidth of G. To adapt the setup we first introduce the coarsening relation and join operation on partitions. After presenting our extension of weighted partitions and adjusting the operations on weighted partitions by [3] to fit our definition, we can finally go on to present our tree decomposition based algorithm for 𝖤𝖵𝖱𝖯. The complete list of definitions and adaptations can be found in the full version. We further show that the adapted operators correctly maintain and update each DP record, and using them, we derive the following theorem.

Theorem 3.9 ().

𝖵𝖱𝖯 parameterized by tw is in 𝖥𝖯𝖳.

4 Capacitated Vehicle Routing

In this section, we investigate the complexity of 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯. We observe that the three problems share most complexity characteristics. In particular, the requirement to adhere to vehicle capacities greatly increases the complexity. Whereas 𝖵𝖱𝖯 admits an 𝖥𝖯𝖳 algorithm when parameterized by the treewidth of G, all problems investigated in this section are 𝖭𝖯-hard even on trees. We derive this hardness by encoding 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instances in vehicle routing problems. In doing so, we also realize that the presence of zero-weight edges greatly impacts the tractability when parameterizing by the output weight r.

Next, we investigate the parameterized complexity with respect to the given vehicle capacities ( for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 and g for 𝖦𝖺𝗌𝖢𝖵𝖱𝖯). We show 𝗉𝖺𝗋𝖺𝖭𝖯-hardness by reduction from 𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀 for all three variants. This shows that capacitated vehicle routing problems do not only pose the challenge of “algebraic packing” as in 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀, but also one of “structural packing”. We further provide 𝗉𝖺𝗋𝖺𝖭𝖯-hardness results for 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯, when parameterized by treewidth, number of depots and either the load capacity or gas constraint, both by reduction from 𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀.

Finally, we find that the situation is not as dim when parameterizing by both the treewidth and the capacity value (for example tw+ for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯). While we cannot yet answer whether or not there can exist an 𝖥𝖯𝖳 algorithm for these parameters, we provide an 𝖷𝖯 algorithm for 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by tw++g, thereby ruling out 𝗉𝖺𝗋𝖺𝖭𝖯-hardness. Additionally, our (to the best of our knowledge) novel 𝖥𝖯𝖳-algorithm for 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 parameterized by the capacity of each bin is a solid starting point for further analysis of the parameterized complexity of capacitated vehicle routing.

We start by extending some of our results from Section 3 to capacitated vehicle routing.

Theorem 4.1 ().

For each of 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯, there is an algorithm that computes an optimal routing in |C|𝒪(|C|)n𝒪(1) steps.

Note that the proof for Corollary 3.3 does not work for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 in general as there is no sensible way to update the demand Λ when contracting zero-weight edges between two clients. This problem also occurs in 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯. Since client assignment is irrelevant for 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and when no zero-weight edges are present the contraction step can be omitted, the proof of Corollary 3.3 applies analogously to the following statements.

Corollary 4.2.

There is an algorithm that, given a 𝖦𝖺𝗌𝖢𝖵𝖱𝖯 instance and r, decides whether there exists a routing of weight at most r in f(r)n𝒪(1) steps, for some computable function f.

Corollary 4.3.

There is an algorithm that, given a 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 or 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 instance with no zero-weight edges and r, decides whether there exists a routing of weight at most r in f(r)n𝒪(1) steps, for some computable function f.

Another insight is that limiting both k and the capacity constraint suffices for tractability, because the number of clients that can possibly be covered is limited.

Theorem 4.4 ().

All of the following problems are in 𝖥𝖯𝖳:

  • 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 parameterized by k+,

  • 𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by k+g, and

  • 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by k+.

4.1 Hardness from Bin Packing

Prior work regarding capacitated vehicle routing, such as by [12], has already observed the connection to 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀. Before we can formally capture the inclusion of 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 within vehicle routing, we first introduce the relevant prior work.

Definition 4.5 (𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀).

A 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instance consists of a finite set U of items, with sizes given by s:U+, a bin capacity B+, and a number of bins k. It asks whether there exists a partition U1,U2,,Uk of U such that for all i[k] we have uUis(u)B. Additionally, we define 𝖴𝗇𝖺𝗋𝗒𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 as a 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 variant, in which all numerical inputs are encoded in unary.

Going forward, we assume that 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instances do not contain items uU with s(u)>B, as these instances can be rejected immediately.

Theorem 4.6 ([9]).

Both 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 and 𝖴𝗇𝖺𝗋𝗒𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 are 𝖭𝖯-complete.

Theorem 4.7 ([10]).

𝖴𝗇𝖺𝗋𝗒𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 parameterized by the number of bins k is 𝖶[1]-hard.

Theorem 4.8.

𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 are 𝖶[1]-hard when parameterized by k, even with unit demands, unit weights, a single depot, and on trees.

Proof.

Similar to before, we give an extensive proof for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 and briefly explain why it carries over to the other variants. Given a 𝖴𝗇𝖺𝗋𝗒𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instance (U,s,k,B), we construct a tree G with one central depot d and one branch for every item uU. To build such a branch, we add s(u) vertices that form a path vu1vu2vus(u) and connect this path to the depot via an edge {d,vu1}. The set of clients is the set of all vertices on these paths, that is, C={vui|uUi[s(u)]}. We then output the 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 instance

(G,w1,D={d},C,k,Λ1,=B,r=2|E(G)|),

where w1 and Λ1 are the unit weight and unit demand functions w1:e1 and Λ1:c1 respectively. Figure 1 shows an example of the reduction. Note that even though we are creating s(u) vertices for every uU, this reduction still runs in polynomial time, as we are reducing from 𝖴𝗇𝖺𝗋𝗒𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀.

Figure 1: Example graph for U=[3] with s(1)=5, s(2)=1, and s(3)=3.

If there is a valid partition of U into k sets U1,,Uk, which serves as a solution to the 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instance, for every i[k] we let a vehicle cover all clients vuj for uUi and j[s(u)]. This can be achieved by having the vehicle traverse the tree from the depot d to vus(u) and back for each uUi. This way, every edge is walked exactly twice and a vehicle i[k] covers uUis(u)B clients.

Suppose in turn that there is a 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 routing (R={p1,p2,,pk},A) for the given instance. Note that as G is a tree, r=2|E(G)| is just enough so that the vehicles can reach the vertices {vus(u)|uU}. Thus, the path of an item uU is traversed by exactly one vehicle. Given that =B, the partition given by Ui={uU|vu1V(pi)} for all i[k] abides the constraints of 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀.

The same reduction works without demands for g=2B, as any vehicle can then again visit at most B clients. For 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 the reduction works with =B and g=2B.

The above translates to the following result regarding treewidth:

Corollary 4.9.

𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯, 𝖦𝖺𝗌𝖢𝖵𝖱𝖯, and 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 are 𝗉𝖺𝗋𝖺𝖭𝖯-hard when parameterized by tw+|D| and 𝖶[1]-hard when parameterized by tw+k+|D|, even with unit demands and unit weights, where tw denotes the treewidth of G.

When mapping 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instances to vehicle routing, the number of bins corresponds to the number of vehicles, and the bin capacity corresponds to the capacity of each vehicle. As we see later in Corollary 4.20, 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 parameterized by B is in 𝖥𝖯𝖳. Thus, an 𝖥𝖯𝖳-reduction from 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 mapping a value from B to some vehicle capacity does not yield any hardness result. 𝖢𝖵𝖱𝖯 instances parameterized by the vehicle capacities could potentially be reduced to 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 parameterized by B, but such a reduction is unlikely to be applicable to the general case, as vehicle routing problems not only require a numerical partitioning as with 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀, but also a structural one found in 𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀. Still, we return to this intuition in Section 4.4, where we develop an 𝖷𝖯 algorithm for 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯.

4.2 Hardness from Triangle Packing

In this section, we show that 𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀 is contained within the three 𝖢𝖵𝖱𝖯 variants we consider.

Definition 4.10 (𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀).

A 𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instance consists of an undirected graph G such that |V(G)|=3q vertices, for some integer q. It asks whether there exists a partition V1,V2,,Vq of V(G) so that for each i[q], G[Vi]K3.

Theorem 4.11 ([9]).

𝖳𝗋𝗂𝖺𝗇𝗀𝗅𝖾𝖯𝖺𝖼𝗄𝗂𝗇𝗀 is 𝖭𝖯-complete.

Observe that a partition into triangle graphs is equivalent to a fleet of vehicles that each drive a small tour of just three vertices. We use this intuition in the following reduction.

Theorem 4.12 ().

All of the following problems are 𝗉𝖺𝗋𝖺𝖭𝖯-hard, even with unit demands and weights:

  • 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 parameterized by ,

  • 𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by g, and

  • 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by +g.

4.3 Hardness from Numerical 3D Matching

In this section we use a reduction from 𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀 to show that 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 is strongly 𝖭𝖯-hard even on trees with constant number of depots, load capacity and unit demands. The reduction can also be adapted to show hardness on trees with constant number of depots, a constant gas constraint and unit edge weights.

Definition 4.13 (𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀).

A Numerical 3-Dimensional Matching instance consists of three disjoint sets X,Y,Z, each containing m elements, and a bound b with aXYZa=mb. It asks wether XYZ can be partitioned into m disjoints sets A1,,Am, such that each Ai contains exactly one element from each of X,Y,Z and aAia=b.

Theorem 4.14 ([9]).

𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀 is strongly 𝖭𝖯-complete.

Theorem 4.15 ().

𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 is strongly 𝖭𝖯-hard, even on stars with one depot, constant load capacities and unit demands.

To show the hardness of 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 on stars with one depot and a constant gas constraint, the construction used in the proof of Theorem 4.15 can be modified. We use client demands instead of edge weights to encode the numbers to be matched and their type in a given 𝖭𝟥𝖣𝖬𝖺𝗍𝖼𝗁𝗂𝗇𝗀 instance, changing the load and gas constraints accordingly.

Corollary 4.16.

𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 is strongly 𝖭𝖯-hard, even on stars with one depot and a constant gas constraint.

4.4 Tractability for Constant Treewidth and Vehicle Capacities

In this section we investigate 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by tw++g. Note that the observation from Lemma 3.7 does not hold once vehicles need to abide capacities, as witnessed in Figure 2.

Figure 2: A 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 instance with =1 where each routing has to use the edge {d,v} more than twice.

Thus, the dynamic programming devised to prove Theorem 3.9 cannot directly be applied to 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯. Instead, we track the number of walks with a given set of characteristics separately, leading to an 𝖷𝖯 running time. Note however, that a similar result to Lemma 3.7 holds for each vehicle individually:

Lemma 4.17 ().

Let (R,A) be a 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 routing, let pR and let HG be the undirected multigraph representing p. If there is an edge eE(H) with multiplicity greater than two, then the walk p obtained from H2e can be used instead of p in R to form a 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 routing R with w(R)w(R).

Before we formally define the state of the dynamic programming algorithm on the tree decomposition of a given instance for this section, we divert back to 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀. We define and solve an extended version of 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀, which abstracts from the combination of different sets of walks in order to form new walks fulfilling some desired characteristics. In the algorithm, this operation will be needed for the computation at the Join Nodes of the tree decomposition.

In particular, we encode each walk as a 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 item with a multidimensional size given by the number of clients and distance traveled. Accordingly, the bins have multidimensional capacities matching the characteristics of the desired walks. As the walks of a partial solution might have different characteristics, there are several different bin kinds. In addition, each walk has a fingerprint given by the endpoints of the walk and whether or not it contains a depot. Each bin kind expects a combination of fingerprints fulfilling a certain predicate, according to the endpoints of the desired walk.

Definition 4.18 (𝖧𝖾𝗍𝖬𝖽𝖥𝗉𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀).

A Heterogeneous Multidimensional Fingerprint Bin Packing instance consists of

  • a finite set U of items,

  • a finite set of fingerprints,

  • a dimension d+,

  • a number of bin kinds m+,

  • bin capacities B1,B2,,Bmd (with B11B21Bm1),

  • available bin counts k1,k2,,km,

  • predicates deciding the validity of a multiset of fingerprints 𝒱1,𝒱2,,𝒱m:{0,1},

  • item sizes s:Ud{0} with s(u)1B11 for all uU, and

  • item fingerprints F:U.

It asks whether there exists a partition {Ui,j}i[m],j[ki] of U such that for all i,j

  • the bin capacity is not exceeded: uUi,js(u)Bi, and

  • the multiset of fingerprints is valid: 𝒱i(F(u)|uUi,j)=1.

Theorem 4.19 ().

There is an algorithm that, given a 𝖧𝖾𝗍𝖬𝖽𝖥𝗉𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 instance

=(U,,d,m,(B1,B2,,Bm),(k1,k2,,km),(𝒱1,𝒱2,,𝒱m),s,F),

computes a feasible partition or concludes that there is none in f(||+d+m+B11)(T(|U|)+||𝒪(1)) steps, where T: is an upper bound on the time complexity of the predicates {𝒱i}i[m], for some computable function f.

Note that removing all the additions of 𝖧𝖾𝗍𝖬𝖽𝖥𝗉𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀, the above algorithm can also be used for regular 𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀.

Corollary 4.20.

𝖡𝗂𝗇𝖯𝖺𝖼𝗄𝗂𝗇𝗀 parameterized by the bin capacity B is in 𝖥𝖯𝖳.

With all preliminaries out of the way, we present the dynamic programming algorithm for 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯. Given a 𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 instance (G,w,D,C,k,,Λ,g,r) and a nice tree decomposition 𝒯 of G, we track partial solutions of the following form:

Definition 4.21.

Let t𝒯. We call a walk p in Gt detached if V(p)Xt= and V(p)D. We call p attached when both endpoints of p are in Xt (but we don’t require anything with regards to D). For u,vV(G),λ,w, an attached u-v-walk with Λ(p)=λ and w(p)=w is called a (u,v,λ,w)-walk.

Let St={s:Xt2×[]0×[g]0} be the set of all multisets of combinations of walk endpoints, clients covered, and weight. We refer to the elements sSt as counters and abbreviate Λ(s)=u,v,λ,wλs(u,v,λ,w) and w(s)=u,v,λ,wws(u,v,λ,w).

Let XXtC, ck, and s,sSt. We call (X,c,s,s) a solution signature at t. A set of walks R={p1,p2,,pk} in Gt and assignment of clients A:C(X(VtXt))[k] is a partial solution compatible with (X,c,s,s) at t, if

  • for all clients cC(X(VtXt)), cV(pA(c)),

  • all walks pR are either detached or attached,

  • there are exactly c detached walks in R,

  • for each u,vXt,λ[]0,w[g]0,

    • there are exactly s(u,v,λ,w) many (u,v,λ,w)-walks pR with V(p)D=, and

    • there are exactly s(u,v,λ,w) many (u,v,λ,w)-walks pR with V(p)D.

We use dynamic programming to compute the minimum weight dp[t,X,c,s,s]{} of all partial solutions R compatible with (X,c,s,s) at all t𝒯 and for all solution signatures (X,c,s,s) at t. The observant reader might have noticed that since the counters sSt map to the natural numbers, the set St is infinite when Xt. However, we know from Lemma 4.17 that it suffices to look for routings where each of the k walks contain each edge of G at most twice. As there are only finitely many such routings, only finitely many partial solutions leading to these routings can be witnessed at the bags of 𝒯. Thus, there are only finitely many counters which are relevant for finding an optimal routing.

First, if the number of covered clients indicated by a counter s is greater than the number of available clients, we know that no compatible partial solution exists. More formally, if

Λ(s+s)>|C(X(VtXt))|,

then dp[t,X,,s,s]=. Note that the above values might still not be equal, as some of the clients in Vt might be covered by detached walks. This means that we can limit the computation of dp to only those counters sSt with s(,,λ,)|C| for all λ1.

This still leaves the value of s unbounded for λ=0. However, the dp values for counters with s(u,v,0,w)>1 can be reduced to the case where s(u,v,0,w)=1. The fact that a partial solution (R,A) containing a (u,v,0,w)-walk p exists suffices to find the minimum weight partial solution for s(u,v,0,w)>1. Such a solution can be obtained by repeatedly inserting copies of p into R, which increases the weight of R by (s(u,v,0,w)1)w. Thus, we only need to compute dp[t,X,c,s,s] when s(,,0,),s(,,0,)1.

Before we can start to describe the computation of dp, we need to introduce the concept of counter reducibility.

Definition 4.22.

Let tT and s1,s1,s2,s2St. The pair of counters (s1,s1) is reducible to (s2,s2), denoted as (s1,s1)(s2,s2), if for every XXt, ck, and partial solution (R1,A1) compatible with (X,c,s1,s1) at t, there is a partial solution (R2,A2) compatible with (X,c,s2,s2) at t which can obtained by merging walks of R1 and updating A1 accordingly.

Lemma 4.23 ().

Counter reducibility can be decided in f(|Xt|++g+z)n𝒪(1) steps for some function f, where z=u,vXt(s2(u,v,0,0)+s2(u,v,0,0)).

The computation of dp then depends on the node type of t:

Leaf Node

If t is a leaf node, then Xt=, so X, s and s must all be empty too. As Vt=, there cannot be any detached walks, so

dp[t,X,c,s,s]={0,if c=0,,otherwise.

Introduce Vertex Node

Suppose that t is an introduce vertex node with child node t such that Xt=Xt{v}. As v is an isolated vertex in Gt, any attached walk p that contains v must be the empty walk. Thus, for all uv and w>0 we must have s(u,v,,)=s(v,u,,)=s(u,v,,)=s(v,u,,)=s(v,v,,w)=s(v,v,,w)=0. Depending on whether or not vD, the empty walks at v are counted in s or s respectively. Suppose that vD, then s(v,v,,)=0. One of the empty walks at v should cover a client if and only if v is a client and contained in X. More formally, for all λ1 we have s(v,v,λ,0)=𝟙(λ=Λ(v)vX). Lastly, the value s(v,v,0,0) can take any value. If all of the above constraints are satisfied, we set dp[t,X,c,s,s]=dp[t,X{v},c,sXt,sXt]. Otherwise there is no compatible partial solution, and the dp entry is set to . The case vD follows analogously with the requirements for s and s swapped.

Introduce Edge Node

Suppose that t is an introduce edge node labeled with the edge e={u,v} with a child t. As seen in Lemma 4.17, any walk in a minimum weight partial solution compatible with (X,c,s,s) at t traverses e at most twice. Thus, when removing e, a walk p gets split into at most three subwalks. Let s,sSt and ce such that max{ce,|s|+|s|}3(|s|+|s|). Then a partial solution compatible with (X,c,s,s) at t can be constructed from a partial solution compatible with (X,c,s,s) at t by inserting ce copies of e if (s+ce(u,v,0,w(u,v)),s)(s,s). Thus, we set

dp[t,X,c,s,s]=mins,s,cedp[t,X,c,s,s]+cew(u,v),

where s,s,ce range over the values described above.

Forget Node

Suppose that t is a forget node with child node t such that Xt=Xt{v}. A partial solution compatible with (X,c,s,s) can interact with v in several ways.

First, there can be detached walks containing v, which are included in the count c. For a given count cc of detached walks that are also detached from t, let svSt be a counter which has sv(a,b,,)=0 whenever av or bv and sv(v,v,,)=cc. There are at most (cc+1)(+1)(g+1) such counters sv. As the detached walks need to contain a depot, we consider the counter sv as an addition to s.

Second, the walks counted in s and s can contain v. However, any such walk cannot start or end at v, as it would otherwise not be attached to Xt. Thus, the counters for t remain unchanged by this interaction.

In both cases, if vC, it must be covered regardless of X. Therefore, we set

dp[t,X,c,s,s]=minc,svdp[t,X(C{v}),c,s,s+sv]

where c and sv range over the counts and counters described above.

Join Node

Suppose that t is a join node with children t1 and t2. A partial solution compatible with (X,c,s,s) is composed of partial solutions from both t1 and t2 to cover the clients in Vt1 and Vt2 respectively. A walk from a partial solution at t might switch between Vt1 and Vt2 a number of times, so it is split into multiple walks at the children. Suppose that a walk p in Gt is split into the walks p1,p2,,pq. First, the clients covered by p are distributed among the pi. There are at most such client-connecting walks. All walks pi that do not cover a client are only needed to connect the start and end of two client-connecting walks. As there are |Xt| vertices that could be reached, at most |Xt| walks are needed in between two client-connecting walks. In total, there are thus at most client-connecting walks and (+1)|Xt| walks connecting the endpoints of those. Therefore, we limit the counters s1,s1St1,s2,s2St2 to those which are bounded above by (+1)|Xt|(|s|+|s|). Similarly to before, only the counters which satisfy (s1+s2,s1+s2)(s,s) are considered. Note that the clients in X are split between the two partial solutions so that the partial solution in t1 covers some subset X1X and leaves XX1 to t2’s solution. Similarly, the number of detached walks is split into c1c and cc1. Bringing it all together, we set

dp[t,X,c,s,s]=minX1X,c1c,s1,s1,s2,s2dp[t1,X1,c1,s1,s1]+dp[t2,XX1,cc1,s2,s2],

where s1,s1,s2,s2 range over the values described above.

Theorem 4.24 ().

𝖫𝗈𝖺𝖽𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by tw++g is in 𝖷𝖯.

Furthermore, the algorithm from Theorem 4.24 can be modified to yield similar results for 𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 and 𝖦𝖺𝗌𝖢𝖵𝖱𝖯. In particular, the counters St for each node t𝒯 should only track the endpoints of each walk and one of the two constraints.

Corollary 4.25.

𝖫𝗈𝖺𝖽𝖢𝖵𝖱𝖯 parameterized by tw+ and 𝖦𝖺𝗌𝖢𝖵𝖱𝖯 parameterized by tw+g are in 𝖷𝖯.

5 Conclusion

We have presented detailed tractability results for vehicle routing problems regarding the parameters given in the input and the treewidth of the underlying network. We have shown complete results for all mentioned parameters in the uncapacitated case. For 𝖵𝖱𝖯 treewidth as a parameter suffices for the existence of 𝖥𝖯𝖳 algorithms. On the other hand, once any form of capacity constraints is introduced, vehicle routing becomes hard even on trees. Combining treewidth with other parameters is only sensible for parameters which are not sufficient for 𝖥𝖯𝖳 algorithms on their own, namely the capacity, k and |D|. Out of these parameters, only the inclusion of all present capacity parameters yields tractability.

While we also proved complexity bounds of the capacitated vehicle routing variants, some questions remain unanswered. We have provided an 𝖷𝖯 algorithm for treewidth and capacity as a combined parameter. However, the existence of an 𝖥𝖯𝖳 algorithm for the problem could neither be ruled out nor proven in this work. Additionally, while the 𝖶[1]-hardness for the parameter tw+k+|D| is likely to rule out an 𝖥𝖯𝖳-algorithm, future work could explore 𝖷𝖯 algorithms for this parameter.

References

  • [1] Saeed Akhoondian Amiri, Klaus-Tycho Foerster, and Stefan Schmid. Walking through waypoints. Algorithmica, 82(7):1784–1812, 2020. doi:10.1007/S00453-020-00672-Z.
  • [2] Matthias Bentert, Fedor V. Fomin, Petr A. Golovach, Tuukka Korhonen, William Lochet, Fahad Panolan, M. S. Ramanujan, Saket Saurabh, and Kirill Simonov. Packing short cycles. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 1425–1463. SIAM, 2025. doi:10.1137/1.9781611978322.45.
  • [3] Hans L Bodlaender, Marek Cygan, Stefan Kratsch, and Jesper Nederlof. Deterministic single exponential time algorithms for connectivity problems parameterized by treewidth. Information and Computation, 243:86–111, 2015. doi:10.1016/J.IC.2014.12.008.
  • [4] Kris Braekers, Katrien Ramaekers, and Inneke Van Nieuwenhuyse. The vehicle routing problem: State of the art classification and review. Computers & industrial engineering, 99:300–313, 2016. doi:10.1016/J.CIE.2015.12.007.
  • [5] Marek Cygan, Fedor V Fomin, 𝖫ukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms, volume 5. Springer, 2015. doi:10.1007/978-3-319-21275-3.
  • [6] G. B. Dantzig and J. H. Ramser. The truck dispatching problem. Management Science, 6:80–91, October 1959.
  • [7] Mark de Berg, Hans L. Bodlaender, Sándor Kisfaludi-Bak, and Sudeshna Kolay. An eth-tight exact algorithm for euclidean tsp. SIAM Journal on Computing, 52(3):740–760, 2023. doi:10.1137/22M1469122.
  • [8] Michelle Döring, Jan Fehse, Tobias Friedrich, Paula Marten, Niklas Mohrin, Kirill Simonov, Farehe Soheil, Jakob Timm, and Shaily Verma. Parameterized complexity of vehicle routing. arXiv preprint arXiv:2509.10361, 2025.
  • [9] Michael R Garey and David S Johnson. Computers and intractability, volume 174. freeman San Francisco, 1979.
  • [10] Klaus Jansen, Stefan Kratsch, Dániel Marx, and Ildikó Schlotter. Bin packing with fixed number of bins revisited. Journal of Computer and System Sciences, 79(1):39–49, 2013. doi:10.1016/j.jcss.2012.04.004.
  • [11] Andrea Mor and Maria Grazia Speranza. Vehicle routing problems over time: a survey. Annals of Operations Research, 314(1):255–275, 2022. doi:10.1007/S10479-021-04488-0.
  • [12] Ted K Ralphs, Leonid Kopman, William R Pulleyblank, and Leslie E Trotter. On the capacitated vehicle routing problem. Mathematical programming, 94:343–359, 2003. doi:10.1007/S10107-002-0323-0.
  • [13] Neil Robertson and Paul D Seymour. Graph minors. III. Planar tree-width. Journal of Combinatorial Theory, Series B, 36(1):49–64, 1984. doi:10.1016/0095-8956(84)90013-3.
  • [14] Šimon Schierreich and Ondřej Suchý. Waypoint routing on bounded treewidth graphs. Information Processing Letters, 173:106165, 2022. doi:10.1016/j.ipl.2021.106165.