Improved Algorithms for Scheduling Unsplittable Flows on Paths

In this paper, we investigate offline and online algorithms for rufpp, the problem of minimizing the number of rounds required to schedule a set of unsplittable flows of non-uniform sizes on a given path with non-uniform edge capacities. rufpp is NP-hard and constant-factor approximation algorithms are known under the no bottleneck assumption (NBA), which stipulates that maximum size of a flow is at most the minimum edge capacity. We study rufpp without the NBA, and present improved online and offline algorithms. We first study offline rufpp for a restricted class of instances called $\alpha$-small, where the size of each flow is at most $\alpha$ times the capacity of its bottleneck edge, and present an $O(\log(1/(1-\alpha)))$-approximation algorithm. Our main result is an online $O(\log\log c_{\max})$-competitive algorithm for rufpp for general instances, where $c_{\max}$ is the largest edge capacities, improving upon the previous best bound of $O(\log c_{\max})$ due to Epstein et al. Our result leads to an offline $O(\min(\log n, \log m, \log\log c_{\max}))$-approximation algorithm and an online $O(\min(\log m, \log\log c_{\max}))$-competitive algorithm for rufpp, where $n$ is the number of flows and $m$ is the number of edges.


Introduction
The unsplittable flow problem on paths (UFPP) considers selecting a maximum-weight subset of flows to be routed simultaneously over a path while satisfying capacity constraints on the edges of the path. In this work, we investigate a variant of UFPP known in the literature as Round-UFPP or capacitated interval coloring. The objective in Round-UFPP is to schedule all the flows in the smallest number of rounds, subject to the constraint that the flows scheduled in a given round together respect edge capacities. Formally, in Round-UFPP we are given a path P = (V, E), consisting of m links, with capacities {c j } j∈ [m] , and a set of n flows F = {f i = (s i , t i , σ i ) : i ∈ [n]} each consisting of a source vertex, a sink vertex, and a size. A set R of flows is feasible if all of its members can be scheduled simultaneously while satisfying

Previous work
The unsplittable flow problem on paths (UFPP) concerns selecting a maximum-weight subset of flows without violating edge capacities. UFPP is a special case of UFP, the unsplittable flow problem on general graphs. The term, unsplittable refers to the requirement that each flow must be routed on a single path from source to sink. 1 UFPP, especially under the NBA, UFPP-NBA, and its variants have been extensively studied [9,4,7,6,8,11,14,22,13].
Recently, O(1)-approximation algorithms were discovered for UFPP (without NBA) [10,3]. Note that, on general graphs, UFP-NBA is APX-hard even on depth-3 trees where all demands are 1 and all edge capacities are either 1 or 2 [18].
Round-UFPP has been mostly studied in the online setting where it generalizes the interval coloring problem (ICP) which corresponds to the case where all demands and capacities are equal. In their seminal work, Kierstead and Trotter gave an optimal online algorithm for ICP with a competitive ratio of 3ω − 2, where ω denotes the maximum clique size [20]. Note that, since interval graphs are prefect, the optimal solution is simply ω. Many works consider the performance of the first-fit algorithm on interval graphs. Adamy and Erlebach were the first to generalize ICP [2]. In their problem, interval coloring with bandwidth, all capacities are 1 and each flow f i has a size σ i ∈ (0, 1]. The best competitive ratio known for this problem is 10 [1, 17] and a lower bound of slightly greater than 3 is known [19]. The online Round-UFPP is considered in Epstein et. al. [16]. They give a 78-competitive algorithm for Round-UFPP-NBA, an O(log σmax cmin )-competitive algorithm for the general Round-UFPP, and

Preliminaries
In Round-UFPP we are given a path P = (V, E) consisting of m + 1 vertices and m links, enumerated left-to-right as v 0 , e 1 , v 1 , ..., v m−1 , e m , v m , with edge capacities {c j } j∈ [m] , and a set of n flows F = {f i = (s i , t i , σ i ) : i ∈ [n]}, where s i and t i represent the two endpoints of flow f i , and σ i denotes the size of the flow. Without loss of generality, we assume that s i < t i . We say that a flow f i uses a link e j if s i < j ≤ t i . For a set of flows F , we denote by F (e) and F (j) the subset of flows in F using edge e and e j respectively. Definition 1. The bottleneck capacity of a flow f i , denoted by b i , is the smallest capacity among all links used by f i -such an edge is called the bottleneck edge for flow f i .
A set of flows R is called feasible if all of its members can be routed simultaneously without causing capacity violation. The objective is to partition F into the smallest number of feasible sets R 1 , ..., R t . A feasible set is also referred to as a round. Alternatively, partitioning can be seen as coloring where rounds correspond to colors.
Definition 2. For a set of flows F , we define its chromatic number, χ(F ), to be smallest number of rounds (colors) into which F can be partitioned.
Definition 3. The congestion of an edge e j with respect to a set of flows F is that is, the ratio of the total size of flows in F using e j to its capacity. Likewise r e (F ) denotes the congestion of an edge e with respect to F . Also, let r max (F ) = max j r j (F ) be 23:4 Improved Algorithms for Scheduling Unsplittable Flows on Paths the maximum edge congestion with respect to F . When the set of flows is clear from the context, we simply write r max .
An obvious lower bound on χ(F) is maximum edge congestion; that is, Proof. Suppose e j is any edge of the path. In each round, the amount of flow passing through the edge is at most its capacity c j . Therefore, the number of rounds required for the flows in F using e j to be scheduled is at least r j (F ) .
Without loss of generality, we assume that the minimum capacity, c min , is 1. Furthermore, let c max = max e∈E c e denote the maximum edge capacity. As is standard in the literature, we classify flows according to the ratio of size to bottleneck capacity. Figure 1 for an example). Accordingly, the set of flows F is divided into small and large classes An example of a path with 5 links and two flows. The first flow f1 is from v1 to v3 of size 1; the second flow f2 is from v4 to v6 also of size 1. Even though both flows have the same size, f1 is 1 4 -large whereas f2 is 1 4 -small. The reason is different bottleneck capacities, b1 = 2 and b2 = 4.
As is often the case for unsplittable flow algorithms, we treat small and large instances independently. In §3 and §4 we study small and large instances respectively.

3
An approximation algorithm for Round-UFPP with α-small flows In this section, we design an offline O(1)-approximation algorithm for α-small flows for any α ∈ (0, 1). We note that offline and online algorithms for α-small instances are known when α is sufficiently small. More precisely, if α = 1/4, 16-approximation and 32-competitive algorithms for offline and online cases have been presented in [15] and [16] respectively.
However, these results do not extend to the case where α is an arbitrary constant in (0, 1). In contrast, we present an algorithm that works for any choice of α ∈ (0, 1). In our algorithm, flows are partitioned according to the ratio of their size to their bottleneck capacity. If α ≤ 1/4, we simply use Lemma 6. Suppose that α > 1/4. The overall idea is to further partition the set of flows into two subsets and solve each independently. This motivates the following definition.
Definition 7. Given two real numbers 0 ≤ β < α < 1, a flow f i is said to be [β, α] Accordingly, we define the corresponding set of flows as In the remainder of this section, we present an O(1)-approximation algorithm, called ProcMids, for F M (1/4, α). ProcMids (see Algorithm 1) starts by partitioning F M (1/4, α) into log c max classes according to their bottleneck capacity.
Next, it computes a coloring for each class by running a separate procedure called FlowDec, explained in §3.1. This will result in a coloring of F M (1/4, α) using O(r max log c max ) colors. Finally, ProcMids runs ColOptimize, described in §3.2, to optimize color usage in different subsets; this results in the removal logarithmic factor and, thereby, a more efficient coloring using only O(r max ) colors.

