Energy Efficient Scheduling via Partial Shutdown

Motivated by issues of saving energy in data centers we define a collection of new problems referred to as "machine activation" problems. The central framework we introduce considers a collection of $m$ machines (unrelated or related) with each machi…

Authors: Samir Kuller, Jian Li, Barna Saha

Energy Efficient Sc heduling vi a Partial Shutdo wn ∗ Samir Kh uller † Jian Li ‡ Barna Saha § Abstract Motiv ated by issues of s aving energy in data c e nters we define a collec tio n of new pro blems referr ed to as “machine activ ation” pro blems. The central framework we in tr o duce conside r s a collection of m machines (unrelated or related) with each mac hine i having an activa tion c ost of a i . There is also a collection o f n jobs that need to b e p erfor med, and p i,j is the pro ces sing time of job j on machine i . Standard s ch eduling models ass ume that the set o f machines is fixed a nd a ll machines are av ailable. How ever, in our setting, we assume that there is an activ ation co st budget of A – we would lik e to sele ct a subset S of the mac hines to a ctiv ate with total cos t a ( S ) ≤ A and find a schedule for the n jobs on the machines in S minimizing the ma kespan (or any other metric). W e consider b oth the unrela ted machines setting, as well as the se tting of sc heduling uniformly related parallel machines, where machine i has activ a tion cost a i and sp eed s i , and the pro cess ing time o f job j on machine i is p i,j = p j s i , wher e p j is the pro ces sing requirement of job j . F or the genera l unrelated machine activ a tion problem, our ma in results a re that if there is a schedule with makespan T and activ ation cost A then we can obtain a schedule with ma kespan (2 + ǫ ) T and activ ation cost 2 (1 + 1 ǫ )(ln n OP T + 1) A , for any ǫ > 0 . W e a ls o consider assignment costs for jobs as in the generalized ass ignment pr oblem, a nd using our framework, provide algorithms that minimize the machine activ a tion and the a ssignment cost simultaneously . In addition, w e present a greedy a lgorithm which o nly works for the basic version and yields a ma kespan of 2 T and an activ ation cost A (1 + ln n ). F or the uniformly rela ted parallel machine scheduling problem, we dev elo p a polyno mia l time approximation scheme that o utputs a sch edule with the pro p e r ty that the activ a tion cost of the subset of machines is at most A and the makespan is at most (1 + ǫ ) T for any ǫ > 0. F or the sp ecial case of m identical sp eed machines, the ma chine a ctiv ation pro blem is tr iv ial, since the cheap est subset of k ma chines is always the b est choice if the optimal so lution activ ates k ma chines. In addition, w e co nsider the case when some jobs can b e dr opp ed (and are trea ted as o utlier s). 1 In tro duction Large scale data cent ers ha v e emerged as an extremely p opular wa y to store and manage a large v olume of d ata. Most large corp orations, suc h as Go ogle, HP and Amazon ha v e dozens of d ata centers. These data ce nt ers are typica lly comp osed of thousands of mac hines, and ha v e e xtremely high energy requirement s. Data cent ers are no w b eing used b y companies suc h as Amazon W eb S ervices, to run large scale computation tasks for other c ompanies who do n ot ha v e the resources to create their o wn data cente rs. Th is is in addition to their o wn computing requir emen ts. These data cente rs are designed to b e able to handle extremely high wo rk loads in p erio ds of p ea k demand. H o w ev er, since the w orkload on these data cen ters fluctuates o v er time, w e c ould se lectiv ely sh ut do wn part of the system to sa ve en ergy when the demand on the sys tem is lo w . Energy sa vings results n ot just from putting m ac hin es in a sleep state, bu t also from sa vings in co oling costs. Hamilton (see th e recent S IGA CT Ne ws article [3]) argues that a ten fold reduction in the p o w er needs of the data center ma y b e p ossib le if we can simply bu ild systems that are optimized with p o wer managemen t as their pr imary goal. S u ggested examples (summarizing from the original text) are: ∗ Researc h supp orted by NSF Award CC F- 0728839 and a Google Researc h Award. † Departmen t of Computer Science, Universit y of Maryland, College Park, MD 20742. E-m ail : samir@cs.um d.edu . ‡ Departmen t of Computer Science, Universit y of Maryland, College Park, MD 20742. E-m ail : lijian@cs.u md.edu . § Departmen t of Computer Science, Universit y of Maryland, College Park, MD 20742. E-m ail : barna@cs.um d.edu . 1. Exp lore w ays to simply d o less during sur ge load p erio d s. 2. Exp lore wa y s to migrate w ork in time. The work load on mo dern cloud platforms is very cyclica l, with infrequen t p ea ks and deep v alleys. Ev en v alley time is made more exp ensiv e b y the need to o w n a p o wer su p ply to b e able to h an d le the p eaks, a num b er of no d es adequate to h andle s u rge loads, a net w ork pro visioned for w orst case d emand . This leads to the issue of which machines c an we shut down , since all mac h ines in a data center are not necessarily iden tical. Eac h mac hine s tores some data, and is th us not capable of p erforming ev er y single job efficien tly unless some data is first migrated to th e machine. W e will formalize this question v ery shortly . T o quote from the r ecen t article b y Birman et al. (SIGA C T News [3]) “Scheduling mechanisms that assign tasks to machines, b u t more b roadly , play the r ole of pro visioning th e data cen ter as a whole. As w e’ll see b elo w, this asp ect of cloud computing is of gro wing imp ortance b ecause of its organic conn ection to p o we r consumption: b oth to spin disks, and run mac hines, but also b ecause activ e machines pro d uce heat and demand co oling. Sc heduling, it turns out, comes do wn to deciding ho w to sp end money .” Data is replicated on storage systems for b oth load balancing d uring p eak demand p erio ds, as w ell as for fault tolerance. T ypically man y jobs hav e to b e sc h eduled on th e mac hin es in th e data cen ter. In man y cases pr ofile information for a set of jobs is a v ailable in adv ance, as well as estimates of cyc lical w orkloads. Jobs ma y b e I/O in tensive o r CPU in tensive, in either ca se, an esti mate of its pro cessing time on eac h t yp e of mac hine is a v ailable. Jobs that need to access sp ecific data can b e assigned to any one of the subset of mac hines that s tore the n eeded data. Our goal is to fir st sele ct a su bset of machines to acti v ate, and then sc hedu le the jobs on the activ e mac hines. F rom this asp ect our p roblems differ from stand ard sc h ed uling pr oblems with m u ltiple machines, where the set of activ e mac hines is the set of all mac hines. Here w e ha ve to d ecide which machines to activate and then sc hedule all jobs on the activ e mac hines. The scheduling literature is v ast, and one can form ulate a v ariety of interesting questions in this mo del. W e initiate this w ork by fo cusing our atten tion on p erhaps one of the most widely studied mac h ine sc heduling problems since it matc hes the r equ iremen ts of the application. W e hav e a collect ion of jobs and unrelated mac hines, and n eed to decide wh ic h sub set of mac h in es to activ ate. The jobs can only b e scheduled on activ e mac hines. This pro vides an additional dimension for scheduling problems that was not previously consider ed . This s ituation also mak es sense w h en we ha v e a certain set of computational tasks to p ro cess, a cost bud get, and can purchase acce ss to a set of mac h ines. One fundamenta l (and w ell s tudied) sc heduling problem is as follo ws: Give n a collectio n of n jobs, and m mac hin es wh ere the pr o cessing time of job j on mac hin e i is p i,j , assign all jobs to mac hines suc h that the mak espan, i.e., th e time when all jobs are complete, is minimized. This pr oblem is w id ely referred to a s unr elate d p ar al lel machine sche duling [17, 20]. If ma c hine i do es n ot ha v e the data that job j needs to ru n, then w e set p i,j = ∞ , otherwise the pro cessing time p i,j is some constan t p j whic h only dep ends on job j . This sp ecial case is th e so-called r estricte d sche duling pr oblem and kn o w n to b e N P -hard. Ho wev er, if a sc h edule exists with m ak esp an T , then the p olynomial time algorithm dev elop ed by Len stra, Shmoys and T ard os [17] sho ws an elegan t rounding method to fi nd a sc hedule with mak espan 2 T . The subs equen t generalization by Shmoys and T ardos [20], s ho ws in f act that eve n with a cost function to map eac h job to a m ac hin e, if a map p ing with cost C and mak espan T exists, then their algorithm fi nds a s c h edule with cost C and makespan at most 2 T . Motiv ated by the problem of s hutting do wn machines when the demand is lo w, w e d efine the follo wing “mac hin e activ ation” pr oblem. Giv en a set J of n jobs and a set M of m machines, our goa l is to activ ate a subs et S of mac hines and then map eac h job to an activ e mac hine in S , minimizing the o v erall mak espan. Eac h mac hine h as an activ ation co st o f a i . T h e activ ation cost of th e subset S is a ( S ) = P i ∈ S a i . W e sh ow th at if there is a sc hedule with acti v ation cost A and makespan T , then we can find a sc hedule with activ ation cost 2(1 + 1 ǫ )(ln n O P T + 1) A and mak espan (2 + ǫ ) T for an y ǫ > 0 b y the LP -rounding sc heme (w e call this is a ((2 + ǫ ) , 2(1 + 1 ǫ )(ln n O P T + 1))-appro xim ation). W e also presen t a greedy algorithm whic h giv es us a (2 , 1 + ln n )-appro ximation. Actually , the ln n term in the activ ation cost with this general form ulation is un a v oidable, since this problem is at least as hard to approximat e as the set co v er pr oblem 1 , for wh ic h a (1 − ǫ ) ln n appro x im ation algorithm will imply that N P ⊆ D T I M E ( n O (log log n ) ) [8 ]. W e also sho w that the recen t PT AS d ev elop ed by Ep stein and S gall [7] can b e extended to the framew ork of mac hine activ ation pr oblems for the case of sc hedu ling job s on uniformly related parallel mac h ines. (The original PT AS b y Ho c h baum and S hmo ys [12] is sligh tly more complicated than the metho d s u ggested by Epstein and Sgall [7].) W e also consider a version of the pr oblem in which a subset of the jobs may b e dropp ed to sa ve energy (recall Hamilton’s p oint (1)). In th is v ersion of the problem, eac h job j a lso has a b enefit π j and w e need to pro cess a subset of job s with total b enefit of at least Π. Supp ose that a sc h edule exists with cost C Π and mak espan T Π that obtains a total b enefi t at least Π. W e sho w that the metho d due to Shmo ys and T a rdos [2 0] can b e extended to fi n d a collection of jobs to p erform with expected b enefit at least Π and exp ected cost C Π , with a make span guaran teed to b e a t most 2 T Π (see Ap p endix A) . (The recen t work b y Gupta et al. [11] giv es a clev er deterministic sc heme with mak espan 3 T Π and cost (1 + ǫ ) C Π along w ith seve ral other results on s cheduling w ith outliers. Th is has b een fu rther improv ed to (2 + ǫ ) T Π and cost (1 + ǫ ) C Π in [18].) 1.1 Related W ork on Sc heduling Generalizations of the work b y Shmo ys and T ardos [20], ha ve considered the L p norm. Azar and Epstein [2 ] giv e a 2-appr o ximation for an y L p norm for any p > 1, and a √ 2-appro ximation for the L 2 norm. The b ounds f or p 6 = 2 ha v e b een su b sequen tly impro v ed [16]. In add ition, w e can ha ve release times r ij asso ciated with eac h job – this sp ecifies the earliest time when job j can b e started on mac h ine i . Koulamas et al. [15] giv e a heuristic solution to this problem on un iformly related mac hin es with a wo rst case approximati on ratio of O ( √ m ). Minimizing resource usage has b een considered b efore. In this f ramew ork, a collection of jobs J needs to b e e xecuted – eac h job has a pro cessing time p j , a release time r j and a deadline d j . In the con tinuous setting, a job can b e executed on any mac hine b etw een its release time and its deadline. In the discrete setting eac h job has a set of in terv als du ring wh ich it ca n b e executed. T he goal is to minimize the num b er of machines that are required to p erform all th e jobs. F or the co nti nuous case, Ch uzhoy and Co denotti [4] h a ve recentl y deve lop ed a constan t factor appro ximation, impro ving u p on a previous algorithm give n by Chuzho y et al [5]. F or the discrete v ersion Chuzho y and Naor [6] hav e shown an Ω(log log n ) hardness of appr o x im ation. Ho w ev er th is framew ork do es n ot mod el non-uniformit y of mac h ines, which is one of the k ey issu es in data cen ters. In addition, non-uniform it y of activ ation costs is not addressed in their work neither. 1.2 Related W ork on Energy Minimization Augustine, Irani and Sw am y [1] d ev elop online algorithms to d ecide when a particular d evice sh ould transition to a s leep state when m ultiple sleep states are av ailable. Eac h slee p state has a different p ow er consumption rate and a differen t transition cost. They pro vide deterministic onlin e algorithms with comp etitiv e ratio arbitrarily c lose to optimal to decide in an online wa y wh ich sleep state to enter wh en there is an idle p er io d . See also the surv ey b y Ir ani and Pruhs for other related w ork [14]. 1 This is easy to see – we can view a set cov er instance as a bipartite graph connec ting elements (jobs) to corr esponding sets (mac hines). If the element belongs to a set, then the pro cessing time of the corresponding job on the corresp onding machine is 0, o.w. it is ∞ . An optimal set cov er solution corresp onds to an optimal set of mach ines to activ ate with 0 makespan. 1.3 Our Con tributions Ou r main contributions are: • A randomized rounding metho d that a ppr o ximates b oth activ ation cost and mak espan for unrelated p arallel machines. This metho d is based on r ounding the LP solution of a certain carefully defined LP r elaxation and uses ideas from w ork on dep endent roundin g [10, 16] (S ection 2). • Extensions of th e ab o v e metho d when w e ha v e assignment costs in addition to activ ation costs as part of the ob jectiv e fu n ction (Section 3). • A greedy algorithm th at a pproximate s b oth ac tiv ation cost and mak espan for unr elated parallel mac h ines and giv es a (2 , 1 + ln n )-appro ximation (S ection 4). • Extensions of these results to the case of hand ling outliers using the method s from [11] as w ell as release times (Section 5). • A p olynomial time app ro ximation sc heme for the cost activ ation problem for uniformly r elated parallel mac h ines extending the construction giv en for the version of the problem with no activ ation costs [7] (Section 6). • A simple d ep endent roun ding sc heme for the partial GAP problem (App endix A). 2 LP Ro unding for Mac hine Activ ation on Unrelated Mac hines In this section, w e fi rst provide a sim p le roundinging scheme with an appro ximation r atio of ( O (log n ) , O (log n )). Then we imp ro v e it to a (2 + ǫ, 2(1 + 1 ǫ )(ln n O P T + 1))-approximat ion b y a n ew rounding sc h eme. W e can form ulate the scheduling activ ation p r oblem as an in teger program. W e define a v ariable y i for eac h mac hine i , wh ic h is 1 if the mac hine is op en and 0, if it is closed. F or ev er y mac hine-job pair, w e ha ve a v ariable x i,j , whic h is 1, if job j is a ssigned to m ac hin e i and is 0 , otherwise. In the corresp onding linear programming r elaxation, w e relax the y i and x i,j v ariables to b e in [0 , 1]. Th e firs t set of constraint s require that eac h job is assigned to some m ac hin e. The second set of constrain ts restrict the jobs to b e assigned to only activ e mac hines, and the th ird set of constrain ts limit the w orkload on a m ac hin e. W e require that 1 ≥ x i,j , y j ≥ 0 and if p i,j > T then x i,j = 0. The form ulation is as sh o w n b elo w : min m X i =1 a i y i (2.1) s.t. X i ∈ M x i,j = 1 ∀ j ∈ J x i,j ≤ y i ∀ i ∈ M , j ∈ J X j p i,j x i,j ≤ T y i ∀ i Supp ose an in tegral solution with act iv ation cost A and mak espan T exist. The LP r elaxation will ha v e cost at most A with th e correct c hoice of T . All th e b ounds w e s h o w are with resp ect t o these terms. In Section 2.2 we sh ow th at un less w e relax the mak espan constraint , there is a large integrali t y gap for this formulatio n. 2.1 Simple Rounding W e first start with a simple rounding sc heme. Let us denote the optimum LP solution b y ¯ y , ¯ x . T he roun ding consists of the f ollo wing four s teps : 1. Round eac h y i to 1, with probabilit y ¯ y i and 0 with probabilit y 1 − ¯ y i . If y i is r ounded to 1, open mac h ine i . 2. F or eac h op en mac h ine i , consid er the set of jobs j , that hav e fractional assignment > 0 on mac hine i . F or eac h suc h j ob , set X i,j = ¯ x i,j ¯ y i . If P j p i,j X i,j < T , (it is alw ays ≤ T ) then un iformly increase X i,j . Stop increasing an y X i,j that reac hes 1. S top th e process, when either the total f ractional mak espan is T or all X i,j ’s are 1. If X i,j = 1, assign job j to mac hine i . If mac h ine i has n o job fractionally assigned to it, drop mac hine i f rom fur ther consideration. F or eac h job j that has fractional assignment X i,j , assign it to mac hine i with probability X i,j . 3. Discard all assigned jobs. If there are some un assigned jobs, rep eat the pro cedure. 4. If some job is assigned to multiple mac h ine, choose any on e of them arbitrarily . In the ab o v e round ing scheme, we use ¯ y i ’s as pr ob ab ilities for op enin g mac hines and for eac h op ened mac h ine, we assign jobs follo wing the probabilit y d istribution give n b y X i,j ’s. It is ob vious th at the exp ected activ ation cost of mac hines in eac h iteration is exactly the cost of the fractional solution give n b y the LP . Th e follo wing lemmas b ound the n umber of iteratio ns and the final load on eac h mac h ine. Lemma 2.1. The numb er of iter ations r e qu ir e d b y the r ounding algorithm is O (log n ) . Pr o of. Consider a job j . In a single iteration, Pr ( job j is n ot assigned to machine i ) ≤ (1 − ¯ y i ) + ¯ y i (1 − ¯ x i,j ¯ y i ) = 1 − ¯ x i,j . Hence, Pr ( job j is n ot assigned in an iteration ) ≤ Y i (1 − ¯ x i,j ) ≤ (1 − 1 m ) m ≤ 1 e The sec ond inequalit y holds since P i ¯ x ij = 1 and the quan tity i s maximize d when all ¯ x ij ’s are equal. Then, it is easy to see the probabilit y that job j is not assigned after 2 ln n iteratio ns is at most 1 n 2 . Therefore, by u nion b oun d, with probabilit y at least 1 − 1 n , all jobs can b e assigned in 2 ln n iterations. ⊓ ⊔ Lemma 2.2. The lo ad on any machine is O ( T log n ) with high pr ob ability. Pr o of. Consider any iteration h . Denote the v alue of X i,j at iteration h , by X h i,j . F or eac h op en mac hine i and eac h job j , define a random v ariable Z i,j,h = ( p i,j T , if job j is assigned to m ac hin e i 0 , otherwise (2.2) Clearly , 0 ≤ Z i,j,h ≤ 1. Define, Z i = P j,h Z i,j,h . Clearly , E [ Z i ] = P h P j p i,j X h i,j T ≤ X h 1 ≤ Θ(log n ) Denote b y M i the load on machine i . Th erefore, M i = T Z i , thus E [ M i ] ≤ Θ( T log n ). No w b y the standard Cher n off-Hoeffdin g b oun d [13, 19], w e get the r esult. ⊓ ⊔ 2.2 In tegralit y Gap of the Natural LP , for St rict Mak espan Let there b e m jobs and m mac h ines. Call these mac h ines A 1 , A 2 , .., A m − 1 , and B . Pro cessing time for all jobs on mac hines A 1 , A 2 , ..., A m − 1 is T and on B it is T m . Activ ation costs of op ening mac hines A 1 , A 2 , .., A m − 1 is 1, and for B it is very high compared to m , sa y R ( R >> m ). An integ ral optim um solution has to op en mac h ine B with tota l cost at least R . No w consid er a fractional solution, where all mac hines A 1 , A 2 , .., A m − 1 are fu lly op en, b ut mac hine B is op en only to the exten t of 1 /m . All jobs are assigned to the exten t of 1 /m on eac h machine A 1 , A 2 , .., A m − 1 . So the total pr o cessing time on an y mac hine A i is m T m = T . The remaining 1 m part of eac h job is assigned to B . So tota l pr o cessing time on B is T m · m · m = T m . I t is easy to see the optimal fractional cost is at most m + R m (b y setting y B = 1 m ). Th erefore, the in tegralit y gap is at least ≈ m . 2.3 Main Rounding Algorithm for Minimizing Sc heduling Activ a tion Cost with Mak espan Budget In this section, we d escrib e our main roundin g approac h, that ac hiev es an appr oximati on factor of 2(1 + 1 ǫ )(ln n O P T + 1) for activ ation cost and (2 + ǫ ) for mak espan. Based on this new r ounding sc heme, w e sho w in Section 3 ho w to sim ultaneously approximat e b oth mac hine a ctiv ation and job assignment cost along with m ak esp an, and how to extend it to handle outliers, when some jobs can b e dropp ed (Section 5). F or the b asic pr oblem with only activ ation cost and mak espan, we sho w in S ection 4, that a greedy algorithm ac hiev es an appr o ximation factor of (2 , 1 + ln n ). Ho wev er, the greedy algorithm is significan tly slow er than the LP r ounding algorithm, since it requir es computations of ( m − i ) linear programs at the i th step of greedy choic e, where i can ru n from 1 to min ( m, n ) and m, n are th e num b er of mac hines and jobs resp ectiv ely . The algorithm b egins by solving LP (Eq(2.1)). As b efore ¯ x , ¯ y denote th e optimum fractional s olution of the LP . Let M denote the set of mac hines and J denote the set of jobs. Let | M | = m and | J | = n . W e defin e a bipartite graph G = ( M ∪ J, E ) as follo ws: M ∪ J are the v ertices of G and e = ( i, j ) ∈ E , if ¯ x i,j > 0. The w eight on edge ( i, j ) is ¯ x i,j and the w eight on mac hine no d e i is ¯ y i . R ou n ding consists of several iterations. Initialize X = ¯ x and Y = ¯ y . T he algorithm iterativ ely mo difies X and Y , such that at the end X and Y b ecome in tegral. Random v ariables at the end of iteration h are denoted by X h i,j and Y h i . The thr ee main steps of rounding are as follo w: 1. T r ansforming the Solution: It consists of creating tw o graphs G 1 and G 2 from G , w here G 1 has an almost f orest structure and in G 2 the we igh t of an edge and the we igh t of the in ciden t machine no de is v ery close . In this step, only X i,j ’s are mo dified, while Y i ’s remain fixed at ¯ y i ’s. 2. Cycle Br e aking: It breaks the remaining cycles of G 1 and con v ert it in to a forest, by m o vin g certain edges to G 2 . 3. Exp loiting the p rop erties of G 1 and G 2 , and r ounding on G 1 and G 2 separately . W e n o w describ e eac h of these steps in detail. 2.4 T ransforming t he Solution W e decomp ose G into t wo graphs G 1 and G 2 through sev eral rounds. Initially , V ( G 1 ) = V ( G ) = M ∪ J , E ( G 1 ) = E ( G ), V ( G 2 ) = M and E ( G 2 ) = ∅ . I n eac h round, w e either mo v e one job no de and/or one edge f rom G 1 to G 2 or delete an edge fr om G 1 . Th us w e alw a ys mak e progress. An edge m o ved to G 2 retains its w eigh t thr ough the rest of the iterations, w h ile the w eigh ts of the edges in G 1 k eep on c h anging. W e m aintain the follo wing inv arian ts, (I1) ∀ ( i, j ) ∈ E ( G 1 ), and ∀ h , X h i,j ∈ (0 , y i /γ ), p i,j > 0. ∀ j ∈ J ′ , X i ∈ M ′ , ( i,j ) ∈ E ( G 1 ) x i,j = 1 − X i ∈ M ′ , ( i,j ) ∈ E ( G 2 ) w i,j (2.3) ∀ i ∈ M ′ , X j ∈ J ′ , ( i,j ) ∈ E ( G 1 ) p i,j x i,j = X j ∈ J ′ p i,j X h i,j − X j ∈ J ′ , ( i,j ) ∈ E ( G 2 ) p i,j w i,j (2.4) Figure 1: Linear S ystem at the b eginning of iteration ( h + 1) (I2) ∀ i ∈ M and ∀ h, P j X h i,j p i,j ≤ T y i . (I3) ∀ ( i, j ) ∈ E ( G 2 ) and ∀ h , 1 ≥ X h i,j ≥ y i /γ . (I4) Once a v ariable is rounded to 0 or 1, it is never c h an ged. Consider r ound one. Remo v e an y mac hine no de th at has Y 1 i = 0 from b oth G 1 and G 2 . Activ ate an y mac hine that has Y 1 i = 1. Similarly , discard an y edge ( i , j ) with X 1 i,j = 0, and if X 1 i,j = 1, assig n job j to m ac hin e i and remov e j . If X 1 i,j ≥ ¯ y i /γ , th en remo v e the edge ( i, j ) from G 1 and add the job j (if not add ed y et) and the edge ( i, j ) with we igh t x i,j ( ≥ ¯ y i /γ ) to G 2 . Note that, if for some ( i, j ) ∈ G , p i,j = 0, then w e can simply tak e ¯ x i,j = ¯ y i and mo v e the edge to G 2 . Thus we can alw a ys assume for ev er y ed ge ( i, j ) ∈ G 1 , p i,j > 0. It is easy to see that, after iteration one, all the inv ariants ( I1 - I4 ) are main tained. Let us consider iteration ( h + 1) and let J ′ , M ′ denote the set of j ob s and m achine n o des in G 1 with degree at least 1 at the b eginning of the iteratio n. Note th at Y h i = Y 1 i = ¯ y i for all h . Let | M ′ | = m ′ and | J ′ | = n ′ . As in iteration one, an y edge with X h i,j = 0 in G 1 is discarded an d an y edge with X h i,j ≥ ¯ y i /γ is mo v ed to G 2 (if no de j do es not b elong to G 2 , add it to G 2 also). W e denote b y w i,j the weigh t of an edge ( i, j ) ∈ G 2 . Any e dge and its weig ht mo ved to G 2 will not b e c hanged furth er . Since w ij is fixed when ( i, j ) is inserted to G 2 , we can treated it as a constant thereafter. C onsider the linear system ( Ax = b ) as in Figure 1. W e call the fractional solution x c anonic al , if x i,j ∈ (0 , y i /γ ), for all ( i, j ). Clearly { X h i,j } , for ( i, j ) ∈ E ( G 1 ) is a canonical feasible solution for the linear system in Figure 1. No w, if a linear system is und er-determined, we can efficien tly find a non-zero vect or r , w ith Ar = 0 . S ince x is canonical, w e can also efficien tly iden tify strictly p ositive reals, α and β , suc h that for all ( i, j ) , x i,j + αr i,j and x i,j − β r i,j lie in [0 , y i /γ ] and there exists at least one ( i, j ), suc h that one of the t w o entries, x i,j + αr i,j and x i,j − β r i,j , is in { 0 , y i /γ } . W e no w define the basic randomized round ing s tep, RandStep ( A , x , b ) : with probabilit y β α + β , return the vec tor x + α r and w ith complemen tary probability of α α + β , return the v ector x − β r . If X = RandStep ( A , x , b ), then the returned s olution has the follo wing prop erties [16]: Pr ( AX = b ) = 1 (2.5) E [ X i,j ] = x i,j (2.6) If the linear system in Figure 1 is un d er-determined, then w e apply RandStep to obtain th e up dated v ector X h +1 . If for some ( i, j ), X h +1 i,j = 0, then w e remo v e th at edge (v ariable) f r om G 1 . If X h +1 i,j = ¯ y i /γ , then w e remov e the edge from G 1 and add it with weigh t ¯ y i /γ to G 2 . Thus the in v arian ts ( I1 , I3 and I4 ) are main tained. Sin ce the we igh t of an y edge in G 2 is nev er c h anged and load constrain ts on all mac h ine n o des b elong to the linear system, w e get from [16], Lemma 2.3. F or al l i, j, h, u , E h X h +1 i,j | X h i,j = u i = u . In p articular, E h X h +1 i,j i = ¯ x i,j . A lso for e ach machine i and iter ation h , P j X h i,j p i,j = P j x i,j p i,j with pr ob ability 1 . Th us the in v ariant ( I2 ) is main tained as w ell. If the linear system (Figure 1) b ecomes determined, then this step en ds and we pro ceed to the next step of “Cycle Breaking”. 2.5 Cycle Breaking: Let M ′ and N ′ b e the mac hine and job no des resp ectiv ely in G 1 , wh en the previous step ended. If | M ′ | = m ′ and | N ′ | = n ′ , th en the n u m b er of edges in G 1 is | E ( G 1 ) | ≤ m ′ + n ′ . Otherwise, the linear system (Figure 1 ) remains un derdetermined. Actually , in eac h connected comp onen t of G 1 , the num b er of edges is at most the num b er of v ertices due to the same r eason. Therefore, eac h comp onent of G 1 can conta in at most one cycle. If there is no cycle in G 1 , we are done; else there is at most one cycle, sa y C = ( v 0 , v 1 , v 2 , . . . , v k = v 0 ), with v 0 = v k ∈ M , in eac h connecte d c omp onent of G 1 . Note that sin ce G 1 is bipartite, C alw a ys h as ev en length. F or simplicit y of notation, let the cur r en t X v alue on edge e t = ( v t − 1 , v t ) b e d enoted b y Z t . Note that if v t is a machine no de, th en Z t ∈ (0 , ¯ y v t /γ ), else v t − 1 is a machine n o de and Z t ∈ (0 , ¯ y v t − 1 /γ ). W e next choose v alues µ 1 , µ 2 , . . . , µ k deterministically , and up d ate the X v alue of eac h edge e t = ( v t − 1 , v t ) to Z t + µ t . Sup p ose that w e initialized some v alue for µ 1 , and ha v e c hosen the incremen ts µ 1 , µ 2 , . . . , µ t , for some t ≥ 1. Then , the v alue µ t +1 (corresp onding to edge e t +1 = ( v t , v t +1 )) is determined as follo ws: (P1) If v t ∈ J (i.e., is a job no de), then µ t +1 = − µ t (i.e., we retain the total assignmen t v alue of w t ); (P2) If v t ∈ M (i.e., is a mac h ine no d e), we set µ t +1 in such a w ay so that the load on mac hin e v t remains unc hanged, i.e., we set µ t +1 = − p v t ,v t − 1 µ t /p v t ,v t +1 , which ensures that the in cremen tal load p v t ,v t − 1 µ t + p v t ,v t +1 µ t +1 is zero. Since p v t ,v t +1 is n on-zero by the p rop erty of G 1 therefore, dividing by p v t ,v t +1 is admissible. The vect or µ = ( µ 1 , µ 2 , . . . , µ k ) is completely determined by µ 1 , f or the cycle C . Therefore, w e can denote this µ by f ( µ 1 ). Let α b e the smallest p ositiv e v alue, su c h that if we set µ 1 = α , then for all X i,j v alues (after incremen ting b y the v ector µ as men tioned ab o v e sta y in [0 , ¯ y i /γ ], and at least one of them b ecomes 0 or ¯ y i /γ . S imilarly let β b e the smallest p ositive v alue suc h that if we s et µ 1 = − β , then a gain all X i,j v alues after increments lie in [0 , ¯ y i /γ ] and at least one of them is roun ded to 0 or ¯ y i /γ . (It is easy to see that α and β alw a y s e xist and they are strictly p ositiv e.) W e no w c ho ose the vect or µ as follo w s : (R1) Set µ = f ( α ), if p v 0 ,v 1 − p v 0 ,v k − 1 µ k /µ 1 < 0. (R2) Set µ = f ( − β ), if p v 0 ,v 1 − p v 0 ,v k − 1 µ k /µ 1 ≥ 0. If some X i,j is round ed to 0, we remo v e that edge from G 1 . If some edge X i,j b ecomes ¯ y i /γ , then w e remo ve it f rom G 1 and add it to G 2 , with w eight ¯ y i /γ . Since at l east one of th ese occurs , we are able to break the cycle. Let φ den ote the fractional assignmen t of x v ariables at the b eginning of the cycle b reaking phase. Then clearly , after this step, for all jobs j , considering b oth G 1 and G 2 , P i X i,j = P i φ i,j . F or any mac hine i ∈ M , if i / ∈ C , then clea rly P j p i,j X i,j = P j p i,j φ i,j . If i ∈ C , but i 6 = v 0 , then b y prop erty ( P2 ), b efore inserting an y edge to G 2 , we ha v e P j p i,j X i,j = P j p i,j φ i,j . Any edge added to G 2 after the cycle breaking s tep has th e same weigh t as it h ad in G 1 . Therefore, w e ha ve, for an y i 6 = w 0 , and considering b oth G 1 and G 2 , P j p i,j X i,j = P j p i,j φ i,j . No w consider the mac hine v 0 (= v k ). Its c hange in load is exact ly µ 1 ( p v 0 ,v 1 − p v 0 ,v k − 1 µ k /µ 1 ). Therefore b y the choice of ( R1 ) and ( R2 ), the load on mac hin e v 0 can only decrease. Hence, b y prop ert y (2.5), w e hav e the f ollo wing lemma, Lemma 2.4. Consider ing b oth G 1 and G 2 , we have after the cycle br e aking step with pr ob ability 1 : P i X i,j = 1 ∀ j ; P j X i,j p i,j ≤ T ¯ y i ∀ i ; , X i,j ≤ ¯ y i ∀ i, j. 2.6 Rounding on G 1 and G 2 The previous t wo steps ensures, th at G 1 is a forest and in G 2 , X i,j ≥ ¯ y i /γ , f or all ( i, j ) ∈ E ( G 2 ). W e remo v e an y isolated no des fr om G 1 and G 2 , an round them separately . 2.6.1 F urther Relaxing the Solution Let us denote the job and the mac h ine nod es in G 1 ( G 2 ) b y J ( G 1 ) (or J ( G 2 )) and M ( G 1 ) (or M ( G 2 )) resp ectiv ely . Consider a job no d e j ∈ J ( G 2 ). If P i :( i,j ) ∈ E ( G 2 ) X i,j < 1 /δ (w e c ho ose δ later), w e simp ly remo ve all the edges ( i, j ) fr om G 2 and the follo wing m ust hold: P i :( i,j ) ∈ E ( G 1 ) X i,j ≥ 1 − 1 /δ . Oth er w ise, if P i :( i,j ) ∈ E ( G 2 ) X i,j ≥ 1 /δ , w e remov e all edges ( i, j ) ∈ E ( G 1 ) fr om G 1 . Th er efore at the e nd of this mo d ification, a job n o de can b elong to either J ( G 1 ) or J ( G 2 ), bu t not b oth. If j ∈ J ( G 1 ), w e ha v e P i ∈ M X i,j ≥ 1 − 1 /δ . Else, if j ∈ J ( G 2 ), P i ∈ M X i,j ≥ 1 /δ . F or the make span analysis it will b e easier to p artition the edges incident on a mac h in e n o de i into t w o parts – the job n o des incident to it in G 1 and in G 2 . The f ractional pro cessing time due to j obs in J ( G 1 ) (or J ( G 2 )) will b e denoted by T ′ ¯ y i (or T ′′ ¯ y i ), i.e., T ′ ¯ y i = P j ∈ J ( G 1 ) p i,j X i,j (or T ′′ ¯ y i = P j ∈ J ( G 2 ) p i,j X i,j ). 2.6.2 Rounding on G 2 : In G 2 , for an y mac hine no de i , recall P j ∈ J ( G 2 ) X i,j p i,j = T ′′ y i . Since w e ha v e for all i ∈ M ( G 2 ) , j ∈ J ( G 2 ), X i,j ≥ y i /γ , w e hav e P j ∈ J ( G 2 ) p i,j ≤ T ′′ γ . T h erefore, if w e deci de to op en a mac hine n o de i ∈ M ( G 2 ), then w e can assign all th e no des j ∈ J ( G 2 ), that h a ve an edge ( i, j ) ∈ E ( G 2 ), by pa ying at most T ′′ γ in the mak espan. Hence, we only concen tr ate on op ening a mac hine in G 2 , and then if the mac hine is op ened, we assign it all the jobs in ciden t to it in G 2 . F or eac h mac hine i ∈ M ( G 2 ), we define Y i = min { 1 , ¯ y i δ } . Since, for all job no d es j ∈ J ( G 2 ), we kno w P i ∈ M ( G 2 ) X i,j ≥ 1 /δ , after scaling we h a ve for all j ∈ J ( G 2 ), P ( i,j ) ∈ E ( G 2 ) Y i ≥ 1. Therefore, this exactly f orm s a fractional set-co ver in stance, whic h can b e r ou n ded using the randomized round ing metho d deve lop ed in [22] to get activ ation cost within a factor of δ (log n O P T + 1). T he instance in G 2 th us n icely captures the h ard part of the pr ob lem, which comes from the hardness of appro ximation of set co v er. Thus we hav e the follo wing lemma. Lemma 2.5. Consider ing only the job no des in G 2 , the final lo ad on any machine i ∈ M ( G 2 ) is at most T ′′ γ and the total activation c ost is at most δ (log n O P T + 1) O P T , wher e T ′′ is the fr actional lo ad on machine i ∈ M ( G 2 ) b efor e rounding on G 2 and O P T is the optimum activat ion c ost. 2.6.3 Rounding on G 1 : F or rounding in G 1 , w e tra verse eac h tree in G 1 b ottom up. If there is a job no de j , th at is a c hild of a mac hine n o de i , then if X i,j < 1 /η ( η to b e fixed late r), w e remo v e the edge ( i, j ) from G 1 . Since in itially j ∈ J ( G 1 ), P i ∈ M X i,j ≥ 1 − 1 /δ , even after these edges are r emo ved, w e ha ve for j ∈ J ( G 1 ), P i ∈ M ( G 1 ) X i,j ≥ 1 − 1 /δ − 1 /η . Ho we v er if X i,j ≥ 1 /η , simply op en mac h ine i , if it is not already op en and add job j to mac hine i . I n itially ¯ y i ≥ 1 /η , since ¯ y i ≥ X i,j . The initial con tr ibution to cost by mac hine i w as ≥ 1 η a i . No w it b ecomes a i . If P j X i,j y i p i,j = T ′ , with X i,j ≥ 1 /η , no w it can b ecome at most η T ′ . After th e ab o v e mo d ification, the y et to b e assigned jobs in J ( G 1 ) form disjoint stars, with the job no des at their cen ters. Consider eac h star, S j with job no de j at i ts cen ter. Let i 1 , i 2 , ., i ℓ j b e all the mac h ine no des in S j , th en we hav e, P ℓ j k =1 X i k ,j ≥ 1 − 1 /δ − 1 /η . Therefore P ℓ j k =1 ¯ y i k ≥ 1 − 1 /δ − 1 /η . If there i s already some op ened mac hine, i l , assign j to i l b y increasing the makespan at most by an additiv e T . Oth er w ise, op en mac hine i l with the chea p est a i l . S ince the total cont ribution of these mac h ines to the cost is P ℓ j k =1 ¯ y i k a i k ≥ P ℓ j k =1 ¯ y i k a i l ≥ (1 − 1 /δ − 1 /η ) a i l , we are w ith in a factor 1 1 − 1 /δ − 1 /η of the total cost con tribu ted f r om G 1 . Hence, w e ha v e th e follo w ing lemma, Lemma 2.6. Consider ing only the job no des in G 1 , the final lo ad on any machine i ∈ M ( G 1 ) is at most T ′ η + max i,j p i,j and the total activation c ost is at most max( 1 η , 1 (1 − 1 /δ − 1 /η ) ) O P T , w her e T ′ is the fr actional lo ad on machine i ∈ M ( G 1 ) b efor e roun ding on G 1 and O P T is the optimum activation c ost. No w com binin g, Lemma 2.4, 2.5 and 2.6, and b y optimizing the v alues of δ, η and γ , we get the follo wing theorem. Theorem 2 .1. A sche dule c an b e c onstructe d efficiently with machine activation c ost 2(1 + 1 ǫ )(ln n O P T + 1) OP T and makesp an (2 + ǫ ) T , wher e T is the optimum makesp an p ossible for any sche dule with activation c ost O P T . Pr o of. F rom Lemma 2.5 and 2.6, we ha v e, • Mac h ine op ening cost is at most  max( 1 η , 1 (1 − 1 /δ − 1 /η )  + δ  ln n O P T + 1)  O P T • Mak espan is at most T (max( γ , η )) + m ax i,j p i,j No w η ≥ γ , since otherwise any ed ge with X i,j ≥ 1 /η will b e m ov ed to G 2 and 1 − 1 /δ ≥ 1 /η . No w set, γ = η , δ = 1 + ζ , for some ζ > 0. So 1 − 1 /δ = ζ / (1 + ζ ). Set 1 /η = ζ / ( 1 + ζ ) − 1 / (1 + ζ )(ln n O P T + 1). Thus, w e ha v e an activ ation cost at most 2(1 + ζ )(ln n O P T + 1) O P T and mak espan ≤ T (1 + ln n + 1 ζ ln n − 1 ) + max i,j p i,j . Therefore, if w e set ζ = 1 + 2 / ln n , we get an activ ation cost b ound of 4(ln n O P T + 1) O P T and mak esp an ≤ 2 T + max i,j p i,j . In general, by setting ǫ = 1 ζ , we get an activ ation cost at most 2(1+ 1 ǫ )(ln n O P T +1) O P T and makespan ≤ (2 + ǫ ) T . ⊓ ⊔ 3 Minimizing Mac hine Activ a tion Cost and Assignmen t C ost W e no w consider the sc heduling problem with assignment costs and mac hine activ ation costs. As b efore, eac h job can b e sc hedu led only on one mac h ine, and pro cessing job j on mac hine i requires p i,j time and incurs a cost of c i,j . Eac h mac hin e is a v ailable for T time u nits a nd the o b jective is to minimize the total incurred cost. In this v ersion of the machine activ ation mo del, we w ish to minimize the sum of the mac hin e activ ation and job assignment costs. Our ob jectiv e n o w is min X i ∈ M a i y i + X ( i,j ) c i,j x i,j sub j ect to the same constrain ts as the LP defined in Eq(2.1). Our algorithm for simulta neous minimization of mac h ine activ ation and assignment cost follo ws the same paradigm as has b een dev elop ed in S ection 2.3, w ith some p roblem sp ecific c h anges. W e ment ion the differences here. 3.1 T ransforming the Solution After solving the LP , we obtain, C = P i,j c i,j x i,j . T hough, we ha v e an add itional constrain t C = P i,j c i,j x i,j to care ab out, w e do not include it in the lin ear system and pro ceed exactl y as in Subsection 2.4. As long as the s ystem is u nderdetermined, w e can rep eatedly apply RandStep to form the tw o graphs G 1 and G 2 . By Pr op ert y 2.6, ∀ i, j, h, E h X h i,j i = ¯ x i,j and hence, we h a ve that the exp ected cost is P i,j c i,j ¯ x i,j . The pro cedur e can b e directly derandomized by the metho d of conditional exp ectation giving an 1-a ppr o ximation to assignmen t cost. When the system b ecomes determined, we mov e to the next step. Thus at th at p oint, in eve ry comp onen t of G 1 , the n um b er of edges is at most the num b er of ve rtices. T h us again eac h comp onen t of G 1 , can consist of at most one cycle. In G 2 , f or all ( i, j ) ∈ E ( G 2 ), we ha v e X i,j ≥ ¯ y i /γ . 3.2 Breaking the Cycles F or breaking th e cycle in ev ery comp onen t of G 1 , we pro ceed in a slightly differen t manner from the previous section. Ho wev er, w e no w hav e t wo parameters, p i,j and c i,j asso ciated w ith eac h edge. S upp ose ( i ′ , j ) is an edge in a cycle. If the X i ′ ,j v alue of this edge exceeds 1 2 then we can assign job j to mac hine i ′ and increase the pro cessing load on the mac hine b y p i ′ ,j . Th is increases the mak espan at most by an additiv e T 2 , sin ce the job w as already assigned to an exten t of 1 2 on that mac hine. The assignmen t cost also goes up, but since w e pa y c i ′ ,j to a ssign j to i ′ , and the LP solution pa y s at least 1 2 c i ′ ,j , this cost causes a p enalty b y a factor of 2 ev en after sum ming u p all such assignment costs. Similarly , activ ation cost is also only affected by a facto r of 2. If the X i ′ ,j v alue is at most 1 2 , then w e simply d elete the edge ( i ′ , j ). W e scale up all the X i,j v alues and ¯ y i v alues by 2. Thus the total assignment of an y job remains at least 1 and the cost o f activ ation and assignment can go up only b y a factor of 2. 3.3 Rounding on G 1 , G 2 The fi rst part inv olv es further relaxing th e solution, that is iden tical to the one describ ed in subsection 2.6.1. Therefore, we now concen trate on rounding G 1 and G 2 separately . 3.3.1 Rounding on G 2 In G 2 , since w e hav e for all ( i, j ) ∈ E ( G 2 ), X i,j = ¯ y i /γ , if w e decide to op en mac hine i , all the jobs j ∈ J ( G 2 ) can b e assigned to i , b y losing only a factor of γ in the mak espan. Therefore, w e just n eed to concen tr ate on minimizing the cost of op enin g mac hin es and the total assignment cost, sub ject to the constraint that all the jobs in J ( G 2 ) m ust h a ve an op en mac hine to get assigned. This is exactly the case of non-metric unc ap acitate d facility lo c ation and we can emplo y the rounding approac h dev elop ed in [21] to obtain an approximat ion factor of O (log n + m O P T ) + O (1) on the mac hine activ ation and assignmen t costs. 3.3.2 Rounding on G 1 Rounding on G 1 is similar to the case when there is n o assignmen t costs with a few mo difi cations. W e pro ceed in the same manner and obtain the stars with job no des at the cen ters. No w for eac h star S j , with j at its c ent er, w e co nsider all the mac hine no des in S j . I f some mac h ine i ∈ S j is already op en , we mak e its op ening cost 0. Now w e op en the machine, ℓ ∈ S j , for whic h c j + a ℓ,j is minimum. Again u sing the same reasoning as in S ubsection 2.6.3, the total cost do es not exceed b y more than a factor of 1 1 − 1 /δ − 1 /η . No w optimizing α, β , γ , w e get the follo wing theorem, Theorem 3 .1. If ther e is a sche dule with total machine activation and assignment c ost as O P T and makesp an T , then a sche dule c an b e c onstructe d efficiently in p olynomial time, with total c ost O (log n + m O P T + 1) O P T and makesp an ≤ (3 + ǫ ) T . Note that for b oth the ca ses of minimizing a lone the mac hin e ac tiv ation cost and also minimizing the assignment cost sim ultaneously , tota l cost is b ou n ded within a constant factor of log d , where d is the maxim um degree (total num b er of edges inciden t on the bipartite grap h ) of any mac hine no de in G 2 . 4 The Greedy Algorithm In this section, we present a greedy algorithm that ac hiev es an approximat ion factor of (2 , 1 + ln n ). The algorithm is similar to the standard set co ver typ e greedy algorithm and runs in iteratio ns. In eac h iteration, the most “c ost-effectiv e” set, the set that maximizes the ratio of the incrementa l b enefit of the set, to its cost, is c hosen and ad d ed to our solution set, until all elements are co v ered. Giv en that a solution w ith activ ation cost A and mak espan T exists, at eac h step we wish to select a mac hine to activ ate based on its “cost-effectiv eness”. Giv en a set S of activ e mac hines, let F ( S ) denote the maxim um num b er o f jobs that can b e sc heduled with m akespan T . How ev er, in this case , the quan tit y F ( S ), is NP-hard to compu te, th u s it is unlikely to ha ve efficien t p ro cedures either to test the feasibilit y of the curr ent set of activ e machines or to fi nd the most cost-effec tiv e mac hine to activ ate. The cen tral idea is that instead of using the inte gral function F ( S ) that is h ard to compute, w e use a fractional r elaxatio n that is m uch easier to compute, and allo ws us to apply the greedy framew ork. F ormally , for a v alue T , we first set all p i,j ’s th at are larger than T to infinity (or the corr esp onding x i,j to 0). Let f ( S ) b e the maxim um n umber of jobs that can b e fractionally pro cessed by a set S of mac h ines that are allo w ed to run for time T eac h. In other wo rds, f ( S ) = max X i,j x i,j (4.7) s.t. X i ∈ M x i,j ≤ 1 ∀ j ∈ J X j ∈ J p ij x i,j ≤ T ∀ i ∈ S 0 ≤ x i,j ≤ 1 ∀ i, j ; x i,j = 0 if i / ∈ S or p ij > T Note that f ( S ) can b e computed by u sing a general LP solv er or b y a generalized flo w compu tation. The generalize d flo w problem is the same as the traditional net work flo w problem except that, for eac h arc e , there is a gain factor γ ( e ) and for eac h unit of flo w that en ters the arc γ ( e ) units exit. T o see that f can b e computed by a generalized flow computation, we add a sink t to the b ipartite graph G ( M ∪ J, E ) and connect eac h j ob to t with an arc with capacit y 1. Each edge ( i, j ) , i ∈ M , j ∈ J has a capacit y p ij and gain factor 1 /p ij . Ev ery mac hine i ∈ S has a flo w excess of T . It is easy to see the maxim um amount of fl o w that reac hes t is exactly the optimal solution of LP (4.7). A function z : 2 N → R is submo dular if z ( S ) + z ( P ) ≥ z ( S ∩ P ) + z ( S ∪ P ) f or any S, P ⊆ N . Let z ( S ) be the maximum amoun t o f flow that r eac h t starting with the excesses at no des in S : R ecently , Fleisc her [9] pro v ed the follo win g: Lemma 4.1. (Fleischer) F or any g e ner alize d flow i nstanc e, z ( S ) is a submo dular function. It is a direct consequence that f ( S ) is submo du lar. Define gain ( i, S ) = f ( S ∪ i ) − f ( i ) for any i ∈ M and S ⊆ M . Ou r greedy algorithm starts with an empty set S of activ e machines, and activ ates a mac hine s in eac h iteration th at maximizes g ain ( i,S ) a i , unt il f ( S ) > n − 1. W e th en round the fr actional solution to an int egral one using the sc h eme by S hmo ys and T ard os [20]. Algorithm GREED Y-SCHE DULING S = ∅ ; While ( f ( S ) ≤ n − 1) do Cho ose i ∈ M \ S suc h th at g ain ( i,S ) a i is maximized; S = S ∪ { i } ; Activ ate the mac hines in s et S ; Round f ( S ) to an inte ger solution to find an assignmen t. The p r oblem is actually a sp ecial case of the submo du lar s et co v er problem: min { P j ∈ S a j | z ( S ) = z ( N ) , S ⊂ N } where z is a nondecreasing sub mo dular f unction. In fact, W olsey [23 ] sho ws the follo wing result ab out the greedy algorithm, rephrased in our notation. Theorem 4 .1. (Wolsey) L et S t b e the solution set we have chosen after i ter ation t in the gr e e dy algorithm. Then, X i ∈ S t a i ≤ O P T  1 + ln z ( N ) − z ( ∅ ) z ( N ) − z ( S t − 1 )  wher e O P T is the optimal solution. In particular, if f () is inte ger-v alued, the theorem yields a 1 + ln n appr o xim ation. How ev er, f () is not n ecessarily inte gral in our problem. Therefore, w e terminate iteratio ns only when more than n − 1 (rather than n ) fractional jobs are satisfied, th us f ( M ) − f ( S t − 1 ) ≥ 1 and Theorem 4.1 giv es us a (1 + ln n )-appro ximation for the activ ation cost. Finally , we w ould like to remark th at the roun ding step guaran tees to find a feasible in tegral solution although the fractional solution w e start with only satisfies m ore than n − 1 jobs. The reason lies in the construction b y Shmoys and T ard os (refer to [20] for m ore d etails). Therefore, there exists an integral matc hin g su c h that all jobs are matc hed. Moreo ve r, it is also pro v en that the job assignment in duced b y an y in tegral matc hing h as a mak espan at most T + max p ij . Therefore, our fi nal mak esp an is at most 2 T . 5 Extensions 5.1 Handling Release Times S u pp ose eac h job j has a mac hine related release time r ij , i.e, j ob j can only b e p ro cessed on mac hin e i after time r ij . W e can mo dify the algorithm in Section 2 to handle release times as follo ws. F or an y “g uess” of the mak esp an T , w e let x i,j = 0 if r ij + p i,j > T in the LP formulation. Then, w e run the ((2 + ǫ ) , 2(1 + 1 ǫ )(ln n O P T + 1))-appro ximation r egardless o f the relea se times and ob tain a subset of activ e mac hines and an assignmen t of jobs to these mac hines. S upp ose the su bset J i of jobs is assigned to mac hine i . W e can now sc hedule the j obs in J i on mac hine i in order by release time. It is not hard to see the make span of mac hine i is at most T + P j ∈ J i p i,j since every job can b e sc heduled on mac h ine i after time T . Th erefore, w e get a (3 + ǫ , 2(1 + 1 ǫ )(log n O P T + O (1))) app ro ximation. Similar extensions can b e don e for the case with acti v ation and assignmen t costs. 5.2 Sc heduling with Outliers W e now consider the case where eac h job j has profit π j and w e are not required t o sc hedu le all the jobs. Some jobs can be dropp ed but th e tota l pr ofit that c an b e dropp ed is at most Π ′ . Therefore the total pr ofi t earned must be at least P j π j − Π ′ = Π. W e no w sho w h o w using our framew ork and a cleve r tric k used in [11], we can obtain a b ound of (3 + ǫ ) on the mak espan and 2(1 + 1 ǫ )(ln n O P T + 1) on the mac hine activ ation cost, while guaran teeing that profit of at most Π ′ (1 + ǫ ) is not scheduled. If we consider b oth mac h ine activ ation and assig nment cost, then w e obtain a total cost within O (log n + m O P T + O (1)) of th e optim u m w ithout altering the mak espan and the profit app ro ximation factor. W e create a dummy mac hin e dum , whic h has cost a dum = 0 and for all j , c i,j = 0. Pro cessing time of j ob j on dum is π j . It is a trivial exercise to show that b oth the algorithms of th e p r evious sections w ork when the mak espan constrain t is differen t on differen t mac hines. If the mak esp an constraint on mac h ine i is T i , then w e t he makespan for mac h ine i is at most (1 + ǫ ) T i + max j p i,j . F or the dummy mac h ine dum , w e set a mak esp an constrain t of Π ′ . Since after the final assignment the mak espan at th e dummy n o de can b e at most (1 + ǫ )Π ′ + max j π j . With some work it can b e sho wn that w e can regain the lost p rofit for a job with maximum p rofit o n dum , to eit her an existing mac hine or b y op enin g a new machine. This either increases our cost sligh tly , or increases the m ak esp an to at most (3 + ǫ ) T . 6 Minimizing Mac hine Activ a tion Cost in Uniformly Related M ac hines In this section, we sho w th at for related parallel mac h ines, there is an p olynomial time (1 + ǫ, 1)- appro ximation f or any ǫ > 0. If a sc hedule with activ ation cost A and makespan T exists, then we fi nd a schedule with activ ation cost A and mak espan at most (1 + ǫ ) T . W e b riefly sketc h the algorithm wh ich is a sligh t generalization of the approximat ion scheme for mak espan minimization on related parallel mac h ines b y Epstein and Sgall [7]. Actually , their algorithm can optimize a class of ob jectiv e functions whic h includes for e xample makespan, L p norm of the load v ector etc . W e only discuss t he mak esp an ob jectiv e in our p ap er. Th e extensions to other o b j ectiv es are straightforw ard. Roughly s p eaking, Epstein and Sgall’s algorithm works as follo ws (see [7] for detailed definitions and pr o ofs). They d efi ne the notion of a princip al c onfigur ation whic h is a v ector of constan t d imension and is us ed to succinct ly represen t a set of jobs (after rou n ding their sizes). A principal configur ation (see App endix B for more details) is of the form ( w , ~ n ) where w = 0 or w = 2 i for some intege r i and ~ n is a vec tor of non-negativ e in tegers. The num b er of d ifferen t p rincipal configur ations is p olynomially b ound ed (for an y fixed ǫ > 0). They also construct the graph of configur ations in which eac h v ertex is of the form ( i, α ( A )) for any 1 ≤ i ≤ m and p rincipal configuration α ( A ) of the job set A ⊂ J . There is a directed edge from ( i − 1 , α ) to ( i, α ′ ) if α ′ represent s a set of jobs that is a su p erset of wh at α represent s and its length is the (1 + ǫ )-appro ximated ratio of the weigh ts of the jobs in the difference of these t w o sets to the sp eed s i of machine i . In tuitiv ely , an assignment J 1 , . . . , J m with jobs in J i assigned to mac hine i corresp ond s to a path P = { ( i, α i ) } i in G su c h that α i represent s ∪ i j =1 J j and the length of edge (( i − 1 , α i − 1 ) , ( i, α i )) is approxima tely the load of mac h in e i . By computing a path P in G from (0 , α ( ∅ )) to ( m, α ( J )) suc h that the m aximum length of any edge in P is minimized, we can find an 1 + ǫ appr o ximation for minimizing the mak espan. T o obtain a (1 + ǫ, 1)-appro ximation of the mac hine activ ation problem, we slight ly mo dify the ab o v e construction of t he graph as f ollo ws. The sets of v ertices and edges are the same as b efore. W e asso ciate eac h edge with a cost. If b oth end p oints of edge (( i − 1 , α i − 1 ) , ( i, α i )) ha ve the same principal configuration α i − 1 = α i , th en the cost of the edge is 0; Otherw ise, the cost is the activ ation co st a i of mac h ine i . F or the guess of the mak espan T # , we compute a path from (0 , α ( ∅ )) to ( m, α ( J )) suc h th at the maxim um length of an y ed ge in P is at m ost T # and the cost is minimize d. If T ≤ (1 + ǫ ) T ∗ , we are guarantee d to fi n d a path of cost at m ost A . 7 Conclusions Current researc h includes considering d ifferen t L p norms as we ll as other measures suc h as w eigh ted completion time. The greedy ap p roac h currently only works for th e most basic v ersion giving a mak espan of 2 T an d an activ ation cost of O (log n ) A . E x tend ing it to handle other generalizations of the b asic problem is ongoing researc h. Ac knowledgmen ts: W e thank Leana Golub c hik (USC) and S hank ar Ramasw am y (Amazon) for useful discussions. References [1] Jo hn Augustine, Sandy Irani, and Chaitany a Sw amy . Optimal p ow er-down strategies. SIAM J. Comput. , 37(5):149 9–15 1 6, 20 08. [2] Y o ssi Azar and Amir Epstein. Conv ex programming for s chedulin g unrelated parallel machines. In S TOC ’05 , pag es 331– 337, 2005 . [3] Ke n Birman, Gre g ory Chockler, and Ro bber t v an Renesse. T ow ard a clo ud computing r esearch agenda . SIGACT News , 40(2 ):6 8–80, 2009. [4] Julia Chuzho y and P aolo Co denotti. Resource minimiza tio n job scheduling. In APPRO X , 20 0 9. [5] Julia Ch uzhoy , Sudipto Guha, Sanjeev Khanna, and J oseph Naor. Approximation algor ithms fo r the job int erv a l selection problem and related scheduling problems. In FOCS ’04: P r o c e e dings of the 45th Symp osium on F oundations of Computer Scienc e , pages 81– 90, 2004. [6] Julia Chuzhoy and Joseph Naor . New hardness results for cong estion minimization and machine scheduling. J. ACM , 53(5):70 7–72 1 , 2006. [7] Lea h Epstein and Jiri Sgall. Approximation schemes for scheduling on uniformly r elated and identical parallel machines. Algo rithmic a , 3 9(1):43–5 7, 200 4. [8] Uriel F eige. A threshold of ln n for approximating set cover. J ournal of the ACM , 45(4):634– 652, 199 8. [9] Lisa Fleischer. Maxim um gener alized flow is submodula r. ANALCO, to app e ar , 2010 . [10] Ra jiv Gandhi, Samir Kh uller, Sr iniv asan Parthasar athy , and Aravind Sriniv asan. Depe ndent r o unding in bipartite g r aphs. In F OCS ’02: Pr o c e e dings of t he 43r d Symp osium on F oundations of Computer Scienc e , pages 32 3–332 , 20 02. [11] Anupam Gupta, Ravishank a r Krishnas wam y , Amit Kumar, and Danny Segev. Scheduling with outlier s. In APPRO X , 200 9. [12] Do r it Ho ch baum and David Shmoys. A p olynomial a ppr oximation scheme for scheduling on unifor m pro cessor s: Using the dual approximation appro a ch. SIAM J. on Computing , 1 7(3):539– 551, 1988. [13] W assily Ho effding. P r obability inequalities for sums o f b ounded random v ar iables. Journal of the Americ an Statistic al Asso ciation , 58(301):13 –30, 196 3. [14] Sa ndy Irani and Kirk Pruhs. Algorithmic problems in p ower management. SIGACT News , 36(2):63–76, 2005. [15] Chr istos Koulamas a nd George J. Ky parisis. Makespan minimization on uniform parallel ma chines with release times. Eur op e an Jour n al of Op er ational Rese ar ch , 15 7(1):262– 266, 20 0 4. [16] V. S. Anil Kumar , Madhav V. Mar athe, Sr iniv asan Parthasara th y , and Aravind Sriniv as a n. Appro ximation algorithms for scheduling on multiple ma chines. In FOCS ’05 , pages 2 54–2 6 3, 20 0 5. [17] J an K arel Lenstra, David B. Shmo ys, and ´ Ev a. T ar do s. Appro ximation algor ithms for scheduling unrelated parallel machines. Math. Pr o gr am. , 46(3 ):259–2 71, 19 90. [18] B a rna Saha and Aravind Sriniv asan. A new approximation technique for resource-a llo cation problems. Manuscript , 20 09. [19] J eanette P . Schm idt, Alan Siegel, and Aravind Sriniv asa n. Chernoff-ho effding b ounds fo r applica tions with limited indep endence. SIAM J. D iscr et. Math. , 8(2):22 3–250 , 1995 . [20] David B. Shm oys and ´ Ev a T a rdos. An approximation alg orithm for the generalized assignment problem. Math. Pr o gr am. , 62(3 ):461–4 7 4, 1993 . [21] Ar avind Sriniv a san. Improv ed approximation guar antees for packing and covering in teger pr ograms. SIAM J. Comput. , 29(2):648 – 670, 1999. [22] Ar avind. Sriniv asan. New approa ches to covering a nd packing pro blems. In Pr o c e e dings of t he t welfth annual ACM -SIAM symp osium on Discr ete algorithms , pages 5 67–57 6, 20 01. [23] L.A. W o lsey . An analysis o f the g reedy alg orithm for the submo dular set cov er ing problem. Combinatoric a , 2:358– 393, 1 982. App endix A P artial GAP (No a ctiv ation costs) Supp ose eac h job earns a p rofit of π j . T here are n jobs and m mac h ines. W e wish to sc hedule a subset S J of jobs of total pr ofit at least Π. Job j has a pro cessing time of p i,j if it is assigned to mac h ine i and has an assignm ent cost of c ij . W e sho w that if a n assignmen t exists for a su bset of jobs S J with the prop erty that π ( S j ) ≥ Π, such that this assignmen t has cost C and ma k espan T , then in p olynomial time w e can find an assignment with exp e cte d cost C and exp ected profit Π with mak espan at most 2 T . The id ea is extremely simple. W e fi rst solve the follo wing LP relaxation. W e ha v e an in teger v ariable y i whic h is 1 if and only if job i is sc heduled. The first constrain t states that the total profit of sc heduled jobs is at least 1. Th e second constraint ensures that all jobs that are sc hed uled are assigned to a mac hin e. Th e third constrain t ensu res that the total cost is not to o high. X j ∈ J π j y j ≥ Π X i ∈ M x i,j = y j ∀ j ∈ J X j ∈ J,i ∈ M x i,j c ij ≤ C X j ∈ J x i,j p i,j ≤ T ∀ i ∈ M 0 ≤ x i,j ≤ 1 , 0 ≤ y i ≤ 1 The h igh lev el idea is as follo ws: supp ose w e h a ve a fractional solution satisfying th e ab o v e constraints (as in [20], if p i,j > T then we set x i,j = 0). W e create a bipartite graph as follo ws – let G = ( J, P , E ) b e a bip artite graph wh ere J is the set of job n o des (one ve rtex for eac h job) associated w ith a y j v alue (the extent to whic h this job is done). F or eac h mac hine no de i in M , let P j ∈ J x i,j = Z i . W e create P i = ⌈ Z i ⌉ no des corresp onding to eac h mac h ine i . S et P = { ( i, k ) |∀ i ∈ M , ∀ k = 1 . . . P i } . F or eac h mac h ine no d e i , we order the jobs assigned to it by the fractional solution in non-increasing p i,j order suc h that the fractional load on eac h cop y , except for th e last cop y , is exactly 1. The main insight here is that this lets us e ssenti ally ignore the p ro cessing times of jobs, as long as we can map this solution to an i nte gral assignmen t in whic h th e set of jobs assigned to a particular mac hine are the set of jobs that are matc h ed to the copies of i in P . This part is almost identic al to the construction in [20]. F rom this fractional solution w e can compute an integ ral solution by using dep end ent rounding on bipartite graphs [10] to con v ert the fract ional solution to an integ ral solutio n. Eac h edge is asso ciated with a v alue x i,j defined by the solution to the linear pr ogram. In add ition the fractional degree of eac h job no de is exactly y i . The randomized rounding con verts eac h x i,j to x i,j (an integ ral v alue), s uc h that Pr [ X i j = 1] = x i,j . In addition, eac h no de has d egree exac tly 0 or 1, such that a j ob no d e j no d e is matc hed with probabilit y exactly y i . These prop er ties ensure that the e xp ected cost is C , and the exp ected b enefit is at least P j ∈ J π j y j ≥ Π. T h e pro of that the mak espan is at most 2 T is th e same as the pro of giv en in [20]. Derandomizing this metho d achievi ng th e cost and b enefit b ounds would b e q u ite interesti ng. If all the π i v alues are iden tical, then instead o f using dep end en t round ing, one can use a direct conv ersion of the fractional matc hing to an in tegral matc hing, main taining the b enefit v alue and cost v alues. B More Details of the Construction [7] Let A ⊆ J b e a set of jobs. Su p p ose w is 0 or 2 i for some inte ger i (p ossibly negativ e). Let the relativ e rounding precision b e δ > 0 and λ b e su c h that λ = 1 /δ is an ev en in teger. Giv en A and w , defin e A ( w ) = { j ∈ A | p j ≤ δ w } . Definition B.1. 1. The roun ding fu nction r ( p ) : L et w b e the lar g e st p ower of two such that p > δ w and i b e the smal lest i nte ger such that p ≤ iδ 2 w . r ( p ) = iδ 2 w . It is e asy to se e p j ≤ r ( p j ) < (1 + δ ) p j . 2. A configuration is of the form ( w, ~ n ) wher e ~ n = { n λ , n λ +1 , . . . , n λ 2 } is a ve ctor of non- ne gative inte gers. A c onfigur ation ( w, ~ n ) r epr esents A if (i) p j ≤ w for al l j ∈ A ; (2) for λ < i ≤ λ 2 , n i e quals the numb er of jobs j ∈ A with r ( p j ) = iδ 2 w ; (3) n λ ∈ {⌊ P j ∈ A ( w ) r ( p j ) / ( δw ) ⌋ , ⌈ P j ∈ A ( w ) r ( p j ) / ( δw ) ⌉} . 3. The prin cipal configuration α ( A ) of A is a c onfigur ation ( w, ~ n ) with the smal lest w which r epr esents A and n λ = ⌈ P j ∈ A ( w ) r ( p j ) / ( δw ) ⌉ . 4. The scaled configuration for ( w, ~ n ) and w ′ ≥ w is define d as a ve ctor scale w → w ′ ( ~ n ) = ~ n ′ such that ( w ′ , ~ n ′ ) r epr esents the set K c ontaining exactly n i jobs with pr o c e ssing time iδ 2 w f or i = λ, . . . , λ 2 , and no other jobs. Cho ose the c onfigur ation with | ( P j ∈ K ( w ′ ) r ( p j )) − n ′ λ δ w ′ | ≤ δ w ′ / 2 , br e aking ties arbitr arily. In tuitiv ely , a single p rincipal configur ation succinctly represent man y d ifferen t sets of jobs that are approximat ely equiv alent. It is also not hard to see the num b er of principal configurations is p olynomially b ounded for any fixed δ . The follo wing d efinition describ es the construction of the configur ation graph G . The construction is th e same as in [7], except that we hav e t w o metrics on edges, length and cost, wh ic h are used to capture resp ectiv ely the mak espan and mac h in e op ening cost. Definition B.2. Assume that the machines ar e numb er e d in non-de cr e asing sp e e d or der. The c onfigur ation gr aph G : e ach vertex is of the f orm ( i, α ( A )) for any 1 ≤ i ≤ m wher e α ( A ) is the princip al c onfigur ation of the job set A ⊂ J . The sour c e is (0 , α ( ∅ )) and the sink is ( m, α ( J )) . Ther e is a dir e cte d e dge fr om ( i − 1 , ( w , ~ n )) to ( i, ( w ′ , ~ n ′ )) iff either ( w, ~ n ) = ( w ′ , ~ n ′ ) or ~ n ′′ ≤ ~ n ′ and P λ 2 i = λ ( n ′ i − n ′′ i ) δ 2 w ′ ≥ w ′ / 3 wher e ~ n ′′ = scale w → w ′ ( ~ n ) . The length of the e dge is ( P λ 2 i = λ ( n ′ i − n ′′ i ) δ 2 w ′ ) /s i . The c ost of the e dge is 0 if ( w, ~ n ) = ( w ′ , ~ n ′ ) and the op ening c ost a i of machine i otherwise. The follo wing d efinition is essen tial f or establishin g the relation b et w een a path of the configuration graph and an job assignmen t. Definition B.3. L et J 1 , . . . , J m b e a sche dule assigning j obs in J i to machine M i . A se q uenc e { i, ( w i , ~ n i ) } m i =0 of vertic es of the gr aph G r epr esents (is a princip al c onfigur ation of ) the assignment if ( w i , ~ n i ) r epr esent (is a princip al c onfigur ation of ) ∪ i i ′ =1 J i ′ . Lemma B.1. L et ( i − 1 , ( w, ~ n )) b e a c onfigur ation r epr ese nting A ⊆ J , and (( i − 1 , ( w , ~ n ) , ( i − 1 , ( w ′ , ~ n ′ )))) b e an e dge in G . We c an find in line ar time a se t of jobs B such that A ⊂ B and ( w ′ , ~ n ′ ) r epr esents B . Lemma B.2. 1. L e t { J i } b e an assignment. Then its princip al r epr esentation { ( i, ( w i , ~ n i ) } is a p ath in G . 2. L et { i, ( w i , ~ n i ) } m i =0 b e a p ath in G r epr esenting an assignment { J i } . L et T # b e the maximum length of any e dge in P and T b e the makesp an of the assignment. Then | T − T # | ≤ δ T . F or the guess of the mak espan T # , we co mpute a path from (0 , α ( ∅ )) to ( m, α ( J )) su c h that the maxim um lengt h of an y edge in P is at m ost T # and the cost is m inimized. By Lemma B .1, we can efficien tly construct an assignment r epresen ted by this path. Let { J ∗ i } b e the assignmen t w ith mak espan T ∗ and cost A ∗ . F rom Lemma B.2, w e kno w ther e is p ath of cost A ∗ and the maxim u m edge length at most (1 + δ ) T ∗ . Hence, if our guess T # ≥ (1 + δ ) T ∗ , we can guaran tee t o find a path of cost at most A ∗ . Again b y Lemma B.2(2), w e kno w the make span of the assignment rep r esen ted by the pat h is at most T # / (1 − δ ) ≤  1+ δ 1 − δ  T ∗ .

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment