Locating Depots for Capacitated Vehicle Routing

Abstract

We study a location-routing problem in the context of capacitated vehicle routing. The input to k-LocVRP is a set of demand
locations in a metric space and a fleet of k vehicles each of capacity Q. The objective is to locatek
depots, one for each vehicle, and compute routes for the vehicles so that all demands are satisfied and the total
cost is minimized. Our main result is a constant-factor approximation algorithm for k-LocVRP. To achieve this result, we
reduce k-LocVRP to the following generalization of k median, which might be of independent interest. Given a metric
(V,d), bound k and parameter ρ∈R+, the goal in the k median forest problem is to find
S⊆V with |S|=k minimizing:

∑u∈Vd(u,S)+ρ⋅d(MST(V/S)),

where d(u,S)=minw∈Sd(u,w) and MST(V/S) is a minimum spanning tree in the graph obtained by
contracting S to a single vertex. We give a (3+ϵ)-approximation algorithm for k median forest, which leads
to a (12+ϵ)-approximation algorithm for k-LocVRP, for any constant ϵ>0. The algorithm for k median
forest is t-swap local search, and we prove that it has locality gap 3+2t; this generalizes the corresponding
result for k median [3].

Finally we consider the k median forest problem when there is a different cost function c for the MST part, i.e.
the objective is ∑u∈Vd(u,S)+c(MST(V/S)). We show that the locality gap for this problem
is unbounded even under multi-swaps, which contrasts with the c=d case. Nevertheless, we obtain a constant-factor
approximation algorithm, using an LP based approach along the lines of [12].

In typical facility location problems, one wishes to locate centers and connect clients directly to centers at minimum
cost. On the other hand, the goal in vehicle routing problems (VRPs) is to compute routes for vehicles originating from
a given set of depots. Location routing problems represent an integrated approach, where we wish to make combined
decisions on facility location and vehicle routing. This is a widely researched area in operations research, see eg.
surveys [4, 13, 14, 5, 16, 17]. Most of these papers deal with exact methods or heuristics, without any
performance guarantees. In this paper we present an approximation algorithm for a location routing problem in context
of capacitated vehicle routing.

Capacitated vehicle routing (CVRP) is an extensively studied vehicle routing problem [19] which involves
distributing identical items to a set of demand locations. Formally we are given a metric space (V,d) on vertices V
with distance function d:V×V→R+ that is symmetric and satisfies triangle inequality. Each
vertex u∈V demands qu units of the item. We have available a fleet of k vehicles, each having capacity Q
and located at specified depots. The goal is to distribute items using the k vehicles at minimum total cost. There
are two versions of CVRP depending on whether or not the demand at a vertex may be satisfied over multiple visits. We
focus on the unsplit delivery version in the paper, while noting that this also implies the result under
split-deliveries.

We consider the question “where should one locate the k depots so that the resulting vehicle routing solution has
minimum cost?” This is called k-location capacitated vehicle routing (k-LocVRP). The k-LocVRP problem bears obvious
similarity to the well-known k median problem, where the goal is to choose k centers to minimize the sum of
distances of each vertex to its closest center. The difference is that our problem also takes the routing aspect into
account. Not surprisingly, our algorithm for k-LocVRP builds on approximation algorithms for the k median problem.

In obtaining an algorithm for k-LocVRP we introduce the k median forest problem, which might be of some
independent interest. The objective here is a combination of k-median and minimum spanning tree. Given metric
(V,d), bound k and parameter ρ∈R+, the goal is to find S⊆V with |S|=k minimizing
∑u∈Vd(u,S)+ρ⋅d(MST(V/S)). Here d(u,S)=minw∈Sd(u,w) is the
minimum distance between u and an S-vertex; MST(V/S) is a minimum spanning tree in the graph obtained by
contracting S to a single vertex. Note that when ρ=0 we have the k-median objective, and ρ being very
large reduces to MST.

1.1 Our Results

The main result is the following.

Theorem 1

There is a (12+ϵ)-approximation algorithm for k-LocVRP, for any constant ϵ>0.

Our algorithm first reduces k-LocVRP to k median forest, at the loss of a constant approximation factor of four. This
step is fairly straightforward and makes use of
known lower-bounds [8] for the CVRP problem. We present this reduction in Section 2.

Then we prove the following result in Section 3 which implies Theorem 1.

Theorem 2

There is a (3+ϵ)-approximation algorithm for k median forest, for any constant ϵ>0.

This is the technically most interesting part of the paper. The algorithm is straightforward: perform local search
using multi-swaps. It is well known that (single swap) local search is optimal for the minimum spanning tree problem.
Moreover, Arya et al. [3] showed that t-swap local search achieves exactly a (3+2t)-approximation
ratio for the k-median objective (this proof was later simplified by Gupta and Tangwongsan [7]). Thus one can
hope that local search performs well for k median forest, which is a combination of both MST and k-median
objectives. However, the local moves used in proving the quality of local optima are different for the MST and
k-median objectives. Our proof shows we can simultaneously bound both MST and k-median objectives using a
common set of local moves. In fact we prove that the locality gap for k median forest under t-swaps is also (3+2t).
Somewhat surprisingly, it suffices to consider exactly the same set of swaps from [7] to establish
Theorem 2, although [7] does not take into account any MST contribution. The interesting
part of the proof is in bounding the change in MST cost due to these swaps— this makes use of non-trivial exchange
properties of spanning trees and properties of the potential swaps from [7]. We remark that the k-median,
k-tree (i.e. choose k centers S to minimize d(MST(V/S))), and k median forest objectives are incomparable in general:
Appendix A gives an instance where near-optimal solutions to these three objectives are mutually far
apart.

Finally we consider the non-uniform k median forest problem in Section 4. This is an
extension of k median forest where there is a different cost function c for the MST part in the objective. Given
vertices V with two metrics d and c, and bound k, the goal is to find S⊆V with |S|=k minimizing
∑u∈Vd(u,S)+c(MST(V/S)). Here MST(V/S) is a minimum spanning tree in the
graph obtained by contracting S to a single vertex, under metric c. In contrast to the uniform case c=d, we
show that the locality gap here is unbounded even for multi-swaps. In light of this, Theorem 2
appears a bit surprising. Still, we show that a different LP-based approach yields:

Theorem 3

There is a 16-approximation algorithm for non-uniform k median forest.

This algorithm follows closely that for the matroid median problem [12]. We consider the natural LP
relaxation and round it in two phases. The first phase sparsifies the solution (using ideas from [6]) and
allows us to reformulate a new LP-relaxation using fewer variables; this is identical to [12]. The second
phase solves the new LP-relaxation, which we show to be integral.

1.2 Related Work

The basic capacitated vehicle routing problem involves a single fixed depot. There are two versions of CVRP: split
delivery where the demand of a vertex may be satisfied over multiple visits; and unsplit delivery where the
demand at a vertex must be satisfied in a single visit (in this case we also assume maxu∈Vqu≤Q). Observe
that the optimal value under split-delivery is at most that under unsplit-delivery. The best known approximation
guarantee for split-delivery is α+1[8, 2] and for unsplit-delivery is α+2[1], where
α denotes the best approximation ratio for the Traveling Salesman Problem. We make use of the following known
lower bounds for CVRP with single depot r: the minimum TSP tour on all demand locations, and 2Q∑u∈Vd(r,u)⋅qu. Similar constant factor approximation algorithms [15] are also known for the CVRP with
multiple depots which was defined in the introduction.

The k median problem is a widely studied location problem and has many constant factor approximation algorithms.
Starting with the LP-rounding algorithm of [6], the primal-dual approach was used in [11], and also
local search [3]. A simpler analysis of the local search algorithm was given in [7]; we make use of
this in our proof for the k median forest problem. Several variants of k median have also been studied. One that is
relevant to us is the matroid median problem [12], where the set of open centers are constrained to be
independent in some matroid; our approximation algorithm for the non-uniform k median forest problem is based on this
approach.

Recently [9] studied (among other problems) a facility-location variant of CVRP: there are opening costs for
depots and the goal is to open a set of depots and find vehicle routes so as to minimize the sum of opening and routing
costs. The k-LocVRP problem in this paper can be thought of as the k-median variant of [9]. In [9] the
authors give a 4.38-approximation algorithm for facility-location CVRP. Following an approach similar to [9]
one can obtain a bicriteria approximation algorithm for k-LocVRP, where more than k depots are opened. However more work
is needed to obtain a true approximation, and this is where we need an algorithm for the k median forest problem.

Here we show that the k-LocVRP problem can be reduced to k median forest at the loss of a constant approximation factor.
This makes use of known lower bounds for CVRP [8, 15, 9].

For any S⊆V, let Flow(S):=2Q∑u∈Vqu⋅d(u,S) and Tree(S)=d(MST(V/S)) be the
length of the minimum spanning tree in the metric obtained by contracting S. The following theorem is implicit in
previous work [8, 15, 9]; this uses a natural MST splitting algorithm.

Given any instance of CVRP on metric (V,d) with demands {qu}u∈V, vehicle capacity Q and depots S⊆V,

The optimal value (of the split-delivery CVRP) is at least max{Flow(S),Tree(S)}.

There is a polynomial time algorithm that computes an unsplit-delivery solution of length at most 2⋅Flow(S)+2⋅Tree(S).

Based on this it is clear that the optimal value of the CVRP instance given depot positions S is roughly given by
Flow(S)+Tree(S), which is similar to the k median forest objective. The following lemma formalizes this reduction. We will
assume an algorithm for the k median forest problem with vertex-weights {qu:u∈V}, where the objective becomes
∑u∈Vqu⋅d(u,S)+ρ⋅d(MST(V/S)).

Lemma 5

If there is a β-approximation algorithm for k median forest then there is a 4β-approximation algorithm
for k-LocVRP.

Proof: Let Opt denote the optimal value of the k-LocVRP instance. Using the lower bound in Theorem 4,

Thus the optimal value of
the k median forest instance is at most Q2ϵ⋅Opt. Let Salg denote the solution found by the
β-approximation algorithm for k median forest. It follows that |Salg|=k and:

ϵ⋅Flow(Salg)+(1−ϵ)⋅Tree(Salg)≤β⋅Opt

(1)

For the k-LocVRP instance, we locate the depots at Salg. Using Theorem 4, the cost of the resulting vehicle routing
solution is at most 2⋅Flow(Salg)+2⋅Tree(Salg)=4⋅[ϵ⋅Flow(Salg)+(1−ϵ)⋅Tree(Salg)] where we set ϵ=1/2. From Inequality (1) it follows
that our algorithm is a 4β-approximation algorithm for k-LocVRP.
■

We remark that this reduction already gives us a constant factor bicriteria approximation algorithm for k-LocVRP as
follows. Let Smed denote an approximate solution to k-median on metric (V,d) with vertex-weights {qu:u∈V}, which can be obtained by directly using a k-median algorithm [3]. Let Smst denote the optimal
solution to minS:|S|≤kd(MST(V/S)), which can be obtained using the greedy MST algorithm. We output
Sbi=Smed⋃Smst as a solution to k-LocVRP, along with the vehicle routes obtained from
Theorem 4 applied to Sbi. Note that |Sbi|≤2k, so we open at most 2k depots. Moreover, if
S∗ denotes the location of depots in the optimal solution to k-LocVRP then:

Flow(Smed)≤(3+δ)⋅Flow(S∗) since we used a (3+δ)-approximation algorithm for
k-median [3].