A logarithmic approximation
Procedure FlowDec (see Algorithm 5 in Appendix C) partitions F M into O(r max (F M )) rounds. In each iteration, it calls procedure rCover (Algorithm 2) which takes as input a subset F ⊆ F M and returns two disjoint feasible subsets C 1 , C 2 of F . In other words, flows in each subset can be scheduled simultaneously without causing any capacity violation. On the other hand, these two subsets cover all the links used by the flows in F . More formally, C 1 and C 2 are guaranteed to have the following two properties: rCover maintains a set of flows F which is initially empty. It starts by finding the longest flow f i1 among those having the first (leftmost) source node. Next, it processes the flows in a loop. In each iteration, the procedure looks for a flow overlapping with the currently selected flow f i k . If one is found, it is added to the collection and becomes the current flow. Otherwise, the next flow is chosen among those remaining flows that start after C V I T 2 0 1 6 23:6 Improved Algorithms for Scheduling Unsplittable Flows on Paths Algorithm 2: rCover input : A set of flows F output : Two disjoint feasible subsets of F satisfying Properties (P1) and (P2) the current flow's sink t i k . Finally, rCover splits F into two feasible subsets and returns them.
Lemma 9. Procedure FlowDec partitions F M into at most 8r max (F M ) feasible subsets.

Removing the log factor
In this subsection, we illustrate Procedure ColOptimize (see Algorithm 3), which removes the logarithmic factor by optimizing color usage. The result is a coloring with O(r max ) colors.

Algorithm 3: ColOptimize
Let τ be a constant to be determined later. Intuitively, the idea is to combine subsets of different levels in an alternating manner with τ serving as the granularity parameter. More .., log c max }, and i ∈ {1, ..., 4r max }, denote the set of colors resulting from the execution of FlowDec. ColOptimize combines colors from different classes to reduce the number of colors by a factor of τ / log c max resulting in 4τ · r max colors being used. An example is illustrated in Figure 3 in Appendix B. Next, we show that setting τ = log(1/(1 − α)) + 2 results in a valid coloring.
The main result of this section now directly follows from Lemma 10.

Algorithms for general Round-UFPP instances
In what follows, we present offline and online algorithms for general instances of Round-UFPP.
Our treatment of large flows involves a reduction from Round-UFPP to the rectangle coloring problem (RCOL) which is discussed in §4.1. Next, in §4.2, we design an online algorithm for the RCOL instances arising from the reduction. Later, in §4.3, we cover our online algorithm for Round-UFPP with 1 4 -large flows. Finally, in §4.4, we present our final algorithm for the general Round-UFPP instances.

The reduction from Round-UFPP with large flows to RCOL
Definition 12. Rectangle Coloring Problem (RCOL). Given a collection R of n axisparallel rectangles, the objective is to color the rectangles with the minimum number of colors such that rectangles of the same color are disjoint.
Each rectangle R ∈ R is given by a quadruple (x l (R), x r (R), y t (R), y b (R)) of real numbers, corresponding to the x-coordinates of its left and right boundaries and the y-coordinates of its top and bottom boundaries, respectively. More precisely, R = {(x, y) | x l (R) ≤ x ≤ x r (R) and y b (R) ≤ y ≤ y t (R)}. When the context is clear, we may omit R and write x l , x r , y t , y b . Two rectangles R and R are called compatible if they do not intersect each other; else, they are called incompatible.
The reduction from Round-UFPP with large flows to RCOL is based on the work in [10]. It starts by associating with each flow If we draw the capacity profile over the path P , then R i is a rectangle of thickness σ i sitting under the curve touching the "ceiling." Let R(F ) denote the set of rectangles thus associated with flows in F . We assume, without loss of generality, that rectangles do not intersect on their border; that is, all intersections are with respect to internal points. We begin with an observation stating that a disjoint set of rectangles constitutes a feasible set of flows.
Observation 13 ([10]). Let R(F ) be a set of disjoint rectangles corresponding to a set of flows F . Then, F is a feasible set of flows.
The main result here is that if all flows in F are k-large then an optimal coloring of R(F ) is at most a factor of 2k worse than the optimal solution to Round-UFPP instance arising from F . The following key lemma is crucial to the result.
Lemma 14 ([10]). Let F be a feasible set of flows, and let k ≥ 2 be an integer, such that every flow in F is 1 k -large. Then there exists a 2k coloring of R(F ).

