Simultaneous Source Location

. We consider the problem of Simultaneous Source Location { selecting locations for sources in a capacitated graph such that a given set of demands can be satis(cid:12)ed. We give an exact algorithm for trees and show how this can be combined with a result of R(cid:127)acke to give a solution that exceeds edge capacities by at most O (log 2 n log log n ), where n is the number of nodes. On graphs of bounded treewidth, we show the problem is still NP-Hard, but we are able to give a PTAS with at most O (1+ (cid:15) ) violation of the capacities, or a ( k +1)-approximation with exact capacities, where k is the treewidth and (cid:15) can be made arbitrarily small.


Introduction
Suppose we are given a capacitated network and we have various demands for service within this network.We would like to select locations for servers in order to satisfy this demand.Such problems arise naturally in a variety of scenarios.One example of this would be the placement of web caches in the Internet, or file servers in an intranet.Another example would be choosing the locations of warehouses in a distribution network.
What does it mean for a server to "serve" a demand?Most previous work has assumed that each server can service each demand for some cost (typically this cost is linear in some underlying distance between server and demand) [20,16,3].In some cases the servers have been considered to be capacitated (each one can provide for only some number of demands) [17].Still, the primary goal can be considered as minimizing the aggregate distance of demands to servers.
In many natural applications, there is no meaningful notion of distance.Consider serving a web page across the internet.The latency (travel time of a single small packet) under low-congestion conditions tends not to be noticeable to the end-users.The real difficulty here is the underlying capacity of the network.If links become congested, then latency will increase and throughput will suffer.In the case of a distribution network, there may be some relation (typically nonlinear) of costs to distance traveled.But we will definitely have to consider the available throughput!The transportation network has capacities as well as costs, and previous work (assuming costs only) tended to ignore this constraint except at the warehouses themselves.
We consider the problem of Simultaneous Source Location (SSL) -selecting locations for sources in a capacitated network in order to satisfy given demands.Our goal is to minimize the number of sources used.Arata et al. previously gave an exact algorithm for the Source Location problem, in the scenario where the sources must be able to satisfy any single demand [2].They also show that the Source Location problem is NP-hard with arbitrary vertex costs.In our problem we must satisfy all demands simultaneously (thus the name Simultaneous Source Location).This is a better model of the natural problems described above.Simultaneous Source Location is easier than the Source Location problem with arbitrary vertex costs explored by Arata et al. -our version of the problem can be reduced to theirs using a high-cost super-sink that is satisfied if and only if all other demands are met.However, we show that our version of the problem is NP-Hard as well and describe various approximations for it.
Our results take several forms.We describe techniques for solving Simultaneous Source Location on a variety of simple graphs.We give an exact algorithm on trees and an approximation for graphs of bounded treewidth.We observe that, in contrast to many other NP-Hard problems (for example vertex cover), Simultaneous Source Location is still NP-Hard even on graphs of treewidth two.Using our algorithm for trees combined with a result of Räcke et al. [18,6] and later Harrelson et al. [11], we show how to solve source location on a general undirected graph while overflowing the capacity by an O(log 2 n log log n) factor.Combining this with a hardness result for directed graphs allows us to show that no tree decomposition similar to Räcke's decomposition can be found in the directed case.We show Simultaneous Source Location is at least hard on general undirected graphs, but there remains a significant gap between the best approximation algorithm and the known lower bound.

Problem Statement
An instance of Simultaneous Source Location (SSL) consists of a graph G = (V, E) along with a capacity function u : E → R + on the edges and a demand function d : V → R + on the vertices.We must select some subset of the vertices S ⊆ V to act as sources.A source set is considered to be feasible if there exists a flow originating from the nodes S that simultaneously supplies demand d v to each node v ∈ V without violating the capacity constraints.This is single-commodity flow -we can imagine adding a single "super-source" that is connected to each node of S with an infinite capacity edge, and a single "supersink" that is connected to each node of V with an edge of capacity d v , and asking whether the maximum flow equals the sum of the demands.Our goal is to select such a source set S of the smallest size.
From the above description, it is clear that the problem is in NP.A source set S can be checked for feasibility by simply solving a flow problem.Unfortunately, finding the set S of minimum size is NP-Hard.
At times we consider various generalizations of this problem.For example, we might have certain nodes in V that are not permitted to act as sources, or have costs associated with making various nodes sources and seek to find a set S of minimum cost.We will also consider simplifications of the problem that place restrictions on the graph G (for example by bounding the treewidth).

Solving Simultaneous Source Location on Trees
Suppose our graph G = (V, E) is a tree.This special case allows us to solve SSL exactly by dynamic programming.For each vertex v and number of sources i, we define f (v, i) to be the amount of flow that must be sent to v by its parent in order to satisfy all demands in the subtree of v, assuming this subtree contains i sources.Our algorithm assumes that the tree is rooted and binary; in general we can create an equivalent binary tree by creating virtual nodes and connecting them by edges of infinite capacity, as shown in Figure 2.For convenience, for each node v we define u(v) to be the capacity of the edge from v to its parent.
Our algorithm is described in Figure 1.
Algorithm BinaryTree(G, d) for all i ≥ 1. 3. Consider any vertex v with children v1, v2 for whom f has been computed: (a) Loop over all values of i1 and i2 with 0 4. Continue until f is defined at all vertices.5.Return the minimum k such that f (r, k) ≤ 0 where r is the root.Assuming that the above algorithm computes f (v, i) correctly for each vertex, the correctness of the result is immediate.We need to show that f (v, i) correctly represents the minimum amount of flow that must be sent from the parent of v provided the number of sources in the subtree is i.
Theorem 1.The algorithm described produces an exact solution to the source location problem on a binary tree.
Proof.The proof will be by induction.Our base case is at the leaves.Either a leaf is a source or it is not.If the leaf v is a source, then it requires no flow from its parent, and can send at most u(v) flow upwards along its edge.This yields f (v, 1) = −u(v).On the other hand, if the leaf is not a source it requires flow d v (its demand) from the parent, so f (v, 0) = d v .Of course, it might not be feasible to send this amount of demand if d v > u(v).
We now consider any node v. Suppose we have correctly computed f (v 1 , i 1 ) and f (v 2 , i 2 ) for all values i 1 , i 2 for the children of node v. Suppose we would like to compute f (v, i).There are i sources to be placed in this subtree.If v is not a source itself, then all the sources are in the child trees.The total demand sent into v will have to be enough to satisfy the demand d v and additionally to satisfy any residual demand on the children.This means where the minimum is over choices of i 1 and the "max" term ensures that a child node cannot provide more flow to its parent than the capacity of their connecting edge.This is exactly what will be computed in the algorithm, in step 3b(i).Notice that if satisfying either child tree in this way would require overflowing a capacity u(v 1 ) or u(v 2 ) then this allocation of sources to subtrees is not feasible and so should not be considered; this is resolved in step 3b.However, it is also possible that v is itself a source.In this case, provided there is some choice of i ), we will be able to produce a solution.This solution can send u(v) upwards since v itself is a source.This is dealt with in step 3b(ii).It follows that the algorithm computes exactly the correct values f (v, i) and the algorithm solves SSL.
Theorem 2. We can solve SSL in time O(n 3 ) on a tree, even if some nodes are disallowed as sources.
If our tree is non-binary we can replace any node with more than two children by multiple nodes as shown in Figure 2.This increases the number of nodes by at most a constant factor.
Fig. 2. By adding additional nodes linked by infinite capacity, we can convert any non-binary tree into an equivalent binary tree by only doubling the number of nodes in the tree.
We can also modify our algorithm to disallow certain nodes as sources.If a leaf v cannot be a source, then we ignore step 2b and instead set f (v, i) = d v for all i.If some higher node cannot be a source, then we remove step 3b(ii) for that node (this step considers the case where v is a source).The correctness proof is the same as before.

Using Räcke's Result
In recent work, Harold Räcke showed that for any undirected graph, it is possible to construct a tree which approximately captures the flow properties of the original graph [18].Later work [6,11] improved the result and described a polynomial-time algorithm to construct such a tree.The most recent result is stated more precisely in the following theorem: there exists a capacitated tree T = (V T , E T , u : E T → R + ) with the following properties: 1.The vertices of V are the leaves of T .2. For any multicommodity flow F which is feasible on G, there exists a flow of equal value between the corresponding leaves on T .3. For any flow F T feasible between the leaves of T , there is a feasible This gives us an approximation for the source location problem.We first construct a tree T as described above.We then solve SSL on the tree, permitting only the leaves to act as sources, using the algorithm of Section 3. We consider using the sources we have obtained on the original graph.We know there exists a flow F T on the tree from our selected source nodes which satisfies all the demands.It follows that 1  ρ F T is feasible on the graph.We conclude that if we violate the capacities by a factor of ρ = O(log 2 n log log n), then we have a feasible solution to source location.On the other hand, any feasible solution on the graph must also be feasible on the tree.This allows us to produce an exact solution (in terms of the number of sources) while increasing the capacities by O(log 2 n log log n).Theorem 4. We can produce an optimum (in terms of number of sources) solution to SSL in polynomial time, if we permit O(log 2 n log log n) stretch on the capacities.
Our results also have interesting implications for directed graphs.Consider the possibility of a Räcke-like representation of a directed graph by a tree, where the capacity on an edge when routing "upwards" might differ from the "downwards" capacity.Suppose such a thing existed, and could be computed in polynomial time, for some factor ρ.This would enable us to solve SSL exactly on directed graphs, while exceeding capacities by a factor of ρ.But this is NP-Hard, as will be shown in Section 6.2.Thus we have the following: Theorem 5.No Räcke-like decomposition of a directed graph into an ρ-approximately flow-conserving tree can be computed in polynomial time, for any value of ρ polynomial in n.
Note that our hardness result is a computational hardness result and assumes a tree-like structure decomposition.Azar et al. [5] have found an existential hardness result which is true for any decomposition, but their bound is weaker: 5 Simultaneous Source Location with Bounded Treewidth

Defining Treewidth
The notion of treewidth was introduced by Robertson and Seymour [19].Many problems that are in general intractable become polynomial-time solvable when restricted to graphs of bounded treewidth.Furthermore, many graphs arising from natural applications have bounded treewidth.A good survey on the topic is given by Bodlaender [7].Here is one of the many equivalent definitions of treewidth: with the following properties: 2. For any (u, v) ∈ E there exists some α ∈ V τ such that u, v ∈ f (α).
3. For any α, β, γ ∈ V τ where β lies along the path from α to γ, if for some x ∈ V we have x ∈ f (α) and x ∈ f (γ), then we must also have x ∈ f (β).
The above conditions essentially state that each tree vertex represents some subset of at most k graph vertices, each edge in the graph has its endpoints represented together in at least one of the tree vertices, and the set of tree vertices which represent a single graph vertex must form a contiguous subtree.
We observe that it is possible to produce such a tree decomposition for a graph of treewidth k in time linear in the number of nodes and vertices (but exponential in k).Assuming k is constant, we are able to produce a tree decomposition -and thereby implicitly detect graphs of constant treewidth -in polynomial time.In general, however, computing the treewidth of an arbitrary graph is NP-Hard.

Nice Decompositions
Bodlaender [8] also introduced the notion of a nice decomposition and proved that any tree decomposition of a graph can be transformed into a nice decomposition still of polynomial size.In a nice decomposition, each node α ∈ V τ has one of the following types: -A leaf node α has no children, and |f (α)| = 1 In addition, the nice decomposition has a root node ρ (which is a subtract node) with f (ρ) empty.