Tree(Smst)≤Tree(S∗) since Smst is an optimal solution to the MST part of the objective.

Clearly Flow(Sbi)≤Flow(Smed) and Tree(Sbi)≤Tree(Smst), so:

12⋅Flow(Sbi)+12⋅Tree(Sbi)≤3+δ2⋅[Flow(S∗)+Tree(S∗)]≤(3+δ)⋅Opt

Using Theorem 4 the cost of the CVRP solution
with depots Sbi is at most 4(3+δ)⋅Opt. So this gives a (12+δ,2) bicriteria approximation
algorithm for k-LocVRP, where δ>0 is any fixed constant. We note that this approach combined with algorithms for
facility-location and Steiner tree immediately gives a constant factor approximation for the facility location CVRP
considered in [9]. The algorithm in that paper [9] has to do some more work in order to get a
sharper constant. For k-LocVRP this approach clearly does not give any true approximation ratio, and for this purpose we
give an algorithm for k median forest.

The input to k median forest consists of a metric (V,d), vertex-weights {qu}u∈V and bound k. The
goal is to find S⊆V with |S|=k minimizing:

Φ(S)=∑u∈Vqu⋅d(u,S)+d(MST(V/S)),

where d(u,S)=minw∈Sd(u,w) and MST(V/S) is a minimum spanning tree in the graph obtained by contracting S
to a single vertex. Note that this is slightly more general than the definition in Section 1 (which is
the special case when qu=1/ρ for all u∈V).

We analyze the natural t-swap local search for this problem, for any constant t. Starting at an arbitrary solution
L consisting of k centers do the following until no improvement is possible: if there exists D⊆L and A⊆V∖L with |D|=|A|≤t and Φ(L∖D⋃A)<Φ(L) then L←L∖D⋃A.
Clearly each local step can be performed in nO(t) time which is polynomial for fixed t. The number of iterations
to reach a local optimum may be super-polynomial; however this can be made polynomial by the standard
method [3] of performing a local move only if the cost Φ reduces by some 1+1poly(n) factor.
Here we omit this (minor) detail and bound the local optimum under the swaps as defined above.

Let F⊆V denote the local optimum solution (under t-swaps) and F∗⊆V the global optimum. Note that
|F|=|F∗|=k. Define map η:F∗→F as η(w)=argminv∈Fd(w,v) for all w∈F∗. For any
S⊆V, let Med(S):=∑u∈Vqu⋅d(u,S), and Tree(S)=d(MST(V/S)) be the length of the minimum
spanning tree in the metric obtained by contracting S; so Φ(S)=Med(S)+Tree(S). For any D⊆F and A⊆V∖F with |D|=|A|≤t we refer to the swap F−D+A as a “(D,A) swap”. We use the following swap
construction from [7] for the k-median problem.

For any F,F∗⊆V with |F|=|F∗|=k, there are partitions {Fi}ℓi=1 of F and {F∗i}ℓi=1
of F∗ such that |Fi|=|F∗i|∀i∈[ℓ]; and there is a unique ci∈Fi (for each i∈[ℓ])
with η(w)=ci for all w∈F∗i and η−1(v)=∅ for all v∈Fi∖{ci}. Define set
S of t-swaps with multipliers {α(s):s∈S} as:

For any i∈[ℓ], if |Fi|≤t then swap (Fi,F∗i)∈S with α(Fi,F∗i)=1.

For any i∈[ℓ], if |Fi|>t then for each a∈F∗i and b∈Fi∖{ci} swap (b,a)∈S with α(b,a)=1|Fi|−1.

Then we have:

∑(D,A)∈Sα(D,A)⋅(Med(F−D+A)−Med(F))≤(3+2/t)⋅Med(F∗)−Med(F).

For each w∈F∗, the extent to which w is added ∑(D,A)∈S:w∈Aα(D,A)=1.

For each v∈F, the extent to which v is dropped ∑(D,A)∈S:v∈Dα(D,A)≤1+1t.

