21
Flexible Resource Allocation for Optical Networks Dmitriy Katz 1 , Baruch Schieber 1 , and Hadas Shachnai 2? 1 IBM T.J. Watson Research Center, Yorktown Heights, NY 10598. E-mail: {katzrog,sbar}@us.ibm.com 2 Computer Science Department, Technion, Haifa 32000, Israel. E-mail: [email protected] Abstract. Motivated by flexible resource allocation in emerging net- work technologies, we study the following variant of the classic storage allocation problem. We are given a set of flexible axis-parallel rectangles (corresponding to activities), and a linear resource. Each rectangle has a maximum possible height, as well as the profit accrued per allocated unit of the resource. The goal is to feasibly allocate to each rectangle some amount of the resource (up to its maximum height), by sliding the rectangles vertically but not horizontally, such that the total profit is maximized. We first show that the flexible storage allocation problem (fsap) is strongly NP-hard already for highly restricted instances, where all of the rectan- gles have the same maximum height and the same (unit) profit, and ob- tain for this subclass the best possible result, namely, a polynomial time approximation scheme (PTAS). We then present a (5/4+ε)-approximation algorithm for general fsap instances where the input graph is proper (i.e., no activity is properly contained in another). Finally, we consider the flexible bandwidth allocation (fba) problem, in which the resource can be allocated in non-contiguous blocks, and the goal is to maximize resource utilization. By establishing an interesting relation to the paging problem, we show that fba can be optimally solved in linear time, even if each activity comes also with a minimum possible height. This substantially improves the running time of the best known algorithm for fba, based on flow techniques. Most of our algorithms are easy to implement, and are therefore practical. 1 Introduction 1.1 Background and Motivation Scheduling activities with resource demands arises in a wide range of appli- cations. In this problem we have a set of activities competing for a reusable resource. Each activity utilizes a certain amount of the resource for the duration of its execution and frees it upon completion. The problem is to find a feasible ? Work partially supported by funding for DIMACS visitors.

Flexible Resource Allocation for Optical Networks

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Flexible Resource Allocation for Optical Networks

Flexible Resource Allocation for OpticalNetworks

Dmitriy Katz1, Baruch Schieber1, and Hadas Shachnai2?

1 IBM T.J. Watson Research Center, Yorktown Heights, NY 10598.E-mail: {katzrog,sbar}@us.ibm.com

2 Computer Science Department, Technion, Haifa 32000, Israel.E-mail: [email protected]

Abstract. Motivated by flexible resource allocation in emerging net-work technologies, we study the following variant of the classic storageallocation problem. We are given a set of flexible axis-parallel rectangles(corresponding to activities), and a linear resource. Each rectangle hasa maximum possible height, as well as the profit accrued per allocatedunit of the resource. The goal is to feasibly allocate to each rectanglesome amount of the resource (up to its maximum height), by sliding therectangles vertically but not horizontally, such that the total profit ismaximized.

We first show that the flexible storage allocation problem (fsap) is stronglyNP-hard already for highly restricted instances, where all of the rectan-gles have the same maximum height and the same (unit) profit, and ob-tain for this subclass the best possible result, namely, a polynomial timeapproximation scheme (PTAS). We then present a (5/4+ε)-approximationalgorithm for general fsap instances where the input graph is proper (i.e.,no activity is properly contained in another).

Finally, we consider the flexible bandwidth allocation (fba) problem, inwhich the resource can be allocated in non-contiguous blocks, and thegoal is to maximize resource utilization. By establishing an interestingrelation to the paging problem, we show that fba can be optimally solvedin linear time, even if each activity comes also with a minimum possibleheight. This substantially improves the running time of the best knownalgorithm for fba, based on flow techniques.

Most of our algorithms are easy to implement, and are therefore practical.

1 Introduction

1.1 Background and Motivation

Scheduling activities with resource demands arises in a wide range of appli-cations. In this problem we have a set of activities competing for a reusableresource. Each activity utilizes a certain amount of the resource for the durationof its execution and frees it upon completion. The problem is to find a feasible

? Work partially supported by funding for DIMACS visitors.

Page 2: Flexible Resource Allocation for Optical Networks

schedule for a subset of the activities which satisfies certain constraints, includ-ing the requirement that the total amount of resource allocated simultaneouslyfor executing activities never exceeds the amount of resource available.

Two classic problems that are immediately seen to fit in this scenario are thestorage allocation (see, e.g., [15, 4]), and the bandwidth allocation problems (see,e.g., [2, 8]). In the storage allocation problem (sap), each activity requires theallocation of a contiguous block of the resource for the duration of its execution.Thus, the input is often viewed as a set of axis-parallel rectangles; we need to packa maximum profit subset of rectangles into a horizontal strip of a given height,by sliding the rectangles vertically but not horizontally. When the resource canbe allocated in non-contiguous blocks, we have the bandwidth allocation (ba)problem, where we only need to allocate to each activity the required amount ofthe resource.

Emerging technologies, such as spectrum-sliced flexgrid optical networks (see,e.g., [20] and the references therein) and server assignment in Cloud Computing(e.g., [12]), allow flexible allocation of the available resources. These technologiesare attracting huge interest, due to their higher efficiency and better utilizationof network resources, however, allocating the resources becomes even more chal-lenging, compared to previous rigid technologies. This calls for the study of theflexible variants of the above problems, as discussed below.

1.2 Problem Statement

We consider a variant of sap where each rectangle has a maximum possibleheight, as well as profit per unit of the resource allocated to it. The goal is topack the rectangles feasibly, subject to resource availability, so as to maximizethe total profit. We refer to this variant below as the flexible storage allocationproblem (fsap).

We also consider the flexible bandwidth allocation (fba) problem, where eachactivity specifies an upper bound on the amount of the resource it can be allo-cated, as well as the profit accrued from each allocated unit of the resource. Thegoal is to determine the amount of resource allocated to each activity so as tomaximize the total profit.

Formally, in our general framework, the input consists of a set J of n inter-vals. Each interval Ji ∈ J requires the utilization of a given, limited, resource.The amount of resource available, denoted by W > 0, is fixed over time. Eachinterval Ji is defined by the following parameters.

(1) A left endpoint, si ≥ 0, and a right endpoint, ei ≥ 0. Then Ji is associatedwith the half-open interval [si, ei) on the real line.

(2) The amount of resource required by each interval, Ji can take any value upto the maximum possible value for Ji, given by rmax(i).

(3) The profit pi ≥ 1 gained for each unit of the resource allocated to Ji.

A feasible solution has to satisfy the following conditions. (i) Each intervalJi ∈ J is allocated an amount of the resource in its possible range. (ii) Thetotal amount of the resource allocated at any time does not exceed the available

2

Page 3: Flexible Resource Allocation for Optical Networks

amount, W . In fba, we seek a feasible allocation which maximizes the total profitaccrued by the intervals. In fsap, we add the requirement that the allocationto each interval is a contiguous block of the resource. A primary application offsap and fba is spectrum allocation for flexgrid optical networks (we give thedetails in the Appendix).

