Approximation Algorithms for the Unsplittable Flow Problem

We present approximation algorithms for the unsplittable flow problem (UFP) in undirected graphs. As is standard in this line of research, we assume that the maximum demand is at most the minimum capacity. We focus on the non-uniform capacity case in which the edge capacities can vary arbitrarily over the graph. Our results are: We obtain an $O({\Delta}\alpha^{-1} \log^2 n)$ approximation ratio for UFP, where n is the number of vertices, ${\Delta}$ is the maximum degree, and $\alpha$ is the expansion of the graph. Furthermore, if we specialize to the case where all edges have the same capacity, our algorithm gives an $O({\Delta} \alpha^{-1} \log n)$ approximation. For certain strong constant-degree expanders considered by Frieze [17] we obtain an $O(\sqrt{\log n})$ approximation for the uniform capacity case. For UFP on the line and the ring, we give the first constant-factor approximation algorithms. All of the above results improve if the maximum demand is bounded away from the minimum capacity. The above results either improve upon or are incomparable with previously known results for these problems. The main technique used for these results is randomized rounding followed by greedy alteration, and is inspired by the use of this idea in recent work.

• We obtain an O(∆α −1 log 2 n) approximation ratio for UFP, where n is the number of vertices, ∆ the maximum degree, and α the expansion of the graph. Furthermore, if we specialize to the case where all edges have the same capacity, our algorithm gives an O(∆α −1 log n) approximation.
• For certain strong constant-degree expanders considered by Frieze [17] we obtain an O( √ log n) approximation for the uniform capacity case.
• For UFP on the line and the ring, we give the first constant-factor approximation algorithms.
All of the above results improve if the maximum demand is bounded away from the minimum capacity. The above results either improve upon, or are incomparable to previously known results for these problems. The main technique used for these results is randomized rounding followed by greedy alteration, and is inspired by the use of this idea in recent work.

Introduction
In the unsplittable flow problem (UFP), we are given an n-vertex graph G = (V, E) with edge capacities {c e }, and a set of k vertex pairs (terminals) T = {(s i , t i ) : i = 1, . . . , k}; each pair (s i , t i ) in T has a demand ρ i and a weight (or profit) w i . The goal is to find the maximum weight subset of pairs from T , along with a path for each chosen pair, so that the entire demand for each such pair can be routed on its path while respecting the capacity constraints.
Let us note at the outset that even very special cases of UFP are NP-hard: for instance, when G is just a single edge, UFP specializes to the Knapsack problem. When each c e = 1 and each ρ i = w i = 1, UFP specializes to the well-known maximum edge-disjoint paths problem (EDP), the goal being simply to find the largest number of pairs from T which can be simultaneously connected by edge-disjoint paths in G. EDP is NP-hard even when restricted to planar graphs.
A substantial amount of research has focused on obtaining good approximation algorithms for both EDP and UFP due to their importance in network routing and design. For EDP, the best known approximation ratio on general graphs is O(min(n 2/3 , √ m)) [14], where n and m are the number of vertices and edges in the graph, respectively. In directed graphs the best known approximation ratio is O(min(n 2/3 log 1/3 n, √ m)) [35] and it is NP-hard to approximate it to a ratio better than Ω(m 1/2−ε ) [20]. However, in undirected graphs, which will be the focus of this paper, EDP is only known to be hard to approximate to within constant factors [19]. Very recently, a hardness factor of Ω(log 1/2−ε n) has been shown [3,4]. Improved approximation ratios for EDP have been obtained for special classes of graphs like trees, mesh-like planar graphs, and graphs with high expansion; see, e.g., [21,25] for references.
Let ρ max = max i ρ i be the maximum demand among the pairs and c min = min e c e be the minimum capacity of an edge. In this paper, we will only consider instances with ρ max ≤ c min ; this is a standard assumption in the literature and is sometimes referred to as the no-bottleneck assumption. In its absence, an UFP instance on a graph G = (V, E) can be embedded into any other graph G = (V, E ) with E ⊆ E , thus making it difficult to study the role of graph structure in the approximability of the problem. Moreover, the restriction is a reasonable one in many applications: e.g., it still includes EDP as a special case. In the rest of the paper, we will assume without loss of generality that c min = 1 and that 0 < ρ i ≤ 1 for all i.
A special case of UFP is the uniform capacity unsplittable flow problem (UCUFP) in which all edges have the same capacity. UCUFP has received more attention and its approximability is often related to the corresponding EDP problem; much less is known about UFP where edges have varying capacities.

Our Results
In this paper we address UFP with non-uniform edge capacities on undirected graphs. Our results will be quantified in terms of the so-called flow number 1 F G of the underlying graph G; this parameter was defined by Kolman and Scheideler [25], 2 who related F G to the expansion of the graph, and showed that F G = O(∆α −1 log n), where α is the edge expansion and ∆ is the maximum degree of the graph G. Let us now present our results for general graphs; while comparisons to known results are given in Section 1.3, let us mention that our results improve upon, or are incomparable to previous results.
• When the maximum demand is much smaller than the smallest capacity, the above bounds can be improved. In particular, if ρ max ≤ c min /B for some integer B, the approximation guarantees improve to O((F G log n) 1 In fact, we have a continuum of approximation ratios between UFP and UCUFP of the form O(F G · min(log n, c max )), where c max is the maximum capacity of an edge (assuming c min = 1). The above results are typically most interesting when G is a constant-degree expander, with ∆α −1 = O(1); however, as noted in [25], there are other interesting cases such butterflies and hypercubes where F G can be shown to be a poly-logarithmic factor better than the upper bound implied by F G = O(∆α −1 log n).
Additionally, we obtain even better approximation ratios on special classes of graphs by further exploiting some of the techniques used in proving the above. In particular, we obtain: • An O( √ log n) approximation for UCUFP on "sufficiently strong" constant degree expanders as defined by Frieze [17] (see Definition 2.2 and Theorem 4.1).
• An O(1) approximation for UFP on line and ring networks (see Theorems 5.5 and 5.8).

Techniques
Previous approaches to approximating EDP and UCUFP on graphs with high expansion relied on proving the existence of near-optimal solutions to the multicommodity flow relaxation of the problem that use short flow paths (i.e., those that are only poly-logarithmic in length). Kolman and Scheideler [25] generalize this to UFP through their notion of flow number F . However, their upper bound on the length of the flow paths depends on the edge-capacities in G, which could be quite large in some cases, giving a weaker bound. We take a different approach, and show the existence of flow paths using only a few (poly-logarithmic number of) edges of low capacity, even though the overall length of the flow path might be large. Since high capacity edges (of capacity Ω(log n)) behave fairly well under randomized rounding, this leaves us to worry only about the behavior of the low capacity edges under randomized rounding.
Our second idea, which subsequently proves useful for the case of the line and the ring as well, is to perform the randomized rounding step with more care. Naïve rounding schemes scale down the fractional solution before randomized rounding, with the scaling factor chosen to be large enough to argue that none of the constraints are violated. Typically, the events corresponding to the violation of these constraints are not independent and the union bound is too weak to estimate the failure probability of the randomized rounding. Hence, probabilistic tools like the Lovász Local Lemma (as in [33,25]) or a correlation inequality like the FKG inequality (as in [33]) are used to overcome these problems. Not surprisingly, these approaches are often technically involved, adding substantial complexity to both the algorithm and the analysis. We take a different route, and use the method of alterations [2] which is applicable to monotone problems. Applications of this technique to approximation algorithms were recently given by Srinivasan [34], who applied it to general packing and covering problems, and by Calinescu et al. [13] who applied it to a specific packing problem. In this approach, the first step is the same as above: scaling followed by randomized rounding. However, instead of desiring feasibility (i.e., that all constraints be satisfied by the randomized rounding), one looks at the random solution and alters it if it is not feasible: in our case, this is done by changing certain '1's in the random solution to '0's to ensure feasibility. Since this greedy (problem-dependent) alteration step ensures feasibility by fiat, the burden shifts to analyzing the expected loss in quality during the alteration step. This turns out to be simple and effective for various problems, and we believe that this idea will find more applications in the future.

Relationship to Previous Work
In this section, we will discuss previous work on UFP, UCUFP and EDP problems, and also indicate how our results mentioned above relate to previously known results.
Culminating a long line of work, Frieze [17] recently showed that for regular expanders with sufficiently strong expansion and sufficiently large (but constant) degree, there exists a constant c such that any cn/ log n vertex pairs can be connected via edge-disjoint paths provided no vertex appears in more than a constant (depending on, and less than the degree) number of pairs. This result is optimal to within constant factors, and has also been extended to expander digraphs [11]. An immediate consequence of this is an O(log n) approximation for EDP on such expanders. In 1996, Kleinberg and Rubinfeld [22] had used an earlier result of Broder, Frieze, and Upfal [12] to show that a deterministic online algorithm, the so-called bounded greedy algorithm (BGA), gave an O(log n log log n) approximation guarantee for EDP. (In fact, Frieze's result mentioned above implies an O(log n) bound for BGA.) In the same paper, Kleinberg and Rubinfeld also showed the existence of a near-optimal fractional solution to any multicommodity flow instance on an expander that used only short paths of length O(log 3 n). This latter result formed the basis of an O(log 3 n) approximation for UCUFP on expanders by Srinivasan [33]. While the above results do not explicitly specify the dependence of the approximation ratio on ∆ and α, Kolman and Scheideler [25] suggest that the actual approximation ratio is Ω(∆ 2 α −2 log 3 n).
In the context of UCUFP, the results of Kleinberg and Rubinfeld on short flow paths were improved by Kolman and Scheideler [24,25]. Their results were stated in terms of a parameter F G,c of a graph G, which we shall call the capacitated flow number of G; here c refers to the capacities of the edges. They proved the existence of near-optimal solutions to multicommodity flow instances that use paths of length O(F G,c ). (The earlier paper [24] gave its results in terms of a parameter called the routing number R, but these results were superseded by those given in [25] in terms of F G,c .) Moreover, in addition to improving the approximation ratio for UCUFP, the results of Kolman and Scheideler offered other advantages: the dependence on the expansion α and the maximum degree ∆ were improved and made explicit, the bound on the flow path lengths was strengthened, and the proof, based on the work of Leighton and Rao [26], was much simpler and direct.
For our results, we will use a quantity F G , which we shall call the flow number of G; in contrast to F G,c , this quantity depends only on the structure of the graph G and is independent of the edge capacities. Also, while the two parameters F G and F G,c have similar definitions, their values turn out to be incomparable in general. (A special case when F G = F G,c is when all edges have unit capacities-i.e., when we have an instance of UCUFP.) We now relate our results to the previous known results for UFP and UCUFP: • Our approximation guarantee for UFP is O(F G log n) = O(∆α −1 log 2 n), which is independent of the edge capacities in the network; this is incomparable to the best known approximation ratio of O(F G,c ) given in [25,Theorem 4.1].
• O(F G ) = O(∆α −1 log n) approximation ratio for UCUFP, which matches the bound of O(F G,c ) given by [25,Theorem 4.1]; however, we achieve this approximation via a different algorithm.
• For the case where the maximum demand is a factor 1/B smaller than the smallest capacity, our bounds are O((F G log n) 1/B ) and O(F G,c − 1)) given in [25,Theorem 4.5], our UFP bound is incomparable while the UCUFP bound is better by a factor of B.
• The O( √ log n) approximation for UCUFP on "sufficiently strong" constant degree expanders is the first sub-logarithmic approximation for constant degree expanders that we are aware of, and improves on the current best approximation ratio of O(log n) [17,25].
UFP on the line: The EDP problem on the line corresponds to the maximum independent set problem on interval graphs, which has a polynomial time algorithm. However, UCUFP on the line generalizes Knapsack and hence is NP-hard; in fact, it is equivalent to the task assignment problem on a single machine with fixed time windows. Generalizations of the task assignment problem to multiple machines and time windows have been studied in the recent past [7,29], and most of these problems have O(1)-approximation algorithms as well as O(1) integrality gaps. This is not the case with UFP on the line, for which no constant-factor approximation was known before this work. In fact, if the demands are not constrained to be less than the minimum capacity, the integrality gap of the natural linear programming relaxation for UFP could be Ω(min(log ρ max , n)) (see Theorem 5.7). Furthermore, two of the standard techniques used to develop O(1) approximations for the task assignment problem, i.e., the local-ratio method [8,7] and rounding fractional solutions [29], seem not to extend to the case of UFP. In this work, we build upon ideas of Calinescu et al. [13], and combine dynamic programming and randomized rounding with alterations to give the first constant-factor approximation for UFP on the line when ρ max ≤ c min . For the general case (without the no-bottleneck assumption), we give an algorithm with approximation ratio Ω(log ρ max ) which matches the integrality gap in Theorem 5.7. We extend the results on the line to the ring via a simple reduction.

The Natural LP Relaxation
UFP has a natural integer programming formulation based on multicommodity flow. Let P i denote the set of all paths in G from u i to v i . The integer program (IP) is: The linear programming (LP) relaxation, which we shall call lpmain, is obtained by allowing x i and f π to lie in the real interval [0, 1]. Let (x 1 , . . . , x k , f π 1 , f π 2 , . . . ) be a fractional solution to lpmain.
We shall refer to k i=1 w i x i as the profit or the value of the solution. We say that the solution uses a flow path π if f π > 0. Though the LP, as given here, is path-based and has exponential size, an optimal solution to lpmain can be obtained in polynomial time. This can be done by first solving a different, polynomial sized linear program which has flow variables for each edge and then performing a path-decomposition on the solution of the linear program. We refer the reader to [1] for more details. An alternative method is to solve the problem using the ellipsoid method. Note that the formulation above has an exponential number of variables but a polynomial number of constraints. It can be checked that the separation oracle for the dual of lpmain is a shortest path computation, which can be implemented in polynomial time. By standard polyhedral theory, an optimal solution to a linear program can be computed if its dual can be solved in polynomial time [32].
In some situations, we need to solve a variant of lpmain where we are given an integer in [1, n] and require that for each 1 ≤ i ≤ k, P i is the set of u i -v i paths with at most edges in them. This restricts the flow to be only on paths with at most edges. In this case, the separation oracle for the dual of the LP is a constrained shortest path problem: given dual values y e ≥ 0 for each e, find the shortest y-length path among all paths between u i and v i containing at most edges. Since this problem can be solved in polynomial time using dynamic programming [1], we can solve the length-constrained version of lpmain in polynomial time.
Finally, fast combinatorial methods that compute (1+ε)-approximate solutions for lpmain are also known [30,18,16]; these methods can also be applied to the variant discussed above that requires the flow to be only on paths with at most edges.

Expansion, Strong Expansion, and Flow Number
We now state the several notions of expansion and connectivity used in this paper. The first definition is standard, while the second one is motivated by the work of Frieze [17].
and if α is the largest real with this property.
We say that G is a strong expander if it is an (α, β, γ)-expander for some constants α, β, γ with β sufficiently small.
Basically, this definition implies that the graph, besides having expansion α as in Definition 2.1, has even better expansion (1 − β) on "small" sets of vertices. Note that the condition of being an (α, β, γ)-expander gets stronger as β decreases. As noted by Frieze [17], random regular graphs and Ramanujan graphs [27] are examples of strong expanders.
Finally, we define the flow number F G of a graph G = (V, E), a concept first used by Kolman and Scheideler [25]. Let deg(x) denote the degree of vertex x ∈ V . Consider the following concurrent multicommodity flow instance defined on G: let all edges in G have unit capacity, and let the demand between any pair of vertices For any solution S to this instance, define the flow value to be the maximum λ such that S routes at least a λ fraction of every demand in the instance. Let the dilation D(S) be the length of the longest flow path in S, and the congestion C(S) be the inverse of the flow value; in other words, we have to scale the edge capacities by C(S) to ensure that all demands are satisfied by this flow S. The flow number F G is defined as the minimum, over all possible solutions S, of the quantity max{C(S), D(S)}.
An important result proved in [25,Theorem 2.4] is the following: if G has edge-expansion α, and maximum degree ∆, then For their results on UFP in [25], Kolman and Scheideler extended the definition of the flow number to handle non-uniform capacities. This was done essentially by replacing each edge by c e parallel copies, and letting the capacitated flow number F G,c be the flow-number of the resulting graph 3 .
It is worth noting that the quantities F G,c and F G are incomparable. Indeed, consider the line graph on n nodes, where all edges except the middle edge in the line have capacity c, and the middle edge has capacity 1. It can be verified that On the other hand, consider the balanced binary tree on n nodes, where all edges at level i have capacity Finally, we shall often make use of the following Chernoff-Hoeffding bound (see [28]).

Approximation Bounds for UFP Based on Expansion
As indicated in Section 1.2, our approach will be to show that the flows in any fractional solution to lpmain can be rerouted to yield a new fractional solution in which the flow paths use few edges of small capacity, where "few" is quantified using the flow number F G ; we will call such a solution favorable. While such a rerouting may reduce the profit of the resulting solution, we prove that this loss can be made small. Next, we will show that any favorable fractional solution can be rounded efficiently to an integral solution without much reduction in the profit.

Rerouting Using Short Paths
The idea of rerouting to use short flow paths is not new, having been first given by Kleinberg and Rubinfeld [22], and subsequently widely used. Our contribution is to redefine the notion of "short": we restrict our attention only to edges of low capacity, requiring our paths to have few edges of small capacity. Note that this rerouting procedure need not be algorithmically efficient: we merely want to establish the existence of a favorable fractional solution with high profit. If we know such a solution exists, it can be obtained by solving a modified version of lpmain in which we have f π variables defined only for paths which use few edges of small capacity. As mentioned in Section 2.1, such an LP can be solved exactly in polynomial time using the ellipsoid method or approximately solved using efficient combinatorial algorithms.
Before getting into the technical details, let us recall that F G = O(∆α −1 log n), and that the capacities and demands have been normalized so that c min = 1 and ρ max ≤ 1.

Definition 3.1 (Favorable solution)
A fractional solution to lpmain is said to be (c, d)-favorable if every flow path used by the solution has at most d edges of capacity at most c.
The following corollary will be useful in the context of UCUFP; it is obtained by setting c = 1 in Theorem 3.2. The remainder of this section is devoted to the proof of Theorem 3.2; the reader more interested in the rounding of favorable solutions should skip to Section 3.2.
Proof of Theorem 3.2: Our proof will use the concept of a balanced multicommodity flow problem (BMFP) defined by Kolman and Scheideler [25]. For our purposes, a BMFP instance consists of an uncapacitated graph, a set of ordered vertex pairs {(u i , v i )}, and demands 0 ≤ ρ i ≤ 1, one for each vertex pair. The total demand entering a vertex v is defined as the sum of ρ i for all i such that v i = v; the total demand leaving a vertex is defined similarly. In a BMFP instance, the total demand entering or leaving a vertex x is required to be equal its degree deg(x).
Suppose, as in the statement of Theorem 3.2, that we are given a fractional solution to lpmain with profit W . Let P be the set of all flow paths used by this solution. Set L = 2cF G /ε. Let P denote the subset of P consisting of paths with at least 2L edges of capacity at most c. We shall now define an instance of BMFP on the underlying uncapacitated graph G. For each flow path π ∈ P , if π ∈ P i , let us "orient" it from s i to t i , and for vertex u on π, let pred π (u) denote the vertex that is the predecessor of u on π. We say that u is a good vertex if pred π (u) exists and the edge (pred π (u), u) has capacity at most c. Let u 1 , u 2 , . . . , u L be the first L good vertices on π, and let v 1 , v 2 , . . . , v L be the last L good vertices on π. We add the pairs {(u j , v j ) : 1 ≤ j ≤ L}, each with demand ρ i f π /c, to the BMFP instance. We do this for all the flow paths in P . Since each edge e incident to a vertex x can contribute at most min{c e /c, 1} to the demand entering or leaving x, the total demand entering or leaving any vertex is clearly at most its degree. We then add dummy demands, if required, to satisfy the definition of a BMFP. We now need the following proposition, which appears in [25, Claim 2.2]: fraction of all the demands (i.e., each demand scaled down by 1/(2F G )) in a BMFP can be concurrently satisfied on the underlying uncapacitated graph G using a family of flow paths of length at most 2F G each.
Let Q be a family of flow paths guaranteed by Prop. 3.4. We take the flow going over paths in P , and use these paths in Q to reroute this flow. Note that a path π ∈ P is associated with L paths in Q, each of which "shortcuts" π. We send ρ i f π /L flow through each of these shortcuts, adjusting the flow on edges in π appropriately. When we do this for all paths, we obtain a candidate fractional solution with profit W that uses paths with at most max (L + 2F G , 2L) edges of capacity at most c. Notice that L + 2F G ≤ 2L, if ε ≤ 1. Thus, the flow paths in this candidate solution have at most 2L = 4cF G /ε edges with capacity at most c.
This candidate solution could violate some edge capacities. However, by Prop. 3.4, had we sent ρ i f π /(2cF G ) flow through each shortcut for π ∈ P we would have had a total flow of at most 1 on each edge. Since we are in fact sending ρ i f π /L = ερ i f π /(2cF G ) flow over each shortcut, we get a total flow of at most ε on each edge due to the shortcuts. Thus, after adding the flow paths in P \ P , the total flow on an edge e is at most c e + ε ≤ (1 + ε)c e . Now, scaling each flow value and each x i by 1/(1 + ε) gives us a feasible solution. The new profit after scaling is clearly W/(1 + ε), which proves Theorem 3.2.

Rounding a Favorable Solution
Theorem 3.5 For a large enough value of d, given a (log n, d)-favorable fractional solution to lpmain with profit W , we can efficiently compute a (random) integral solution with expected profit W such that: Before proving this theorem, let us derive some of the results implied by it.
Corollary 3.6 For graphs with expansion α and maximum degree ∆, the following can be derived. But this integral solution is also feasible for I 2 , since we only increased demands in going from I 2 to I 2 ; thus we have an O(d 1/B )-approximation for I 2 .
Either I 1 or I 2 has optimal profit at least half that of I, so we can simply pick the better of the two approximate solutions. Finally, for UFP, we can set d = O(F G log n) by applying Theorem 3.2; for UCUFP, Corollary 3.3 implies that we can set d = O(F G ).
Remark. The above corollary implies a constant factor approximation for UCUFP when ρ max ≤ 1/ log F G . If ρ max ≤ 1/ max{ log F G , log log n}, then a constant factor approximation can be obtained for UFP as well. Thus, in cases when F G = O(log n), such as when G is a butterfly or an expander, UFP has a constant factor approximation algorithm when ρ max = O(1/ log log n). Our algorithms are considerably simpler than those in [25] that achieve similar results. Also, our proofs (as the reader will soon see) are substantially simpler than those in [25] which rely upon the Lovász Local Lemma.

Rounding in the General Case
In this section and the following one, we prove the several parts of the Theorem 3.5. Our rounding is based on the work of Srinivasan [34]: we randomly round the (log n, d)-favorable fractional solution after appropriate scaling, and follow that by an alteration phase to obtain a feasible solution. We prove that this yields an O(d) approximation in expectation. We note that Srinivasan [33], and Baveja and Srinivasan [9] showed that randomized rounding yields an O(d) approximation for UCUFP if all flow path lengths are bounded by d. However, the proof is involved and is based on the FKG inequality. While it is conceivable that those techniques can be used to round the favorable solutions guaranteed by the previous section, we believe that such an approach would be more involved than the one we present below.
Proof of Theorem 3.5 (Part 1): The rounding procedure works in two phases: the selection phase where we choose random paths, and the pruning or alteration phase, in which we ensure that our solution is feasible.
Selection Phase: Independently, for each i ∈ {1, . . . , k}, we do the following: we select at most one of the paths in P i with the property that each path π ∈ P i is selected with probability equal to f π /(16d). To do this, let us order the paths in P i arbitrarily as π 1 , π 2 , . . . , π h . For 0 ≤ j ≤ h define y j as 1 16d ≤j f π . Now pick a random number ζ from [0, 1]. We select path π j iff ζ ∈ [y j−1 , y j ); if ζ ≥ y h , no path is selected. Since π∈P i f π = x i , we will have selected some path in P i with probability x i /(16d).
Alteration/Pruning Phase: For path π ∈ P i , let ρ(π) to denote the demand value ρ i associated with π. We sort the paths in descending order of their demand values. We consider the paths picked picked in the selection phase, one by one in the sorted order above. When considering a path π we either add it to the final solution or discard it. The criterion for adding a path π to the solution is as follows: if π can be added to the current set of paths without violating edge capacities, add it, else discard it. If some path π is added, it should be understood that the demand ρ(π) is routed along π.
It is clear that we will have a feasible integral solution at the end of the pruning phase. The following lemma suffices to prove Part (1) of Theorem 3.5.
Lemma 3.7 The resulting random integral solution has expected profit Ω(W/d).
Before proving this lemma, let us state a technical probabilistic tail estimate whose proof we defer to the appendix.
Lemma 3.8 Let a 1 , . . . , a h , y 1 , . . . , y h ∈ [0, 1] be such that ∀ i < j : a i ≤ 1 2 ⇒ a j ≤ 1 2 and furthermore h i=1 a i y i ≤ 1. Let 0 < θ < 1 and let independent 0-1 random variables Y 1 , . . . , Y h and (possibly dependent) 0-1 random variables Z 1 , . . . , Z h be defined as follows: Then, for each i, Pr[Z i = 0] is at most Proof of Lemma 3.7: Recall that the pruning phase of the algorithm orders the paths used by the (log n, d)-favorable solution in a specific way, based upon the demand values associated with the paths, thereby effectively ordering the k commodities. Without loss of generality, assume that this ordering is 1, 2, . . . , k. Now, for each commodity i, edge e and path π ∈ k i=1 P i , define indicator random variables for the following events of interest: • X i (π), for the event "the selection phase chooses path π ∈ P i ".
• Y i (e), for the event "the selection phase chooses a path in P i that contains e".
• Z i (e), for the event "even if all commodities preceding i were routed along the paths chosen for them in the selection phase, there would be at least ρ i residual capacity on edge e".
• A i (π), for the event "the final random solution (after the pruning phase) routes commodity i along path π".
• A i , for the event "commodity i is routed in the final random solution".
Note that the pruning phase eliminates a path π chosen in the selection phase only if Z i (e) = 0 for some e ∈ π. Therefore, where the final equation follows because Z i (e) is independent of the routing of commodity i, by definition. We already know that Pr[X i (π) = 1] = f π /(16d), so we turn our attention to upper bounding Pr[Z i (e) = 0].
Fix an edge e ∈ E(G). The random variables {Y i (e)} k i=1 are easily seen to be independent from the description of the rounding algorithm. Also, setting y i (e) = π∈P i :π e f π and θ = 1/(16d), we get Pr[Y i (e) = 1] = θy i (e). Setting a i (e) = ρ i /c e and using the constraints in lpmain, we see that for all i, a i (e), y i (e) ∈ [0, 1] and that k i=1 a i (e)y i (e) ≤ 1. Translating the definition of Z i (e) into algebraic notation directly gives us Z i (e) = 1 iff j<i a j (e)Y j (e) ≤ 1 − a i (e). Finally, the ordering of the paths before the pruning phase ensures that ∀ i < j : a i (e) ≤ 1 2 ⇒ a j (e) ≤ 1 2 . Therefore, we may apply Part 1 of Lemma 3.8 to obtain For those edges that satisfy c e > log n, we can say something stronger. Since ρ max ≤ 1, the random variables ≤ c e /(16d). Now, for any i, . The Chernoff-Hoeffding bound, after some routine algebra, gives for large enough d. Finally, recall that we started with a fractional solution that was (log n, d)favorable, i.e., on any path π used by the solution, there are at most d edges of "small" capacity (≤ log n). Applying Using this in (3.2) gives Pr[A i (π) = 1] ≥ Pr[X i (π) = 1] · (1 − 1 2 ) = f π /(32d). As the selection phase chooses at most one path for each i, we have Pr . Therefore the expected profit of the final solution (after the pruning phase) is This completes the proof of Part 1 of Theorem 3.5.

Exploiting a Gap between Demands and Capacities
We now complete the proof of Theorem 3.5 by proving the remaining two parts.
Proof of Theorem 3.5 (Part 2): So far, we have worked with arbitrary demands subject only to the no-bottleneck assumption. This part of the theorem applies when we have the stronger guarantee that there is a separation between the largest demand and the smallest capacity (i.e., in the language of our normalized variables, ρ max is bounded away from 1). For the proof, we modify the above rounding algorithm to produce even better solutions.

Proof of Theorem 3.5 (Part 3):
This part of the theorem handles the case when we have an even stronger guarantee on the demands: they are discrete, i.e., each ρ i = 1/B for some integer B ≥ 2. For this case, we assume that the edge capacities are integers: if the capacities are not integral, we can round the capacity c e of each edge down to c e , and scale down the fractional solution (by at most a factor of two) to maintain the feasibility of the solution. Now we use a rounding algorithm where we select a path π with probability f π /(2ed 1/B ). The analysis is very similar to the ones above, but since a i (e) = ρ i /c e = 1/c e B (and c e is a positive integer), we can use Lemma 3.8 Part 3; indeed, setting θ = 1/(2ed 1/B ), we obtain the following.
Continuing the analysis as before, we see that our expected profit is at least W/(4ed 1/B ) = Ω(W/d 1/B ). Finally, note that the claimed guarantee for the case of B = 1 is Ω(W/d 1 ) which follows from Section 3.2.1, and hence our result for the discrete case holds for all B ≥ 1.

An Improved Result for Strong Expanders
For strong expanders as specified in Definition 2.2, we can improve over the results in Corollary 3.6 to obtain the following theorem. To prove this, we need the following result of Frieze [17].

Theorem 4.2 (Frieze)
There exist constants k 1 , k 2 such that given an n-vertex ∆-regular strong expander, with ∆ sufficiently large, any (k 1 ∆n/ log n) pairs of vertices, with no vertex appearing in more than k 2 ∆ pairs, can be connected by disjoint paths of length O(log n) in polynomial time.
In order to prove the theorem above, we will need the following lemma.
Lemma 4.3 Given a graph G = (V, E) with weights w e on edges, and parameters k and C, suppose we want to find a set of k (or fewer) edges of maximum total weight such that no vertex is adjacent to more than C of these edges. There is a polynomial time O(1)-approximation algorithm for this problem. In fact, the approximation ratio of this algorithm remains a constant even if we allow the optimum to have C edges adjacent to any vertex, where C is O(C).
Proof of Lemma 4.3: Consider the greedy algorithm that repeatedly picks the heaviest unpicked edge that does not already have C picked edges incident to one of its end-points. The algorithm stops if k edges have been picked or if there are no edges that can be picked. We claim that this algorithm is a constant factor approximation algorithm for this problem. Let F be the set of edges picked by our algorithm, and let F * be the set of edges in an optimal solution.
We only need to bound the cost of the edges in F * \ F . Let V be the set of vertices v such that F has C edges incident to v. For v ∈ V , let l v be the smallest weight of an edge in F incident to v.
It is easy to see that v∈V C · l v is at most twice the weight of the edges in F . We claim that the weight of the edges in F * \ F is at most v∈V C · l v .
Indeed, let e ∈ F * \ F . When the greedy algorithm considers e but does not pick it, our solution must have already picked C edges incident to one of the end-points of e. Let this end-point be u. Then, w e ≤ l u and we charge the weight of e to u. Since F * contains at most C edges incident to any vertex, this charging scheme charges at most C · l v to any vertex in v in V . Hence the total weight of edges in F * \ F is at most the total charge to vertices in V , which is in turn at most v∈V C · l v . The second part of our lemma is also easy to see, because then the total charge on any vertex v is at most C · l v .
Proof of Theorem 4.1: Suppose we have an instance I of UCUFP. Fix an optimal integral solution O for I and partition the terminals pairs of O into three parts as follows: • O 1 includes exactly those pairs with demand at most 1 2 .
• O 2 includes exactly those pairs not in O 1 , and routed by O on paths of length at most √ log n.
• O 3 includes the rest of the pairs.
We will use these three parts to prove the performance guarantee of our algorithm, which we now describe.
Our algorithm partitions I into two instances: I 1 , which is I restricted to demands ρ i ≤ 1 2 , and I 2 , which is I \ I 1 . By Corollary 3.6, applied with B = 2, we can find a solution to I 1 that O ∆α −1 log n -approximates the optimum (here α is as in Definition 2.2). Since O 1 is a feasible solution for I 1 , our solution is within the same factor of O 1 . Now we solve an LP relaxation of I 2 with the added restriction that flow path lengths are at most √ log n. By part 1 of Theorem 3.5, the fractional solution can be rounded to give an O( √ log n)approximation to the LP optimum. Since O 2 is feasible for the LP relaxation, we obtain an O( √ log n)-approximation to the value of O 2 .
Finally, we give an approximation to O 3 . First we bound |O 3 |. Each demand in O 3 is more than 1 2 , thus a feasible solution induces edge disjoint paths for the pairs. Further, by definition, each pair in O 3 uses a path of length at least √ log n. Therefore, it follows that |O 3 | ≤ |E(G)|/ √ log n = O(∆n/ √ log n). We choose a set of pairs S such that |S| ≤ k 1 ∆n/ log n and no more than k 2 ∆ pairs in S are incident to any vertex. Here k 1 and k 2 are the constants in Theorem 4.2. We do this as follows. We build an auxiliary graph G on the vertex set V ; for each demand (s i , t i ) in I 2 we have an edge in G between s i and t i and the weight of this edge is w i . Now, we obtain S as the collection of edges in G using Lemma 4.3 with k = (k 1 ∆n/ log n), C = k 2 ∆ and C = ∆. From the lemma, the total weight of the pairs in S is within a constant factor of the k 1 ∆n/ log n pairs in

Line and Ring Networks
In this section we consider UFP restricted to the line network. We handle the ring network in a very similar fashion; we give the relevant details at the end of the section. Before we proceed, let us fix some notation. The terminal pairs now form intervals I 1 , I 2 , . . . , I m on the line [1, n], with I j having demand ρ j and weight (or profit) w j . Edge e on the line has capacity c(e). For an edge e, let I(e) be the set of all demands (intervals) that contain e. Recall that we are working under the no-bottleneck assumption: ρ max ≤ 1 = c min .
The UCUFP on the line is equivalent to a resource allocation problem that has been studied recently [29,7,10,13]; however, we will not use the resource allocation terminology. Constant factor approximation algorithms for the resource allocation problem, and consequently UCUFP on the line, have been obtained via several different techniques -LP rounding [8,29], the local-ratio method [7,10], and primal-dual algorithms [7,10]. Most of these techniques do not seem to extend to UFP on the line where capacities are non-uniform. There is, however, one exception: a recent algorithm of Calinescu et al. [13] which gives constant factor approximations for UCUFP on the line. We extend their algorithm and analysis to non-uniform capacities. Their algorithm is the following: the demands are divided into two sets, one set containing demands which are "large" compared to the (common) capacity, say 1, and the other containing the rest. Dynamic programming is then invoked to find the optimal solution on the set of large demands. For the "small" demands, the algorithm solves the LP and then randomly rounds the solution (after scaling it by a constant α < 1). The resulting set of demands has the right weight in expectation, but it may not be feasible. The alteration step then looks at the randomly chosen demands in order of their left end points, accepting a demand in the final output if adding it maintains feasibility. Since all edges have capacity 1, a demand I j is rejected in this step if demands sharing an edge with it and that have been inserted earlier add up to 1 − ρ j . However, these demands are small and their expected sum is at most α, so applying a Chernoff bound shows the probability that a demand is chosen randomly and later rejected is small.
Our algorithm for UFP is very similar to that in [13], but the analysis requires new ideas. One difficulty is the following: in the alteration step, a demand ρ j which spans edges e 1 , e 2 , . . . , e k in the left-to-right order is rejected if for some edge e i , the demands already accepted that are using edge e i sum up to more than c(e i ) − ρ j . In the uniform capacity case it is sufficient to just look at the edge e 1 for the rejection probability. In the non-uniform case, taking a union bound for the rejection probability over edges e 1 , . . . , e k is too weak to give a constant factor approximation and we need a more careful analysis.
Another idea is needed in defining small and large demands so that dynamic programming is still feasible for the large demands, and the small demands are still small enough to allow us to make the concentration arguments. To this end, we define the bottleneck capacity b j of a demand I j to be the capacity of the lowest capacity edge on this demand. Now a demand I j is δ-small if ρ j ≤ δb j , else it is δ-large.
In the sequel, we show how to find the optimal solution for the δ-large demands, and a constant factor approximation for the set of δ-small demands, for some appropriate choice of δ. We then output the better of the two solutions.

The Large Demands
The following lemma is key to invoking dynamic programming to find an optimal solution for the δ-large demands in n O(1/δ 2 ) time.
Lemma 5.1 The number of δ-large demands that cross an edge in any feasible solution is at most 2 1/δ 2 .
Proof : Fix a feasible solution S, and consider an edge e. Let S e be the set of all δ-large demands in S that cross e. We partition S e into two sets S and S r as follows: a demand in S e is in S if it has a bottleneck capacity edge to the left of e (including e), otherwise the demand is in S r . We show that |S | ≤ 1/δ 2 , and a similar argument shows that |S r | ≤ 1/δ 2 .
Let A be the set of bottleneck edges for demands in S and let e be the rightmost edge in A.
Since e is the bottleneck edge for some δ-large demand I j ∈ S , by definition, ρ j ≥ δc(e ). Since ρ j ≤ c min , it follows that c(e ) ≤ c min /δ. Because e is the rightmost edge in A, all demands in S pass through e . But each demand I k in S is δ-large, which implies that ρ k ≥ δb k ≥ δc min . It follows that |S | ≤ c(e )/(δc min ) ≤ 1/δ 2 .
Using Lemma 5.1 and standard dynamic programming ideas, we obtain the following.

Theorem 5.2
For an instance of UFP on a line network that has only δ-large demands, an optimum solution can be found in n O(1/δ 2 ) time.
The dynamic program computes a

The Small Demands
We now show that for any constant δ < 1 2 , when all demands in a UFP instance are δ-small, we can give an O(1)-approximation to the optimal solution. The approximation factor deteriorates as δ increases. On the other hand, the running time of the algorithm in Theorem 5.2 increases as δ decreases. Let us choose the parameters as follows: δ = 0.001, and α = 0.032 .
We first solve the linear program lpmain for the problem. Let x j be the fractional value assigned to demand I j . We define two {0, 1}-random variables X j and Y j as follows.
1. Let X j be set to 1 independently with probability αx j .
2. Sort the demands corresponding to X j = 1 in order of their left end points (breaking ties arbitrarily). Consider them in this order, adding the current demand to the output if the addition does not violate any edge capacity. Set Y j = 1 if demand I j is output.
By construction, this procedure produces a feasible solution. Clearly, E [X j ] = Pr[X j = 1] = αx j . The probability that I j will be in the final solution is E [ The rest of the argument shows that Pr[Y j = 0 | X j = 1], the chance of rejection, is at most 0.597; this, in turn, shows that the expected weight of the solution is at least j w j x j /77.51, i.e., a constant factor away from the weight of the fractional solution.
Let us focus on a particular demand I j with X j = 1, and let E j = e 1 , . . . , e k be the edges on I j from left to right. The crucial idea is the following: when considering I j , its probability of rejection depends on whether there is "enough room" on all these edges. Instead of taking a union bound over all edges, we choose a subsequence of edges such that the capacity of each edge drops by half, and such that for a demand to be rejected, a "bad" event happens at one of these chosen edges. Now a union bound on the bad events at these edges suffices. We show that this union bound gives us a sum whose terms decrease rapidly -faster than geometrically -and thus the chance of rejection is a constant times the probability of rejection on some edge e i . Finally, arguments similar to that in [13] complete the proof.
Formally, create a subsequence E j = e i 1 , e i 2 , . . . , e i h of E j as follows: set i 1 = 1, and hence e i 1 = e 1 . For > 1, set i = min{t : t > i −1 and c(e t ) < c(e i −1 )/2}. In other words e i is the leftmost to the right of e i −1 with capacity at most half the capacity of e i −1 . If there is no such edge we stop the construction of the sequence. For 1 ≤ a ≤ h, let E a denote the (bad) event that the random demands chosen in step 1 use at least 1 2 c(e ia ) − δb j capacity in the edge e ia . Recall that b j is the bottleneck capacity of I j . The following lemma shows that it is enough to bound the chance that no bad event occurs on these chosen edges.
Proof : If Y j = 0 and X j = 1 then some edge e g ∈ E j had a capacity violation when I j was considered for insertion. Let e ia be the edge in E j to the left of e g and closest to it. (Here, an edge is considered to be "to the left" of itself.) Note that such an edge always exists since e i 1 = e 1 , and e 1 is the left most edge in I j . By the construction of the subsequence, c(e g ) ≥ 1 2 c(e ia ). If the capacity of e g was violated while trying to insert I j , it must be that the capacity of demands already accepted that cross e g is at least c(e g ) − ρ j which is lower bounded by 1 2 c(e ia ) − δb j : we use the fact that I j is small which implies that ρ j ≤ δb j and the fact that c(e g ) ≥ 1 2 c(e ia ). However, any interval that is accepted before I j and crosses e g , must also cross e ia , and thus event E a occurs. Applying the trivial union bound, we have Pr It is not enough to bound each Pr[E a ] by a constant, because we may have to take a union bound over up to Θ(n) of these. But the following lemma addresses this concern.
Lemma 5. Also, where the last inequality follows from the feasibility of the LP solution. Since Q a is a sum of independent random variables distributed in [0, 1] we apply a Chernoff-Hoeffding bound to get where the final inequality follows by plugging in the constants we chose for α and δ. Since c(e ia ) < c(e i a−1 )/2 and each c(e ia ) ≥ 1, we now get: which proves the lemma.
The previous two lemmas together imply Pr[Y j = 0 | X j = 1] ≤ 0.597, and so the approximation ratio of our algorithm is at most 1/(0.403α) ≤ 77.51.

Combining Large and Small Demands
We combine the algorithms for large and small demands in a straightforward manner. Partition any given instance of UFP on the line into two sub-instances: I L , which contains only the δ-large demands, and I S , which contains only the δ-small demands. Solve I L optimally, and find a 77.51approximation to the optimum of I S ; we know how to do both these things in polynomial time.
Then, simply output the better of the two solutions.
In an optimal solution to I, either the small demands contribute at least a 77.51/78.51 fraction of the weight, or the large demands contribute at least a 1/78.51 fraction of the weight. Choosing the better of the two solutions, as above, ensures that we always obtain at least a 1/78.51 fraction of the weight of an optimal solution to I. Thus, we have proved the following theorem (we remind the reader than we have not tried to optimize our constants).
Theorem 5.5 There is a polynomial time 78.51-approximation for UFP on the line if ρ max ≤ c min .

Corollary 5.6
There is a constant factor approximation for UFP on the line when ρ max /ρ min is bounded even without the no-bottleneck assumption. Hence, for arbitrary demands we get an O (log (ρ max /ρ min )) approximation.
Proof sketch: Since the analysis for the δ-small demands does not use the fact that ρ max ≤ c min , we need to only consider the large demands. For the δ-large demands, an argument similar to that in Lemma 5.1 and Theorem 5.2 works when ρ max /ρ min is bounded.
So, given arbitrary demands, we can divide them into O (log (ρ max /ρ min )) classes so that for any two demands j and j in the same class, ρ j /ρ j is bounded. This proves the result.

Integrality Gap
In this section, we show that the integrality gap of the natural LP for instances with ρ max ≤ c min is upper bounded by some fixed constant. The algorithm described in the previous section uses dynamic programming for large demands and hence it does not imply a constant factor bound on the integrality gap of the LP. If we do not have the no-bottleneck assumption, the integrality gap can be Θ(log(ρ max /ρ min )). Thus, the performances of our algorithms, both with and without the no-bottleneck assumption, match the integrality gap of the LP to within a constant factor.
Theorem 5.7 The integrality gap of the natural LP is O(1) when ρ max ≤ c min . For arbitrary demands the integrality gap is Θ((log (ρ max /ρ min )) which can be Ω(n).
Proof : We first show that the integrality gap of the natural LP is O(1) when ρ max ≤ c min . Consider a fractional solution to lpmain. Let x j be the fractional value assigned to demand I j . Let S δ denote the set of δ-small demands, where δ is as chosen in Section 5.2. Consider the fractional profit accrued by the δ-small demands, i.e., j∈S δ w j x j . If this is at least half the total profit of the LP solution, then we are done. This is so because we have already shown that the LP restricted to δ-small demands, for sufficiently small δ has at most a constant integrality gap.
Let L δ be the set of demands i such that ρ i ≥ δρ max . Note that L δ contains the δ-large demands but could include some δ-small demands as well. If S δ does not have half the profit of the LP solution then clearly L δ does. We show how we can obtain an Ω(δ) fraction of the profit of L δ . Suppose, for each demand i ∈ L δ , we increase ρ i to ρ i = ρ max and decrease x i to x i = δx i /2. Also, for each edge e, we round down the capacity c(e) to c (e) such that c (e) is the largest integer multiple of ρ max less than c(e) -note that c (e) is at least c(e)/2. From this, it is easy to see that x is a feasible solution to ρ with edge capacities c . The profit of this solution has decreased by at most δ/2. Also, any feasible solution to this new instance is feasible for the original instance since, in going from the original to the new instance, we only increased demands and reduced capacities.
Observe that the instance we have created has all demands of equal size and all capacities that are integer multiples of the demand. For such instances, which are basically unit demand instances, the integrality gap of the LP is 1. This is a well known fact and follows from the total unimodularity of consecutive-ones matrices [32]. Therefore we can recover a δ/2 fraction of the profit of L δ .
Thus, for some sufficiently small but fixed δ, either S δ or L δ gives an f (δ) fraction of its fractional profit for some function f . It follows that the integrality gap of the LP is O(1). We now remove the assumption that ρ max ≤ c min . In this case we partition the demands into O(log ρ max /ρ min ) sets S 0 , S 1 , S 2 , . . . where S j contains demands i such that ρ i ∈ [ρ max /2 j , ρ max /2 j+1 ). For demands in any particular S j , using arguments similar to those in Corollary 5.6, we can show that the integrality gap of the LP is O(1). Picking the set S j with the largest fractional profit from the LP shows that the integrality gap of the LP is O(log ρ max /ρ min ).
We now prove that the integrality gap is Ω (log (ρ max /ρ min )). Consider the line graph on n + 1 points corresponding to the integers in [0, n]. The capacity of the edge (i, i + 1) is 1/2 i . We have n demands. Demand I j corresponds to the interval [0, j], and ρ j = 1/2 j−1 . All demands have profit 1. We claim that any integral solution can route only 1 demand. To see this, let I j be the demand with the smallest index that is routed in the solution. I j saturates the edge (j − 1, j) and hence no other demand I j , j > j can be routed. Thus, any integral solution has profit at most 1. Now we construct a fractional solution with profit Ω(n). The fractional solution assigns x j = 1/2 for all demands I j . Consider the edge (j, j + 1). The demands which contain this edge are I j , j > j. But note that j :j >j ρ j ≤ 2/2 j . Thus, the fractional solution is a feasible solution. The profit of this solution is n/2. Also, notice that ρ max /ρ min is O(2 n ). Thus, we have shown the desired integrality gap.
A bound of Θ(log ρ max /c min ) on the integrality gap can also be obtained by slightly altering the above proof. We thank a reviewer for pointing this out.

UFP on a Ring Network
Finally, we consider UFP on the ring network. Unlike the line network, this gives us a choice of one of two paths for each demand. However, we can reduce the problem on the ring to that on a line network with a slight loss in the approximation factor as follows. Let e be any edge on the ring with c(e) = c min . Consider any integral optimal solution O to the problem. The demands routed in O can be partitioned into two sets O 1 and O 2 where those in O 1 use e and those in O 2 do not. We remove e and solve the problem approximately on the resulting line network. This clearly approximates the value of O 2 . To approximate the solution for O 1 , for each demand we choose the path that uses e and solve a knapsack problem to find a (1 + ε)-approximation to the maximum weight set of demands that can be routed with capacity bounded by c e , where ε is an arbitrarily small constant. Since c(e) = c min , any solution feasible at e will be feasible for the entire network. Thus we obtain: Theorem 5.8 For UFP on the ring there is a (1 + A + ε) approximation where A is the approximation factor for the problem on the line, and ε > 0 is any fixed constant.

Concluding Remarks
Our O(F G log n)-approximation algorithm for UFP is based on randomly rounding a fractional solution to the linear programming relaxation. Two natural questions suggest themselves: namely, whether (a) there exists a deterministic algorithm with a similar approximation ratio, and (b) whether there exists an online algorithm with a similar competitive ratio. The answer to both these questions is positive. For the former, note that the randomized algorithm presented in this paper can be derandomized using the method of conditional expectations and pessimistic estimators [31]. The standard details are not particularly illuminating, and hence we omit them.
Perhaps of greater interest is an online algorithm with a competitive ratio of O(F G log n) for the case of the throughput measure, that is, the case where the weights are proportional to the request size (w i = ρ i ). Such an algorithm can be obtained by combining the bounded greedy algorithm [21,25] and the algorithm of Awerbuch, Azar and Plotkin (AAP) [5] for large capacities. Kleinberg [21] has previously developed and analyzed such a combined algorithm in a related context. However, to apply this idea in our context, we need the existence of (log n, O(F G log n)) favorable solutions to the linear program. We briefly describe our algorithm here. An edge is called a low-capacity edge if its capacity is less than log n, and is called high-capacity otherwise. The AAP algorithm assumes that all edges are of high capacity; it maintains edge lengths that are exponential in the congestion of the edge-recall that the congestion of an edge e is the flow already routed on e, divided by the capacity of e. A path is good for the AAP algorithm if the total length of the path is at most some given bound (the L AAP bound) that depends only on n, the graph size. (Since we are only offering a sketch of the extension, we omit the precise definition of the AAP factor here.) The bounded greedy algorithm (BGA) [21,25] is relevant for the low-capacity case. A path is good for the BGA if the number of edges in it is at most a given bound B. We combine these two measures as follows. In the combined algorithm, we call a path good if the total number of low-capacity edges in it is O(F G log n), and the total length of the high-capacity edges is less than the AAP bound L AAP . The online algorithm works as follows. When a new pair (u, v) arrives, if a feasible good path exists between u and v, we route the demand pair (u, v) along any such path, otherwise we reject it. The lengths of the high-capacity edges are updated according to the AAP algorithm. The claimed competitive ratio can be obtained by combining the analysis for the bounded greedy algorithm from [25] with that of [5] and using the existence of (log n, O(F G log n))favorable solution to the LP. We note that the idea of combining the algorithm (and analysis) for high and low capacity edges is borrowed from earlier work of Kleinberg [21].
For UFP on the line and the ring, a (2 + ε)-approximation has been obtained in subsequent work by Chekuri, Mydlarz and Shepherd [15]. The improvement is based on a different algorithm for small demands which builds on certain grouping and scaling ideas for packing problems from the work of Kolliopoulos and Stein [23].
2. e B θ B−1 , if each a i ∈ [0, 1 B ] for an integer B ≥ 2. 3. e B θ B , if each a i = 1 B for an integer B ≥ 1.
Proof of Part 1: Fix an i and define the index sets I = {j < i : a j > 1 2 } and J = {j < i : a j ≤ 1 2 }. Then we have

Proof of Part 3:
We first consider the case B ≥ 2. This works a lot like Part 2 above, except that the random variables {Ba j Y j } j∈J are now {0, 1}-variables, so their sum Y , if greater than B − 1, must be at least B. Thus, as desired. Finally, we consider the case B = 1. In this case every a i = 1, so J = ∅. Also, 1 ≥ j∈I a j y j = j∈I y j , whence Combining this with (A.7) gives us Pr[Z i = 0] ≤ θ ≤ e 1 θ 1 , as desired.