We use the same set S of swaps for the k median forest problem and will show the following:

∑(D,A)∈Sα(D,A)⋅(Tree(F−D+A)−Tree(F))≤(3+2/t)⋅Tree(F∗)−Tree(F)

(2)

Combined with the similar inequality in Theorem 6 (for Med) and using local optimality of F, we
would obtain the main result of this section:

Theorem 7

The t-swap local search algorithm for k median forest is a (3+2t)-approximation.

It remains to prove (2), which we do in the rest of the section. Consider a graph H which is the
complete graph on vertices V⋃{r} (for a new vertex r). If E=(V2) denotes the edges in the metric,
H has edges E⋃{(r,v):v∈V}; the edges {(r,v):v∈V} are called root-edges and edges
E are true-edges. Let M denote the spanning tree of H consisting of edges MST(V/F)⋃{(r,v):v∈F}; similarly M∗ is the spanning tree MST(V/F∗)⋃{(r,v):v∈F∗}. For ease of notation, for
any subset S⊆V, when it is clear from context we will use S to also denote the set {(r,v):v∈S} of
root-edges. We start with the following exchange property (which holds more generally for any matroid), see
Equation (42.15) in Schrijver [18].

Given two spanning trees T1 and T2 in a graph H and a partition {T1(i)}pi=1 of the edges of T1,
there exists a partition {T2(i)}pi=1 of edges of T2 such that (T2∖T2(i))⋃T1(i) is a
spanning tree in H for each i∈[p]. (This also implies |T2(i)|=|T1(i)| for all i∈[p]).

Figure 1: The partitions used in local search proof (eg. has k=8 and t=2).

We will apply Theorem 8 on trees M∗ and M. Throughout, M∗ and M represent the corresponding
edge-sets. Recall the partition F∗0:={F∗i}ℓi=1 of F∗ from Theorem 6; we refine
F∗0 by splitting parts of size larger than t into singletons, and let F∗ denote the resulting partition (see
Figure 1). The reason behind splitting the large parts of {F∗i}ℓi=1 is to ensure the
following property (recall swaps S from Theorem 6).

Claim 9

For each swap (D,A)∈S, A⊆F∗ appears as a part in F∗. Moreover, for each part A′ in F∗ there is
some swap (D′,A′)∈S.

Consider the partition P∗ of M∗ with parts F∗⋃{e}e∈M∗∖F∗, i.e. each true edge lies
in a singleton part and the root edges form the partition F∗ defined above. Let P denote the partition of M obtained by applying Theorem 8 with partition P∗ of M∗; note also
that there is a pairing between parts of P and P∗. Let M′⊆M∩E denote the true edges of M that
are paired with true edges of M∗; and M′′=(M∩E)∖M′ are the remaining true edges of M (see also
Figure 1). We will bound the cost of M′ and M′′ separately.

Claim 10

∑e∈M′de≤∑h∈E∩M∗dh.

Proof: Fix any e∈M′. By the definition of M′ it follows that there is an h∈E∩M∗
such that part {h} in P∗ is paired with part {e} in P. In particular, M−e+h is a spanning tree in
H. Note that the root edges in M−e+h are exactly F, and so M−e+h is a spanning tree in the original metric
graph (V,E) when we contract vertices F. Since M=MST(V/F) is the minimum such tree, we have d(M)−de+dh≥d(M) or de≤dh. Summing over all e∈M′ and observing that each edge h∈E∩M∗ can be paired with at
most one e∈M′, we obtain the claim. ■

Consider the connected components (in fact a forest) induced by true-edges of M: for each f∈F let Cf⊆V
denote the vertices connected to f. Note that {Cf:f∈F} partitions V.

Now consider the forest induced by true edges of M∗ (i.e. E∩M∗) and direct each edge towards an F∗-vertex
(note that each tree in this forest contains exactly one F∗-vertex). Observe that each vertex v∈V∖F∗
has exactly one out-edge σv, and F∗-vertices have none.