Improved Algorithms for Scheduling Unsplittable Flows on Paths
As an immediate corollary, we get the following.
Corollary 15. Let F be a feasible set of flows, and let k ≥ 2 be an integer, such that every flow in F is 1 k -large. Then, χ(R(F )) ≤ 2kχ(F ).
Proof. Consider an optimal coloring C of F with χ(F ) colors. Apply Lemma 14 to each color class C i , for 1 ≤ i ≤ χ(F ), to get a 2k-coloring of R(C i ). The final result is a coloring of R(F ) using at most 2kχ(F ) colors.
We are ready to state the main result of this subsection.
Lemma 16. Suppose there exists an offline α-approximation (online α-competitive) algorithm A for RCOL. Then, for every integer k ≥ 2 there exists an offline 2kα-approximation (online 2kα-competitive) algorithm for Round-UFPP consisting of 1 k -large flows.
Proof. Given a set F of 1 k -large flows for some integer k ≥ 2, construct the set of associated rectangles R(F ) and apply the algorithm A to it. The solution is a valid Round-UFPP solution (Observation 13). Furthermore, by Corollary 15, Finally, the reduction does not depend on future flows; hence, it is online in nature.

Algorithms for RCOL
In this section, we consider algorithms for the rectangle coloring problem (RCOL). We begin by introducing a key notion measuring the sparsity of rectangles with respect to a set of lines. This is similar to the concept of point sparsity investigated by Chalermsook [12].
Definition 17 (s-line-sparsity). A collection of rectangles R is s-line-sparse if there exists a set of axis-parallel lines L R (called an s-line-representative set of R), such that every rectangle R ∈ R is intersected by k R ∈ [1, s] lines in L R (see Figure 2 for an example). For simplicity, we assume that representative lines are all horizontal. The objective is to design an online O(log s)-competitive algorithm for RCOL consisting of s-line-sparse rectangles. In the online setting, rectangles appear one by one; however, we assume that an s-line-representative set L R is known in advance. As we will later see, this will not cause any issues since the RCOL instances considered here arise from Round-UFPP instances with large flows from which it is straightforward to compute s-line-representative sets. In the offline case, on the other hand, we get a log(n) approximation by (trivially) computing an n-line-representative set-associate to each rectangle an arbitrary line intersecting it. The remainder of this subsection is organized as follows. First, in §4.2.1, we consider the 2-line-sparse case. Later, in §4.2.2, we study the general s-line-sparse case.

The 2-line-sparse case
Consider a collection of rectangles R and a 2-line-representative set L R = { 0 , 1 , ..., k } (that is, each rectangle R is intersected by either one or two lines in L R ) where the rectangles in R appears in an online fashion. Recall, however, that the line set L R is known in advance. Without loss of generality, assume that y( 0 ) < y( 1 ) < ... < y( k ).
For each R ∈ R, let T (R) denote the index of the topmost line in L R that intersects R; T (R) = max{i | i intersects R}. Next, partition R into three subsets R l = {R ∈ R | T (R) ≡ l mod 3}, for l = 0, 1, 2. (2) The following lemma shows that each of the above subsets can be viewed as a collection of interval coloring problem (ICP) instances.
Lemma 18. Suppose two rectangles R, R ∈ R belong to the same subset; that is, R, R ∈ R l for some l ∈ {0, 1, 2}. Then, the following are true. (

1) If T (R) = T (R ) and the projection of R and R on the x-axis have a non-empty intersection, then
We will use the optimal 3-competitive online algorithm due to Kierstead and Trotter for ICP [20]. The algorithm colors an instance of ICP of clique size ω with at most 3ω − 2 colors which matches the lower bound shown in the same paper. Henceforth, we refer to this algorithm as the KT algorithm. Now we can present an O(1)-competitive online algorithm, named COL2SP, with a known 2-line-representative set (see Algorithm 6 in Appendix C). COL2SP computes a partition of R into R 0 , R 1 , and R 2 as explained above. Then, it applies the KT algorithm to each subset. Note that COL2SP can be seen as executing multiple instances of the KT algorithm in parallel (see Figure 4 in Appendix B).