Given an algorithm A, let A(J ), OPT (J ) denote the profit of A and anoptimal solution for a problem instance J , respectively. For ρ ≥ 1, we say that

A is a ρ-approximation algorithm if, for any instance J , OPT (J )A(J ) ≤ ρ.

1.3 Our Contribution

We study several classes of instances of fsap and fba arising in our applicationsand develop (almost) optimal algorithms, which are easy to implement and aretherefore practical in use. We first show (in Section 3) that if all of the activi-ties have the same (unit) profit per allocated resource unit, then assuming theinterval endpoints are sorted, fba can be optimally solved in linear time, even ifeach interval comes also with a minimum possible resource requirement. Thus,we substantially improve the running time of the best known algorithm for fba(due to [19]), based on flow techniques. We derive the result by establishing aninteresting relation to the classic paging problem.

In Section 4, we show that fsap is strongly NP-hard already for highlyrestricted instances, where all of the rectangles have the same maximum heightMax and the same (unit) profit, and obtain for this subclass the best possibleresult, namely, a PTAS. We also give (in the Appendix) a 2k

2k−1 -approximation

algorithm, where k = d WMaxe. This algorithm, which has a linear running time,

is of practical interest. For general fsap instances in which the input graph isproper, we present (in Section 5) a (5/4 + ε)-approximation algorithm, for anyε > 0. This improves the bound of 4/3 which follows from a result of [19].

Techniques: Our approximation scheme for uniform fsap instances utilizes astructural property of the respective fba instances. We show that there existsan optimal solution for fba in which any interval that properly contains anotherinterval is allocated a positive amount of the resource only if all the intervalscontained in it are allocated their maximum demands. This property is at theheart of our algorithm, Paging fba (see Section 3). For uniform instances, itimplies the existence of an optimal solution for fba where each interval is allo-cated either Max or W mod Max colors, which can then be converted with smalldecrease in profit into a valid solution for fsap. Secondly, we show the existenceof almost optimal solutions for fsap having a certain strip structure. Our schemefinds a solution having this structure for uniform fsap instances in which Max

is large.

1.4 Related Work

Storage allocation problems have been studied since the 1960’s (see, e.g., [14]).The traditional goal is to contiguously store a set of objects in minimum size

3

Page 4: Flexible Resource Allocation for Optical Networks

memory. This is the well-known dynamic storage allocation (dsa) problem (see,e.g., [6] and the references therein). The storage allocation problem (sap), thethroughput version of dsa, is NP-hard since it includes Knapsack as a specialcase. sap was first studied in [2, 15]. Bar-Noy et al. [2] presented an approx-imation algorithm that yields a ratio of 7. Chen et al. [9] studied the specialcase in which all rectangle heights are multiple of 1/K, for some integer K ≥ 1.They developed an O(n(nK)K) time dynamic programming algorithm to solvethis special case of sap, and also gave an approximation algorithm with ratioee−1 + ε, for any ε > 0, assuming that the maximum height of any rectangle isO(1/K). The best known results are due to Bar-Yehuda et al. [3], who presenteda randomized algorithm for sap with ratio 2 + ε, and a deterministic algorithmwith ratio 2e−1

e−1 + ε < 2.582.The bandwidth allocation (ba) is known to be is strongly NP-hard even for

the case of uniform profits [10]. The results of Albers et al. [1] imply a constantfactor approximation (where the constant is about 22). Bar-Noy et al. [2] gavea 3-approximation algorithm for the problem. Calinescu et al. [7] developed arandomized approximation algorithm for ba with expected performance ratioof 2 + ε, for every ε > 0. The best known result is an LP-based deterministic(2 + ε)-approximation algorithm for ba due to Chekuri et al. [8].

The flexible variants of sap and ba were introduced by Shalom et al.[19].The paper shows that fba can be optimally solved using flow techniques. Theauthors also consider several special cases in which fsap is optimally solvable,using dynamic programming. The paper presents a 4

3 -approximation algorithmfor fsap instances in which the input graph is proper. This algorithm worksalso when each activity has a lower bound rmin(i) on the amount of resource it

can be allocated, as long as rmin(i) ≤ d rmax(i)2 e, for all 1 ≤ i ≤ n. The paper

[18] shows NP-hardness of a general version of fsap, where each activity has apositive lower and upper bounds on the amount of resource it can be allocated.The problem remains difficult even if the bounds are identical for all activities,i.e., rmin(i) = Min and rmax(i) = Max, for all i, where 0 < Min < Max ≤ W .The authors also show that fsap is NP-hard for the subclass of instances wherermin(i) = 0 and rmax(i) is arbitrary, for all i, and present a (2+ε)-approximationalgorithm for such instances, for any fixed ε > 0.

Due to space constraints, some of the results are given in the Appendix.

2 Preliminaries

Given an instance of our problems, we use graph-theoretic terminology to de-scribe the conflicts among the jobs. Specifically, we represent the input J as aninterval graph, G = (V,E), in which the set of vertices, V , represents the n jobs,and there is an edge (vi, vj) ∈ E if the intervals representing the jobs Ji, Jjintersect. For simplicity, we interchangeably use Ji to denote the i-th job, andthe interval representing the i-th job on the real-line. We say that an input Jis proper, if in the corresponding interval graph G = (V,E), no interval Ji isproperly contained in another interval Jj , for all 1 ≤ i, j ≤ n.

Throughout the paper, we use coloring terminology when referring to the as-signment of bandwidth to the jobs. Specifically, the amount of available resource,

4

Page 5: Flexible Resource Allocation for Optical Networks

W , can be viewed as the amount of available distinct colors. Thus, the demandof a job Ji for (contiguous) allocation from the resource, where the allocatedamount is an integer in the range [0, rmax(i)], can be satisfied by coloring Jiwith a (contiguous) set of colors, of size in the range [0, rmax(i)].