For each f∈F, define Tf:={σv:v∈Cf} the set of out-edges from Cf.

Claim 11

∑f∈Fd(Tf)=d(E∩M∗).

Proof: It is clear that {Tf}f∈F partitions E∩M∗. ■

We are now ready to bound the increase in the Tree cost under swaps S. By Claim 9 it follows
that for each swap (D,A)∈S, A is a part in F∗ (and so in P∗); define EA as the true-edges of M
(possibly empty) that are paired with the part A of P∗.

Claim 12

{EA:(D,A)∈S} is a partition of M′′.

Proof:
Consider the partition P of M given by Theorem 8 applied to P∗. By definition, M′⊆E∩M are the true edges of M paired (by P and P∗) with true edges of M∗; and M′′=(E∩M)∖M′ are
paired with parts from F∗ (i.e. root edges of M∗). For each part π∈F∗ (and also P∗) let E(π)⊆M′′ denote the M′′-edges paired with π. It follows that {E(π):π∈F∗} partitions M′′. Using the
second fact in Claim 9 and the definition EAs, we have {EA:(D,A)∈S}={E(π):π∈F∗}, a partition of M′′.
■

We prove the following key lemma.

Lemma 13

For each swap (D,A)∈S, Tree(F−D+A)−Tree(F)≤2⋅∑f∈Dd(Tf)−d(EA).

Proof:
By Claim 9, A⊆F∗ is a part in P∗. Recall that EA denotes the true-edges of M paired
with A; let FA denote the root-edges of M paired with A. Then using Theorem 8 it follows that
(M∖EA∖FA)⋃A is a spanning tree in H. Hence SA:=(E∩M)∖EA is a forest
with each component containing some vertex from F∪A; for any f∈F∪A let C′f denote vertices in the
component containing f.
In other words, SA connects connects each vertex to some vertex of F∪A.

Consider the edge set S′A:=SA⋃f∈DTf. We will add some edges N so that S′A⋃N connects
each D-vertex to some vertex of F−D+A. Since SA already connects all vertices to F∪A, it would follow that
S′A⋃N connects all vertices to F−D+A, i.e.

Tree(F+A−D)≤d(S′A)+d(N)≤Tree(F)−d(EA)+∑f∈Dd(Tf)+d(N).

To prove the lemma it now suffices to construct a set N with d(N)≤∑f∈Dd(Tf), such that S′A⋃N connects each D-vertex to F−D+A. Below, for any V′⊆V we use δ(V′) to denote the edges of S′A
between V′ and V∖V′.

Constructing N

Consider any minimal U⊆D such that δ(⋃f∈UC′f)=∅; recall that C′s are
the connected components of SA⊆S′A. By minimality of U, it follows that ⋃f∈UC′f is connected
in S′A. We now prove two simple claims:

Claim 14

Claim 15

There exists f∗∈F∗⋂(⋃f∈UC′f) and f′∈U such that ⋃f∈UTf
contains a path between f′ and f∗.

Proof: Let any f′∈U. Consider the directed path P from f′ obtained by following out-edges σ until the first
occurrence of a vertex v∈F∗ or v∈V∖(⋃f∈UC′f). Since F∗-vertices are
the only ones with no out-edge σ, and {σw:w∈V}=E∩M∗ is acyclic, there must exist such a
vertex v∈F∗⋃(V∖(⋃f∈UC′f)). Observe that C′f⊆Cf for
all f∈D⊇U; recall that Cs (resp. C′s) are the connected components in M (resp. SA⊆M). So
P⊆{σw:w∈⋃f∈UC′f}⊆{σw:w∈⋃f∈UCf}=⋃f∈UTf.
Suppose that vertex v∉F∗, then v∈V∖(⋃f∈UC′f) which implies
δ(⋃f∈UC′f)≠∅ since path P⊆S′A leaves ⋃f∈UC′f. So we
have v∈F∗⋂(⋃f∈UC′f) and P⊆⋃f∈UTf is a path from f′ to v.
■