The s-line-sparse case
Consider a set of s-line-sparse rectangles R and an s-line-representative set L R . Our goal in this subsection is to demonstrate a partitioning of R into O(log s) 2-line-sparse subsets, where each subset is accompanied by its own 2-line-representative set. Given a set of lines L, we define the degree of a rectangle R ∈ R, with respect to L, to be the number of lines in L that intersect R, C V I T 2 0 1 6 23:10

Improved Algorithms for Scheduling Unsplittable Flows on Paths
We say that a rectangle R ∈ R is of level l ≥ 0 with respect to L R , if 2 l ≤ Deg L R (R) < 2 l+1 . The partitioning is based on the level of rectangles. More precisely, R is partitioned into log s + 1 "levels" Lev(i) = {R ∈ R | R is of level i}, for i = 0, 1, ..., log s .
Next we show that each level is a 2-line-sparse set. To this end, we present a 2-linerepresentative set for each level. Let L R = { 1 , 2 , ...., k } and define

An algorithm for Round-UFPP with large flows
We are ready to present ProcLarges, an algorithm for Round-UFPP with large flows. For concreteness, we present the algorithm for 1 4 -large flows; this result can be easily generalized to α-large flows for any α ≤ 1/2. The online algorithm we have designed for RCOL need to have access to an s-line-representative set L R for the set of rectangles R. In our case, these rectangles are constructed from flows ( §4.1) which themselves arrive in an online fashion. However, all we need to be able to compute an s-line-representative set is the knowledge of the path over which the flows will be running-that is P = (V, E) with capacities {c e } e∈E (recall that we assume that c min = 1, which can always be achieved via scaling if needed). It is possible to construct (at least) three different s-line-representative sets for R: L 1 A set of s = log 4/3 c max + 1 horizontal lines L = {l 0 , l 1 , ..., l s } where the y-coordinate of the ith line is y(l i ) = (3/4) i · c max . Note that 0 is the topmost line. L 2 A set of m vertical lines, one per edge in the path. L 3 A set of n axis-parallel lines, one per rectangle.
Note that L 3 is only useful in the offline setting. It is obvious that L 2 and L 3 are valid line-representative sets for R. Below, we show that L 1 is valid as well.
The algorithm ProcLarges, for 1 4 -large flows, can be seen in Algorithm 7 in Appendix C. Proof. In the online case, ProcSmalls is a 32-competitive [16]. On the other hand, by Proposition 23, ProcLarges is an O(min(log m, log log c max ))-competitive. Thus overall, algorithm SolveRUFPP is O(min(log m, log log c max ))-competitive. In the offline case, since the set of flows F is known in advance, we can get a slightly better bound by using L 3 in §4.3 as the third line-representative set (of sparsity s = n). Thus we get the O(min(log n, log m, log log c max )) bound by running the algorithm three times with L 1 , L 2 , and L 3 and using the best one.

Concluding remarks
In this paper, we present improved offline approximation and online competitive algorithms for Round-UFPP. Our work leaves several open problems. First, is there an O(1)-approximation algorithm for offline Round-UFPP? Second, can we improve the competitive ratio achievable in the online setting to match the lower bound of Ω(log log log c max ) shown in [16], or improve the lower bound? From a practical standpoint, it is important to analyze the performance of simple online algorithms such as First-Fit and its variants for Round-UFPP and RCOL. Another natural direction for future research is the study of Round-UFP and variants on more general graphs.

A Missing proofs
Here we provide the proofs that could not be included in the main text due to space constraints.
Proof of Lemma 9. By property (P1) of rCover, C i 1 and C i 2 are both feasible sets for any i. Consequently, the flows in C i 1 and C i 2 can be scheduled in two rounds. Moreover, by property (P2) of rCover, we have This implies that FlowDec runs for at most 4 · r max (F ) steps and therefore it partitions F into at most 8 · r max (F ) feasible subsets.