Let C = {1, 2, . . . ,W} denote the set of available colors. Recall that in acontiguous coloring, c, each interval Ji is assigned a block of |c(Ji)| consecutivecolors in {1, . . . ,W}. In a circular contiguous coloring, c, we have the set ofcolors positioned consecutively on a circle. Each interval Ji ∈ J is assigned ablock of |c(Ji)| consecutive colors on the circle. Formally, Ji can be assignedany consecutive sequence of |c(Ji)| indices, {`, (` mod W ) + 1, . . . , [(`+ |c(Ji)| −2) mod W ]+1}, where 1 ≤ ` ≤W . Given a coloring of the intervals, c : J → 2C ,let |c(Ji)| be the number of colors assigned to Ji, then the total profit accruedfrom c is

∑ni=1 pi|c(Ji)|.

Let S ⊆ J be the subset of jobs Ji for which |c(Ji)| ≥ 1 in a (contiguous)coloring C for the input graph G. We call the subgraph of G induced by S,denoted GS = (S,ES), the support graph of S.

3 The Flexible Bandwidth Allocation Problem

In this section we study fba the non-contiguous version of our resource allocationproblem. We consider a generalized version of fba where each activity i has alsoa lower bound rmin(i) on the amount of resource it is allocated.

Shalom et al.[19] showed that this generalized fba can be solved optimallyby using flow techniques. We show that in the special case where all jobs havethe same (unit) profit per allocated color (i.e., resource unit), the problem canbe solved by an efficient algorithm based on the well known Belady’s algorithmfor offline paging [5]. From now on we assume that the problem is feasible, thatis, there are enough colors to allocate at least rmin(i) colors to each job Ji.

To gain some intuition, assume first that rmin(i) = 0 for all i ∈ [1..n] Thekey idea is to view the available colors as slots in fast memory and each job(interval) Ji as rmax(i) pairs of requests for pages in the main memory. Eachpair of requests is associated with a distinct page: one request at si and one atei − 1. We apply Belady’s offline paging algorithm that in case of a page faultevicts the page who is requested furthest in the future. If a page remains inthe fast memory between the two times it was requested then the color thatcorresponds to its fast memory slot is allocated to the corresponding job.

When rmin(i) > 0 we follow the same intuition while making sure that weallocate at least rmin(i) colors to each Ji to ensure feasibility. We show belowthat the optimality of the paging algorithm ensures the optimality of our fbainstance.

The algorithm is implemented iteratively by reassigning colors, in the fol-lowing manner. The algorithm scans the endpoints of the intervals from left toright. When the algorithm scans si it first assigns rmin(i) colors to Ji to ensurefeasibility. The algorithm starts by assigning the available colors. If there areless than rmin(i) colors available at si, the algorithm examines the intervals in-tersecting Ji at si in decreasing order of right endpoints and feasibly decreases

5

Page 6: Flexible Resource Allocation for Optical Networks

the number of colors assigned to these intervals and reassigns them to Ji until Jiis allocated rmin(i) colors. The feasibility of the instance implies that so manycolors can be reassigned.

Next, the algorithm allocates up to rmax(i) − rmin(i) additional colors tointerval Ji to maximize profit. If rmax(i) − rmin(i) colors are available at si,then they are assigned to Ji. If not so many colors are available and thus Ji isassigned less than rmax(i) colors, then the algorithm follows Belady’s algorithmto potentially assign additional colors to Ji. The algorithm examines the intervalsintersecting Ji at si and in case there are such intervals with larger right endpointthan ei, it feasibly decreases the number of colors assigned to such intervals withthe largest right endpoints (furthest in the future), and increases the number ofcolors assigned to Ji, up to rmax(i).

When the algorithm scans ei, the right endpoint of an interval Ji, the colorsassigned to Ji are released and become available. The pseudo code for Pag-ing fba is given in the Appendix (see Algorithm B.1).

Assume that the interval endpoints are sorted. Then, we have the following

Theorem 1. Paging fba is an optimal linear time algorithm, for any instanceof fba where pi = 1 for all 1 ≤ i ≤ n.

Proof. Given an instance of fba, where pi = 1 for all 1 ≤ i ≤ n, define a re-spective multipaging problem instance, where the size of the fast memory is W ,as follows. (The multipaging problem is a variant of the paging problem wheremore than one page is requested at the same time.) For each job Ji ∈ J de-fine two types of page requests: feasibility requests and profit requests. For eachsi ≤ t < ei there are rmin(i) feasibility requests for the same rmin(i) pages.In addition there are rmax(i) − rmin(i) pairs of requests for rmax(i) − rmin(i)distinct pages. The first request of each pair is at si and the second at ei − 1.It is not difficult to see that Belady’s algorithm is optimal also for the multi-paging problem [16]. Consider an implementation of Belady’s algorithm for thisinstance where the feasibility requests are always processed before the profit re-quests. In this case it is easy to see that none of the pages that are requestedin the feasibility requests will be evicted before the last time in which they arerequested. Note that Paging fba implements this variant of Belady’s algorithm,where AVAIL corresponds to the available memory slots. The optimality of Be-lady’s algorithm guarantees that the number of page faults is minimized. Thepage faults whenever a new page is requested cannot be avoided. (Note thatthere are

∑ni=1 rmax(i) such faults.) Additional page faults may occur when the

second occurrence of a page in the pairs of the profit requests needs to be ac-cessed. Minimizing the number of such page faults is equivalent to maximizingthe number of pairs of profit requests for which the requested page is in mem-ory throughout the interval [si, ei), that is, maximizing the profit of allocatedresources in the fba instance. It is easy to verify that if the intervals are sortedby endpoints, then the running time of Paging fba is linear in |J |.

6

Page 7: Flexible Resource Allocation for Optical Networks

4 Uniform fsap Instances

We now consider uniform instances of fsap, in which rmax(i) = Max, for some1 ≤ Max ≤W , and pi = 1, for all 1 ≤ i ≤ n. Let k = dW/Maxe.

We first prove that if k = W/Max (i.e., W is an integral multiple of Max)then fsap can be solved optimally by finding a maximum k-colorable subgraphin G, and assigning to each interval in this subgraph Max contiguous colors. Incontrast to this case if k > W/Max, then we show that fsap is NP-Hard, andgive a polynomial approximation scheme to solve such instances.

Lemma 1. An fsap instance where for all 1 ≤ i ≤ n, rmax(i) = Max, and Wis multiple of Max can be solved exactly in polynomial time.

Proof. Consider an fba instance where for all 1 ≤ i ≤ n, rmax(i) = Max, andW is multiple of Max. We claim that there exists an optimal solution to thisfba instance in which each job gets either 0 or Max colors. To see that considerthe behavior of the algorithm Paging fba on such an instance, i.e., in whichrmin(i) = 0 and rmax(i) = Max. Note that when we start the algorithm |AVAIL|is a multiple of Max and thus when the first (left) endpoint s1 is considered thejob J1 is allocated Max colors and |AVAIL| remains a multiple of Max. Assumeinductively that as the endpoints are scanned all the jobs that were allocatedcolors up to this endpoint were allocated Max colors and that |AVAIL| is a mul-tiple of Max. If the current scanned endpoint is a right endpoint ei then by theinduction hypothesis either 0 or Max colors are added to AVAIL and nothing else ischanged. Suppose that the scanned endpoint is a left endpoint si. If |AVAIL| > 0then Max colors from AVAIL are allocated to Ji. Otherwise, Ji may be allocatedcolors that were previously allocated to another job J`, for ` < i. However, inthis case because rmin(`) = 0 all the Max colors allocated to J` will be moved toJi, and the hypothesis still holds.

The optimal way to assign either 0 or Max colors to each job is given bycomputing the maximum k = (W/Max)-colorable subgraph of G and assigningMax colors to each interval in the maximum k-colorable subgraph. Since theassignment of these colors can be done contiguously it follows that this is alsothe optimal solution to the respective fsap instance.

Next, we prove the hardness in case k > W/Max.

Theorem 2. fsap is strongly NP-hard even if for all 1 ≤ i ≤ n rmax(i) = 3,and W is not divisible by 3.

4.1 An Approximation Scheme

We now describe a PTAS for uniform istances of fsap. Fix ε > 0, and let J be auniform input for fsap. Denote by OPTfsap(J ) the value of an optimal solutionfor instance J of fsap.

The scheme handles separately two subclasses of inputs, depending on thevalue of Max. First, we consider the case where Max is large relative to W , ormore precisely k = dW/Maxe ≤ 1/ε. We prove in the next lemma that in this

7

Page 8: Flexible Resource Allocation for Optical Networks

case if we partition the colors into a constant number of contiguous strips andlimit our solution to always assigning all the colors in the same strip to the samejob, we can find a solution that is at least (1− ε)OPTfsap(J ). The size of eachstrip (except possibly the last one) is bεMax/4c ≥ 1. Since the number of strips isO(1/ε2), we can find an approximation in this case using dynamic programmingas shown in [19].

Lemma 2. Any optimal solution for a uniform input J for fsap where k =dW/Maxe ≤ 1/ε can be converted to a solution where each interval is assigned anumber of colors that is an integral number of strips, and the total profit is atleast (1− ε)OPTfsap(J ).

Proof. W.l.o.g., we may assume that bεMax/4c ≥ 1, else we have that W is aconstant, and we can solve fsap optimally in polynomial time (see in [19]). Givenan optimal solution for a uniform input J , let S be the subset of intervals Jifor which |c(Ji)| > 0, and let GS be the support graph for S (i.e., the subgraphof the original interval graph induced by the intervals in S). Using the abovepartition of the colors to strips, we have 1 ≤ N ≤ d 4WεMaxe strips. Denote by Cjthe subset of colors of strip j. We obtain the strip structure for the solutionas follows. Let Sj ⊆ S be the subset of intervals with colors in strip j, i.e.,Sj = {Ji|c(Ji)∩Cj 6= ∅}. Initialize for all Ji ∈ S, c′(Ji) = ∅. (i) For all 1 ≤ j ≤ N ,find in GS a maximum independent set, Ij of intervals Ji ∈ Sj . For any Ji ∈ Ij ,assign to Ji all colors in Cj , i.e., c′(Ji) = c′(Ji) ∪ Cj . (ii) For any Ji ∈ S, if|c′(Ji)| > Max then omit from the coloring of Ji a consecutive subset of strips,starting from the highest 1 ≤ j ≤ N , such that Cj ⊆ c′(Ji), until for the firsttime |c′(Ji)| ≤ Max.

We show below that the above strip coloring for S is feasible, and that thetotal profit from the strip coloring is at least (1− ε)OPT fsap(J). To show feasi-bility, note that if Ji ∈ Sj and Ji ∈ Sj+2 then because the coloring is contiguousJi is allocated all the colors in Sj+1, and thus any maximum independent setIj+1 will contain Ji since it has no conflicts with other jobs in Sj+1. It fol-lows that if a job Ji is allocated colors in more than two consecutive strips, i.e.,Ji ∈ Sj ∩ Sj+1 ∩ · · · ∩ Sj+`, for ` > 1, then Ji ∈ Ij+1 ∩ · · · ∩ Ij+`−1. Thus, eachinterval Ji ∈ S will be assigned in step (i) a consecutive set of strips. Hence c′

is a contiguous coloring. In addition, after step (ii), for all Ji ∈ S we have that|c′(Ji)| ≤ Max.

Now, consider the profit of the strip coloring. We note that after step (i),the total profit of c′ is at least OPT fsap(J). This is because for each strip j,|Cj | · |Ij | is an upper bound on the profit that can be obtained from this strip.We show that the harm of reducing the number of colors in step (ii) is small.We distinguish between two type of intervals in S.

(a) Intervals Ji for which |c(Ji)| ≥ (1−ε/2)Max. Since coloring c is valid it followsthat |c′(Ji)| is reduced in step (ii) only if before this step |c′(Ji)| > |c(Ji)|.Consider all the strips that contain colors assigned to Ji in the originalcoloring c. Note that all such strips except at most two do not contain colorsthat are assigned to other intervals. Thus |c′(Ji)| is reduced in step (ii) by

8

Page 9: Flexible Resource Allocation for Optical Networks

at most 2b εMax4 c ≤ (ε/2)Max. Since |c(Ji)| ≥ (1− ε/2)Max, we have that afterstep (ii), |c′(Ji)| ≥ |c(Ji)| − (ε/2)Max ≥ (1− ε)Max.

(b) For any interval Ji for which |c(Ji)| < (1 − ε/2)Max, since after step (i)|c′(Ji)| ≤ |c(Ji)| + 2b εMax4 c, we have that |c′(Ji)| ≤ Max. Thus, no colors areomitted from Ji in step (ii).

From (a) and (b), we have that the total profit from the strip coloring satisfiesOPT ′fsap(J ) ≥ (1− ε)OPT fsap(J ).

Now, consider the case where Max is small, i.e., k = dW/Maxe > 1/ε. In thiscase we consider just (k− 1)Max consecutive colors and ignore the remainder upto εW colors. Recall that when the number of colors is a multiple of Max we canfind an optimal solution. Let OPTfsap(W )(J ) denote the value of an optimal so-lution for instance J of fsap with W colors, and recall that k = dW/Maxe.Since (k − 1)Max < W < kMax, OPTfsap((k−1)Max)(J ) < OPTfsap(W )(J ) <OPTfsap(kMax)(J ). The value of OPTfsap((k−1)Max) is Max times the size of themax (k − 1)-colorable subgraph of G, and the value of OPTfsap(kMax) is Max

times the size of the max k-colorable subgraph of G. Clearly, the ratio of thesizes of these subgraphs and thus the ratio of the two optimal values is boundedby 1 − 1/k > 1 − ε. It follows that OPTfsap(W )(J ) > OPTfsap((k−1)Max)(J ) ≥(1 − ε)OPTfsap(kMax)(J ) > (1 − ε)OPTfsap(W )(J ). Combining the results, wehave

Theorem 3. The above algorithm is a PTAS for uniform fsap instances.

5 Approximation Algorithm for Proper fsap Instances

In this section we consider fsap instances where the input graph is proper.Our Algorithm, Proper fsap, uses the parameters ε > 0 and β ∈ (0, 1) (tobe determined). Initially, Proper fsap guesses the value of the optimal solutionOPT fsap(J ). (The guessing is done by binary search and it is straightforwardto verify by the results of Proper fsap whether the guess is correct or whetherit is under or above the optimal value.)

Let Jwide denote the set of wide intervals Ji for which rmax(i) ≥ εW . LetJnarrow denote the complement set of narrow intervals. If the profit from thewide intervals that are actually assigned at least εW colors is large, namely, atleast β ·OPT fsap(J ), then such a high profit subset of intervals is found and re-turned by the algorithm as the solution. Otherwise, Proper fsap calls AlgorithmANarrow Color that finds a solution of high profit accrued from both narrow andwide intervals. The upper bound on the profit that can be attained from wide in-tervals that are assigned at least εW colors is used to improve the approximationratio of Algorithm ANarrow Color. The pseudo code for Proper fsap follows.

We now describe AlgorithmANarrow Color that finds an approximate solutionfor fsap in case the extra profit of the wide intervals above the profit of theirfirst dεW e assigned colors is bounded by β fraction of the optimal solution.

First, Algorithm ANarrow Color solves a linear program LPfba that finds a(fractional) maximum profit solution of the fba problem on the set J , in which

9

Page 10: Flexible Resource Allocation for Optical Networks

Algorithm 5.1 Proper fsap(J , rmax, p,W, ε, β)

1: Guess the value of OPT fsap(J ), the optimal solution of fsap on the input J .2: Find in Jwide a solution S of fsap with maximum total profit among all solutions

in which intervals that are assigned colors are assigned at least dεW e colors.3: if P (S) < βOPTfsap(J ) then4: Let S be the solution output by ANarrow Color(J , rmax, p,W, ε, βOPT fsap(J ))5: Return S and the respective contiguous coloring

the number of colors used is no more than (1− ε)W . Note that according to ourguess the value of the solution is at least (1 − ε)OPTfsap(J ). This is since thevalue of the optimal solution when all W colors are used is at least OPTfsap(J ).The solution needs to satisfy an upper bound on the extra profit accrued fromwide intervals that are assigned more than εW colors.

Next, this solution is rounded to an integral solution of the fba instance ofvalue at least (1 − 2ε)OPT fsap(J ). Algorithm ANarrow Color proceeds by con-verting the resulting (non-contiguous) coloring to a contiguous circular coloringwith the same profit. Finally, this coloring is converted to a valid (non-circular)coloring. We give the pseudo code of ANarrow Color in Algorithm 5.2.

Algorithm 5.2 ANarrow Color(J , rmax, p,W, ε, P ))

1: Solve the linear program LP fba

2: Round the solution to obtain a (non-contiguous) coloring c.3: Find a circular contiguous coloring c′ of the same total profit as c. Such a coloring

exists since the input graph is proper.4: Let S′ be the set of colored intervals in c′.5: Let S′w ⊆ S′ be the subset of intervals Ji ∈ S′ for which |c′(Ji)| ≥ εW , and letS′n = S′ \ S′w.

6: for ` ∈ [1..b(1− ε)W c] do7: Let S′w(`) = {Ji ∈ S′w|{`, [` mod b(1− ε)W c] + 1} ⊆ c′(Ji)}8: Let P (S′w(`)) =

∑Ji∈S′

w(`) pi

9: Let `good = argmin1≤`≤b(1−ε)WcP (S′w(`)).10: for Ji ∈ S′w(`good) do11: Suppose that c′(Ji) = {fi, [fi mod b(1− ε)W c]+1, . . . , ti}, for some 1 ≤ fi, ti ≤

b(1− ε)W c. Partition the set of |c′(Ji)| colors assigned to Ji into two contiguousblocks: Block1(i) = {fi, . . . , `good}, and Block2(i) = {`good mod b(1 − ε)W c +1, . . . , ti}.

12: Assign to Ji the larger of Block1(i) and Block2(i).13: Renumber the first b(1− ε)W c colors starting at `good mod b(1− ε)W c+ 1.14: Let S′n(`good) = {Ji ∈ S′n|{`good, [`good mod b(1− ε)W c] + 1} ⊆ c′(Ji)}15: for Ji ∈ S′n(`good) do16: Assign to Ji |c′(Ji)| contiguous colors in the set {b(1− ε)W c+ 1, . . . ,W}.17: Return c′′ the resulting coloring of S′.

10

Page 11: Flexible Resource Allocation for Optical Networks

5.1 Analysis of Proper fsap

Our main result is the following.

Theorem 4. Proper fsap is a ( 54 − 2ε)-approximation algorithm for any in-

stance of fsap in which the input graph is proper.

We prove the theorem using the following results.

Lemma 3. If there exists an optimal solution of fsap for J in which the profitfrom the intervals in Jwide that are assigned at least εW colors is at leastβOPT fsap(J ), then a solution of profit at least βOPT fsap(J ) can be found inpolynomial time.

The linear program LPfba solved by Algorithm ANarrow Color is given inthe Appendix (see Figure 6). For each Ji ∈ Jnarrow the linear program has avariable xi that denotes the number of colors assigned to Ji. For each Ji ∈ Jwidethe linear program has two variables xi and yi that denote the number of colorsassigned to Ji, where yi denotes the assigned colors “over” the first dεW e colors.

Constraint (1) bounds the total profit from the extra allocation for eachinterval Ji ∈ Jwide. The constraints (2) bound the total number of colors usedat any time t > 0 by (1 − ε)W . We note that the number of constraints in (2)is polynomial in |J |, since we only need to consider points of time t, such thatt = si or t = ei for some interval Ji ∈ J , i.e., we have at most 2n constraints.

Lemma 4. For any ε > 0, there is an integral solution of LP fba of total profitat least (1− 2ε)OPT fsap(J ).

Lemma 5. Let P (c′(S′w)), P (c′(S′n)) be the total profit from the wide and narrowintervals in the circular coloring c′ generated in Step 3 of ANarrow Color. Then,(i) P (c′′(S′w)) ≥ 3

4P (c′(S′w)), and (ii) P (c′′(S′n)) = P (c′(S′n)).

Proof of Theorem 4: Let 0 < β < 1 be the parameter used by Proper fsap.For a correct guess of OPT fsap(J ) and a fixed value of ε > 0 we have

(i) If there is an optimal solution in which the coloring c satisfies P (c(Sw)) ≥βOPTfsap(J ) then, by Lemma 3, Proper fsap finds in Step 2 a solution ofprofit at least βOPTfsap(J ) in polynomial time.

(ii) Otherwise, consider the coloring c′′ output by ANarrow Color. Then, usingLemma 5, we have that

P (c′(J ))

P (c′′(J ))=P (c′(S′w)) + P (c′(S′n))3P (c′(S′

w))4 + P (c′(S′n))

≤ max0<x≤β

13x4 + 1− x

=4

4− β

Now, applying Lemma 4 we have that P (c′(J )) ≥ (1−2ε)OPT fsap(J ). Thetheorem follows by taking β = 4/5.

Acknowledgment: We thank Viswanath Nagarajan for valuable discussions.

11

Page 12: Flexible Resource Allocation for Optical Networks

References

1. S. Albers, S. Arora, and S. Khanna. Page replacement for general caching problems.In SODA, pages 31–40, 1999.

2. A. Bar-Noy, R. Bar-Yehuda, A. Freund, J. S. Naor, and B. Schieber. A unifiedapproach to approximating resource allocation and scheduling. Journal of theACM, pages 735–744, 2000.

3. R. Bar-Yehuda, M. Beder, Y. Cohen, and D. Rawitz. Resource allocation inbounded degree trees. Algorithmica, 54(1):89–106, 2009.

4. R. Bar-Yehuda, M. Beder, and D. Rawitz. A constant factor approximation al-gorithm for the storage allocation problem: extended abstract. In SPAA, pages204–213, 2013.

5. L. A. Belady. A study of replacement algorithms for virtual-storage computer.IBM Systems Journal, 5(2):78–101, 1966.

6. A. L. Buchsbaum, H. J. Karloff, C. Kenyon, N. Reingold, and M. Thorup. Optversus load in dynamic storage allocation. SIAM J. Comput., 33(3):632–646, 2004.

7. G. Calinescu, A. Chakrabarti, H. J. Karloff, and Y. Rabani. An improved approx-imation algorithm for resource allocation. ACM Transactions on Algorithms, 7(4),2011.

8. C. Chekuri, M. Mydlarz, and F. B. Shepherd. Multicommodity demand flow in atree and packing integer programs. ACM Transactions on Algorithms, 3(3), 2007.

9. B. Chen, R. Hassin, and M. Tzur. Allocation of bandwidth and storage. IIETransactions, 34(5):501–507, 2002.

10. M. Chrobak, G. J. Woeginger, K. Makino, and H. Xu. Caching is hard - even inthe fault model. Algorithmica, 63(4):781–794, 2012.

11. O. Gerstel. Flexible use of spectrum and photonic grooming. In Photonics inSwitching, 2010.

12. N. Jain, I. Menache, J. Naor, and J. Yaniv. A truthful mechanism for value-basedscheduling in cloud computing. In SAGT, pages 178–189, 2011.

13. M. Jinno, H. Takara, B. Kozicki, Y. Tsukishima, Y. Sone, and S. Matsuoka.Spectrum-efficient and scalable elastic optical path network: architecture, bene-fits, and enabling technologies. Comm. Mag., 47:6673, 2009.

14. D. Knuth. The Art of Computer Programming, Vol. 1: Fundamental Algorithms,2nd Edition. Addison-Wesley, 1973.

15. S. Leonardi, A. Marchetti-Spaccamela, and A. Vitaletti. Approximation algorithmsfor bandwidth and storage allocation problems under real time constraints. InFSTTCS, volume 48, pages 409–420, 2000.

16. V. Liberatore. Uniform multipaging reduces to paging. Inf. Process. Lett., 67(1):9–12, 1998.

17. R. Ramaswami, K. N. Sivarajan, and G. H. Sasaki. Optical Networks: A PracticalPerspective. Morgan Kaufmann Publisher Inc., San Francisco, 2009.

18. H. Shachnai, A. Voloshin, and S. Zaks. Optimizing bandwidth allocation in flex-grid optical networks with application to scheduling. In IPDPS 2014, to appear.

19. M. Shalom, P. Wong, and S. Zaks. Profit maximization in flex-grid all-opticalnetworks. In SIROCCO, July 2013.

20. L. Velasco, M. Klinkowski, M. Ruiz, and J. Comellas. Modeling the routing andspectrum allocation problem for flexgrid optical networks. Photonic Network Com-munications, 24(3):177–186, 2012.

12

Page 13: Flexible Resource Allocation for Optical Networks

A Spectrum Allocation for Flexgrid Optical Networks

In all-optical networks, several high-speed signals connecting different source-destination pairs may share a link, provided they are transmitted on carriershaving different wavelengths of light (see, e.g., in [17]). Traditionally, the spec-trum of light that can be transmitted through the fiber has been divided intofrequency intervals of fixed width with a gap of unused frequencies betweenthem. In the emerging flexgrid technology (see, e.g., [13, 11]), the usable fre-quency intervals are of variable width. As in the traditional model, two differentsignals using the same link have to be assigned disjoint sub-spectra. Thus, givena set of connection requests in a path network, each associated with a profit perallocated spectrum unit, in fsap we need to feasibly allocate to the requestscontiguous frequency intervals, with the goal of maximizing the total profit. fbacorresponds to the model where the sub-spectra allocated to each request neednot be contiguous.

B Algorithm Paging fba

Algorithm B.1 gives the pseudo code of Paging fba.

C Hardness of fsap for Uniform Instances

Proof of Theorem 2: We use a reduction from a variant of the 3SAT problemin which each literal occurs exactly twice. The reduction is quite involved andwe will give here only the main ideas. Let W = 3α+ 1 for some integral α to bedetermined later. At each time we are going to have α active jobs of size 3 andone job of size 1 whose movement will be controlled in the reduction.

To show how we control the movement of a job of size 1 consider Figure 1.Suppose that all colors but 4 contiguous ones are occupied. Now, consider thefour jobs in the first line. Assume that two of them must be of size 3. (This iseasy to achieve when we assign different profits to jobs but can be achieved alsoin the unit profit case by replacing each such “important” job by many slices ofjobs, one after the other thus increasing the total profit of the job.) The first lineshows a “forced move”: the only way to fit all these jobs in a contiguous blockof 4 colors is by moving the jobs of size 1 from top to bottom or from bottom totop. This is in contrast to the second line example of an “optional move” wherethe job of size 1 may go either to the top or to the bottom.

Consider an instance of the 3SAT problem in which each literal occurs twicewith c clauses and v = 3c/4 variables. Loosely speaking, the instance of theuniform fsap will have v repeating blocks, each corresponding to a variable.Each such block will start with an optional move that will determine the valueof this variable, followed by a sequence of forced moves that are used to collect“rewards” for all the clauses that are satisfied by the assigned value. The rewardsare in the form of extra jobs that can be executed and thus more profit. We provethat the 3SAT instance is satisfied if and only if the profit attains a certain value.

13

Page 14: Flexible Resource Allocation for Optical Networks

Algorithm B.1 Paging fba(J , rmin, rmax,W )

1: SOL = 0.2: AVAIL = [1..W ].3: W.l.o.g. assume that all endpoints are distinct. Sort the endpoints of the intervals

in J in non-decreasing order. Let L denote the sorted list.4: while not end-of-list do5: Consider the next endpoint L.6: if the endpoint is si the left endpoint of Ji then7: SOL+ = rmin(i).8: Ai = ∅.9: if |AVAIL| > rmin(i) then

10: Move rmin(i) colors from AVAIL to Ai.11: else12: Ai = AVAIL

13: AVAIL = ∅.14: while |Ai| < rmin(i) do15: Among all intervals such that sk < si and |Ak| > rmin(k), let Jk be the

interval with maximum right endpoint ek.16: Move min{|Ak| − rmin(k), rmin(i)− |Ai|} colors from Ak to Ai.17: Move min{|AVAIL|, rmax(i)− rmin(i)} colors from AVAIL to Ai.18: SOL+ = min{|AVAIL|, rmax(i)− rmin(i)}.19: Let Ji = {Jk ∈ J |sk < si ∧ ek > ei ∧ |Ak| > rmin(k)}.20: while |Ai| < rmax(i) ∧ |Ji| > 0 do21: Let Jk be the interval with the maximum right endpoint in Ji.22: Move min{|Ak| − rmin(k), rmax(i)− |Ai|} colors from Ak to Ai

23: else24: {The endpoint is ei the right endpoint of Ji}25: AVAIL = AVAIL ∪Ai

26: Return SOL and the sets A1, . . . An of colors assigned to the jobs in J .

We first describe the reward mechanism. Consider the jobs described in Fig-ure 2. Suppose that only 3 contiguous colors are available for all these jobs. Inorder to profit from both the large number of job at the start of the top sequenceand the large number of jobs at the end of the bottom sequence we need at somepoint to move from the top row of jobs to the bottom row of jobs. We can doit only if somewhere else there are 3 contiguous colors available exactly whena job at the top and a job at the bottom overlap. We will have such a rewardmechanism for each clause and the gaps will be available only when a literal inthis clause is satisfied. Note that when we move from the top row to the bottomrow we also change the contiguous block of 3 colors. We can then make sure thatwe swap again to the original block of colors by inserting forced moves that canbe done only if the colors are swapped.

We now put everything together and show the construct we have for eachvariable. This construct occupies a block of 10 contiguous colors. We assumethat at the start we are at one of the two initial states as shown in Figure 3. Atthe beginning this can be ensured by forced moves, as we proceed we guarantee

14

Page 15: Flexible Resource Allocation for Optical Networks

Forced move (a) (b)

Optional move (a) (b)

Fig. 1: A forced move and an optional move.

The reward mechanism

Fig. 2: The reward mechanism.

that the final state when we are done with a construct for a variable is one ofthese two states.

The jobs (of size 3 and size 1) are shown at figure 4. We claim that the onlyway to loose no more that three profit units is to execute all jobs of size 3 and3 jobs of size 1. This can be done in two ways (up to inversion) as showm infigure 5. We claim that, which results in two sets of possible gaps that are alignedwith the rewards related either to a true assignment or to a false assignment.

D A 2k2k−1

-approximation Algorithm for Uniform fsap

We describe below Algorithm AMaxSmall, that yields for uniform fsap instancessolutions that are close to the optimal as k = d W

Maxe gets large. Initially,AMaxSmall

15

Page 16: Flexible Resource Allocation for Optical Networks

The initial state

(a) (b)

Fig. 3: The initial state of a variable construct.

solves optimally fba on the input graph G. Let G′ be the support graph for thissolution. AMaxSmall proceeds by generating a feasible solution for fsap as fol-lows. Each interval Ji in G′ for which |c(Ji)| = Max is assigned a set of Max

contiguous colors. Denote the support subgraph of this set of intervals G2. Thealgorithm then finds a maximum independent set of intervals in the remainingsubgraph G1 = G′ \ G2, and colors contiguously each interval in this set usingMax mod W colors (see the pseudo code in Algorithm D.1).

Algorithm D.1 AMaxSmall(J , Max,W )

1: Find an optimal solution for fba on G, the interval graph of J , using AlgorithmPaging fba.

2: Let S ⊆ J be the solution set of intervals, and G′ ⊆ G the support graph of S.3: Let G2 ⊆ G′ the subgraph containing all intervals Ji for which |c(Ji)| = Max.4: Let G1 = G′ \G2.5: Color contiguously each interval Ji in G2 with the lowest available Max colors.6: Let r = Max mod W .7: Let I be a maximum independent set in G1.8: Color each interval in I contiguously with r colors.9: Return the coloring of the intervals in G1 ∪G2.

Analysis: We now analyze Algorithm AMaxSmall.

Theorem 5. For any uniform instance of fsap, AMaxSmall yields an optimalsolution for fsap, if k ∈ {1, 2}, and a 2k

2k−1 -approximation for any k ≥ 3.

We use in the proof the next results.

Lemma 6. There exists an optimal solution set S for uniform fba in which thesupport graph G′ = (S,ES) is k-colorable.

16

Page 17: Flexible Resource Allocation for Optical Networks

The jobs in a variable construct

Fig. 4: The jobs of a variable construct.

Proof. Consider the support graph G′ of the solution output by Paging fba(described in Section 3) for a uniform instance of fba. Sort the intervals in thesolution in non-decreasing order by their right endpoint, and partition the set tocliques as follows. Let J1

1 = (s11, e11) denote the interval having the leftmost right

endpoint in G′. We denote by Clique 1 the subset of intervals in G′ intersectingthe right endpoint of J1

1 , e11. Let J21 be the interval having the leftmost right

endpoint among those that do not intersect e11. We define Clique 2 as the subsetof intervals in G′ that intersect the right endpoint of J2

1 , e21. Similarly, we defineClique j, for j ≥ 3. Consider Clique j, for j ≥ 1.

Claim 6 For any interval Ji in Clique j, except maybe for the interval withmaximal right endpoint, it holds that |c(Ji)| = Max.

Proof. Let nj be the number of intervals in Clique j. We number the intervals

by their right endpoints. Assume that, for some 1 ≤ ` < nj , the interval Jj` was

assigned less than Max colors. It follows that any interval Jj`′ , for ` < `′ ≤ njhas its left endpoint to the right of sj` . In addition, at the time sj` there are not

enough available colors for Jj` . Thus, we have that none of the intervals Jj`′ for` < `′ ≤ nj is assigned colors by Paging fba. Contradiction.

By Claim 6, we have that for all j ≥ 1, Clique j contains at most k intervals.

Using the solution output by Paging fba, we have the following.

Lemma 7. The subgraph G1 ⊆ G′ is proper and 2-colorable.

17

Page 18: Flexible Resource Allocation for Optical Networks

Excuting all jobs but 3 of size 1 corresponding to a False assignment.

Excuting all jobs but 3 of size 1 corresponding to a True assignment.

Reward

gap

Reward

gap

Reward

gap

Reward

gap

Fig. 5: The two possible assignments (up to inverse).

Proof. We first note that ifG1 is not proper, then there exist two intervals, Ji andJj , such that Jj is properly contained in Ji. By the way Paging fba proceeds,when it colors Jj , some colors that were assigned to Ji should be assigned toJj , until either |c(Jj)| = Max, or |c(Ji)| = 0. Since none of the two occurs - acontradiction.

We now show that G1 is 2-colorable. Throughout the proof, we assume thatthe intervals in G1 are numbered by 1, 2, . . . by their starting points, i.e., s1 <s2, < ···. For any Ji ∈ G1, we say that Ji is tight at t if

∑{J`∈J :t∈J`} |c(J`)| = W .

Let Ti denote the set of points t ∈ Ji in which Ji is tight, for all Ji ∈ G1. Wenote that, for all Ji ∈ G1, Ti 6= ∅ (otherwise, Paging fba would assign to Jimore colors). We complete the proof using the next claim.

Claim 7 For any Ji ∈ G1, (i) No other interval Jr ∈ G1 intersects Ji at t, forall t ∈ Ti, i.e., Ji is alone in G1 at t, and (ii) Ji is assigned |c(Ji)| = Max mod Wcolors.

We now show that Claim 7 implies that G1 is 2-colorable. Assume that thereexists in G1 a clique of at least 3 intervals. Let Ji1, Ji2, Ji3 be three intervals

18

Page 19: Flexible Resource Allocation for Optical Networks

in this clique. We note that there is no t ∈ Ti2 in which Ji2 is alone in G1.Contradiction to Claim 7.Proof of Claim 7: We show the two properties n the claim.

(i) We use induction on i to show that, for any t ∈ Ti, Ji is alone in G1 at t,for all Ji ∈ G1.Basis: i = 1. Let t ∈ T1, then we distinguish between two cases.(a) If t < s2 then we are done.(b) Otherwise, Paging fba assigns to J2 colors only if |c(J1)| = Max. Con-

tradiction.Induction Step: Consider a point t ∈ Ti for i > 1. We note that, by theinduction hypothesis, if t ∈ Tj for some j < i, then Jj is alone in G1 at t,namely, Ji /∈ G1. Thus, we have two cases to consider.(a) If ei−1 < t < si+1 then we are done.(b) If t > si+1, then Paging fba assigns colors to Ji+1 only |c(Ji)| = Max.

Contradiction.(ii) By (i), for any Ji ∈ G1, consider a point t ∈ Ti. then, since all of the intervals

that intersect Ji at t belong to G2 (i.e., each of these intervals is assignedMax colors, it follows that |c(Ji)| = Max mod W .

We are ready to show the performance ratio of Algorithm AMaxSmall.Proof of Theorem 5: Given the graphs G′ and G1, G2, as defined in Steps 4.and 3. of AMaxSmall, respectively. Let OPT fsap(G) and A(G) be the value ofan optimal solution and the solution output by AMaxSmall, respectively, for aninput graph G. We distinguish between two cases.

(i) Suppose that k ≥ 3. Then, we have

OPT fsap(G)

A(G)≤ OPT fsap(G1) +OPT fsap(G2)

OPT fsap(G1)2 +OPT fsap(G2)

≤ OPT fsap(G′)

OPT fsap(G′)( 12k + k−1

k )=

2k

2k − 1.

The first inequality follows from the fact that AMaxSmall colors G2 optimallyand finds a maximum independent set inG1, which is 2-colorable. The secondinequality holds since G2 is a maximum (k − 1)-colorable subgraph, andtherefore, OPT fsap(G2) ≥ k−1

k OPT fsap(G).(ii) If k = 2, we note that G1 is an independent set, thus AMaxSmall yields an

optimal solution.

E The Linear Program LP FBA

In Figure 6 we give the linear program used by Algorithm ANarrow Color.

19

Page 20: Flexible Resource Allocation for Optical Networks

(LP fba) : max∑

Ji∈Jnarrow

pixi +∑

Ji∈Jwide

pi(xi + yi)

s.t.∑

Ji∈Jwide

piyi ≤ β(1− ε)OPTfsap(J ) (1)

∑{Ji∈J :t∈Ji}

xi +∑

{Ji∈Jwide:t∈Ji}

yi ≤ (1− ε)W ∀t > 0 (2)

0 ≤ xi ≤ min{rmax(i), dεW e} for 1 ≤ i ≤ n0 ≤ yi ≤ rmax(i)− dεW e for Ji ∈ Jwide

Fig. 6: The linear program LPfba

.

F Some proofs

Proof of Lemma 3: We consider only the intervals in Jwide and the set offeasible solutions S with the property that each interval in S is assigned at leastεW colors. Note that for each such feasible solution, at any time t > 0, thenumber of active intervals is bounded by 1/ε, which is a constant. Hence, we canuse dynamic programming to find a solution of maximum profit among all thesefeasible solutions. (See the details in [19].) By our assumption the value of thissolution is at least βOPT fsap(J ).Proof of Lemma 4: Let x∗, y∗ be an optimal (fractional) solution of LP fba.Note that by possibly move value from y∗i to x∗i we can always find such asolution in which for any Ji ∈ Jwide, if y∗i > 0 then x∗i = dεW e.

Let Sw be the set of intervals in Jwide for which yi > 0. Consider now thesolution x∗, z, where zi = by∗i c, for all Ji ∈ Sw. We bound the loss due to therounding down.∑

Ji∈Swpi(xi + byic) ≥

∑Ji∈Sw

pi(xi + yi − 1)≥

∑Ji∈Sw

pi(xi + yi)(1− 1xi

)

≥∑Ji∈Sw

pi(xi + yi)(1− 1dεWe )

The last inequality follows from the fact that xi = dεW e, for any Ji ∈ Sw. Thus,for W ≥ 1/ε2, we have that the total profit after rounding the yi values is atleast (1− 2ε)OPT fba(J ).

Now consider the linear program LPround in which we fix bi = by∗i c, forJi ∈ Sw.

We have that x∗ is a feasible (fractional) solution of LP round with profit atleast (1 − 2ε)OPT fba(J ) −

∑Ji∈Sw

pibi. The rows of the coefficient matrix ofLP round can be permuted so that each column has consecutive 1’s, thus thismatrix is totally unimodular (TU). It follows that we can find in polynomialtime an integral solution, x∗I , of the same total profit. Thus, the integral solutionx∗I , z satisfies the lemma.

20

Page 21: Flexible Resource Allocation for Optical Networks

(LP round) : max

n∑i=1

pixi

s.t.∑

{Ji∈J :t∈Ji}

xi +∑

{Ji∈Sw :t∈Ji}

bi ≤ (1− ε)W ∀t > 0

0 ≤ xi ≤ dεW e for 1 ≤ i ≤ n

Proof of Lemma 5: Property (i) follows from a result of [19], which impliesthat the non-circular contiguous coloring c′′, obtained for S′w in Steps 10−12of ANarrow Color, has a total profit at least 3

4P (c′(S′w)). As shown in [19], thisalgorithm can be implemented in polynomial time.

Also, (ii) holds since (in Steps 15−16) Algorithm ANarrow Color assigns|c′(Ji)| colors to any Ji ∈ S′n, i.e., in the resulting non-circular contiguous color-ing, c′′, we have |c′′(Ji)| = |c′(Ji)|, ∀ Ji ∈ S′n. We note that c′′ is a valid coloringsince the total number of colors in coloring S′n at any time t > 0 is at most dεW eand we have this number of unused contiguous block of colors since we used only(1− ε)W colors at any time t > 0.

21