Approximation for Graphs of Bounded Treewidth
Suppose we are given a graph G = (V, E) with treewidth k, for which we would like to approximate the SSL problem.Our algorithm takes in some set of current sources S along with a graph (V, E) and returns a set S of sources which are feasible for the given graph.Our algorithm for this problem appears in Figure 3.
Algorithm SL(S, V, E) 1. Check whether the source set S is feasible for (V, E); if so return S 2. If not, find sets X and BX that have the following properties: (a Lemma 1. Assuming we are always able to find sets X and B X with the properties described, algorithm SL is a (k + 1)-approximation for the source location problem.
The prove is done by induction on the number of sources required by the optimum solution.
Of course, we still need to prove that we can always find the sets X, B X with the required properties in polynomial time.In a general graph, such a pair of sets might not even exist, but we will use the assumption of treewidth k to prove existence and the ability to find the sets in polynomial time.
Lemma 2. If the current set of sources S is not feasible for the graph G = (V, E) with treewidth k, then there exists a pair of sets X, B X with the required properties; furthermore, such a pair of sets can be found in polynomial time.
Proof.We produce a tree decomposition (τ, f ) of G.For each tree node α, we define τ α to be the subtree of τ rooted at α.We define f (τ α ) = β∈τα f (β).For each node α we will test whether S (V − f (τ α )) is a feasible set of sources.We find node α such that S (V − f (τ α )) is infeasible, but such that S (V − f (τ β )) is feasible for each child β of α.Note that such an α must exist; we simply travel upwards from the each leaf of the tree until we find one.We now consider returning X = f (τ α ) and B X = f (α).We will show that these sets satisfy the required properties.
Since the graph has treewidth k we know |B X | = |f (α)| ≤ k+1.Consider any (x, y) ∈ E with x ∈ X and y ∈ V − X.From the definition of treewidth, there must exist some node β with x, y ∈ f (β).Since y is not in f (τ α ) we conclude that β is not in τ α .On the other hand, there is some node γ ∈ τ α such that x ∈ f (γ) (this follows from x ∈ X).The path from γ to β must pass through α, so the treewidth definition implies x ∈ f (α) and therefore x ∈ B X as desired.The selection of α guarantees that S (V − X) is not a feasible source set.This leaves only the fourth condition for us to prove.
We consider the children of α.A pair of them γ 1 , γ 2 must have f (γ 1 ) f (γ 2 ) ∈ f (α) because of the contiguity property of tree decomposition.Thus the sets of nodes represented by the subtrees of the children can intersect only in the nodes of B X = f (α).We know that for each child γ, the set of nodes S (V − f (τ γ )) would be feasible.It follows that we can cover all the demand of f (τ γ ) using nodes of S and nodes external to the set.Since the children sets are disjoint except for nodes which we have declared to be sources, the flows to satisfy each child subtree are edge-disjoint; any flow from external nodes must also pass through B X , and we conclude that we can cover f (τ γ ) using S B X .It follows that we can cover all of X using the sources S B X , making S B X (V − X) a feasible source set for the entire graph.Theorem 6. Algorithm SL produces a k + 1-approximation to the SSL problem on a graph of treewidth k.

Bounded Treewidth with Capacity Stretch
We will describe an exact algorithm for the SSL problem on graphs of bounded treewidth.The running time of this algorithm will be exponential in the treewidth, and also depends polynomially on the maximum edge capacity.In the general case where the capacities may be large, we will use the technique of Appendix A to obtain a solution with 1 + stretch on the edge capacities.
Suppose we have found a nice tree decomposition (τ, f ).We will construct a set of vectors of dimension k + 3.Each vector has the following form: Here α ∈ V τ , 0 ≤ i ≤ |V |, and the f i are feasible flow values (we assume these are from a polynomially-bounded range of integers).Let S α = f (τ α )−f (α) represent the nodes represented by the subtree rooted at α minus the nodes of its boundary (the nodes of f (α) itself).A feasible vector represents the excess flow needed to be sent directly from the nodes of f (α) to S α to satisfy all the demand in S α if S α contains i sources.
We observe that if k is a constant and flow is polynomially-bounded, then the number of possible vectors is polynomial in size.We will determine which such vectors are feasible in polynomial time, then use this to solve SSL.Our algorithm is as follows: 1. Start with the empty set of feasible vectors.2. Consider each node α from the bottom up: -If α is a leaf, then add vector (α, 0, 0).
-If α is an add node with child β, then for each feasible vector for β, copy that vector for α, placing flow 0 in the new position corresponding to the additional node in f (α) − f (β).-If α is a merge node with children β, γ then for each pair of feasible vectors x β , x γ for the children, create a vector for α: x α = x β + x γ (adding the number of sources and the flows while changing the choice of node from V τ to α). -If α is a subtract node with child β, then consider each feasible vector For each such allocation we construct a vector x α whose number of sources is equal to x β and with flow value at a equal to the flow value in x β plus F (a).This corresponds to refusing to make b a source.We now consider making b a source.This corresponds to creating a vector x α with one more source than the vector x β .We set the flow value for a node a ∈ f (α) to be the flow value in x β minus u(b, a). 3. Now consider all vectors for the root node ρ.These are simply pairs (ρ, i) since f (ρ) is empty.We return the minimum value of i such that (ρ, i) is in the feasible set.This running time is polynomial assuming that F is polynomial and k is a constant.If the number of possible flow values is not polynomial, we can use the result of Appendix A to effectively reduce the number of flow values.This will cause us to exceed the graph capacities by a factor of 1 + .

Lower Bound for Treewidth 2 Graphs
We show that the SSL problem is NP-Hard even on graphs with treewidth two.Theorem 8. SSL is NP-Hard even on graphs with treewidth two.
Proof.The proof is by reduction from subset sum.We are given a set of numbers {x 1 , x 2 , . . ., x n }, and would like to determine whether some subset of the given inputs sums to A. Suppose the sum of all the numbers is S. We construct an SSL instance with 2n + 2 nodes.Each number will be represented by a pair of nodes of demand S with an edge of capacity S between them.Our example is a four level graph.On the first level we have a node of demand A which connects to one side of every pair of nodes that represent a number.The capacity on the edge between the A node and the number x i node is exactly x i .The number nodes from the second level are paired with the nodes from level 3.All nodes from level 3 are connected to a single node at level 4 with an edge of capacity corresponding to their number.The node at level 4 has demand S − A. This graph is shown in Figure 4.If there exists a subset of the numbers summing to A, then we can place sources on the lefthand node for each of the numbers in that subset and the righthand node for all the other numbers; it is straightforward to see that this is a feasible SSL making use of n sources.On the other hand, consider a SSL solution.We must select one of the two nodes for each of the numbers (otherwise there is not enough capacity to satisfy them).It follows that the SSL uses at least n sources.If exactly n sources are used, then the result corresponds to a subset sum solution.It follows that solving source location exactly on this graph will solve subset sum.The graph given has treewidth two; we can see this because if we remove the node of demand A, the remaining graph is a tree.We take the (treewidth one) tree decomposition and add the node of demand A to the subset f (α) for all α.This is a tree decomposition of width two.6 Simultaneous Source Location on Directed Graphs

Greedy O(log n) Approximation
We are given a directed graph G = (V, E) for which we would like to approximate the SSL problem.We propose a simple greedy algorithm.We start with no sources and no demand satisfied.We add the source which maximizes the increase in the total satisfied demand.We repeat this until all demand is satisfied.
Theorem 9.The greedy algorithm gives an O(log n) approximation on the number of sources with no violation of the capacities.
Proof.Suppose that the optimum solution uses t sources.At some point in time, suppose our current set of sources can cover demand d and the total demand in the graph is D. Consider the residual graph after adding the flows from our sources to satisfy demand d.The residual demand is D − d, and if we were to add all the optimum sources we would be able to satisfy the full residual demand (note that this is essentially single commodity flow since sources are equivalent).
It follows that we can add one source to the residual graph to satisfy demand We apply the standard greedy analysis for problems like SET COV ER to show that the full demand will be covered in O(log D) steps.Assuming that the maximum and minimum demand are within a polynomial factor of one another, we are done.Otherwise, we can apply scaling arguments of Appendix A to give the desired O(log n) factor.

Lower Bound for Directed Graphs
We show that O(log n) is the best approximation factor we can expect to obtain for the directed SSL problem in polynomial time, due to a reduction from set cover.
Theorem 10.We cannot approximate directed SSL to better than O(log n) in the worst case, unless N P ⊂ DT IM E(n O(log log n) ).
Proof.Suppose we would like to solve a set cover instance.We construct a graph with one node for each set, one node for each element, and one additional node.The additional node is connected by a directed edge of capacity one to each of the sets.Each set is connected by a directed edge of capacity N , where N is more than the sum of the number of sets and elements, to each of its elements.The additional node has demand one, each set has demand one, each element has demand N .We solve the SSL problem to some approximation factor ρ on this graph.We first observe that no element should be selected as a source; otherwise we could simply select one of the sets containing that element as a source instead.Second, we observe that the additional node will be selected as a source.We have a solution consisting of ρt nodes, where t is the optimum.Consider the set nodes that we selected as sources.Every element node must be connected to one of these set nodes in order for its demand to be satisfied (note N is greater than the number of sets).It follows that we have a set cover of size ρt − 1.Similarly, observe that any set cover, plus the additional node, forms a feasible SSL solution.So we have obtained a ρt−1 t−1 ≥ ρ approximation to set cover.This is unlikely for ρ smaller than log n due to the results of Feige [10].
We observe that even if we are allowed to violate edge capacities by some large factor (say less than N ), the reduction from set cover still holds.
We show that SSL does not have a polynomial-time approximation scheme via an approximation-preserving reduction from vertex cover.
Assume we can approximate SSL on any graph to a constant α.Now for an instance of Vertex Cover on a graph G=(V,E), we will setup an instance of SSL.For every vertex the demand is equal to its degree and all edge capacities are unit.
The main observation is that a vertex cover set and a source location set on this graph are equivalent.It is easy to see that a feasible vertex cover is a feasible source location: for every edge at least one end is in the vertex cover and therefore a source.Thus every vertex will have its demand satisfied.On the other hand a source location set can't have a two hop path over a non source vertex, because this vertex will be starved.Hence every edge has at least one end in the source location set, i.e. the source location set is a feasible vertex cover.
Using the assumption we can approximate the SSL problem on G. Therefore we find a set S⊂V which covers all edges in E and is within α of the optimal Vertex Cover.However as Hastad [12] showed Vertex Cover is inapproximate if α < 7/6 (although an approximation factor better than 2 would be a surprising improvement on existing vertex cover results).
Theorem 11.Simultaneous Source Location is 1.36067− hard on general undirected graphs if edge capacities are not violated.
The proof follows from the reduction above and the recent hardness results by Dinur and Safra [9].

Conclusions
We define the Simultaneous Source Location problem and solve the problem exactly on trees.We present a (1 + ) violation of the capacities PTAS for graphs of bounded treewidth.On general graphs we find a solution with exact number of sources which can exceed the capacities by at most a factor of O(log 2 n log log n).We show a O(log n) factor approximation on the number of sources with no violation of the capacities for general directed graphs.We believe that many interesting applications of this problem involve graphs of low treewidth; many of the connectivity graphs of real networks have been observed to have low tree width [8].
The main open problem is the approximability of SSL on undirected graphs of large treewidth.No constant approximation on the number of sources is known, even if we allow constant violation of the capacities.The only lower bound on approximability with exact capacities is 1.36067 − .An approximation factor asymptotically better than 2 would be a surprising improvement on existing vertex cover results [15].One can also consider adding costs on the edges and/or the vertices.
A Dealing with Super-Polynomial Capacities Some of our analyses assume that there are only a polynomial number of capacities.Here we present a method to extend those analyses to when the capacities are super-polynomial, allowing us to satisfy demands while exceeding capacities by a 1 + factor in those cases.
When capacities are super-polynomial, we express the flow and capacity of each edge as αF i for some value of i (which might be different from edge to edge) and some value of α which is between F and F 2 .This can be done by rounding every flow up to the nearest value.Once this is done, we might no longer have a feasible flow.The new capacities (which might be larger than the old capacities by a 1 + 1 F factor) will not be exceeded.However, flow conservation may no longer hold.Consider any node.If the original inflow was f then the outflow was f also.But it is possible that after this rounding upwards, the inflow is still f and the outflow has increased to f (1+ 1 F ).We consider such a flow to be feasible.This means that a node might effectively "generate" some amount of flow, but this amount is at most 1 F of the inflow.Now consider any graph with a feasible flow under the representation described above.We would like to transform this into a real flow.If we consider splitting the "generated" flow equally among outgoing edges, we will see that as flow passes through a node the percentage of "real" flow might decrease by a factor of F F +1 .In the worst case, some edge might have a fraction of "real" flow equal to ( F F +1 ) n ≥ 1 − n F .We let F = n .It follows that we can satisfy at least 1 − of each demand while exceeding capacities by a factor of 1 + n .Since we can scale the flows and capacities, this means we can satisfy the demands while exceeding capacities by 1 + factor.This is useful in bounding the running time and approximation factor of various techniques for approximating SSL.

Fig. 1 .
Fig. 1.Algorithm for SSL on a Binary Tree

Fig. 3 .
Fig. 3. Algorithm for SSL with treewidth k x β for the child.Let the subtracted node be b ∈ f (β) − f (α).This node requires some flow r b which is the sum of the demand d b and the flow value for b in x β .We consider all feasible allocations of flow F (a) to nodes a ∈ f (α) such that |F (a)| ≤ u(b, a) and a∈f (α) F (a) ≥ r b .

Theorem 7 .
If there are F possible flow values, the above BTW algorithm runs in time O(kn 2 N F 2k+2 ) where n = |V | and N = |V τ | and k is the treewidth.

Fig. 4 .
Fig. 4. Simultaneous Source Location is NP-Hard even on graphs of treewidth two.To satisfy each demand in this graph using only n sources we must find a partition of {x1, x2, . . ., xn} whose sums are A and S − A.