Proof of Lemma 8. Let
. . , f ip } denote the set of flows obtained by rCover after termination of the loop. We first establish that for 1 ≤ k < p, t i k < t i k+1 . This follows immediately from the selection of f i k+1 in iteration k + 1: in case 2, when there is an overlapping flow, the flow f i selected satisfies t i > t i k , while in case 3, when there is no overlapping flow, the flow f i selected satisfies t i > s i > t i k . We next show that for 1 ≤ k < p, if k + 2 ≤ p, then s i k+2 ≥ t i k , which implies that no two flows in C 1 (resp., C 2 ) overlap, establishing property (P1). The proof is by contradiction. Let k be the smallest index that violates the preceding condition. Consider iteration k + 1. Since f k+2 satisfies the conditions s i k+2 ≤ t i k and t i k ≤ t i k+2 , f k+2 is a flow that satisfies the conditions of case 2 in iteration k + 1. Since f i k+1 is the flow selected in iteration k + 1, it follows that t k+1 ≥ t k+2 , a contradiction to the claim we have just established.
It remains to establish property (P2). The proof is again by contradiction. Let e be the left-most edge for which (P2) is violated, and let f j be a flow that uses edge e. We consider two cases. The first case is where there exists an index k such that s j ≤ t i k . In this case, in iteration k + 1, f j is a flow such that s j ≤ t i k and t j > t i k (the latter holds, since otherwise e is covered by flow f i k leading to a contradiction). So the overlapping flow condition of rCover holds; therefore, s i k+1 ≤ t i k and t i k+1 ≥ t j , implying that e is covered by flow f i k+1 , leading to a contradiction. The second case is where there is no index k such that s j ≤ t i k ; in particular s j > t i where is the number of flows in C 1 ∪ C 2 . This leads to another contradiction since the termination condition implies t i ≥ t j . This establishes property (P2) and completes the proof of the lemma. Recall that, by Property (P1), FlowDec assigns in each level at most one flow that uses e to each color. This means that D i a (k) has at most one flow that uses e from each set C i a (zτ + k), for z = 0, ..., L(e)/τ − 1. Moreover, the size σ i of a flow f i ∈ F M t is bounded by α · 2 t . On the other hand, each flow f i ∈ F M L(e) satisfies σ i ≤ α · c e since it is α-small Thus, the total size of the flows in D i a (k) that go through e is α · c e + 2 L(e)−τ + 2 L(e)−2τ + ... ≤ α · c e + 2 L(e)−τ (1 + 1/2 + 1/2 2 + ....) = α · c e + 2 L(e)−τ +1 ≤ α · c e + 2 −τ +2 c e ≤ c(e), C V I T 2 0 1 6 23:14

Proof of Lemma 18.
(1) is easy to verify. Indeed, the projections of R and R on the y-axis both contain y( T (R) ); hence, their intersection is non-empty. Thus, R and R intersect if and only if their projection on the x-axis has a non-empty intersection. Next, we prove (2). Consider two rectangle R, R ∈ R l , where T (R) = T (R ). Let i = T (R) and i = T (R ). Assume, without loss of generality, that i < i . Note that i ≥ i + 3 by definition. Additionally, y t (R) < y( i+1 ) since i is the topmost line of L that intersects R. On the other hand, y b (R ) > y i+1 since L is a 2-line-representative set of R meaning that at most two lines in L intersect R . Consequently, the projection of R and R on the y-axis have an empty intersection. Therefore, the R and R do not intersect.
Proof of Lemma 19. Let Rec( i ) denote the set of rectangles for which the line i is the topmost line intersecting it. More precisely, Figure 3 An example with 7 classes. Initially, FlowDec uses 7 colors in each column (one color per class). Next, ColOptimize, called with parameter τ = 3, combines the colors resulting in the use of 3 colors per column.