Submodular unsplittable flow on trees

We study the Unsplittable Flow problem (UFP\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {UFP}$$\end{document}) on trees with a submodular objective function. The input to this problem is a tree with edge capacities and a collection of tasks, each characterized by a source node, a sink node, and a demand. A subset of the tasks is feasible if the tasks can simultaneously send their demands from the source to the sink without violating the edge capacities. The goal is to select a feasible subset of the tasks that maximizes a submodular objective function. Our main result is an O(klogn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(k\log n)$$\end{document}-approximation algorithm for Submodular UFP on trees where k denotes the pathwidth of the given tree. Since every tree has pathwidth O(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(\log n)$$\end{document}, we obtain an O(log2n)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(\log ^2 n)$$\end{document} approximation for arbitrary trees. This is the first non-trivial approximation guarantee for the problem, matching the best known approximation ratio for UFP on trees with a linear objective function. Our main technical contribution is a new geometric relaxation for UFP on trees that builds on the recent work of Bonsma et al. (2014, FOCS), Anagnostopoulos et al. (Amazing 2+ϵ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon $$\end{document} approximation for unsplittable flow on a path, SIAM, pp 26–41, 2014) for UFP on paths with a linear objective. Our relaxation is very structured, so it can be combined with the contention resolution framework of Chekuri et al. (2009, STOC). Our approach is robust and extends to several related problems, such as UFP with bag constraints and the Storage Allocation Problem. Additionally, we study the special case of UFP on trees with a linear objective and upward instances where, for each task, the source node is a descendant of the sink node. Such instances generalize UFP on paths. We build on the work of Bansal et al. (A quasi-PTAS for unsplittable flow on line graphs, ACM, pp 721–729, 2006) for UFP on paths and obtain a QPTAS for upward instances when the input data is quasi-polynomially bounded. We complement this result by showing that, unlike the path setting, upward instances are APX\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {APX}$$\end{document}-hard if the input data is arbitrary.


Introduction
Submodular functions are a rich class of functions with many applications both in theory and in practice. On the theoretical side, submodularity is a key concept in combinatorial optimization and economics with deep mathematical consequences. On the practical side, submodular functions arise naturally in a variety of settings such as data summarization, sensor placement, inference in graphical models, image segmentation, social networks, auctions, and exemplar clustering [8,17,20,21,[23][24][25][26].
One of the main reasons for the success of submodularity is that it combines a significant modeling power with a certain degree of tractability. This delicate balance between generality and tractability has made submodular functions very appealing, and there has been a significant interest in optimizing submodular functions subject to a variety of constraints.
The traditional approach to submodular maximization makes extensive use of the classical Greedy algorithm of Nemhauser, Wolsey, and Fisher [27]. The Greedy algorithm and its continuous counterparts are well-suited for constraints such as cardinality, matroids, and knapsack, but they fail to handle other types of natural constraints. Thus there is an increasing need to develop algorithms for general constraints.
A major contribution in this direction comes from the work of Chekuri et al. [15] which has developed a powerful framework for submodular function maximization with general constraints. Their framework leverages the power of mathematical programming relaxations coupled with structured rounding schemes called contention resolution (CR) schemes. In particular, it unifies several previous results for special cases (e.g., matroids or knapsack constraints) and thus captures the types of con-straints for which we know how to optimize submodular functions. This has led to the following very interesting meta-question: For which type of constraints can we provide structured relaxations that admit good CR schemes?
In this paper, we address this question in the specific case of the unsplittable flow problem (UFP). In this setting, we are given an edge-capacitated, undirected graph and a collection of tasks; each task is specified by a source vertex, a sink vertex, and a demand. The goal is to select a maximum profit subset of the tasks that can be routed unsplittably, i.e., the task's demand is routed along a single path from the source to the sink subject to the edge capacities.
The problem is well-studied, and most of the results focus on linear objectives. Despite its apparent simplicity, already UFP on paths captures several well-studied problems, including the knapsack problem (when the graph is a single edge) and resource allocation problems.
UFP is quite challenging even on paths and trees, and one of the main reasons for the difficulty is the lack of LP relaxations with small integrality gaps. The natural LP relaxation for the problem has an (n) integrality gap even on paths [11], and standard approaches for strengthening the LP by adding valid inequalities fail to improve the integrality gap significantly [14]. Chekuri et al. [14] gave a novel LP relaxation for UFP on paths that strengthens the standard LP using clique type of constraints, and they showed that it has an O(log n) integrality gap. The relaxation of [14] can also be extended to trees, and understanding this relaxation has been an interesting and challenging open question. 1 The design of good relaxations for UFP is motivated not only by the goal of obtaining better approximations for linear objectives, but also by the need of handling more general constraints and objective functions. In particular, the current approaches for submodular objectives rely on structured relaxations with good CR schemes. As a result, there is a discrepancy between the approximation guarantees for linear and submodular objectives. There has been a long line of work for UFP on paths with a linear objective that led to a constant factor approximation [5,7]; these approaches combine the standard LP relaxation with dynamic programming techniques. Chekuri et al. [14] give a combinatorial greedy algorithm for UFP on trees with a linear objective that achieves an O(log 2 n) approximation. Chakaravarthy et al. [10] study the generalization of the UFP with a linear objective, called bagUFP, where tasks are partitioned into bags and a feasible solution is allowed to select at most one task per bag. They give O(log n) approximation algorithm for bagUFP on paths based on a primal-dual approach. Grandoni et al. [19] improve the approximation factor to O(log n/ log log n), and to O (1) in the uniform-weight setting. Note that bagUFP is a special case of UFP with a submodular objective. In general, for UFP with a submodular objective, an O(log n) approximation for paths can be easily obtained by combining the results of [14] and [15]. In contrast, no non-trivial approximation was known for trees prior to our work. Chekuri et al. [15] consider instances of submodular UFP on trees that satisfy a certain assumption, called the no-bottleneck assumption (NBA), 2 and they give a constant factor approximation for such instances. However, the no-bottleneck assumption is very restrictive and removing this restriction poses several technical challenges, particularly for the design of mathematical programming relaxations.
Thus, there has been an extensive work on UFP on paths but relatively fewer results on trees. Since UFP models the allocation of communication bandwidths in networks, we believe that it is worthwhile to develop a better understanding for more complex network topologies, such as trees. Also, submodular objective functions are much richer than linear objectives, and can model for instance linear objective functions with additional constraints.
Our contributions. We give the first approximation algorithm for submodular UFP on trees and the first relaxation with a matching integrality gap. Our algorithm achieves an approximation ratio of O(k log n) on trees with pathwidth k. As each tree has pathwidth O(log n), this gives an O(log 2 n)-approximation for arbitrary trees, matching the best known result for linear objective functions [14]. For several special cases of the problem, such as paths, spiders, and caterpillars, our approximation ratio improves to O(log n) (since in those cases k = O(1)), and such a ratio was not even known for linear objectives. Thus our result generalizes and improves the best approximations known for UFP on paths with a submodular objective and UFP on trees with a linear objective.
Theorem 1 There is a O(k·log n) approximation for Submodular UFP on trees, where k is the pathwidth of the tree and n is the number of nodes in the tree. Additionally, there is a polynomial-sized relaxation for the problem with a matching integrality gap.
We obtain our result via a new geometric LP relaxation for UFP on trees that is very different from the clique-based approach of [14]. Our relaxation builds on a powerful two-dimensional geometric viewpoint developed in the context of the UFP problem on paths with a linear objective [7]. This viewpoint connects UFP to structured instances of the Maximum Independent Set of Rectangles (MISR) problem [1,12,13], which in turn allows one to handle instances of UFP on paths for which the standard LP relaxation fails. The geometry was exploited to obtain a combinatorial algorithm for such instances that is based on dynamic programming. A related twodimensional visualization was used in [2], again as the basis of a dynamic program. These approaches, however, break down for submodular UFP on trees; in the twodimensional viewpoints, an input path corresponds to a subinterval of the x-axis and this is no longer meaningful for trees. Also, dynamic programming approaches are not suitable for submodular objective functions. In contrast to previous work, the focus in this paper is to translate these geometric insights to an LP relaxation for UFP on trees. We give a CR scheme for our relaxation that can be combined with the framework of [15] to obtain approximation guarantees for submodular objectives. The core of our reasoning is that our LP-formulation not only decides which tasks to select, but also computes a drawing of them as non-overlapping rectangles on suitable subpaths of the tree. Our LP is a polynomial-sized extended formulation and, to our knowledge, this is the first time that an extended formulation is used in the context of CR schemes.
A very important feature of the CR scheme framework is that it allows one to combine several constraints, thus extending the applicability of our approach to two generalized settings. First, in the Submodular Bag-UFP on trees problem, the input tasks are partitioned into bags and a feasible solution is allowed to select at most one task per bag [10]. 3 We obtain an O(k log n) approximation for Submodular Bag-UFP on trees of pathwidth k. Second, we obtain an O(log n) approximation for the Submodular Storage Allocation Problem on trees. This problem has the same input as UFP, with additional requirements that each selected task gets a private subinterval of width equal to the demand, contained in [0, u e ) for each edge e used by the task. We require these subintervals to be disjoint for any two tasks sharing an edge of the tree, intuitively enforcing each task to get a contiguous portion of the resource spectrum.
Finally, we round up our contributions with the following results for a special case of UFP on trees with a linear objective function. An instance of UFP on tree is an upward instance if the input tree is rooted and, for every task, the source node of the task is an ancestor of the sink node (or vice-versa).
Theorem 2 There is a (1 + ) approximation algorithm for upward instances of UFP on trees with running time n poly(log(n/ )) log(d max /d min ) . In particular, if the demands are quasi-polynomially bounded, this yields a QPTAS.
Unlike for UFP on paths [5], we show that the dependency of the running time on the term log(d max /d min ) can not be removed for upward instances of UFP on trees. In fact, assuming the Exponential Time Hypothesis (ETH), the running time of our approximation scheme is essentially tight. This illustrates an inherent distinction between paths and upward instances on trees. Also, this establishes the problem's status as a very rare problem that allows a QPTAS on quasi-polynomially bounded input but is APX-hard on general instances.

Theorem 3
There is a constant 0 such that for all δ > 0 any (1 + 0 )-approximation for upward instances of UFP on trees runs in time of at least n poly(log n) log 1−δ (d max /d min ) , unless ETH fails. Also, the problem is APX-hard.
Other related work. The problem of maximizing submodular functions subject to various constraints is very well-studied; we refer the reader to [15] for an overview. UFP with a linear objective is also extensively studied. The best approximation is a (2 + ε) approximation [2] and a QPTAS [4,6] for UFP on paths, and an O(log 2 n) approximation for UFP on trees [14].

Preliminaries
Formal problem definitions. The input of Unsplittable Flow problem on trees (UFPtree) consists of an undirected tree T = (V, E) with edge capacities u e ∈ Z + , and a set of tasks T . Each task i ∈ T is characterized by a start vertex s i ∈ V , an end vertex t i ∈ V , a demand d i ∈ Z + , and a profit w i ∈ Z + . For each task i ∈ T denote by p i the unique path between s i and t i in T . A subset of tasks T ⊆ T is said to be feasible if i∈T : p i e d i ≤ u e for each edge e ∈ E. The goal is to find a feasible solution maximizing w(T ):= i∈T w i .
The Submodular UFP-tree problem is a generalization of UFP-tree, where instead of a linear weight function w we are given a submodular objective function f : 2 T → R + and the goal is to select a feasible subset T ⊆ T maximizing f (T ).
for any two subsets A, B ⊆ T . We assume that f is given as a value oracle: In a unit of computational time, the algorithm may specify S ⊆ T and obtain the value f (S).
Path Decomposition and pathwidth. A path decomposition of a graph G is given by a collection X = {X 1 , X 2 , . . . , X m } satisfying -X i ⊆ V (G) for each i = 1, . . . , m. We refer to each set X i as a bag.
The pathwidth of a graph G is a minimum value k for which there exists a path decomposition X of G where for each bag X i ∈ X we have |X i | ≤ k + 1. Any tree has pathwidth of at most O(log n) [22].

Geometric relaxation for submodular UFP on trees
In this section, we present our O(k · log n) approximation algorithm for Submodular UFP-tree. We first describe a pseudo-polynomial sized LP relaxation for UFP-tree with a linear objective function. In Sect. 3.2, we show how to reduce the size of the LP to polynomial. In Sect. 3.3, we extend our algorithm to a submodular objective function.

A pseudo-polynomial sized relaxation
In the following, we give a geometric LP-relaxation for UFP-tree with a linear objective function. The relaxation has pseudo-polynomial size.
Reduction to intersecting instances. We reduce the general case to the case in which the path of each task contains the root of the tree. We call such instances intersecting instances. Chekuri et al. [14] showed that, via a standard centroid decomposition, we can reduce an arbitrary instance to a collection of intersecting instances at a loss of O(log n) in the approximation ratio.
Lemma 1 (Chekuri et al. [14]) Suppose that there is a polynomial time αapproximation for UFP-tree on intersecting instances. Then there is a polynomial time O(α · p log n) approximation algorithm for the problem on arbitrary trees. Moreover, this holds for the generalization of the problem in which the objective function is sub-additive. 4

Partitioning into paths
In the remainder of this section, we assume that we are given an intersecting instance on a tree T of pathwidth k. Our goal is to compute a O(k)-approximation for such instances, so that using Lemma 1 we obtain a O(k log n)-approximation for the general problem. First, we split a given tree into a collection P of paths such that each input task shares an edge with at most O(k) paths in P. Then, we define a new LP relaxation for the problem with a randomized rounding with alteration strategy. The relaxation will be based on a two-dimensional geometric viewpoint for each path in P.
For our path partition P we require that each path P ∈ P is an upward path, i.e., one endpoint of the path is an ancestor in T of the other endpoint. The following observation follows from the property of an intersecting instance.

Observation 1 For each task i and each upward path P, if i uses an edge of P then it uses the top edge of P.
Definition 1 Consider an intersecting instance I of UFP-tree on a rooted tree T . Let P = {P 1 , . . . , P } be a collection of paths in T . We say that P is a K -nice splitting for I if it has the following properties.
-The paths in P are edge-disjoint, upward, and they partition the edges of the tree T . -Each task of I uses an edge of at most K paths in P.
The next lemma shows the existence of a O(k)-nice splitting.

Lemma 2
Consider an intersecting instance I of UFP-tree on a rooted tree T of pathwidth k. There is a polynomial time algorithm that constructs an O(k)-nice splitting for I .
Proof Consider an intersecting instance I of UFP-tree on a rooted tree T of pathwidth k. Our algorithm will assign colors to the edges of T . For each color j, edges colored with j will form a path P j in the O(k)-nice splitting of T .
The algorithm is recursive and is applied to a subtree of the form T uv , where uv is The algorithm will color the edges of the subtree, and return an integer k uv which is the maximum number of colors in any root-to-leaf path of T uv . Now we describe the algorithm. If T uv contains only a single edge uv, then uv is given a color and k uv is set to 1. Otherwise uv has some children edges vv 1 , vv 2 , . . . , vv q (i.e., the children of v are v 1 , . . . , v q ), and we recursively color the subtrees T vv j for all j = 1, . . . , q. Assume that each subtree uses a distinct set of colors. Then we give the edge uv the same color as an edge vv j such that j maximizes k vv j . We set k uv to max j k vv j . The following claim is immediate. claim 1 When the algorithm finishes coloring a subtree T uv , edges of the same color form an upward path. Moreover, any root-to-leaf path in T uv contains edges from at most k uv color classes. Now we show that the number of colors used is proportional to k. In order to achieve this, we show that if we run the above algorithm on a subtree T uv and obtain k uv ≥ 3k for some positive integer k , then the pathwidth of the subtree T v (i.e., excluding the vertex u) is at least k .
We prove this by induction on k . Since the pathwidth is at least 1, the base case (for k = 1) holds. Now, let P be a collection of paths output by the algorithm, and Q a root-to-leaf path that intersects the maximum number of paths in P, where this number is at least 3k . We traverse the path Q = e 1 e 2 . . . e q from root to leaf. Then we must have k e 1 ≥ 3k and k e 1 ≥ k e 2 ≥ . . . ≥ k e q = 1. Due to the way we constructed our paths, since Q intersects the maximum number of paths in P we have that k e j−1 ≤ k e j + 1 for all j. Let e a be the edge on Q closest to the root for which k e a = 3k − 1. Our algorithm guarantees that its parent edge e a−1 must have another child edge e a such that k e a ≥ k e a = 3k − 1 (e a is the edge that obtains the same color as e a−1 ). Using the same argument, let e b and e c be the top-most edges on Q such that k e b = 3k − 2 and k e c = 3k − 3, respectively. Again, the algorithm guarantees that there are edges e b and e c with one endpoint at Q such that k e b ≥ 3k − 2 and k e c ≥ 3k − 3. The three subtrees T e a , T e b and T e c are disjoint, and they are "attached" to the path Q via edges e a , e b , e c respectively. Denote by T a , T b , T c the subtrees T e a , T e b and T e c excluding the edges e a , e b , e c , respectively.
By the induction hypothesis, each of T a , T b , T c has pathwidth at least k −1. Assume for contradiction that T v has pathwidth smaller than k , i.e., it has a path splitting Proof Assume that this does not hold for T a (the arguments are similar for T b and T c .) The decomposition X restricted to nodes in V (T a ) gives a path decomposition for T a of pathwidth less than k − 1, a contradiction. W.l.o.g. we can assume that a < b < c . Therefore, the set of vertices in the bag X b forms a vertex cut in T v separating the two components X a and X c . This is impossible, because T a and T c are connected in T v \V (T b ) via the path Q. We obtain a contradiction.

Geometric viewpoint
Let P = {P 1 , . . . , P } be an O(k)-nice splitting of the instance that is guaranteed by Lemma 2. We use P to write an LP relaxation for the problem, based on the following geometric viewpoint. For a path P ∈ P, let T P be the set of tasks from T using an edge of P. If we restrict the tasks in our instance to a path P in T , we get an instance of the Unsplittable Flow problem on paths (UFP-path) in a natural way. For each task i ∈ T P , the UFP-path instance has a corresponding task whose path is p i ∩ P. Notice that each task i ∈ T P uses the top edge of P, so we can assume w.l.o.g. that when traversing the edges of P from top to bottom, their capacities are non-increasing. We call this a one-sided staircase instance.
We claim that for such UFP-path instance on a path P, each feasible subset of the tasks can be represented as a collection of non-overlapping rectangles drawn underneath the capacity profile, such that each task i has a corresponding rectangle of height d i whose projection on P is the path of i. We interpret these rectangles as open sets and call such a drawing a representing drawing (see Fig. 1).

Lemma 3 Consider an instance of UFP-path on a path P in which all of the tasks use the first edge of P. Any feasible subset of the tasks admits a representing drawing.
Proof Let I be a feasible set of tasks for a path P, where each task i ∈ I uses the first edge of P. We can construct a drawing for I as follows. We order the tasks in a non-increasing order with respect to the length of p i ∩ P, breaking ties arbitrarily. We consider the tasks in this order and, for the current task j ∈ I , we assign a height h i = i< j d i . Each task i ∈ I corresponds to a rectangle whose projection on the height-axis is [h i , h i + d i ), and projection on P is p i ∩ P. It corresponds to placing the newly drawn rectangle on top of the rectangles we have drawn so far.
Clearly, these rectangles are pairwise non-overlapping. We now show that the rectangles are drawn underneath the capacity profile. Consider an edge e ∈ E, and let I e ⊆ I be the subset of tasks using e. Due to our ordering procedure, the tasks in I e are exactly the |I e | first tasks in I . Therefore the projection of all the corresponding rectangles on the height-axis is the interval [0, i∈I e d i ). That fits under the capacity profile, as u e ≥ i∈I :e∈ p i d i = i∈I e d i .

LP relaxation
Using this geometric viewpoint, we write an LP relaxation for intersecting instances of UFP-tree as follows. Recall that we have an O(k)-nice splitting P of the tree T . We add constraints to the relaxation to enforce that there is a representing drawing for the selected tasks on each path P ∈ P; we remark that these constraints will automatically enforce the capacity constraints.
Variables. The IP has the following variables. For each task i, we have a variable x i ∈ {0, 1} with the interpretation that x i = 1 if task i is in the solution. For each path P ∈ P, each task i ∈ T P , and each height h, we have a variable y(i, h, P) ∈ {0, 1} with the interpretation that y(i, h, P) = 1 if the rectangle for task i is drawn at height h in the representing drawing for P. The allowed heights h are the ones satisfying h + d i ≤ u e for each edge e ∈ p i ∩ P, i.e., such that the rectangle fits under the capacity profile. We introduce variables y(i, h, P) only for such heights.
Constraints. For each P ∈ P and each i ∈ T P , we have a constraint For each path P ∈ P, we add constraints enforcing that in the representing drawing for P the rectangles do not overlap, by imposing constraints that any point q underneath the capacity profile is covered by at most one rectangle. Since all tasks use the first edge of P, it suffices to consider only points q on a vertical line going through the first edge of P, i.e., points q = (x 0 , h) where x 0 is any x-coordinate strictly between the first and the second vertex of P and h is an integral height that is at most the capacity of the first edge of P. We use R(i, h, P) to denote a rectangle representing task i on P drawn at height h, i.e., R(i, h, P) is a rectangle of height d i , with a bottom y-coordinate h, and whose projection on the x-axis equal p i ∩ P. For each path P ∈ P and each point q = (x 0 , h) as described above we have a constraint We refer to the resulting LP relaxation as Rectangle-LP (P). It clearly has pseudopolynomial complexity. In the following, we show an O(k)-approximation based on LP rounding.

An LP rounding algorithm
Let (x, y) be a feasible solution to Rectangle-LP (P). We use a randomized rounding with alteration strategy (as introduced in [9]) to select a subset of the tasks and a representing drawing for them on each path P ∈ P. We proceed in two phases. In the selection phase, we pick a subset of the tasks and determine a drawing for them. The drawing in this phase may contain overlapping rectangles. In the alteration phase, we pick a subset of the selected tasks whose corresponding rectangles do not overlap.
Selection phase. We select a (not necessarily feasible) set S of tasks. For each task i, we add i to S independently at random with probability x i /(c 1 · k), where c 1 > 1 is a sufficiently large constant that will be determined later. We refer to the tasks in the random sample S as the selected tasks. Additionally, for each task i ∈ S and each path P ∈ P such that i ∈ T P , we choose a rectangle representing the drawing of i on P, as follows. We choose a height h for the rectangle independently at random according to the probability distribution {y(i, h, P)/x i } h . Note that the constraints (1) ensure that the values y(i, h, P)/x i form a probability distribution over the allowed heights h.
Let h(i, P) be the height chosen for task i on the path P; we use the rectangle R(i, h(i, P), P) to represent task i on the path P. Let R denote the resulting draw-ing, i.e., R is the collection of rectangles selected for the tasks in S. Each rectangle Alteration phase. In the alteration phase, we select a subset S ⊆ S of the tasks such that the rectangles R ⊆ R representing them on the paths are non-overlapping. Recall that we view the rectangles as open sets and thus two rectangles overlap iff they contain a common point in their interiors. We consider the paths of P in an arbitrary order. For each P ∈ P, let S(P) = {i ∈ S : i ∈ T P }. Our goal is to choose a subset S (P) ⊆ S(P) such that the rectangles {R(i, h(i, P), P) : i ∈ S (P)} are non-overlapping. We choose the set of accepted tasks S (P) as follows.
We order the tasks in S(P) in non-increasing order according to their demands, breaking ties arbitrarily. We consider the tasks in this order. Let i be the current task. We add i to S (P) if the rectangle R(i, h(i, P), P) does not overlap with any of the rectangles {R(i , h(i , P), P) : i ∈ S (P)} for the tasks we have accepted so far.
We refer to the tasks in S (P) as the tasks accepted on P, and the tasks in S(P) − S (P) as the tasks rejected on P. The following key lemma shows that each selected task i ∈ S(P) is accepted with a constant probability. The main observation is that, for each task j, appearing before i in the ordering, if the rectangles R(i, h(i, P), P) and R( j, h( j, P), P) overlap, then R( j, h( j, P), P) contains the top left or the bottom left corner of R(i, h(i, P), P) since d j ≥ d i ; it now suffices to check the constraints only at two points.

Lemma 4 For any path P and i ∈ T P ,
Finally, we use the sets {S (P) : P ∈ P} to select a subset S ⊆ S such that the rectangles R ⊆ R representing S on each path of P are non-overlapping. We set S = {i ∈ S : ∀ P∈P:i∈T P i ∈ S (P)}, i.e., a task is accepted if it was accepted for all paths. It follows from Lemma 4 and the union bound that each selected task is rejected with probability at most |{P ∈ P : i ∈ T P }| · 2 c 1 k ≤ 1/2 if c 1 is sufficiently large. More precisely, if P is ck-nice, then this happens when c 1 ≥ 4c. We summarize the rounding step in the following lemma.
Lemma 5 Consider a UFP-tree instance that has a K -nice splitting P, and let (x, y) be a feasible solution to Rectangle-LP (P). Let S be a random sample of the tasks such that each task i is in S independently at random with probability x i /(4K ). There is a polynomial-time algorithm that constructs a feasible solution S ⊆ S such that, for each task i, For linear objective functions, this yields a pseudo-polynomial time LP-based O(k)approximation for intersecting instances of UFP-tree and, with Lemma 1, a pseudopolynomial time O(k log n)-approximation for arbitrary instances of UFP-tree.

A polynomial-sized relaxation
In this section, we show how to turn the LP from the previous section to a polynomial sized one. Notice that the pseudo-polynomial running time is caused by the fact that the rectangles for the tasks in T can be drawn at pseudo-polynomially many heights.
We show that restricting to a polynomial sized set of heights incurs only an O (1) factor loss in the approximation ratio.
Task classification. For a path P ∈ P and a task i ∈ T P , let b P (i):= min e∈ p i ∩P u e be the bottleneck capacity of i on P. We say that a task i ∈ T P is big on P if d i > 1 16 · b P (i). Otherwise we say that i is small on P. Allowed heights. For each path P ∈ P and task i ∈ T P , we will now construct a set H(i, P) of allowed heights for drawing the rectangle corresponding to i on P. If i is big on P, we set H(i, P) = {b P (i) − d i }, i.e., the only allowed height is obtained by drawing the rectangle for i as high as possible underneath the capacity profile. If i is small on P, for the integer j such that b P (i) ∈ [2 j , 2 j+1 ), we set  (1) and (2) only for the heights h ∈ H. As H has polynomial size, the size of Restricted-Rectangle-LP (P, H) is also polynomial. The following lemma shows that the LP restricted to these heights still admits a good fractional solution. Combining it with Lemma 5 yields the desired polynomial time approximation algorithm for linear UFP-tree.

Lemma 6 For each feasible integral solution T ⊆ T of an instance of
We devote the remainder of this subsection to proving Lemma 6. Let T ⊆ T be any feasible solution for an instance of UFP-tree. We define the fractional solution (x, y) as follows. First, for each task i ∈ T , we set x i :=1/64; we set x i :=0 for all other tasks. Thus it only remains to define the vector y. For each path P and each task i ∈ T using P we identify a height h(i, P) ∈ H(i, P) such that if we set y(i, h(i, P), P):=1/64 for each task i ∈ T using P then all constraints of type (2) are satisfied. Note that the constraints of type (1) are then automatically satisfied.
Consider a task i ∈ T that is big on P. In this case, only the height b P (i) − d i is allowed for task i on the path P, and thus we set h(i, P):=b P (i) − d i . Lemma 4.4 in [7] implies that each point underneath the capacity profile of P can be overlapped by at most 32 rectangles corresponding to big tasks in T when each of these rectangles is drawn at maximum height. This implies the following proposition. Proposition 1 Let P ∈ P and let T B (P) denote all tasks in T that are big on P. Then for each point q = (x 0 , h) such that x 0 is strictly between the first and the second vertex of P we have that i∈T B (P) (h : q∈R(i,h ,P)) We now define the heights for the small tasks. Let j ∈ N and let T ( j) S (P) denote all tasks i ∈ T that are small on P and that have the property that b P (i) ∈ [2 j , 2 j+1 ). Due to the latter property and since all tasks use the first edge of P, there is an edge e ∈ P used by all tasks in T s.t. u e < 2 j+1 . Therefore we must have that i∈T ( j) S (P) d i ≤ 2 j+1 . Since they are small, for each task i ∈ T ( j) S (P) it must hold that d i ≤ 2 j+1 /16 = 2 j−3 . We partition the tasks in T Now consider the following drawing of T ( j,k) S (P) using rectangles whose heights correspond to the new demands d i . We start drawing the rectangles at height 2 j−1 . We consider the tasks in arbitrary order. Starting at height 2 j−1 , we draw each task i using a rectangle of height d i , and we place this rectangle on top of the rectangles we have already drawn. Let h(i, P) denote the height of the rectangle for task i in the resulting drawing.
Since the demands d i are multiples of 2 j−3 /n and the starting height is 2 j−1 , we have h(i, P) = 2 j−1 +r 2 j−3 /n for some integer r ∈ {0, . . . , n/2 j−3 }. Therefore h(i, P) ∈ H(i, P). Moreover, for each task i ∈ T For each task i ∈ T   (k log n)). For a submodular objective, we will show in Sect. 3.3 that, by combining the rounding from Sect. 3.1 with the CR framework of [15], we also obtain an integral solution with a value of (OPT/(k log n)).

Submodular objective via the CR scheme framework
In this section, we extend our results to submodular objectives by combining the results from the previous section with the framework from [15]. Let N be a finite ground set. Let I ⊆ 2 N be a family of subsets of N , and P I a convex relaxation for the constraints imposed by I, such that P I is down-monotone and solvable. 5 Let x ∈ P I and let support(x) = {i ∈ N : x i > 0}. For any b ∈ [0, 1], let b · P I = {bx : x ∈ P I }. Let R(x) be a random sample of N such that each element i ∈ N is in R(x) independently at random with probability x i . For a set function

Definition 2 ([15])
For b, c ∈ [0, 1], a (b, c)-balanced CR scheme π for a polytope P I is a procedure that for every x ∈ b · P I and A ⊆ N returns a random set π x (A) satisfying We use the CR schemes as in [15]. First, we compute a vector x * with F(x * ) ≥ (max{F(x ) : x ∈ P I }). Then, we compute a random sample R(x) with x:=b · x * . We apply the CR scheme π and obtain the set π x (R(x)). We know that for each element i we have that Pr[i ∈ R(x)] = b · x * i and Pr[i ∈ π x (R(x)) | i ∈ R(x)] ≥ c. Thus, Pr[i ∈ π x (R(x))] ≥ bc · x * i which can be used to show that E[ f (π x (R(x)))] ≥ (bc) · max{F(x ) : x ∈ P I }.

Theorem 4 ([15]) Let f : 2 N → R + be a submodular function. Let I ⊆ 2 N be a family of feasible solutions and let P I ⊆ [0, 1] N be a convex relaxation for I that is down-monotone and solvable. Suppose that there is a (b, c)-balanced CR scheme for P I . Then there is a polynomial time randomized algorithm that constructs a solution I ∈ I such that
To apply the above framework, let P denote the set of points x for which there exists a vector y such that (x, y) is contained in the polytope defined by Restricted-Rectangle-LP (P, H). Clearly, P is down-monotone and solvable. Similarly as in the case of linear objective functions, P contains a fractional point with large profit according to F: Let T * be an optimal integral solution. By Lemma 6, 1 64 · 1 T * ∈ P. Moreover, it is straightforward to verify that F 1 64 · 1 T * ≥ 1 64 f (T * ). So max{F(x) : x ∈ P I } = (OPT).
By Lemma 5, there is a (1/ (k), 1/2)-balanced CR scheme for P. Therefore we can apply Theorem 4 to obtain our main result for Submodular UFP-tree.
Theorem 5 There is a polynomial time O(k) approximation algorithm for Submodular UFP-tree on intersecting instances and, therefore, an O(k log n) approximation for arbitrary instances, where k is the pathwidth of the tree.

Applications
We describe how our techniques can be applied to obtain approximation algorithms for Submodular Bag-UFP-tree and Submodular Bag-SAP-tree.

Bag-UFP.
In the Submodular Bag-UFP-tree we have the same input as for UFPtree and additionally the input tasks T are partitioned into bags T 1 , . . . , T s and we are allowed to select at most one task per bag. We start with the same approach as for Submodular UFP-tree and invoke Lemma 1 to reduce the general case to the case of intersecting instances at the expense of a factor O(log n) in the approximation ratio. Then we formulate the problem using Rectangle-LP (P) and add to it the set of constraints i∈T j Similarly to the case of UFP-tree, we round the resulting LP using randomized rounding with alteration. In the selection phase, we again sample each task i with probability x i /(c 1 · k) for some large constant c 1 and choose the heights for its rectangles according to the distribution given by y(i, h, P)/x i . In the alteration phase, we accept a task i in a bag T j if none of its corresponding rectangles overlaps with a rectangle of a previously accepted task and if no task from T j has been accepted before. Similarly as in Lemma 5 we can show that Pr[i ∈ S |i ∈ S] ≥ 1/2 (as each selected task i is rejected due to overlapping with a previously accepted task with probability at most |{P ∈ P : i ∈ T P }| · 2 c 1 k , and is rejected due to another task from the same bag being previously accepted with probability at most 2 c 1 k ). This yields a CR scheme and, thus, an algorithm for Submodular Bag-UFP-tree. As described in Sect. 3.2 we can restrict the set of allowed heights to polynomial size (observe that the reasoning there only argues about tasks from an optimal solution.) The following theorem summarizes our contribution on Submodular Bag-UFP-Tree.

Theorem 6
There is a polynomial time O(k · log n)-approximation algorithm for Submodular Bag-UFP-tree where k is the pathwidth of an input tree.
We note that one can model submodular bagUFP with an instance of submodular UFP for a different submodular function: in case that the computed set of tasks contains several tasks from a bag, this new function selects only one task from each such bag such that the profit of the original submodular function is maximized. However, it is not clear how to evaluate this new submodular function efficiently if one has only oracleaccess to the original submodular function. Therefore, we give a separate algorithm for Submodular Bag-UFP-Tree.
Storage Allocation. The input to SAP-tree is that of UFP-tree, with an additional requirement that for each selected task i in T ⊆ T we have to compute a value We invoke Lemma 1 to reduce the instance to a collection of intersecting instances. In contrast to UFP-tree, on such instances it essentially suffices to focus on edges incident to the root when checking feasibility.

Proposition 3 For an intersecting instance of SAP-tree, a pair (T , h) with T ⊆ T is a feasible solution if and only if -for any edge e incident to the root and for any two tasks
We set up a similar LP as Rectangle-LP (P), however, taking into account that we model SAP-tree, rather than UFP-tree. To keep the notation close to Rectangle-LP (P), we introduce a variable x i for each task i ∈ T and a variable y(i, h) for each task i ∈ T and a height h ∈ N such that h ≤ u e − d i for each edge e ∈ p i (as in the second property of Proposition 3), indicating that task i is selected and drawn at height h. For each task i ∈ T , we have the constraints h:h≤u e −d i ∀e∈ p i ∩P y(i, h) = x i (6) to enforce that the values y(i, h)/x i form a probability distribution for the possible heights of task i. For each task i ∈ T we add the constraint x i ≤ 1, to ensure that each task is selected at most once. Then, for each edge e incident to the root and each integer q, we add the constraint Intuitively, the constraints (7) model that on edge e the rectangles corresponding to the selected tasks do not overlap (as required by the first property of Proposition 3). Denote by SAP-LP (P) the resulting linear program. The key difference to Rectangle-LP (P) is now that each task no longer appears on up to k different paths of P with up to k different rectangles with different heights, but only on two edges. Therefore, we can round SAP-LP (P) using randomized rounding with alteration by losing only a constant factor, instead of a factor O(k).
Formally, we sample a set of tasks S such that each task i is added to S independently at random with probability x i /c 1 (in contrast to the probability x i /(c 1 · k) as in the case of UFP-Tree). Like above, we choose a height h for i independently at random according to the probability distribution y(i, h)/x i . In the alteration phase, again we order the tasks non-increasingly by demands and reject a task if on one of its two edges incident to the root it conflicts with a previously accepted task, i.e., a constraint of type (7) would be violated. Denote by S the set of accepted tasks.

Lemma 8 For each task i ∈ T we have that
By choosing c 1 sufficiently large we ensure that Pr[i ∈ S |i ∈ S] ≤ 1/2 and with a similar reasoning as for UFP-tree we obtain a O(1)-approximation algorithm for intersecting instances of SAP-tree. We can also extend the above argumentation to submodular objective functions and to the setting with bag constraints, i.e., Submodular Bag-SAP-tree. Also, we can apply a similar reasoning as in Sect. 3.2 to get an LP-formulation with polynomial size.

Theorem 7
There is a polynomial time O(log n)-approximation algorithm for Submodular Bag-SAP-tree.

An algorithm
In this section we first prove Theorem 2. Assume that we are given an upward instance of UFP-tree on a tree T with a set of tasks T . By losing a factor 1 + O( ) in the approximation ratio we can assume that for each i ∈ T we have that w i is a power of 1 + and w i ∈ [1, n/ ) (tasks with a weight of at most n · max i w i can be discarded by losing only a factor of 1 + ). We first show that we can assume w.l.o.g. that each vertex in the tree T has a degree of at most three.

Lemma 9 There is a polynomial time algorithm that for any instance of UFP-tree on an n-vertex tree T produces an equivalent instance on an O(n)-vertex tree T , s.t. each vertex of T has a degree of at most 3.
Proof Suppose T has a vertex v with degree d ≥ 4. Let {v 1 , . . . , v d } be neighbors of v and let v 1 be the parent of v. Replace v by a gadget containing v, a new vertex v , and an edge vv with infinite capacity. We keep the edges vv 1 and vv 2 with the same capacities as before, and all vertices in {v 3 , . . . , v d } are defined to be children of v , where each edge v v j has capacity c vv j for j ≥ 3.
We repeat this operation until every vertex has a degree of at most three.
For simplicity, assume that each vertex in T is either a leaf or has a degree of exactly three (enforcing this condition can increase the number of vertices by at most n). Let v r denote the root of T . We devise a recursive procedure with O(log n) levels. In the first step, we identify a (center) vertex v m of T with the property that T \{v m } has three connected components, each of them having at most n/2 vertices. Such a vertex always exists. Let V 1 denote the vertices of T in the connected component of T \{v m } containing v r , and V 2 , V 3 the vertices in the other two components of T , respectively. For j ∈ {1, 2, 3} let T j denote T [V j ∪ {v m }]. Denote by P the path from v m to v r .
Approximate profiles. We partition T into classes such that the tasks in each class have roughly the same demand and profit. For each pair (k, ) with k ∈ { log 1+ d min , . . . , log 1+ d max }, ∈ {1, . . . , log 1+ (n/ ) }, define a set of tasks Notice that there are O (log(d max /d min ) log(n)) sets. For each pair (T j , T (k, ) ) with j ∈ {2, 3} we guess an approximation of how much capacity is used on the edges of P by tasks from T (k, ) having a start vertex in T j .
Denote by O PT (k, , j) the optimal solution restricted to tasks in T (k, ) which start in T j and use an edge of P. For each edge e ∈ P we define a value u (k, , j) e := i∈O PT (k, , j) : p i e d i , which is the capacity used by O PT (k, , j) on e.
Observe that when traversing P from v m towards v r , the values of u (k, , j) e are nonincreasing. These values yield a non-increasing profile u (k, , j) on P with possibly polynomially many different values. We claim that there is a much simpler profilē u (k, , j) that attains only O (log n) different values from some quasi-polynomial size set, underestimates the real profile, but is still large enough s.t. we can fit a (1+ / log n)approximate subset of O PT (k, , j) intoū (k, , j) . The following lemma can be shown with a similar reasoning as in [4].
From this, we obtain that for any edge e ∈ P, u (k, , j) (e) ≤ d(e) = u (k, , j) (e), and for any pair of edges e, e belonging to the same path P we haveū (k, , j) (e) =ū (k, , j) (e ). The number of possible values ofū (k, , j) (e) is O(log 2 n/ ).
We define sets A (k, , j) as follows. We order the tasks i ∈ O PT (k, , j) nonincreasingly by | p i ∩ P|, breaking ties arbitrarily. Then, we greedily select the set of tasks B from O PT (k, , j) , until d(B) ≥ 2D/s. We set A (k, , j) = O PT (k, , j) \B.
We will show that for any e ∈ P, it holds i∈A (k, , j) : In parallel we guess an approximative capacity profile due to Lemma 10 for each pair (T j , T (k, ) ).
There are only n ( 1 log n) O(1) log(d max /d min ) possible guesses.
Recursion. We recurse on the following three subproblems.
-The first subproblem is defined by T 1 and all tasks whose start and end vertices lie in T 1 . For the edge capacities, we take into account that the edges of P have smaller capacity since the guessed capacity profiles use up some capacity. Each edge e ∈ P has then a residual capacity of u e − j=2,3 k, ū (k, , j) e . -The second subproblem is defined by T 2 ∪ P and all tasks having their start vertex in T 2 . On each edge in T 2 we have its full capacity available, on each edge e ∈ P the available capacity is the sum of the capacities due to the previously guessed profiles: k, ū (k, ,2) e . -The third subproblem is defined on T 3 ∪ P symmetrically to the second.
This defines the first step of our recursion. When we proceed, each arising subproblem is defined on a subtree T of the input tree T and a path P which is the path from v r to the vertex in T that is closest to v r .
Each edge of T ∪ P has a given a capacity (that might be smaller than in T ). Additionally, we are given a set of tasks T that is exactly the set of input tasks that have their respective start vertex in T . Our goal is to find a good approximation for this subproblem. When we recurse on it, we perform the procedure described above with the center vertex v m of T , i.e., we guess the approximative profiles on the path between v m and v r in T ∪ P and then recurse on the three arising subproblems. 6 We do this recursive procedure until we obtain subproblems in which T consists of only one single edge. The resulting instance is equivalent to an instance of Unsplittable Flow on Paths. We compute a (1 + )-approximation for it in time n O (log n) using the algorithm in [5].
Analysis. When given one of the subproblems, the number of possible guesses for the profiles on the path between the center v m of T and v r is at most n ( 1 log n) O(1) log(d max /d min ) . Thus, each node in the recursion tree has at most n ( 1 log n) O(1) log(d max /d min ) children. As in each recursive step we recurse on the center vertex of the respective tree T , our recursion depth is O(log n). Finally, solving the leaf subproblems requires at most n O (log n) time, see [5].

Lemma 11
The running time of the above algorithm is upper bounded by For the approximation factor, each level of the recursion incurs a loss by a factor of at most (1 + log n ) −1 . Since our recursion depth is O(log n) this yields an approximation ratio of (1 + O( )), completing the proof of Theorem 2.

Hardness
In this section we prove Theorem 3, based on the assumption that SAT is not in DTIME(2 o(n) ). We start from the near-linear PCP theorem. There are many PCPs in the literature whose proof lengths are near-linear in the size of the original SAT formula, e.g., Dinur's PCP [16]. The following theorem can be derived by combining known tools in the literature, more precisely the PCP theorem and the bounded occurrences reduction from [3,16,28]. 16,28]) There is a universal constant 0 > 0 such that there is a polynomial time algorithm that transforms any n-variable SAT formula φ into another formula φ satisfying the following properties • φ is a 3SAT formula and each variable appears at most 3 times, i.e., it is a 3SAT (3) formula. • φ has at most O(n poly log n) variables and clauses. • (Completeness:) If φ is satisfiable, then φ is satisfiable. • (Soundness:) If φ is not satisfiable, then any assignment to φ satisfies at most For a CNF formula φ, we denote by SAT(φ) the maximum number of clauses that can be satisfied by any assignment. We prove this theorem in the next subsection. We show now that this theorem yields our hardness result. Start from an n-variable SAT formula φ, invoke Theorem 8 to obtain φ , and then Theorem 9 to obtain (T, T ). Our reduction guarantees that |T |, |T | ≤ n O (1) and d max d min = 2 O(M) ≤ 2 n poly log n . All these steps so far have taken a polynomial running time. Assume for contradiction that there is an algorithm A, that is an approximation scheme for UFP-trees running in time (for constant ) 2 poly log |T | n log 1−δ dmax d min . We have that log d max /d min = O(M) ≤ n poly log n, and therefore, log 1−δ (d max /d min ) ≤ n 1−δ/2 for sufficiently large n. Therefore, the running time of invoking the algorithm A is N poly log N log 1−δ (d max /d min ) ≤ 2 o(n) for sufficiently large n. Moreover, -in the completeness case, we have OPT(T, T ) = 4N + M, and -in the soundness case, we have OPT(T, The second inequality follows from the fact that our formula φ is a 3SAT (3) formula, so we have that N ≤ M ≤ 3N , which implies that 4N Since there is a gap of (1 − 0 /8), running the approximation scheme A on (T, T ) can distinguish the two cases in time 2 o(n) , contradicting the ETH.

Proof of Theorem 9
Suppose that we are given a 3-BOUNDED-3-SAT formula φ with n variables x 1 , . . . , x n and m clauses {C 1 , . . . , C m }=:C with the property that every literal appears at most three times. Note that this implies that m ≤ 3n. We create an instance of UFPtree. Our tree can be decomposed into a path P and a set of edges E such that every edge in E is connected to one vertex on P and each vertex on P is connected to at most one edge of E , see Fig. 2. The path P has three parts. The first part has m vertices and each vertex corresponds to exactly one clause C ∈ C. For each clause C ∈ C we denote by v C the vertex for C. The second part has exactly n vertices and each vertex corresponds to exactly one variable. For each variable x j we denote by v j the vertex corresponding to x j in the second part. The third part of P has 2n vertices and for each variable x j there is one vertex that we denote by v j+ and one vertex that we denote by v j− . Additionally, each vertex in the third part is connected to exactly one edge in E . For each vertex v j+ (resp. v j− ) in the third part of P, denote by v j+ (resp. v j− ) the corresponding vertex that it is connected to by an edge in E . Now we define the input tasks. First, for each clause we define three tasks. Let C be a clause containing the three variables x j , x k , x (possibly in a negated form). We define three tasks for C: i(C, j), i(C, k) and i(C, ). Intuitively, if φ is satisfiable then we want to select the task among the three of them that corresponds to the variable satisfying C. All three tasks i(C, j), i(C, k), i(C, ) have a weight of 1 and their start vertex is v C . If the variable x j appears positively in C then the end vertex of i(C, j) is defined to be v j+ , otherwise the end vertex of i(C, j) is v j− . We define the end vertices of i(C, k), i(C, ) accordingly. We do this procedure with all clauses in C. We set the edge capacities on the first part of P and the task demands to ensure that -for each clause C containing the three variables x j , x k , x any feasible solution selects at most one of the tasks i(C, j), i(C, k), -if we select exactly one task corresponding to each clause (no matter which one) then we do not violate the edge capacities on the first part of P.
We achieve this by setting the capacity of each edge (v C m , v C m +1 ) to be 4 m and the capacity of the edge (v C m , v 1 ) to be 4 m . We set the demand of each of the three tasks corresponding to the clause C m to be 3 4 · 4 m . It is clear then that any feasible solution can select at most one of the tasks for each clause. Moreover, the second property above follows from a geometric sum argument. Note that here we crucially need that the input values do not need to be quasi-polynomially bounded.
We set the edge capacities of the third part of P to ∞. We define the capacity of each edge (v j+ , v j+ ) ∈ E (of (v j− , v j− ) ∈ E ) such that -if i( j, −) (resp. i( j, +)) is selected then it uses the whole capacity of (v j+ , v j+ ) (resp. of (v j− , v j− )) -if i( j, −) (resp. i( j, +)) is not selected then all three other tasks using (v j+ , v j+ ) (resp. of (v j− , v j− )) can be selected.
To this end, we set the capacity of (v j+ , v j+ ) to 3 4 · 4 m · 4 j . Since a total demand of tasks is at most 3 · 4 m the second property also holds.

Lemma 12
If φ is satisfiable, then the optimal solution to our UFP-tree instance has a value of at least 4n + m.
Proof Consider a satisfying assignment of φ. Let x j be a variable. If in the assignment x j is set to true then we select the task i( j, +). Otherwise, we select the task i( j, −). For each clause there must be one variable that satisfies the clause. Consider a clause C that is satisfied by a variable x j . We select the task i(C, j). The total profit of this solution is 4n + m. It remains to argue that the solution is feasible. On the edges on P we satisfy the capacity constraints since we selected only one task corresponding to each variable and at most one task for each clause. Consider an edge (v j+ , v j+ ) ∈ E (edge (v j− , v j− ) can be argued similarly.) If we do not select the task i( j, −) then the other three tasks using it do not use more than the available capacity on (v j+ , v j+ ). If we select the task i( j, −) then we do not select any task i(C, j) using (v j+ , v j+ ). The reason is that if we selected such a task then x j would satisfy the clause C. But if i(C, j) used (v j+ , v j+ ) then this would mean that x j appeared positively in C. However, since we selected the task i( j, −) this means that the satisfying assignment set x j to false which contradicts that x j satisfies C.
We prove that if any variable assignment can satisfy at most m clauses then the optimal solution to our instance of UFP-tree has a value of at most 4n + m . First, we need the following lemma about the structure of an optimal solution.

Lemma 13
For each x j , any optimal solution selects either i( j, +) or i( j, −).
Proof Assume by contradiction that there is an optimal solution S such that for a variable x j neither i( j, +) nor i( j, −) are selected. Due to the way we defined the capacities on P and the task demands, the solution S can contain at most one task in {i( j , +), i( j , −)} for each variable x j and at most one task in {i(C, j), i(C, k), i(C, )} for each clause C containing variables x j , x k , x . Moreover, if we select at most one task in {i( j , +), i( j , −)} for each variable x j and at most one task in {i(C, j), i(C, k), i(C, )} for each clause C containing variables x j , x k , x then we do not violate the capacities on P. Thus, if we add i( j, +) to S then on P we will not violate the capacity of any edge. We add i( j, +) to S and remove all other tasks that use (v j− , v j− ). The task i( j, +) yields a profit of 4 and the other three tasks using (v j− , v j− ) have a total profit of at most 3. Thus, we obtain a solution that is more valuable than S, a contradiction to the choice of S being optimal.

Lemma 14
If any assignment can satisfy at most m clauses, then the optimal solution to our instance of UFP-tree has a value of at most 4n + m .
Proof We prove a contrapositive statement. Suppose that we have a solution S with w(S) > 4n + m . By Lemma 13 for each variable x j either i( j, +) ∈ T or i( j, −) ∈ T . These tasks contribute a profit of 4n in w(S), so a profit of more than m must come from the tasks i(C, j). We construct an assignment of the variables of φ by setting each variable x j to true if and only if i( j, +) ∈ S. We claim that for each task i(C, j) ∈ S the variable x j satisfies C, implying that more than m clauses are satisfied and thus completing the proof.
Assume that i(C, j) ∈ S uses the edge (v j+ , v j+ ) (the other case that i(C, j) ∈ S uses the edge (v j− , v j− ) can be proven similarly). This implies that x j appears positively in C. Also, we know that the task i( j, −) uses the full capacity of (v j+ , v j+ ). Thus, i( j, −) / ∈ S and therefore we set x j to be true in our variable assignment. Thus, C is satisfied by our assignment.