A Primal-Dual Approximation Algorithm for Min-Sum Single-Machine Scheduling Problems
Maurice Cheung, Julián Mestre, David B. Shmoys, José Verschae
aa r X i v : . [ c s . D S ] D ec A Primal-Dual Approximation Algorithm forMin-Sum Single-Machine Scheduling Problems ∗ Maurice Cheung † Juli´an Mestre ‡ David B. Shmoys † Jos´e Verschae § Abstract
We consider the following single-machine scheduling problem, which is oftendenoted 1 || P f j : we are given n jobs to be scheduled on a single machine, whereeach job j has an integral processing time p j , and there is a nondecreasing, non-negative cost function f j ( C j ) that specifies the cost of finishing j at time C j ; theobjective is to minimize P nj =1 f j ( C j ). Bansal & Pruhs recently gave the firstconstant approximation algorithm with a performance guarantee of 16. We im-prove on this result by giving a primal-dual pseudo-polynomial-time algorithmbased on the recently introduced knapsack-cover inequalities. The algorithmfinds a schedule of cost at most four times the constructed dual solution. Al-though we show that this bound is tight for our algorithm, we leave open thequestion of whether the integrality gap of the LP is less than 4. Finally, we showhow the technique can be adapted to yield, for any ǫ >
0, a (4+ ǫ )-approximationalgorithm for this problem. We consider the following general scheduling problem: we are given a set J of n jobs toschedule on a single machine, where each job j ∈ J has a positive integral processingtime p j , and there is a nonnegative integer-valued cost function f j ( C j ) that specifiesthe cost of finishing j at time C j . The only restriction on the cost function f j ( C j ) isthat it is a nondecreasing function of C j ; the objective is to minimize P j ∈J f j ( C j ).This problem is denoted as 1 || P f j in the notation of scheduling problems formulatedby Graham, Lawler, Lenstra, & Rinnooy Kan [13].In a recent paper, Bansal & Pruhs [4] gave the first constant approximation algo-rithm for this problem; more precisely, they presented a 16-approximation algorithm, ∗ A preliminary version of this article appeared in the Proceedings of APPROX-RANDOM 2011.Research supported partially by NSF grants CCF-0832782, CCF-1017688, CCF-1526067, and CCF-1522054; NSERC grant PGS-358528; FONDECYT grant No. 11140579, and Nucleo Milenio Infor-maci´on y Coordinaci´on en Redes ICM/FIC RC130003. † School of Operations Research & Information Engineering Cornell University, Ithaca NY 14853,USA. ‡ School of Information Technologies, The University of Sydney, NSW, Australia. § Facultad de Matem´aticas & Escuela de Ingenier´ıa, Pontificia Universidad Cat´olica de Chile,Santiago, Chile. ǫ >
0, a (4 + ǫ )-approximation algorithm for this problem. This problem isstrongly N P -hard, simply by considering the case of the weighted total tardiness,where f j ( C j ) = w j max j ∈J { , C j − d j } and d j is a specified due date of job j , j ∈ J .However, no hardness results are known other than this, and so it is still conceivablethat there exists a polynomial approximation scheme for this problem (though by theclassic result of Garey & Johnson [12], no fully polynomial approximation scheme ex-ists unless P=NP). No polynomial approximation scheme is known even for the specialcase of weighted total tardiness. Our Techniques
Our results are based on the linear programming relaxation of atime-indexed integer programming formulation in which the 0-1 decision variables x jt indicate whether a given job j ∈ J , completes at time t ∈ T = { , . . . , T } , where T = P j ∈J p j ; note that since the cost functions are nondecreasing with time, wecan assume, without loss of generality, that the machine is active only throughout theinterval [0 , T ], without any idle periods. With these time-indexed variables, it is trivialto ensure that each job is scheduled; the only difficulty is to ensure that the machineis not required to process more than one job at a time. To do this, we observe that, foreach time t ∈ T , the jobs completing at time t or later have total processing time atleast T − t + 1 (by the assumption that the processing times p j are positive integers);for conciseness, we denote this demand D ( t ) = T − t + 1. This gives the followinginteger program:minimize X j ∈J X t ∈T f j ( t ) x jt (IP)subject to X j ∈J X s ∈T : s ≥ t p j x js ≥ D ( t ) , for each t ∈ T ; (1) X t ∈T x jt = 1 , for each j ∈ J ; (2) x jt ∈ { , } , for each j ∈ J , t ∈ T . We first argue that this is a valid formulation of the problem. Clearly, each feasibleschedule corresponds to a feasible solution to (IP) of equal objective function value.Conversely, consider any feasible solution, and for each job j ∈ J , assign it the duedate d j = t corresponding to x jt = 1. If we schedule the jobs in Earliest Due Date(EDD) order, then we claim that each job j ∈ J , completes by its due date d j . If weconsider the constraint (1) in (IP) corresponding to t = d j + 1, then since each job isassigned once, we know that P j ∈J P d j t =1 p j x jt ≤ d j ; in words, the jobs with due dateat most d j have total processing time at most d j . Since each job completes by its duedate, and the cost functions f j ( · ) are nondecreasing, we have a schedule of cost nomore than that of the original feasible solution to (IP).The formulation (IP) has an unbounded integrality gap: the ratio of the optimalvalue of (IP) to the optimal value of its linear programming relaxation can be arbitrar-ily large. We strengthen this formulation by introducing a class of valid inequalities2alled knapsack-cover inequalities . To understand the starting point for our work, con-sider the special case of this scheduling problem in which all n jobs have a common duedate D , and for each job j ∈ J , the cost function is 0 if the job completes by time D ,and is w j , otherwise. In this case, we select a set of jobs of total size at most D , so asto minimize the total weight of the complementary set (of late jobs). This is equivalentto the minimum-cost (covering) knapsack problem, in which we wish to select a subsetof items of total size at least a given threshold, of minimum total cost. Carr, Fleis-cher, Leung, and Phillips [9] introduced knapsack-cover inequalities for this problem(as a variant of flow-cover inequalities introduced by Padberg, Van Roy, and Wolsey[18]) and gave an LP-rounding 2-approximation algorithm based on this formulation.Additionally, they showed that the LP relaxation with knapsack-cover inequalities hasan integrality gap of at least 2 − n .The idea behind the knapsack-cover inequalities is quite simple. Fix a subset ofjobs A ⊆ J that contribute towards satisfying the demand D ( t ) for time t or later;then there is a residual demand from the remaining jobs of D ( t, A ) := max { D ( t ) − P j ∈ A p j , } . Thus, each job j ∈ J can make an effective contribution to this residualdemand of p j ( t, A ) := min { p j , D ( t, A ) } ; that is, given the inclusion of the set A , theeffective contribution of job j towards satisfying the residual demand can be at mostthe residual demand itself. Thus, we have the constraint: X j / ∈ A T X s = t p j ( t, A ) x js ≥ D ( t, A ) for each t ∈ T , and each A ⊆ J . The dual LP is quite natural: there are dual variables y ( t, A ), and a constraint thatindicates, for each job j and each time s ∈ T , that f j ( s ) is at least a weighted sum of y ( t, A ) values, and the objective is to maximize P t,A D ( t, A ) y ( t, A ).Our primal-dual algorithm has two phases: a growing phase and a pruning phase.Throughout the algorithm, we maintain a set of jobs A t for each time t ∈ T . In eachiteration of the growing phase, we choose one dual variable to increase, correspondingto the demand D ( t, A t ) that is largest, and increase that dual variable as much aspossible. This causes a dual constraint corresponding to some job j to become tightfor some time t ′ , and so we set x jt ′ = 1 and add j to each set A s with s ≤ t ′ . Notethat this may result in jobs being assigned to complete at multiple times t ; thenin the pruning phase we do a “reverse delete” that both ensures that each job isuniquely assigned, and also that the solution is minimal, in the sense that each jobpasses the test that if it were deleted, then some demand constraint (1) in (IP) wouldbe violated. This will be crucial to show that the algorithm is a 4-approximationalgorithm. Furthermore, we show that our analysis is tight by giving an instance forwhich the algorithm constructs primal and dual solutions whose objective values differby a factor 4. It will be straightforward to show that the algorithm runs in timepolynomial in n and T , which is a pseudo-polynomial bound.To convert this algorithm into a polynomial-time algorithm, we adopt an interval-indexed formulation, where we bound the change of cost of any job to be within afactor of (1 + ǫ ) within any interval. This is sufficient to ensure a (weakly) polynomialnumber of intervals, while degrading the performance guarantee by a factor of (1 + ǫ ),and this yields the desired result.It is well known that primal-dual algorithms have an equivalent local-ratio counter-part [7]. For completeness, we also give the local-ratio version of our algorithm and its3nalysis. One advantage of the local ratio approach is that it naturally suggests a sim-ple generalization of the algorithm to the case where jobs have release dates yieldinga 4 κ -approximation algorithm, where κ is the number of distinct release dates. Previous Results
The scheduling problem 1 || P f j is closely related to the unsplit-table flow problem (UFP) on a path. An instance of this problem consists of a path P , a demand d e for each edge e , and a set of tasks. Each task j is determined bya cost c j , a subpath P j of P , and a covering capacity p j . The objective is to find asubset T of the tasks that has minimum cost and covers the demand of each edge e ,i.e., P j ∈ T : e ∈ P j p j ≥ d e . The relation of this problem to 1 || P f j is twofold. On the onehand UFP on a path can be seen as a special case of 1 || P f j [5]. On the other hand,Bansal & Pruhs [4] show that any instance of 1 || P f j can be reduced to an instancesof UFP on a path while increasing the optimal cost by a factor of 4. Bar-Noy et al. [6]study UFP on a path and give a 4-approximation algorithm based on a local ratiotechnique. In turn, this yields a 16-approximation with the techniques of Bansal &Pruhs [4]. Very recently, and subsequent to the dissemination of earlier versions of ourwork, H¨ohn et al. [16] further exploited this connection. They give a quasi-PTAS forUFP on a path, which they use to construct a quasipolynomial ( e + ǫ )-approximationfor 1 || P f j by extending the ideas of Bansal & Pruhs [4].The local ratio algorithm by Bar-Noy et al. [6], when interpreted as a primal-dual algorithm [7], uses an LP relaxation that includes knapsack-cover inequalities.Thus, the 4-approximation algorithm of this paper can be considered a generaliza-tion of the algorithm by Bar-Noy et al. [6]. The primal-dual technique was indepen-dently considered by Carnes and Shmoys [8] for the minimum knapsack-cover problem.Knapsack-cover inequalities have subsequently been used to derive approximation al-gorithms in a variety of other settings, including the work of Bansal & Pruhs [4] for1 | ptmn, r j | P f j , Bansal, Buchbinder, & Naor [1, 2], Gupta, Krishnaswamy, Kumar,& Segev [14], Bansal, Gupta, & Krishnaswamy [3], and Pritchard [19].An interesting special case of 1 || P f j considers objective functions of the form f j = w j f for some given non-decreasing function f and job-dependent weights w j > P w j C j on a ma-chine that changes its speed over time. For this setting, Epstein et al. [11] derive a4-approximation algorithm that yields a sequence independent of the speed of themachine (or independent of f , respectively). This bound is best possible for an un-known speed function. If randomization is allowed they improve the algorithm toan e -approximation. Moreover, Megow and Verschae [17] give a PTAS for the fullinformation setting, which is best possible since even this special case is strongly NP-hard [15].A natural extension of 1 || P f j considers scheduling on a varying speed machine tominimize P f j ( C j ), yielding a seemingly more general problem. However, this problemcan be modeled [15, 17, 11] as an instance of 1 || P f j by considering cost functions˜ f j = f j ◦ g for a well chosen function g that depends on the speed function of themachine. Organization of the paper
Section 2 contains our main results, including the pseu-dopolynomial 4 − approximation algorithm and the proof that its analysis is tight. Sec-tion 3 shows the techniques to turn this algorithm to a polynomial (4+ ǫ )-approximation.4he local ratio interpretation is given in Section 4, and the case with release dates isanalyzed in Section 5. || P f j We give a primal-dual algorithm that runs in pseudo-polynomial time that has aperformance guarantee of 4. The algorithm is based on the following LP relaxation:min X j ∈J X t ∈T f j ( t ) x jt (P)s.t. X j / ∈ A X s ∈T : s ≥ t p j ( t, A ) x js ≥ D ( t, A ) , for each t ∈ T , A ⊆ J ; (3) x jt ≥ , for each j ∈ J , t ∈ T . Notice that the assignment constraints (2) are not included in (P). In fact, the followinglemma shows that they are redundant, given the knapsack-cover inequalities. Thisleaves a much more tractable formulation on which to base the design of our primal-dual algorithm.
Lemma 1.
Let x be a feasible solution to the linear programming relaxation (P).Then there is a feasible solution ¯ x of no greater cost that also satisfies the assignmentconstraints (2).Proof. First, by considering the constraint (3) with the set A = J − { k } and t = 1, itis easy to show that for any feasible solution x of (P), we must have P s ∈T x ks ≥ k .We next show that each job is assigned at most once. We may assume without lossof generality that x is a feasible solution for (P) in which P j ∈J P s ∈T x js is minimum.Suppose, for a contradiction, that P s ∈T x js > j , and let t be the largesttime index where the partial sum P s ∈T : s ≥ t x js ≥
1. Consider the truncated solution¯ x where ¯ x ks = , if k = j and s < t − P Ts = t +1 x js , if k = j and s = tx ks , otherwiseLet us check that the modified solution ¯ x is feasible for (P). Fix s ∈ T and A ⊆ J . If s > t or A ∋ j , then clearly ¯ x satisfies the corresponding inequality (3) for s, A since x does. Consider s ≤ t and A j , so that P r ∈T : r ≥ s ¯ x j,r = 1 and p k ( s, A ) = p k ( s, A \ { j } )for each k ∈ J . Then, X k / ∈ A X r ∈T : r ≥ s p k ( s, A )¯ x kr = p j ( s, A \ { j } ) X r ∈T : r ≥ s ¯ x k,j + X k / ∈ A \{ j } X r ∈T : r ≥ s p k ( s, A \ { j } )¯ x kr ≥ p j ( s, A \ { j } ) + D ( s, A \ { j } ) ≥ D ( s, A ) , where the first inequality follows since x is feasible for (P). Thus ¯ x satisfies (3). Thisgives the desired contradiction because P j ∈J P s ∈T ¯ x js < P j ∈J P s ∈T x js . Finally,since ¯ x ≤ x component-wise and the objective f j ( t ) is nonnegative, it follows that ¯ x is a solution of no greater cost than x . 5aking the dual of (P) gives:max X t ∈T X A ⊆J D ( t, A ) y ( t, A ) (D)s.t. X t ∈T : t ≤ s X A : j / ∈ A p j ( t, A ) y ( t, A ) ≤ f j ( s ); for each j ∈ J , s ∈ T ; (4) y ( t, A ) ≥ t ∈ T , A ⊆ J . We now give the primal-dual algorithm for the scheduling problem 1 || P f j . Thealgorithm consists of two phases: a growing phase and a pruning phase.The growing phase constructs a feasible solution x to (P) over a series of iterations.For each t ∈ T , we let A t denote the set of jobs that are set to finish at time t or laterby the algorithm, and thus contribute towards satisfying the demand D ( t ). In eachiteration, we set a variable x jt to 1 and add j to A s for all s ≤ t . We continue untilall demands D ( t ) are satisfied. Specifically, in the k th iteration, the algorithm select t k := argmax t D ( t, A t ), which is the time index that has the largest residual demandwith respect to the current partial solution. If there are ties, we choose the largest such time index to be t k (this is not essential to the correctness of the algorithm – onlyfor consistency and efficiency). If D ( t k , A t k ) = 0, then we must have P j ∈ A t p j ≥ D ( t )for each t ∈ T ; all demands have been satisfied and the growing phase terminates.Otherwise, we increase the dual variable y ( t k , A t k ) until some dual constraint (4) withright-hand side f j ( t ) becomes tight. We set x jt = 1 and add j to A s for all s ≤ t (if j is not yet in A s ). If multiple constraints become tight at the same time, we pickthe one with the largest time index (and if there are still ties, just pick one of thesejobs arbitrarily). However, at the end of the growing phase, we might have jobs withmultiple variables set to 1, thus we proceed to the pruning phase.The pruning phase is a “reverse delete” procedure that checks each variable x jt that is set to 1, in decreasing order of the iteration k in which that variable was setin the growing phase. We attempt to set x jt back to 0 and correspondingly deletejobs from A t , provided this does not violate the feasibility of the solution. Specifically,for each variable x jt = 1, if j is also in A t +1 then we set x jt = 0. It is safe to doso, since in this case, there must exist t ′ > t where x jt ′ = 1, and as we argued inLemma 1, it is redundant to have x jt also set to 1. Otherwise, if j / ∈ A t +1 , we checkif P j ′ ∈ A s \{ j } p j ′ ≥ D ( s ) for each time index s where j has been added to A s in thesame iteration of the growing phase. In other words, we check the inequality for each s ∈ { s , . . . , t } , where s < t is the largest time index with x js = 1 (and s = 0 ifthere is no such value). If all the inequalities are fulfilled, then j is not needed tosatisfy the demand at time s . Hence, we remove j from all such A s and set x jt = 0.We will show that at the end of the pruning phase, each job j has exactly one x jt setto 1. Hence, we set this time t as the due date of job j .Finally, the algorithm outputs a schedule by sequencing the jobs in Earliest DueDate (EDD) order. We give pseudo-code for this in the figure Algorithm 1. Throughout the algorithm’s execution, we maintain both a solution x along with thesets A t , for each t ∈ T . An easy inductive argument shows that the following invariantis maintained. 6 lgorithm 1 primal-dual ( f, p ) // Initialization x, y, k ← A t = ∅ , for all t ∈ T t := argmax t D ( t, A t ) // Growing phase while D ( t k , A t k ) > do Increase y ( t k , A t k ) until a dual constraint (4) with right handside f j ( t ) becomes tight // break ties by choosing thelargest t x jt ← A s ← A s ∪ { j } for each s ≤ t k ← k + 1 t k := argmax t D ( t, A t ) // break ties by choosing thelargest t // Pruning phase Consider { ( j, t ) : x jt = 1 } in reverse order in which they are setto 1 if j ∈ A t +1 then x jt ← else if P j ′ ∈ A s \{ j } p j ′ ≥ D ( s ) for all s ≤ t where j is added to A s in the same iteration of growing phase then x j,t ← A s ← A s \ { j } for all such s // Output schedule for j ← , . . . , n do Set due date d j of job j to time t if x jt = 1 Schedule jobs using EDD rule
Lemma 2.
Throughout the algorithm, j ∈ A s if and only if there exists t ≥ s suchthat x jt = 1 .Proof. This lemma is proved by considering each step of the algorithm. Clearly, it istrue initially.In the growing phase of the algorithm, we add j to A s if and only if we have setsome x jt with t ≥ s to 1 in the same iteration; hence the result holds through the endof the growing phase. Moreover, there is the following monotonicity property: Since j is added to A s for all s ≤ t when x jt is set to 1, if there is another x jt ′ set to 1 in a lateriteration k , we must have t ′ ≥ t . Otherwise, if t k ≤ t ′ < t , when increasing y ( t k , A t k )in Step 7 job j would belong to A t ⊆ A t k and the dual constraint could never becometight. Hence, in the pruning phase, we consider the variables x jt for a particular job j in decreasing order of t .Next we show that the result holds throughout the pruning phase. One directionis easy, since as long as there is some t ≥ s with x jt equals 1, j would remain in A s .7ext, we prove the converse by using backward induction on s ; we show that if for all t ≥ s , x jt = 0, then j / ∈ A s . Since the result holds at the end of the growing phase, weonly have to argue about the changes made in the pruning phase. For the base case,if x jT is set to 0 during the pruning phase, by construction of the algorithm, we alsoremove j from A T ; hence the result holds. Now for the inductive case. In a particulariteration of the pruning phase, suppose x jt ′ is the only variable corresponding to job j with time index t ′ at least s that is set to 1, but it is now being changed to 0. Weneed to show j is removed from A s . First notice by the monotonicity property above, j must be added to A s in the same iteration as when x jt ′ is set to 1 in the growingphase. By the assumption that x jt ′ is the only variable with time index as least s thatis set to 1 at this point, j / ∈ A t ′ +1 by induction hypothesis. Hence we are in the else-if case in the pruning phase of the algorithm. But by construction of the algorithm, weremove j from all A t for all t ≤ t ′ that are added in the same iteration of the growingphase, which include s . Hence the inductive case holds, and the result follows.Note that this lemma also implies that the sets A t are nested; i.e., for any two timeindices s < t , it follows that A s ⊇ A t . Using the above lemma, we will show that thealgorithm produces a feasible solution to (P) and (D). Lemma 3.
The algorithm produces a feasible solution x to (P) that is integral andsatisfies the assignment constraints (2), as well as a feasible solution y to (D).Proof. First note that, by construction, the solution x is integral. The algorithmstarts with the all-zero solution to both (P) and (D), which is feasible for (D) butinfeasible for (P). Showing that dual feasibility is maintained throughout the algorithmis straightforward. Next we show that at termination, the algorithm obtains a feasiblesolution for (P).At the end of the growing phase, all residual demands D ( t, A t ) are zero, and hence, P j ∈ A t p j ≥ D ( t ) for each t ∈ T . By construction of the pruning phase, the same stillholds when the algorithm terminates.Next, we argue that for each job j there is exactly one t with x jt = 1 when thealgorithm terminates. Notice that D (1) (the demand at time 1) is T , which is also thesum of processing time of all jobs; hence A must include every job to satisfy D (1).By Lemma 2, this implies that each job has at least some time t for which x jt = 1when the growing phase terminates. On the other hand, from the pruning step (inparticular, the first if statement in the pseudocode), each job j has x jt set to 1 for atmost one time t . However, since no job can be deleted from A , by Lemma 2, we seethat, for each job j , there is still at least one x jt set to 1 at the end of the pruningphase. Combining the two, we see that each job j has one value t for which x jt = 1.By invoking Lemma 2 for the final solution x , we have that P Ts = t P j ∈J p j x js ≥ D ( t ). Furthermore, x also satisfies the constraint P t ∈T x jt = 1, as argued above.Hence, x is feasible for (IP), which implies the feasibility for (P).Since all cost functions f j are nondecreasing, it is easy to show that given a feasibleintegral solution x to (P) that satisfies the assignment constraints (2), the followingschedule costs no more than the objective value for x : set the due date d j = t for job j , where t is the unique time such that x jt = 1, and sequence in EDD order.8 emma 4. Given a feasible integral solution to (P) that satisfies the assignment con-straint (2), the EDD schedule is a feasible schedule with cost no more than the valueof the given primal solution.Proof.
Since each job j ∈ J has exactly one x jt set to 1, it follows that P j ∈J P s ∈T p j x js = T . Now, taking A = ∅ from constraints (3), we have that P j ∈J P s ∈T : s ≥ t p j x js ≥ D ( t ) = T − t + 1. Hence, P j ∈J P s ∈T : s ≤ t − p j x js ≤ t − t is no greaterthan the machine’s capacity for job processing up to this time (which is t − j ∈ J , we set its due date d j = t , where t is the unique time such that x jt = 1. As a corollary, this also shows x jt = 0 for t < p j . Finally, this schedule costsno more than the optimal value of (P), since each job j ∈ J finishes by d j , and eachfunction f j ( t ) is nondecreasing in t .Next we analyze the cost of the schedule returned by the algorithm. Given theabove lemma, it suffices to show that the cost of the primal solution is no morethan four times the cost of the dual solution; the weak duality theorem of linearprogramming then implies that our algorithm has a performance guarantee of 4.We first introduce some notation used in the analysis. Given the final solution ¯ x returned by the algorithm, define ¯ J t := { j : ¯ x jt = 1 } , and ¯ A t := { j : ∃ ¯ x jt ′ = 1 , t ′ ≥ t } .In other words, ¯ A t is the set of jobs that contribute towards satisfying the demandat time t in the final solution; hence, we say that j covers t if j ∈ ¯ A t . Let x k be thepartial solution of (P) at the beginning of the k th iteration of the growing phase. Wedefine J kt and A kt analogously with respect to x k . Next we prove the key lemma in ouranalysis. Lemma 5.
For every ( t, A ) such that y ( t, A ) > we have X s ∈T : s ≥ t X j ∈ ¯ J s \ A p j ( s, A ) < D ( t, A ) . Proof.
Recall that the algorithm tries to increase only one dual variable in each iter-ation of the growing phase. Suppose that y ( t, A ) is the variable chosen in iteration k ,i.e., t = t k . Then the lemma would follow from X j ∈ ¯ A tk \ A ktk p j ( t k , A kt k ) ≤ · D ( t k , A kt k ) for all k. (5)Let us fix an iteration k . We can interpret the set on the left-hand side as the jobsthat cover the demand of t k that are added to the solution after the start of iteration k and that survive the pruning phase. For each such job j , let us define τ j to be largesttime such that p ( ¯ A τ j \ ( A kτ j ∪ { j } )) < D ( τ j , A kτ j ) . Let us first argue that this quantity is well defined. Let d j be the unique time stepfor which ¯ x j,d j = 1, which, by Lemma 2, is guaranteed to exist. Also, let r be thelargest time such that x kj,r = 1, which must be r < t k (we define r = 0 if x j,t = 0 forall t ). We claim that τ j > r . 9onsider the iteration of the pruning phase where the algorithm tried (unsuccess-fully) to set x j,d j to 0 and let ˆ x be the primal solution that the algorithm held at thatmoment; also, let ˆ A be defined for ˆ x in the same way ¯ A is defined for ¯ x . The algorithmdid not prune x j,d j because there was a time s > r such that p ( ˆ A s \ { j } ) < D ( s ). No-tice that ¯ A s ⊆ ˆ A s because the pruning phase can only remove elements from A s , and A ks ⊆ ˆ A s because x j,d j was set in iteration k or later of the growing phase. Hence, p ( ¯ A s \ ( A ks ∪ { j } )) ≤ p ( ˆ A s \ { j } ) − p ( A ks ) < D ( s ) − p ( A ks ) ≤ D ( s, A ks ) , which implies that τ j ≥ s , which in turn is strictly larger than r as claimed. Therefore, τ j is well defined.Based on this definition we partition the set ¯ A t k \ A kt k in two subsets, H := { j ∈ ¯ A t k \ A kt k : τ j ≥ t k } and L := { j ∈ ¯ A t k \ A kt k : τ j < t k } . For each of these, we define h := argmin { τ j : j ∈ H } and ℓ := argmax { τ j : j ∈ L } . We will bound separately the contribution of H \ { h } and L \ { ℓ } to the left-hand sideof (5). For j ∈ { h, ℓ } , we will use the trivial bound p j ( t k , A kt k ) ≤ D ( t k , A kt k ) . (6)We start by bounding the contribution of H \ { h } . Notice that for every job j ∈ H we must have τ j ≤ d j ; otherwise, the solution ¯ x would not be feasible, whichcontradicts Lemma 3. For all j ∈ H we have that j ∈ ¯ A τ h since τ h ≤ τ j ≤ d j ; also j / ∈ A kτ h since j / ∈ A kt k and A kt k ⊇ A kτ h because τ h ≥ t k . It follows that H ⊆ ¯ A τ h \ A kτ h .Therefore, X j ∈ H \{ h } p j ( t k , A kt k ) ≤ p ( H \ { h } ) ≤ p ( ¯ A τ h \ ( A kτ h ∪ { h } )) < D ( τ h , A kτ h ) ≤ D ( t k , A kt k ) , (7)where the first inequality follows from p j ( t, A ) ≤ p j , the second inequality from thefact that H ⊆ ¯ A τ h \ A kτ h , the third inequality from the definition of τ h , and the fourthbecause t k is chosen in each iteration of the growing phase to maximize D ( t k , A kt k ).Now we bound the contribution of L \ { ℓ } . Suppose that at the beginning ofiteration k we had x j,r = 1 for some r < t k and j ∈ ¯ A t k \ A kt k . When we argued abovethat τ j was well defined we showed in fact that r < τ j . For all j ∈ L then we havethat j / ∈ A kτ ℓ since τ j ≤ τ ℓ ; also j ∈ ¯ A τ ℓ since j ∈ ¯ A t k and ¯ A t k ⊆ ¯ A τ ℓ because τ ℓ ≤ t k .It follows that L ⊆ ¯ A τ ℓ \ A kτ ℓ . Therefore, X j ∈ L \{ ℓ } p j ( t k , A kt k ) ≤ p ( L \ { ℓ } ) ≤ p ( ¯ A τ ℓ \ ( A kτ ℓ ∪ { ℓ } )) < D ( τ ℓ , A kτ ℓ ) ≤ D ( t k , A kt k ) , (8)where the first inequality follows from p j ( t, A ) ≤ p j , the second inequality from thefact that L ⊆ ¯ A τ ℓ \ A kτ ℓ , the third inequality from the definition of τ ℓ , and the forthbecause t k is chosen in each iteration of the growing phase to maximize D ( t k , A kt k ).10t is now easy to see that (5) follows from (6), (7), and (8): X j ∈ ¯ A tk \ A ktk p j ( t k , A kt k ) ≤ p ( L \ { ℓ } ) + p ℓ ( t k , A kt k ) + p ( H \ { h } ) + p h ( t k , A kt k ) ≤ · D ( t k , A kt k ) . Now we can show our main theorem.
Theorem 1.
The primal-dual algorithm produces a schedule for || P f j with cost atmost four times the optimum.Proof. It suffices to show that the cost of the primal solution after the pruning phase isno more than four times the dual objective value. The cost of our solution is denotedby P t ∈T P j ∈ ¯ J t f j ( t ). We have that X t ∈T X j ∈ ¯ J t f j ( t ) = X t ∈T X j ∈ ¯ J t X s ∈T : s ≤ t X A : j / ∈ A p j ( s, A ) y ( s, A )= X s ∈T X A ⊆J y ( s, A ) X t ∈T : t ≥ s X j ∈ ¯ J t \ A p j ( s, A ) The first line is true because we set x jt = 1 only if the dual constraint is tight,and the second line is obtained by interchanging the order of summations. Now, fromLemma 5 we know that P t ∈T : t ≥ s P j ∈ ¯ J t \ A p j ( s, A ) < D ( s, A ). Hence it follows that X s ∈T X A ⊆J y sA X t ∈T : t ≥ s X j ∈ ¯ J t \ A p j ( s, A ) < X s ∈T X A ⊆J D ( s, A ) y ( s, A ) , where the right-hand side is four times the dual objective. The result now follows,since the dual objective is a lower bound of the cost of the optimal schedule. In this section we show that the previous analysis is tight.
Lemma 6.
For any ε > there exists an instance where Algorithm 1 constructs apair of primal-dual solutions with a gap of − ε .Proof. Consider an instance with 4 jobs. Let p ≥ j ∈ { , , , } ,we define the processing times as p j = p and the cost functions as f ( t ) = f ( t ) = ≤ t ≤ p − ,p if p ≤ t ≤ p − , ∞ otherwise , and11 t k A kt k D ( t k , A kt k ) Dual update Primal update1 1 ∅ p y , ∅ = 0 x , p − = 12 1 { } p y , { } = 0 x , p − = 13 1 { , } p y , { , } = 0 x ,p − = 14 3 p − ∅ p + 2 y p − , ∅ = 1 x , p = 15 p { , } p + 1 y p, { , } = 0 x , p − = 16 1 { , , } p y p, { , , } = 0 x , p − = 17 3 p { } y p, { } = 0 x , p = 1Figure 1: Trace of the key variables of the algorithm in each iteration k of the growingphase and the corresponding updates to the dual and primal solutions f ( t ) = f ( t ) = ( ≤ t ≤ p − ,p otherwise . Table 1 shows a trace of the algorithm for the instance. Notice that the only non-zero dual variable the algorithm sets is y p − , ∅ = 1. Thus the dual value achieved is y p − , ∅ D (3 p − , ∅ ) = p + 2. It is easy to check that the pruning phase keeps the largestdue date for each job and has cost 4 p . In fact, it is not possible to obtain a primal(integral) solution with cost less than 4 p : We must pay p for each job 3 and 4 in orderto cover the demand at time 3 p , and we must pay p for each job 1 and 2 since theycannot finish before time p . Therefore the pair of primal-dual solutions have a gap of4 p/ ( p + 2), which converges to 4 as p tends to infinity.The attentive reader would complain that the cost functions used in the proofLemma 6 are somewhat artificial. Indeed, jobs 1 and 2 cost 0 only in [0 , p −
1] eventhough it is not possible to finish them before p . This is, however, not an issue sincegiven any instance ( f, p ) of the problem we can obtain a new instance ( f ′ , p ′ ) where f ′ j ( t ) ≥ f ′ j ( p ′ j ) for all t where we observe essentially the same primal-dual gap in ( f, p )and ( f ′ , p ′ ). The transformation is as follows: First, we create a dummy job withprocessing time T = P j p j that costs 0 up to time T and infinity after that. Second,for each of the original jobs j , we keep their old processing times, p ′ j = p j , but modifytheir cost function: f ′ j ( t ) = ( δp j if t ≤ T,δp j + f j ( t − T ) if T < t ≤ T. In other words, to obtain f ′ j we shift f j by T units of time to the right and then add δp j everywhere, where δ is an arbitrarily small value.Consider the execution of the algorithm on the modified instance ( f ′ , p ′ ). In thefirst iteration, the algorithm sets y , ∅ to 0 and assigns the dummy job to time T .In the second iteration, the algorithm chooses to increase the dual variable y T +1 , ∅ .Imagine increasing this variable in a continuous way and consider the moment whenit reaches δ . At this instant, the slack of the dual constraints for times in [ T + 1 , T ]in the modified instance are identical to the slack for times in [1 , T ] at the beginningof the execution on the original instance ( f, p ). From this point in time onwards, theexecution on the modified instance will follow the execution on the original instancebut shifted T units of time to the right. The modified instance gains only an extra δT
12f dual value, which can be made arbitrarily small, so we observe essentially the sameprimal-dual gap on ( f ′ , p ′ ) as we do on ( f, p ). (4 + ǫ ) -approximation algorithm We now give a polynomial-time (4 + ǫ )-approximation algorithm for 1 || P f j . This isachieved by simplifying the input via rounding in a fairly standard fashion, and thenrunning the primal-dual algorithm on the LP relaxation of the simplified input, whichhas only a polynomial number of interval-indexed variables. A similar approach wasemployed in the work of Bansal & Pruhs [4].Fix a constant ǫ >
0. We start by constructing n partitions of the time indices { , . . . , T } , one partition for each job, according to its cost function. Focus on somejob j . First, the set of time indices I j = { t : f j ( t ) = 0 } are those of class k = 1 , , . . . are the set of indices I kj = { t : (1 + ǫ ) k − ≤ f j ( t ) < (1 + ǫ ) k } . (We canbound the number of classes for job j by 2 + log ǫ f j ( T ).) Let ℓ kj denote the minimumelement in I kj (if the set is non-empty), and let b T j be the set of all left endpoints ℓ kj .Finally, let b T = ∪ j ∈J b T j ∪ { } . Index the elements such that b T := { t , ..., t τ } where1 = t < t < ... < t τ . We then compute a master partition of the time horizon T into the intervals I = { [ t , t − , [ t , t − , ..., [ t τ − , t τ − , [ t τ , T ] } . There are twokey properties of this partition: the cost of any job changes by at most a factor of1 + ǫ as its completion time varies within an interval, and the number of intervals isa polynomial in n , log P and log W ; here P denotes the length of the longest job and W = max j,t ( f j ( t ) − f j ( t − f j ( t ) in one timestep over all jobs j and times t . Lemma 7.
The number of intervals in this partition, |T | = O ( n log nP W ) .Proof. It suffices to show that the number of intervals in each T j is O (log nP W ).Notice that T ≤ nP , thus the maximum cost of any job is bounded by nP W , whichimplies T j = O (log nP W ).Next we define a modified cost function f ′ j ( t ) for each time t ∈ b T ; in essence, themodified cost is an upper bound on the cost of job j when completing in the intervalfor which t is the left endpoint. More precisely, for t i ∈ b T , let f ′ j ( t i ) := f j ( t i +1 − f j ( t ) ≤ f ′ j ( t ) ≤ (1 + ǫ ) f j ( t ) for each t ∈ b T .Consider the following integer programming formulation with variables x ′ jt for each job j and each time t ∈ b T ; we set the variable x ′ jt i to 1 to indicate that job j completesat the end of the interval [ t i , t i +1 − D ( t ) is defined the same way asbefore. 13inimize X j ∈J X t ∈ b T f ′ j ( t ) x ′ jt (IP ′ )subject to X j ∈J X s ∈ b T : s ≥ t p j x ′ js ≥ D ( t ) , for each t ∈ b T ; (9) X t ∈ b T x ′ jt = 1 , for each j ∈ J ; (10) x ′ jt ∈ { , } , for each j ∈ J , t ∈ b T . The next two lemmas relate (IP ′ ) to (IP). Lemma 8.
If there is a feasible solution x to (IP) with objective value v , then thereis a feasible solution x ′ to (IP ′ ) with objective value at most (1 + ǫ ) v .Proof. Suppose x jt = 1 where t lies in the interval [ t i , t i +1 −
1] as defined by thetime indices in T , then we construct a solution to (IP ′ ) by setting x ′ jt i = 1. It isstraightforward to check x ′ is feasible for (IP ′ ), and by construction f ′ j ( t i ) = f j ( t i +1 − ≤ (1 + ǫ ) f j ( t ). Lemma 9.
For any feasible solution x ′ to (IP ′ ) there exists a feasible solution x to(IP) with the same objective value.Proof. Suppose x ′ jt = 1, where t = t i ; then we construct a solution to (IP) by setting x j,t i +1 − = 1. Notice that the time t i +1 − t i , t i +1 − f j ( t i +1 −
1) = f ′ j ( t i ); hence, the cost of solution x and x ′ coincide. To check its feasibility, it suffices to see that the constraint correspondingto D ( t i ) is satisfied. This uses the fact that within the interval [ t i , t i +1 − D ( t ) islargest at t i and that the constraint corresponding to D ( t ) contains all variables x js with a time index s such that s ≥ t .Using the two lemmas above, we see that running the primal-dual algorithm usingthe LP relaxation of (IP ′ ) strengthened by the knapsack-cover inequalities gives us a4 (1 + ǫ )-approximation algorithm for the scheduling problem 1 || P f j . Hence we havethe following result: Theorem 2.
For each ǫ > , there is a (4 + ǫ ) -approximation algorithm for thescheduling problem || P f j . In this section we cast our primal-dual 4-approximation as a local-ratio algorithm.We will work with due date assignment vectors σ = ( σ , . . . , σ n ) ∈ ( T ∪ { } ) n ,where σ j = t means that job j has a due date of t . We will use the short-handnotation ( σ − j , s ) to denote the assignment where j is given a due date s and all otherjobs get their σ due date; that is,( σ − j , s ) = ( σ , . . . , σ j − , s, σ j +1 , . . . , σ n ) . lgorithm 2 local-ratio ( σ , g ) if σ is feasible then ρ = σ else t ∗ = argmax t ∈T D ( t, σ ) // break ties arbitrarily For each i ∈ J let b g i ( t ) = ( p i ( t ∗ , σ ) if σ i < t ∗ ≤ t, Set e g = g − α · b g where α is the largest value such that e g ≥ Let j and s be such that e g j ( s ) = 0 and b g j ( s ) > e σ = ( σ − j , s ) e ρ = local-ratio ( e σ , e g ) if ( e ρ − j , σ j ) is feasible then ρ = ( e ρ − j , σ j ) else ρ = e ρ return ρ We call an assignment σ feasible , if there is a schedule of the jobs that meets alldue dates. We say that job j ∈ J covers time t if σ j ≥ t . The cost of σ under thecost function vector g = ( g , . . . , g n ) is defined as g ( σ ) = P j ∈J g j ( σ j ). We denote by A σ t = { j ∈ J : σ j ≥ t } , the set of jobs that cover t . We call D ( t, σ ) = D ( t, A σ t ) = max { T − t + 1 − p ( A σ t ) , } the residual demand at time t with respect to assignment σ . And p j ( t, σ ) = p j ( t, A σ t ) = min { p j , D ( t, σ ) } the truncated processing time of j with respect to t and σ .At a very high level, the algorithm, which we call local-ratio , works as follows:We start by assigning a due date of 0 to all jobs; then we iteratively increase the duedates until the assignment is feasible; finally, we try to undo each increase in reverseorder as long as it preserves feasibility.In the analysis, we will argue that the due date assignment that the algorithmultimately returns is feasible and that the cost of any schedule that meets these duedates is a 4-approximation. Together with Lemma 4 this implies the main result inthis section. Theorem 3.
Algorithm local-ratio is a pseudo-polynomial time 4-approximationalgorithm for || P f j . We now describe the algorithm in more detail. Then we prove that is a 4-approximation.For reference, its pseudo-code is given in Algorithm 2.15 .1 Formal description of the algorithm
The algorithm is recursive. It takes as input an assignment vector σ and a cost functionvector g , and returns a feasible assignment ρ . Initially, the algorithm is called on thetrivial assignment (0 , . . . ,
0) and the instance cost function vector ( f , . . . , f n ). As thealgorithm progresses, both vectors are modified. We assume, without loss of generality,that f j (0) = 0 for all j ∈ J .First, the algorithm checks if the input assignment σ is feasible. If that is the case,it returns ρ = σ . Otherwise, it decomposes the input vector function g into two costfunction vectors e g and b g as follows g = e g + α · b g , where α is the largest value such that e g ≥ (where by g = e g + α · b g , we mean g j ( t ) = e g j ( t ) + α · b g j ( t ) for all t ∈ T and j ∈ J , and by e g ≥ , we mean e g j ( t ) ≥ j ∈ J , t ∈ T ), and b g will be specified later.It selects a job j and a time s such that b g j ( s ) > e g j ( s ) = 0, and builds anew assignment e σ = ( σ − j , s ) thus increasing the due date of j to s while keeping theremaining due dates fixed. It then makes a recursive call local-ratio ( e g , e σ ), whichreturns a feasible assignment e ρ . Finally, it tests the feasibility of reducing the deadlineof job j in e ρ back to σ j . If the resulting assignment is still feasible, it returns that;otherwise, it returns e ρ .The only part that remains to be specified is how to decompose the cost functionvector. Let t ∗ be a time slot with maximum residual unsatisfied demand with respectto σ : t ∗ ∈ argmax t ∈T D ( t, σ ) . The algorithm creates, for each job i ∈ J , a model cost function b g i ( t ) = ( p i ( t ∗ , σ ) if σ i < t ∗ ≤ t, . and chooses α to be the largest value such that e g i ( t ) = g i ( t ) − α b g i ( t ) ≥ i ∈ J and t ∈ T . In the primal-dual interpretation of the algorithm, α is the value assigned to the dualvariable y ( t ∗ , A σ t ∗ ).Let ( j, s ) be a job-time pair that prevented us from increasing α further. In otherwords, let ( j, s ) be such that e g j ( s ) = 0 and b g j ( s ) >
0. Intuitively, assigning a due dateof s to job j is free in the residual cost function g and helps cover some of the residualdemand at t ∗ . This is precisely what the algorithm does: The assignment used asinput for the recursive call is e σ = ( σ − j , s ). For a given vector g of non-negative functions, opt ( g ) denotes the cost of an optimalschedule with respect to these cost functions. We say an assignment ρ is β -approximatewith respect to g if P i ∈J g i ( ρ i ) ≤ β · opt ( g ).The correctness of the algorithm rests on the following lemmas.16 emma 10. Let ( σ (1) , g (1) ) , ( σ (2) , g (2) ) , . . . , ( σ (k) , g (k) ) be the inputs to the succes-sive recursive calls to local-ratio and let ρ (1) , ρ (2) , . . . , ρ (k) be their correspondingoutputs. The following properties hold:(i) σ (1) ≤ σ (2) ≤ · · · ≤ σ (k) ,(ii) ρ (1) ≤ ρ (2) ≤ · · · ≤ ρ (k) ,(iii) σ (i) ≤ ρ (i) for all i = 1 , . . . , k ,(iv) g ( i ) j ( σ ( i ) j ) = 0 and g ( i ) j is non-negative for all i = 1 , . . . , k and j ∈ J .Proof. The first property follows from the fact that σ (i+1) is constructed by taking σ (i) and increasing the due date of a single job.The second property follows from the fact that ρ (i) is either ρ (i+1) or it is con-structed by taking ρ (i+1) and decreasing the due date of a single job.The third property follows by an inductive argument. The base case is the basecase of the recursion, where σ (k) = ρ (k) . For the recursive case, we need to show that σ (i) ≤ ρ (i) , by recursive hypothesis we know that σ (i+1) ≤ ρ (i+1) and by the firstproperty σ (i) ≤ σ (i+1) . The algorithm either sets ρ (i) = ρ (i+1) , or ρ (i) is constructedby taking ρ (i+1) and decreasing the due date of some job to its old σ (i) value. In bothcases the property holds.The forth property also follows by induction. The base case is the first call wemake to local-ratio , which is σ (1) = (0 , . . . ,
0) and g (1) = ( f , . . . , f n ), where itholds by our assumption that f j (0) = 0 for all j . For the inductive case, we notethat g (i+1) is constructed by taking g (i) and subtracting a scaled version of the modelfunction vector, so that ≤ g (i+1) ≤ g (i) , and σ (i+1) is constructed by taking σ (i) andincreasing the due date of a single job j ( i ) such that g ( i +1) j ( i ) ( σ ( i +1) j ( i ) ) = 0, which ensuresthat the property holds. Lemma 11.
Let local-ratio ( σ , g ) be a recursive call returning ρ then X i ∈J : σ i
0, it follows that X i ∈J − i L : ρ i ≥ t L p i < T − t L + 1 X i ∈J : σ i ≥ t L p i + X i ∈J − i L : ρ i ≥ t L >σ i p i < T − t L + 1 X i ∈J − i L : ρ i ≥ t L >σ i p i < D ( t L , σ )Recall that σ i < t i ≤ ρ i for all i ∈ X and that t i ≤ t L ≤ t ∗ for all i ∈ L . It followsthat the sum on the left-hand side of the last inequality contains all jobs in L − i L .Finally, we note that D ( t L , σ ) ≤ D ( t ∗ , σ ) due to the way local-ratio chooses t ∗ ,which gives us (12).Now let us argue (13). Since D (cid:0) t R , ( ρ − i R , σ i R ) (cid:1) >
0, it follows that X i ∈J − i R : ρ i ≥ t R p i < T − t R + 1 X i ∈J : σ i ≥ t R p i + X i ∈J − i R : ρ i ≥ t R >σ i p i < T − t R + 1 X i ∈J − i R : ρ i ≥ t R >σ i p i < D ( t R , σ ) . Recall that σ i < t ∗ for all i ∈ X and that t ∗ < t R ≤ t i ≤ ρ i for all i ∈ R . It followsthat the sum in the left-hand side of the last inequality contains all jobs in R − i R .Finally, we note that D ( t R , σ ) ≤ D ( t ∗ , σ ) due to the way local-ratio chooses t ∗ ,which gives us (13).Finally, we note that p i ( t ∗ , σ ) ≤ D ( t ∗ , σ ) for all i ∈ J . Therefore, X i ∈ X p i ( t ∗ , σ ) ≤ X i ∈ L − i L p i + p i L ( t ∗ , σ ) + X i ∈ R − i R p i + p i R ( t ∗ , σ ) ≤ · D ( t ∗ , σ ) , which finishes the proof. 18e are ready to prove the performance guarantee of the algorithm. Lemma 12.
Let lr-sc ( σ , g ) be a recursive call and ρ be its output. Then ρ is afeasible 4-approximation w.r.t. g .Proof. The proof is by induction. The base case corresponds to the base case ofthe recursion, where we get as input a feasible assignment σ , and so ρ = σ . FromLemma 10 we know that g i ( σ i ) = 0 for all i ∈ J , and that the cost functions arenon-negative. Therefore, the cost of ρ is optimal since X i ∈J g i ( ρ i ) = 0 . For the inductive case, the cost function vector g is decomposed into e g + α · b g . Let( j, s ) be the pair used to define e σ = ( σ − j , s ). Let e ρ be the assignment returned by therecursive call. By inductive hypothesis, we know that e ρ is feasible and 4-approximatew.r.t. e g .After the recursive call returns, we check the feasibility of ( e ρ − j , σ j ). If the vectoris feasible, we return the modified assignment; otherwise, we return e ρ . In either case ρ is feasible.We claim that ρ is 4-approximate w.r.t. b g . Indeed, X i ∈J b g i ( ρ i ) = X i ∈J : σ i This section discusses how to generalize the ideas from the previous section to instanceswith release dates. We assume that there are κ different release dates, which we denotewith the set H . Our main result is a pseudo-polynomial 4 κ -approximation algorithm.The generalization is surprisingly easy: We only need to redefine our residual demandfunction to take into account release dates.For a given due date assignment vector σ and an interval [ r, t ) we denote by D ( r, t, σ ) = max { r + p ( { j ∈ J : r ≤ r j ≤ σ j < t } ) − t + 1 , } the residual demand for [ r, t ). Intuitively, this quantity is the amount of processingtime of jobs released in [ r, t ) that currently have a due date strictly less than t thatshould be assigned a due date of t or greater if we want feasibility.The truncated processing time of j with respect to r , t , and σ is p j ( r, t, σ ) = min { p j , D ( r, t, σ ) } . The algorithm for multiple release dates is very similar to local-ratio . The only difference is in the way we decompose the input cost function vector g . First, we findvalues r ∗ and t ∗ maximizing D ( r ∗ , t ∗ , σ ). Second, we define the model cost functionfor job each i ∈ J as follows b g i ( t ) = ( p i ( r ∗ , t ∗ , σ ) if r ∗ ≤ r i < t ∗ and σ i < t ∗ ≤ t, . Algorithm 3 local-ratio-release ( σ , g ) if σ is feasible then ρ = σ else ( t ∗ , r ∗ ) = argmax ( t,r ) ∈T × H D ( r, t, σ ) // break tiesarbitrarily For each i ∈ J let b g i ( t ) = ( p i ( r ∗ , t ∗ , σ ) if r ∗ ≤ r i < t ∗ and σ i < t ∗ ≤ t, . Set e g = g − α · b g where α is the largest value such that e g ≥ Let j and s be such that e g j ( s ) = 0 and b g j ( s ) > e σ = ( σ − j , s ) e ρ = local-ratio-release ( e σ , e g ) if ( e ρ − j , σ j ) is feasible then ρ = ( e ρ − j , σ j ) else ρ = e ρ return ρ local-ratio-release . Its pseudocode is given in Algorithm 3. The initial call to thealgorithm is done on the assignment vector ( r , r , . . . , r n ) and the function cost vector( f , f , . . . , f n ). Without loss of generality, we assume f j ( r j ) = 0 for all j ∈ J . Theorem 4. There is a pseudo-polynomial time κ -approximation for scheduling jobswith release dates on a single machine with generalized cost function. The proof of this theorem rests on a series of Lemmas that mirror Lemmas 10, 11,and 12 from Section 4. Lemma 13. An assignment σ is feasible if there is no residual demand at any interval [ r, t ) ; namely, σ is feasible if D ( r, t, σ ) = 0 for all r ∈ H and r < t ∈ T . Furthermore,scheduling the jobs according to early due date first yields a feasible preemptive schedule.Proof. We start by noting that one can use a simple exchange argument to show thatif there is some schedule that meets the due dates σ , then the earliest due date (EDD)schedule must be feasible.First, we show that if there is a job j in the EDD schedule that does not meet itsdeadline, then there is an interval [ r, t ) such that D ( r, t, σ ) > 0. Let t = σ j + 1 andlet r < t be latest release date such that the machine was idle at time r − j . Let X = { i ∈ J : r ≤ r i , σ i < t } . Clearly, r + p ( X ) ≥ t ,otherwise j would have met its due date. Therefore,0 < r + p ( X ) − t + 1= r + p ( { i ∈ J : r ≤ r i ≤ σ i < t } ) − t + 1 ≤ D ( r, t, σ ) . Second, we show that for any interval [ r, t ) such that D ( r, t, σ ) > 0, there exists ajob j in the EDD schedule that does not meet its deadline. Let X = { i ∈ J : r ≤ r i , σ i < t } .Then, 0 < D ( r, t, σ ) = r + p ( X ) − t + 1 = ⇒ r + p ( X ) ≥ t. Let j be the job in X with the largest completion time in the EDD schedule. Noticethat the completion time of j is at least r + p ( X ) ≥ t . On the other hand, its due dateis σ j < t . Therefore, the EDD schedule misses j ’s due date. Lemma 14. Let ( σ (1) , g (1) ) , ( σ (2) , g (2) ) , . . . , ( σ (k) , g (k) ) be the inputs to the succes-sive recursive calls to local-ratio-release and let ρ (1) , ρ (2) , . . . , ρ (k) be their cor-responding outputs. The following properties hold:(i) σ (1) ≤ σ (2) ≤ · · · ≤ σ (k) ,(ii) ρ (1) ≤ ρ (2) ≤ · · · ≤ ρ (k) ,(iii) σ (i) ≤ ρ (i) for all i = 1 , . . . , k ,(iv) g ( i ) j ( σ ( i ) j ) = 0 and g ( i ) j is non-negative for all i = 1 , . . . , k and j ∈ J . roof. The proof of Properties (i)-(iii) is exactly the same as that of Lemma 10.The forth property follows by induction. The base case is the first call we make to local-ratio-release , which is σ (1) = ( r , . . . , r n ) and g (1) = ( f , . . . , f n ), where itholds by our assumption. For the inductive case, we note that g (i+1) is constructedby taking g (i) and subtracting a scaled version of the model function vector, so that ≤ g (i+1) ≤ g (i) , and σ (i+1) is constructed by taking σ (i) and increasing the duedate of a single job j ( i ) . The way this is done guarantees that g ( i +1) j ( i ) ( σ ( i +1) j ( i ) ) = 0, whichensures that the property holds. Lemma 15. Let local-ratio-release ( σ , g ) be a recursive call returning ρ then X i ∈J r ∗≤ ri ≤ σi 0, it follows that X i ∈J − irLr ≤ ri 0, it follows that X i ∈J − irRr ≤ ri Proceedings of the 48th Annual IEEE Symposium onFoundations of Computer Science , pages 507–517, 2007.[2] N. Bansal, N. Buchbinder, and J. Naor. Randomized competitive algorithms forgeneralized caching. In Proceedings of the 40th Annual ACM Symposium on theTheory of Computing , pages 235–244, 2008.[3] N. Bansal, A. Gupta, and R. Krishnaswamy. A constant factor approximationalgorithm for generalized min-sum set cover. In Proceedings of the 21st AnnualACM-SIAM Symposium on Discrete Algorithms , pages 1539–1545, 2010.[4] N. Bansal and K. Pruhs. The geometry of scheduling. In Proceedings of the 51stAnnual IEEE Symposium on Foundations of Computer Science , pages 407–414,2010.[5] N. Bansal and J. Verschae. Personal communication, 2013.[6] A. Bar-Noy, R. Bar-Yehuda, A. Freund, J. Naor, and B. Schieber. A unifiedapproach to approximating resource allocation and scheduling. Journal of theACM , 48:1069–1090, 2001.[7] R. Bar-Yehuda and D. Rawitz. On the equivalence between the primal-dualschema and the local ratio technique. SIAM J. Discrete Math. , 19:762–797, 2005.[8] T. Carnes and D. Shmoys. Primal-dual schema for capacitated covering problems.In Proceedings of the 13th Conference on Integer Programming and CombinatorialOptimization , number 5035 in Lecture Notes in Computer Science, pages 288–302,2008.[9] R. D. Carr, L. Fleischer, V. J. Leung, and C. A. Phillips. Strengthening integralitygaps for capacitated network design and covering problems. In Proceedings ofthe 11th Annual ACM-SIAM Symposium on Discrete Algorithms , pages 106–115,2000. 2510] M. Cheung and D. B. Shmoys. A primal-dual approximation algorithm for min-sum single-machine scheduling problems. In Proceedings of APPROX-RANDOM ,volume 6845 of Lecture Notes in Computer Science , pages 135–146. SpringerBerlin Heidelberg, 2011.[11] L. Epstein, A. Levin, A. Marchetti-Spaccamela, N. Megow, J. Mestre, M. Skutella,and L. Stougie. Universal sequencing on an unreliable machine. SIAM Journalon Computing , 41:565–586, 2012.[12] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to theTheory of NP-Completeness . W. H. Freeman and Company, New York, NY, 1979.[13] R. L. Graham, E. L. Lawler, J. K. Lenstra, and A. H. G. Rinnooy Kan. Opti-mization and approximation in deterministic sequencing and scheduling: a survey. Annals of Discrete Mathematics , 5:287–326, 1979.[14] A. Gupta, R. Krishnaswamy, A. Kumar, and D. Segev. Scheduling with outliers.In Proceedings of APPROX-RANDOM , pages 149–162, 2009.[15] W. H¨ohn and T. Jacobs. On the performance of smiths rule in single-machinescheduling with nonlinear cost. In LATIN 2012: Theoretical Informatics , volume7256 of Lecture Notes in Computer Science , pages 482–493, 2012.[16] W. H¨ohn, J. Mestre, and A. Wiese. How unsplittable-flow-covering helps schedul-ing with job-dependent cost functions. In Proceedings of ICALP , volume 8572 of Lecture Notes in Computer Science , pages 625–636, 2014.[17] N. Megow and J. Verschae. Dual techniques for scheduling on a machine withvarying speed. In Proceedings of ICALP , volume 7965 of Lecture Notes in Com-puter Science , pages 745–756, 2013.[18] M. W. Padberg, T. J. van Roy, and L. A. Wolsey. Valid inequalities for fixedcharge problems. Operations Research , 33:842–861, 1985.[19] D. Pritchard. Approximability of sparse integer programs. In