Consider f∗ and f′ as given Claim 15. If f∗∈A then the component ⋃f∈UC′f of
S′A is already connected to F−D+A. Otherwise by Claim 14 we have η(f∗)∉D; in this
case we add edge (f∗,η(f∗)) to N which connects component ⋃f∈UC′f to η(f∗)∈F−D⊆F−D+A. Now using Claim 15, d(f∗,η(f∗))≤d(f∗,f′)≤∑f∈Ud(Tf).1
In either case, U is connected to F−D+A in S′A⋃N, and cost of N increases by at most ∑f∈Ud(Tf).

We apply the above argument to every minimalU⊆D with δ(⋃f∈UC′f)=∅.
The increase in cost of N due to each such U is at most ∑f∈Ud(Tf). Since such minimal sets Us are
disjoint, we have d(N)≤∑f∈Dd(Tf). Clearly S′A⋃N connects each D-vertex to F−D+A.
■

Using this lemma for each (D,A)∈S weighted by α(D,A) (from Theorem 6) and adding,

∑(D,A)∈Sα(D,A)⋅[Tree(F−D+A)−Tree(F)]

(3)

≤

2⋅∑(D,A)∈Sα(D,A)⋅∑f∈Dd(Tf)−∑(D,A)∈Sα(D,A)⋅d(EA)

=

2∑f∈F⎛⎝∑(D,A)∈S:f∈Dα(D,A)⎞⎠⋅d(Tf)−∑e∈M′′⎛⎝∑(D,A)∈S:e∈EAα(D,A)⎞⎠⋅de

(4)

≤

2(1+1t)∑f∈Fd(Tf)−∑e∈M′′de

(5)

=

2(1+1t)⋅d(E∩M∗)−d(M′′)

(6)

Above (3) is by Lemma 13, (4) is by interchanging summations using the
fact that EA⊆M′′ (for all (D,A)∈S) from Claim 12. The first term in (5) uses
the property in Theorem 6 that each f∈F is dropped (i.e. f∈D) to extent at most 1+1t;
the second term uses the property in Theorem 6 that each f∗∈F∗ is added to extent one in S and Claim 12. Finally (6) is by Claim 11.

In this section we study the following extension of k median forest. There is a set of vertices V with weights
{qu}u∈V, two metrics d and c defined on V, and a bound k. The goal is to find S⊆V with |S|=k
minimizing ∑u∈Vqu⋅d(u,S)+c(MST(V/S)). Here MST(V/S) is a minimum
spanning tree in the graph obtained by contracting S to a single vertex under metric c. The difference from the
k median forest problem is that the cost functions for the k-median and MST parts in the objective are different.

It is natural to consider the local search algorithm in this setting as well, since local search achieves good
approximations for both k-median and MST. However the next lemma shows that the locality gap is unbounded even if we
allow multiple swaps. The example is similar to the locality gap in [12].

Lemma 16

The locality gap of non-uniform k median forest with multi-swaps is unbounded.

Proof:
Fix values M≫w≫1. Let V={ui,j:i∈[k],j∈{1,2}}, so |V|=2k. Define vertex-weights
as follows: q(uk,2)=1 and all other vertices have weight w. The metric d for the k-median part is:

d(x,y)={0 if either x=y or {x,y}={ui,2,ui+1,1} for some i∈[k−1]1 otherwise

The second metric c for the MST part of the objective is:

c(x,y)={0 if either x=y or {x,y}={ui,1,ui,2} for some i∈[k]M otherwise

Observe that for any S⊆V with |S|=k, we have c(MST(V/S))<M iff |S⋂{ui,1,ui,2}|=1 for all
i∈[k]. So the non-uniform k median forest objective is smaller than M only if |S⋂{ui,1,ui,2}|=1,∀i∈[k].

We claim that the optimal value is at most one. Consider the solution S∗={ui,1}ki=1. It is clear that
c(MST(V/S∗))=0. Moreover, ∑u∈Vq(u)⋅d(u,S∗)=1 with vertex uk,2 being the only contributor.

We now claim that the solution L={ui,2}ki=1 is locally optimal under even (k−1)-swaps. First, observe that
c(MST(V/L))=0 and ∑u∈Vq(u)⋅d(u,S∗)=w with vertex u1,1 being the only contributor. So L has
objective value of w. Secondly, notice that every solution S obtained by some (k−1)-swap of L has either
MST-objective of M or median-objective of w. Thus L is a local optimum and the locality gap is w≫1.
■

We remark that the near-optimality proof of local search in the previous section only requires the following
consistency property between the two metrics: for any pair e,f of edges de≤df⟹ce≤cf. In spite of
the large locality gap, we show that non-uniform k median forest admits a constant factor approximation algorithm via an LP
approach.

The algorithm.

We make use of the following natural LP relaxation for non-uniform k median forest. The variables yv denote the probability
of locating a depot at v; xuv denotes the extent to which vertex u is connected to a depot at v (for the
k-median part); and ze denotes the extent to which edge e is used in the MST part of the objective. Also
E=(V2) is the set of all edges in the metric. Define H to be the complete graph on vertices V⋃{r}
(for a new vertex r) with edges E⋃{(r,v):v∈V}.

minimize ∑u∈Vqu⋅∑v∈Vd(u,v)xuv

+∑e∈Ece⋅ze

($\mathsf{LP}$)

subject to ∑v∈Vxuv

=1

∀u∈V

(7)

xuv

≤yv

∀u∈V,v∈V

(8)

∑v∈Vyv

≤k

(9)

(y,z)

∈SP(H)

(10)

xuv,yv,ze

≥0

∀u,v∈V,∀e∈E

(11)

Above SP(H) denotes the spanning tree polytope of graph H, which admits a linear description in terms of its edge
variables; see eg. [18]. Also (y,z)∈SP(H) corresponds to the fractional spanning tree in H with
values ze on edges e∈E and value yv on each edge (r,v). It can be checked directly that this is a valid
relaxation of non-uniform k median forest. Moreover this LP can be solved exactly in polynomial time to obtain solution
(x∗,y∗,z∗) using the Ellipsoid algorithm.

We now describe the rounding procedure. Let I denote the instance of k median forest and LPmed=∑u∈V∑v∈Vd(u,v)x∗uv denote the median part of the optimal LP solution. Apply Stage I of the rounding algorithm
in [12] to modify variables x∗ to ¯¯¯x (here y∗ and z∗ remain unchanged), with the
following properties:

Set R⊆V of representatives with weights wu for each u∈R, which defines a new instance M of non-uniform k median forest (the weights of
vertices in V∖R are zero).

Any solution to the new instance M with objective C is a solution to the original instance I having
objective at most C+4LPmed.

(¯¯¯x,y∗,z∗) is feasible for LP(M).

Disjoint collection of subsets {P(u)⊆V}u∈R with ∑v∈P(u)yv≥12 for all u∈R.

Collection of pseudoroots {(ai,bi)∈(R2)}ti=1 with each representative in at
most one pseudoroot.

Map σ:R→R where σ(u) lies in a pseudoroot for each u∈R.

Each u∈R is connected (under ¯¯¯x) only to P(u)∪{σ(u)}.

∑u∈Rwu⋅[∑v∈P(u)du,v⋅¯¯¯xu,v+du,σ(u)⋅(1−∑v∈P(u)¯¯¯xu,v)]≤4⋅LPmed.

Now apply the LP reformulation from Stage II in [12] to eliminate x-variables in LP, using the above
structure of (¯¯¯x,y,z), and obtain: