BULLETIN OF THE POLISH ACADEMY OF SCIENCES TECHNICAL SCIENCES, Vol. 67, No. 1, 2019 DOI: 10.24425/bpas.2019.127335
Better polynomial algorithms for scheduling unit-length jobs with bipartite incompatibility graphs on uniform machines
T. PIKIES* and M. KUBALE Department of Algorithms and System Modelling, Gdańsk University of Technology, ETI Faculty, Gabriela Narutowicza 11/12, 80-233 Gdańsk, Poland
Abstract. The goal of this paper is to explore and to provide tools for the investigation of the problems of unit-length scheduling of incompat- ible jobs on uniform machines. We present two new algorithms that are a significant improvement over the known algorithms. The first one is Algorithm 2 which is 2-approximate for the problem Qm pj = 1, G = bisubquartic Cmax. The second one is Algorithm 3 which is 4-approximate for the problem Qm p = 1, G = bisubquartic ΣC , wherej m {2, 3, 4}. The theoryj behind the proposed algorithms is based on the properties j j 2 of 2-coloring with maximalj coloring width, andj on the properties of ideal machine, an abstract machine that we introduce in this paper.
Key words: approximation algorithm, graph coloring, incompatible job, polynomial algorithm, scheduling, uniform machine, unit-time job.
1. Introduction partite subcubic (subquartic) graph is said to be bisubcubic (bi- subquartic). The symbol α(G) stands for the size of a maximum Suppose we have to process n bins of chemical substances independent set in G. We say that a graph is k-colorable if its and we have m parallel uniform machines, i.e. machines that vertices can be partitioned into k independent sets, called color have identical functionality but may have different processing classes, and by a k-coloring of G we mean such a partition of its speeds. On no machine can we process two substances that may vertices. The width of a coloring is the difference between the react with each other in order to guarantee machines safety or sizes of the largest and the smallest color class of the coloring. due to spacial reasons. The aim is such an assignment of the For other definitions the reader is referred to [10]. Conflicts bins to the machines that the processing time of all bins is as between jobs can be modeled by an incompatibility graph, i.e. short as possible or the mean flow time of a bin is as short as by a graph which has exactly one unique vertex assigned to possible. We assume here that each of the bins has to be pro- each of the jobs and which has an edge between a pair of ver- cessed on exactly one machine without interruptions. tices if the corresponding jobs cannot be processed on the same The problem can be expressed as the following scheduling machine. We say that jobs in a given set are compatible if the problem. Let us assume that we have n identical jobs with unit vertices corresponding to them form an independent set in the execution times. We also have m parallel uniform machines. incompatibility graph. They are uniform in the sense that the execution of a job on Now let us introduce some definitions concerning sched- a machine takes time inversely proportional to the speed of uling theory. Let us denote the set of jobs by J = { j1, …, jn}. Let the machine to be completed. There may be incompatibilities us also denote the set of the machines by M = {M1, …, Mm}. By between some jobs, that is, jobs belonging to incompatible s(M ) we denote the speed of machine M. Without loss of gener- pairs cannot be scheduled on the same machine. We consider ality we assume that s(M ) … s(M ), i.e. that the machines 1 ¸ ¸ m two criteria of optimality: the length of schedule and the total are ordered according to their speeds. By stotal = ∑ M M s(M ) completion time. we denote the sum of the speeds of all machines. A 2schedule Let us recall definitions of graph theory used further in this is for each job an allocation of a time interval to a machine paper. For a graph G = (V, E) by n(G) = V we denote the [2]. A subschedule is a schedule for a restricted set of jobs number of its vertices (nodes) and by e(G) =j Ej the number of J J on a restricted set of machines M M . By n (M ) 0 µ 0 µ S its edges. We denote by ∆(G) the maximum degreej j of a vertex we denote the number of jobs scheduled on machine M in in G. By V0(G) we mean the set of all vertices of a graph G a schedule S. By CS (M ) we denote the latest completion time with degree 0. A graph G is said to be a cubic (quartic) graph of the jobs scheduled on machine M in a schedule S. We have if it is 3-regular (4-regular). If, however, G fulfills ∆(G) 3 C (M ) = n (M )/s(M ). Thus the schedule length is equivalent ∙ S S (∆(G) 4) then it is called subcubic (subquartic). A bipartite to maxC (M ). Symbol Σ (N ) stands for the total completion ∙ S S cubic (quartic) graph is said to be bicubic (biquartic), and a bi- time of jobs from a set N J in a schedule S, therefore the µ total completion time is denoted by ΣS (J). By a greedy as- signment of compatible jobs to machines we understand an *e-mail: [email protected], [email protected] assignment in which the jobs are scheduled one by one and Manuscript submitted 2018-01-04, revised 2018-04-16, initially accepted each job is assigned to the machine that guarantees the shortest for publication 2018-05-08, published in February 2019. completion time at the moment of scheduling this job. In the
Bull. Pol. Ac.: Tech. 67(1) 2019 31 T. Pikies and M. Kubale following algorithms all the assignments of jobs to machines 2. 2-coloring with maximal coloring width should be performed greedily, e.g. using an Algorithm given in [3]. We present a simple Algorithm that constructs a 2-coloring of For a set of the machines K M by an ideal machine M we a bipartite graph with maximal coloring width. µ id mean a machine with the speed equal to ∑M K s(M )Tytus, thatPikies, can Marek Kubale ignore incompatibilities between jobs. By C (2N) we denote the id Algorithm 1 Non-Equitable Coloring latestN completionJ scheduled time on of the the ideal jobs machine from setM Nid , hence J scheduledCid(N)= Algorithm 1 Non-Equitable Coloring ⊆ µ Input: A bipartite graph G. onN the/∑ idealM K smachine(M). By MΣidid, (henceN) we C denoteid(N ) = the N total/∑M completion K s(M ). Input: A bipartite graph G. | | ∈ j j 2 Bytime Σ of(N jobs) we from denote a set theN totalJ completionscheduled on time the idealof jobs machine from Output:Output: AA two-coloring two-coloring with with maximal coloring width id ⊆ a Msetid ,N hence JΣ idscheduled(N)=0.5 Non( theN + ideal1)/∑ machineM K s(M ).M , hence 1. Col1 = Col2 = /0 µ | | | | ∈ Tytusid Pikies, Marek Kubale1 2 Σid(ThereN) = 0.5 areN several( N papers+ 1)/∑ addressingM K s(M ) the. problem of schedul- 2. Let G1, …, ,...,GGc be beconnected connected components components of ofG G. . j j j j 2 1 c ingThere with are incompatible several papers job constraintsaddressing the on identicalproblemTytus of machines. sched Pikies,- Marek3. Kubalei = 1 c N J scheduled on the ideal machine Mid, hence Cid(N)= Algorithm3. for i = 1 1 Non-Equitabletoto c dodo Coloring ulingHowever,⊆ with incompatible to the best of job our constraints knowledge, on thereidentical are fewmachines. results 4. Split V(G ) into color classes Col (G ) and Col (G ), N /∑ s(M). By Σid(N) we denote the total completion A bipartiteV( i) graph G. (1 )i (2 ) i N JM scheduledK on the ideal machine Mid, hence Cid(N)= Input:Algorithm4. Split 1 Non-EquitableGi into color Coloringclasses Col1 Gi and Col2 Gi , However,|involving⊆| ∈ to uniform the best machines. of our knowledge, The problem there isare hard few even results for where Col1(Gi) Col2(Gi) . timeN / of jobss( fromM). a By setΣN (NJ) wescheduled denote theon the total ideal completion machine Output:whereA two-coloring |Col (G )|≥| with Col maximal(G )| . coloring width identical∑M K machines. Theid authors⊆ of [1] have proved that even if Input:5. ColA bipartite= Col1 graphColi G(G. ). 2 i involvingM| id| , hence∈ uniformΣid(N)= machines.0.5 N ( NThe+ 1problem)/∑ sis( Mhard). even for 1. =1 j =1 j ¸1 j i j time of jobs from a set N J scheduledM onK the ideal machine Output:5. Col Col1 A Col= two-coloring Col2 ∪/0 Col with(G ) maximal. coloring width identicalthere are machines. only three The identical authors|⊆| | machines| of [1] have and∈ proved the incompatibili- that even 6. Col21 = Col21 [Col21(Gii). M There, hence areΣ several(N)= papers0.5 N addressing( N + 1)/ the problems(M). of schedul- 2. Let G1,...,Gc be∪ connected components of G. tiesid betweenid jobs can be modeled by a∑ bipartiteM K graph then the 1.6.7. Col Col1 =2 Col= Col2 =2 /0 Col2(Gi). ifing there with are incompatible only three identical job| | constraints| |machines on ∈and identical the incompati machines.- 3. endi for= c [ There are several papers addressing the problem of schedul- 2. forLet G ,...,1 toG dobe connected components of G. bilitiesproblem betweenP3 p j jobs= 1, canG = bebipartite modeledC maxby aremains bipartite NP-hard. graph then 7.8. endreturn for1 (Colc1,Col2) However,ing with incompatible to| the best of job our constraints knowledge,| on there identical are few machines. results 4. Split V(Gi) into color classes Col1(Gi) and Col2(Gi), the problemThere is P a3 p review = 1, G of = known bipartite algorithmsC remains for unit-lengthNP-hard. 3.8. forreturni = 1(Colto c, doCol ) involvingHowever, uniformto thej best machines. of our knowledge, The problemmax there is are hard few even results for where Col11(Gi)2 Col2(Gi) . schedulingThere is witha reviewj incompatible of known jobs algorithms presentedj for in [4].unit-length The au- 4. Split V|(Gi) into|≥| color classes| Col1(Gi) and Col2(Gi), identicalinvolving machines. uniform machines. The authors The of [1] problem have proved is hard that even even for if Proof.5. ColThe1 = setCol of1 verticesCol1(G ofi). G can be split into V0(G) and schedulingthors of [4] with have incompatible also considered jobs presented a model ofin more[4]. The power- au- where Col1(∪Gi) Col2(Gi) . thereidentical are machines. only three The identical authors machines of [1] have and proved the incompatibili- that even if V6.(G) ColV0(2G=)|.Col Since2 Col no|≥|2( isolatedGi). vertex| belongs to Col2, we thorsful machinesof [4] have that also are considered called parallel a model batching of moremachines powerful (for 5. \Col 1Let= Col G be1 ∪ aCol bisubquartic1(Gi). graph. For the set Col re- ties between jobs can be modeled by a bipartite graph then the Lemmawill7. end consider 1. for the set∪V(G) V0(G) only. 2 theredetails are of only this three model identical see e.g. machines [2]). They and thepresented incompatibili- optimal 6. Col2 = Col2 Col2(\Gi). machinesproblem thatP3 pare= called1,G = parallelbipartite batchingC remains machines NP-hard. (for details turned8.Let byH beAlgorithm a graph∪ 1 with we athave least Col one2 edge. 2(n( TheG) following α(G)). in- ties between jobsj can be modeled bymax a bipartite graph then the 7. return (Col1,Col2) j j ∙ ¡ ofpolynomial this model| algorithms see e.g. [2]). for theThey problems presented| Q3 batchoptimal, p j polyno= 1,G =- end for There is a review of known algorithms| for unit-length equality is well known in graph theory (see e.g. [11]). problem P3 p j = 1,G = bipartite, = C, max=remains NP-hard. 8. return (Col1,Col2) mialbicubic algorithmsΣCj| and forQ 4thebatch problemsp j Q1| 3Gbatchbiquartic, pj = 1,Σ GC j=. Basedbicu- Proof. The set of vertices of G can be split into V0(G) and schedulingThere| is with a review incompatible| of known jobs algorithms presentedj in for [4].| unit-length The au- Proof. The set of vertices of G cane( beH) split into V (G) and biconΣ [7],C and they Q also4 batch presented, p = 1, optimal G = biquartic polynomialΣC algorithms. Based V(G) V (G). Sinceα no(H isolated) n(H vertex) belongs. to Col0, we will thorsschedulingj ofj [4] with havej incompatible also consideredj jobs presented a model of inj more [4].j The power- au- V(G)n V0 (G). Since no≤ isolated− vertex(H) belongs to 2Col , we for the problem Q3 batch, p j = 1,G = bipartite ΣCj when Proof. The0 setV of( vertices) V ( ) of G can∆ be split into V (G2) and onful [7], machines they also that presented are| called optimalparallel polynomial batching machines algorithms| (for consider\ the set G 0 G only. 0 thors( )= of [4]( have) also( ) considered a model of more power-, = will consider the set Vn(G) V0(G) only. fors Mthe1 problems M2 Q3s batchM3 and, pj for= 1, the G problem= bipartiteQ3 batchΣCj whenp j VLet(GLet us) H noticeV 0be(G a). thatgraph Since for with a no connected isolatedat\ least one component vertex edge. belongs TheGi wefollowing to haveCol2, wein- detailsful machines of this that model≥ arej see called e.g.parallel [2]). They batching presentedmachines|j optimal (for Let\H be a graph with at least one edge. The following in- s(1M,G) == sbisubquartic(M ) s(M )Σ andCj whenfor thes (problemM1)= 2Qs(3Mbatch2)=, 3ps (=M 1,3) . equalitywill consider is well the known set V( inG )graphV0(G theory) only. (see e.g. [11]). polynomialdetails1 of this2 algorithms¸ model3| see for e.g.the problems [2]). TheyQ3 batch presentedj , p j = optimal1j,G = equality is well known in graph\ 3 theory (see1 e.g. [11]). GAn = bisubquartic optimal algorithmC when for s the(M ) problem = 2s(M| Q) 3= 3p js(=M 1),. GAn= Let H be a graphα with(Gi) at leastn(G onei)+ edge., The following in- bicubic ΣCj and QΣ4 batchj , p j = 11,G = biquartic2 | ΣCj.3 Based ≤ 4 4 polynomialconnected| bicubic algorithmsj C| forwith the timeproblems complexityQ3 batchO(,|np2j)=was1,G pre-= e(H) optimalon [7], Algorithm they also for presentedmax the problem optimal Q3 polynomialpj =| 1, G = connected algorithms equality is well known in graph theory (see e.g. [11]). bicubic ΣCj and Q|4 batch, p j = 1,G =j biquartic2 ΣCj. Based10 because Gi is connectedα(H) andn(H subquartic.) Now.. we show how bicubicsentedC| in [6]. with Also time| in thatcomplexity paper there O(n has) was been presented| given a in7 - ≤ − ∆(H) foron [7], the problem theymax alsoQ presented3 batch, p j optimal= 1,G polynomial= bipartite algorithmsΣCj when the number of vertices in Col (G ) ise( relatedH) to n(G ) α(G ). approximationj algorithm| for the NP-hard problem| Q3 p j = α(H) n2(H)i . i i [6].s(M Also1)= ins( Mthat2) papers(M there3) and has for been the problemgiven a ¹⁰⁄Q73-approximabatch, p j =- Let us notice that for a connected component G we have− for the problem Q3 batch, p = 1,G = bipartite ΣC |when For this reason, let n(Gi)=≤ 4l +r,− where∆(H)l N, ir 0,1,2,3 . tion1,G Algorithm= connected for≥ the 3-colorable NP-hardj cubicproblemCmax Q3whenp = 1, the| G machines =j con- Let us notice that for a connected component G we have 1,G = bisubquartic|ΣCj when s(M|1)=2s(jM2)=| 3s(M3). ∈ i ∈{ } shave(M1)= speedss(Ms2()M )s>(M| s3()Mand)= fors(M the). problem This algorithmj Q3 batch has, p timej = LetConsider us notice four that cases, for asa connected follows.3 component1 Gi we have nected 3-colorable≥1 cubic C2max when3 the machinesQ p have| = speeds,G = α(Gi) n(Gi)+ , An,G optimal= bisubquartic algorithm3 C for thes( problemM2 )= s(M3 )=j 1s(M ) 1complexity O(n ). ThereΣ jj when is a O(n 1) algorithm2 |2 2 for3 optimal3 . ≤ 43 41 s(connectedM1) > s(M bicubic2) = s(MC3|). Thiswith Algorithm time complexity has timeO( ncomplexity) was pre- If r = 0, we have α(Gi) 3l. From this we obtain n(Gi) An optimal algorithmmax for the problem Q3 p = 1,G = • α(Gi) ≤ n(Gi)+ ., − scheduling3 in the|Q24 p j = 1,G = bisubcubic Cmaxj problem10 becauseα(G )G lis. Thus connectedCol ( andG ) subquartic.2l 2(n( NowG ) weα(G show)). how Osented(n ). There in [6]. is a Also O(n in)| Algorithm that paper therefor optimal has been |scheduling| given2 a in- i i 2 ≤ i 4 4 i i connectedif the machines bicubic haveCmax speedswith times(M complexity) 12s(M O)=(n 12) wass(M pre-)=7 ≥ | |≤ ≤ − the Q4 pj = 1, G =| bisubcubic Cmax1 problem if2 the machines3 10= theIf numberr = 1, we of haveverticesα(G ini)Col32(lG+i1.) is From related this to wen(G havei) nα(G(Gi)i). approximationsentedj in [6]. Also algorithm in that for paper thej NP-hard there≥ has problem been givenQ3 ap j - because• Gi is connected and≤ subquartic. Now we show− how− 12s(M4) [5]. The authors have also discussed an extension| 7 of Forα this(G ) reason,l, and let alson(Gi we)= obtain4l +r,Col where(Gl ) N,2rl 20(,n1(,G2,3) . have1,G =speedsconnected s(M1 3-colorable) 12s(M2 cubic) = 12Csmax(M3when) = 12 thes(M machines4) [5]. becausethe numberi Gi is of connected vertices in Coland subquartic.(G ) is related2 iNow to nwe(G show) α (howGi ). approximation algorithm¸ for the1.5 NP-hard problem Q3 p j = ≥ 2 i | ∈|≤ ∈{≤i i}− this algorithm, that is a O(mn ) algorithm| for the problem Considerα(Gi)) four. cases, as follows. − α Thehave authors speeds haves(M1 )also> s (discussedM2)=s(M an3) .extension This algorithm of this has algo| time- theFor number this reason, of vertices let n(G ini)= Col4l2+(Gri,) whereis relatedl Nto, rn(Gi)0 ,1 ,2(,G3i).. 1,G = connected 3-colorable cubic Cmax when the machines ¡ rithm,Qm p thatj = is1, aG O=3mnbipartite1.5 Algorithm,∆(G) form2 theCmax problemand machines Qm p = with 1, ForIf thisr =reason,2, we let have n(G )α =( 4Gil) + r,3 wherel + 1. l ∈ From N, r this∈{ 0, 1, 2, 3 we have}. complexity| O(n( ). There) is a O≤(n| |) algorithm for optimalj ConsiderIf r = 0, four we cases, have α as(i G follows.i) 3l. From this we obtain{ n(Gi) } havespeeds speedss(M )s(M1m)(>m s(M1)2s)=(M s)(,Ms(3M). This)=... algorithm= s(M ) hasj. time •• ( ) ( ) + ≤ ≤ 2 ( 2) + − Gscheduling = bipartite1 in, the∆3(GQ) 4 pm C=max1m,G and= bisubcubic2machines2 Cwithm problemspeeds Considern Gi fourα Gcases,i las follows.1, so in this case Col2 Gi 2l 1 complexity O(≥n ).∙ There− j j is a O(n ) algorithmmax for optimal αIf(rG=i)−0, wel. Thus have≥ Colα(G2()Gi) 3l.2 Froml 2( thisn|(G wei) obtainα(|≤Gi))n.(G ) ≤ s(MIn) this m( paperm 1 we)s( analyzeM |), s(M the) problem= … = s of(M the). scheduling| of in- ● If2 (rn (=G 0,i≥) weα (haveGi))| .α(Gi) 3|≤l. From≤ this we− obtain n(Gi) if the1 machines havem speeds2s(M1) 12s(mM2)=12s(M3)= • If r = 1,− we have α(Gi)i ≤3l +1. From this we have n(Gii)− schedulingcompatible¸ unit-lengthin¡ the Q4 p jobsj = with1,G respect= bisubcubic≥ to two criteriaCmax problem of opti- • αFinally,(Gi) letl. Thus us assumeCol2(G that≤∙i) r =2l3.2 Then(n(Gi we) haveα(Gi))α(. G ) −¡ 12Ins( Mthis4) [5].paper The we authors analyze| have the alsoproblem discussed of the an |scheduling extension of of α (αG(G)i≥) l, l and. Thus also| Col we2( obtainGi|≤) 2Col≤l ( 2G(n)(Gi)− 2l α(2G(ni)()G. i) if the machines have speeds s(M1) 12s(M2)=12s(M3)= • ¡If r =i 1,¸ we have αj(G ) 3lj+∙1. From∙2 i this we¡ have n(Gi ) ≤ incompatiblemality. The firstunit-length criterion jobs is the with1. schedule5 respect length to two minimization. criteria of ● If3 lr+ =2. 1,≥ Likewe have in the α(G previousi) 3l + case 1.| From we have this|≤ nwe(G havei≤) α n((Gi) − this algorithm, that is a O(mn ) algorithm≥ for the problem • α(Gi)). i ≤ − i −≥ 12Thes(M second4) [5]. one The is authorsthe total have completion also discussed time minimization. an extension The of α+(Gi) l, and also we∙ obtain Col2(Gi) (2l ) 2(n(+Gi) ¡ optimality.Qm p = 1The,G =firstbipartite criterion,∆ (isG 1the).5 schedulem C and length machines minimiza with- l α(1,Gi and≥) similarlyl, and also we we conclude obtain| Col that2(GColi)|≤ 2 2Gil ≤ 2(2nl(Gi1) − this algorithm,j that is a O(mn ) algorithmmax for the problem ¡Ifα(Gr =)).2,¸ we have α(Gi) 3lj + 1.| Fromj ∙ this∙|≤ we have¡≤ remainder| of the paper is organized≤ as| follows. In the next sec- • 2(αn(iGi) α(Gi)). ≤ tion.speeds Thes second(M1) onem(m is the1) stotal(Mm completion),s(M2)= ...time= minimization.s(Mm). n( G(iG) i))α. (Gi) l + 1, so in this case Col2(Gi) 2l + 1 Qmtionp wej = describe1,G≥= bipartite a procedure− ,∆(G for) 2-coloringm Cmax and of machinesG with maxi- with ¡If r =−2,− we have≥ α(Gi) 3l + 1.| From this|≤ we have≤ TheIn remainder| this paper of we the analyze paper is the organized problem≤ | ofas thefollows. scheduling In the ofnext in- ●•So If2( forrn (=G 2, each) weαconnected have(G )) α. (Gi) component 3l≤ + 1. FromG , Col this( weG ) havecontains n(Gi) no speeds s(M1) m(m 1)s(Mm),s(M2)=...= s(Mm). n(G ) i α(G ) i l + 1,∙ so in this casei Col2 (Gi ) 2l + 1 ¡ sectionmum coloringwe describe≥ width. a procedure− In Section for 3 2-coloring we give a 2-approximationof G with max- α(i G ) − l i+ 1, so in this case Col 2(G )i 2l + 1 compatibleIn this paper unit-length we analyze jobs the with problem respect of to the two scheduling criteria of of opti- in- moreFinally,( ( than−i) let2(n us(Gi≥ assume))) α(G thati)) vertices.r = 3. ThenFrom| 2 wethesei have observations|≤α(Gi) ≤ algorithm for the problem Qm p j = 1,G = bisubquartic Cmax. • ¡2 n Gi ¸α Gi −. j j ∙ ≤∙ imummality. coloring The first width. criterion In Section is the schedule3 we give length a 2-approximation minimization. 2(n(G−i) α(Gi)). compatible unit-length jobs with| respect to two criteria of| opti- it∙3Finally, followsl + 2. Like that let¡ usCol in assume the2 previous2( thatn(G)r case=α3.( weG Then)) have. wen(G havei) α(Gi) AlgorithmThis algorithm for the isproblem better thanQm Algorithmp = 1, G = 4 bisubquartic in [5] in theC sense. ●• Finally, let us |assume|≤ that r = 3.− Then we have α(G−) 3l i+ 2.≥≤ Themality. second The one first is criterion the total is completion thej schedule time length minimization. minimization.max The l +l +1, and similarly we conclude that Col2n(G(Gi)) i 2l(+G 1) that it has a smaller approximationj ratio, it runs in O(nj) time 3 2. Like in the previous case we( have|) α( )i|≤∙α+ i ≤ Thisremainder Algorithm of the is paperbetter is than organized Algorithm as follows. 4 in [5] In in the the next sense sec- 3.Like2( 2-approximationn( Gini )the αprevious(Gi)). case algorithmwe have n Gi for theGi − problem l 1, and≥ Therather second than O one(n1 is.5) thetime total and completion requires no time assumptions minimization. as to The the l + 1, and− similarly we conclude that Col¡ 2(Gi)¸ 2l + 1 thattion it wehas describe a smaller a approximation procedure for 2-coloringratio, it runs of inG withO(n) maxi-time similarly we conclude that Col2(Gi) | 2l + 1 |≤ 2(n(Gi) ≤ remaindermachine speeds. of the1.5 paper In Section is organized 4 we give as follows. a 4-approximation In the next sec- al- So2( forQmn(G eachi)p j =α connected(G1,i))G. = componentbisubquarticj Gi,j ∙CColmax2(Gi) ∙contains no¡ rathermum than coloring O(n width.) time In and Section requires 3 we no give assumptions a 2-approximation as to the α(G|i))−. | tion we describe a procedure for 2-coloring of G with maxi- more¡ than 2(n(Gi) α(Gi)) vertices. From these observations machinegorithm speeds. for the In problem Section 4Qm wep givej = a1 ,4-approximationG = bisubquartic AlgoΣC-j, SoSoObservation for for each each connected connected 1. For a setcomponent K M andGi, aCol set2( NGi) containsJ and the no algorithmmum coloring for the width. problem In SectionQm|p j 3= we1,G give= bisubquartic a 2-approximationC| max. − ⊆ i 2 i⊆ where m 2,3,4 . | | itideal follows machine that MColid 2for K,2( Cnid(G(N) ) isα a(G lower)). bound on the length rithmThis for algorithm the problem is better Qm thanpj = 1, Algorithm G = bisubquartic 4 in [5] inΣC thej, where sense moremore than than 2 2((n(|GGii)) |≤ α(Gii)))) vertices.vertices.− From From these observations algorithm∈{ for the problem} j Qm p j = 1,G = bisubquarticj Cmax. ¡− m 2, 3, 4 . | | ititof follows follows any subschedule that that Col2 for 2 N2(n on(G K.) αα((G)))). thatThis{ it algorithm has a} smaller is better approximation than Algorithm ratio, 4 it in runs [5] in inO the(n) sensetime | 2|≤ − □ 2.2 2-coloring1.5 with maximal coloring width 3. 2-approximationj j ∙ algorithm¡ for the problem ratherthat it than has aO smaller(n ) time approximation and requires ratio, no assumptions it runs in O as(n) totime the Lemma 2. Let K M and let N J be a set of compatible 3.Qm 2-approximationp j = 1,⊆G = bisubquartic algorithm⊆ C formax the problem machineratherWe present than speeds.O a( simplen1.5) Intime Section algorithm and requires 4 we that give constructs no a assumptions 4-approximation a 2-coloring as to the al- of unit-time| jobs. Let Mid be the ideal machine| for K and Sopt be 32gorithm for the problem Qm p = 1,G = bisubquartic ΣC , Observationa subscheduleQm p = 1. for1For,G N a=on setbisubquartic K Kwith theMBull. minimaland Pol. aC set Ac.: length. N Tech.J Then 67(1)and 2019 the machinea bipartite speeds. graph with In Section maximal 4| we coloringj give a width. 4-approximation| al-j | j ⊆ | max ⊆ where m 2,3,4 . ideal machine Mid for K, Cid(N) is a lower bound on the length gorithm for the problem Qm p j = 1,G = bisubquartic ΣCj, Observation 1. Formax aC setSopt K(K) M andK a set1 N J and the Lemma∈{ 1. Let G} be a bisubquartic| graph. For the set| Col2 of any subschedule for N on K.⊆ 1 + | |− . ⊆ where m 2,3,4 . ideal machine Mid forC K,(N C)id(N)≤is a lowerN bound on the length returned∈{ by Algorithm} 1 we have Col2 2(n(G) α(G)). id 2. 2-coloring with maximal| coloring|≤ width− Lemmaof any subschedule 2. Let K forM Nand on let K. N J |be| a set of compatible ⊆ ⊆ unit-time jobs. Let M be the ideal machine for K and Sopt be We2.2 2-coloring present a simple with algorithm maximal that coloring constructs widtha 2-coloring of Lemma 2. Let K Mid and let N Bull.J Pol.be aAc.: set Tech. of compatible XX(Y) 2016 a subschedule for⊆ N on K with the⊆ minimal length. Then aWe bipartite present graph a simple with algorithm maximal coloring that constructs width. a 2-coloring of unit-time jobs. Let Mid be the ideal machine for K and Sopt be a bipartite graph with maximal coloring width. a subschedule formax N onCS Kopt with(K) the minimalK 1 length. Then Lemma 1. Let G be a bisubquartic graph. For the set Col2 1 + | |− . C (N) ≤ N returned by Algorithm 1 we have Col2 2(n(G) α(G)). maxCidSopt (K) K 1 Lemma 1. Let G be a bisubquartic| graph.|≤ For the− set Col2 1 + | ||−| . C (N) ≤ N returned by Algorithm 1 we have Col2 2(n(G) α(G)). id | | 2 | |≤ − Bull. Pol. Ac.: Tech. XX(Y) 2016 2 Bull. Pol. Ac.: Tech. XX(Y) 2016 Tytus Pikies, Marek Kubale
N J scheduled on the ideal machine M , hence C (N)= Algorithm 1 Non-Equitable Coloring ⊆ id id N /∑M K s(M). By Σid(N) we denote the total completion Input: A bipartite graph G. | | ∈ time of jobs from a set N J scheduled on the ideal machine Output: A two-coloring with maximal coloring width ⊆ Mid, hence Σid(N)=0.5 N ( N + 1)/∑M K s(M). 1. Col1 = Col2 = /0 Better polynomial algorithms for scheduling unit-length jobs | | | | ∈ There are several papers addressing the problem of schedul- 2. Let G1,...,Gc be connected components of G. Better polynomial algorithms for scheduling unit-length jobs ing with incompatible job constraints on identical machines. 3. for i = 1 to c do Proof. Without loss of generality we may assume that Sopt was Therefore we assume V0(G)=/0for the problem under con- However, to the best of our knowledge, there are few results 4. Split V(Gi) into color classes Col1(Gi) and Col2(Gi), Proof.createdWithout greedily, loss i.e. of generality by the application we mayassume of the algorithm that Sopt was given sideration.Therefore we assume V0(G)=/0for the problem under con- involving uniform machines. The problem is hard even for where Col1(Gi) Col2(Gi) . createdin [3]. greedily, The completion i.e. by the time application on Mid isof equal the to algorithm given sideration. | |≥| | in [3]. The completion time on M is equal to Corollary 1. Let S be a subschedule created by a greedy as- identical machines. The authors of [1] have proved that even if 5. Col1 = Col1 Col1(Gi). id Let S be a subschedule created by a greedy as- ∪ Cid(N)=maxCSopt (K) t, (1) Corollarysignment 1. of N J to K M . If a number k is such that there are only three identical machines and the incompatibili- 6. Col2 = Col2 Col2(Gi). − ⊆ ⊆ ∪ Cid(N)=maxCSopt (K) t, (1) signment of N J to K M . If a number k is such that ties between jobs can be modeled by a bipartite graph then the 7. end for for some t 0. Let Mi K be any− machine such that ∑M K s⊆(M) N⊆ K 1 ≥ ∈ k ∈ > | | and N | |− , (2) t M K s(M) N ∑ K s(M1) N problem P3 p j = 1,G = bipartite Cmax remains NP-hard. 8. return (Col1,Col2) forCS someopt (Mi)=max0.C LetSopt (Ki). Letben(M any) for machineM K suchmeans that the ∑M Kstotal J | |≥ M K | | ≥ ∈ ∈ k ∈ > | | and N k | s∈ |− |J,| (2) C (M )=maxC (K). Let n(M) for M K means the | | ∑M K stotal(M) −N There is a review of known algorithms for unit-length Smaximalopt i numberSopt of jobs that M can execute in time equal to stotal J | |≥k ∈ | || | ∈ or | | stotal − J scheduling with incompatible jobs presented in [4]. The au- maximalCid(N). number Then of jobs that M can execute in time equal to | | Proof. The set of vertices of G can be split into V0(G) and or ∑M K s(M) N thors of [4] have also considered a model of more power- Cid(N). Then K = 1 and k ∈ = | | (3) V(G) V0(G). Since no isolated vertex belongs to Col2, we n(Mj) nS (Mj)+1 s(Mj)t | | ∑M Kss(M) NJ ful machines that are called parallel batching machines (for \ ≤ opt − K = 1 and k ∈ total = | | | | (3) will consider the set V(G) V0(G) only. n(Mj) nS (Mj)+1 s(Mj)t | | s J \ ≤ opt − then total details of this model see e.g. [2]). They presented optimal Let H be a graph with at least one edge. The following in- for any machine Mj=i K. The above bound results from the | | for any machine M ∈K. The above bound results from the then maxC (K) kC (J ), polynomial algorithms for the problems Q3 batch, p j = 1,G = equality is well known in graph theory (see e.g. [11]). following observation.j=i Each Mj=i K can complete at most S id | ∈ ∈ maxC (K) ≤kC (J ), bicubic ΣCj and Q4 batch, p j = 1,G = biquartic ΣCj. Based followingnSopt (Mj observation.)+1 jobs in time Each equalMj=i to maxK canCSopt complete(K). Otherwise, at most it S id | | | e(H) ∈ where Mid is the ideal machine≤ for M . on [7], they also presented optimal polynomial algorithms nSwouldopt (Mj)+ provide1 jobs a fasterin time completion equal to max of theCSopt last(K job). Otherwise, on Mi than itMi α(H) n(H) . where Mid is the ideal machine for M . for the problem Q3 batch, p = 1,G = bipartite ΣC when ≤ − ∆(H) woulddoes. provide But this a isfaster not possiblecompletion due of to the the last algorithm job on M fori than scheduleMi Proof. Let us assume that (2) occurs. Let Mid be the ideal | j | j s(M )=s(M ) s(M ) and for the problem Q3 batch, p = Let us notice that for a connected component G we have does.construction. But this isM noti can possible complete duen to(M thei)= algorithmnS (Mi) fors schedule(Mi)t jobs Proof.machineLet for usK assume. By Lemma that (2) 2, occurs.we have Let Mid be the ideal 1 2 ≥ 3 | j i opt − 1,G = bisubquartic ΣC when s(M )=2s(M )=3s(M ). construction.in time equalM toi canCid complete(N). So wen(M havei)=nSopt (Mi) s(Mi)t jobs machine for K. By Lemma 2, we have | j 1 2 3 3 1 − maxCS(K) K 1 An optimal algorithm for the problem Q3 p = 1,G = α(Gi) n(Gi)+ , in time equal to Cid(N). So we have 1 + | |− . j ≤ 4 4 ( )= , maxCCS((KN)) ≤ K N1 | 2 n M N id + . connected bicubic Cmax with time complexity O(n ) was pre- ∑ | | 1 | |−| | | M nK(M)= N , Cid (N) ≤ N sented in [6]. Also in that paper there has been given a 10 - because Gi is connected and subquartic. Now we show how ∑ ∈ | | Applying the equality | | 7 (M K)+ ( ) ( ) = , the number of vertices in Col2(Gi) is related to n(Gi) α(Gi). ∑ n M∈ nSopt Mi s Mi t N Applying the equality approximation algorithm for the NP-hard problem Q3 p j = − | | C (N) N s − M K Mni (M)+nS (Mi) s(Mi)t = N , id total | For this reason, let n(Gi)=4l +r, where l N, r 0,1,2,3 . ∑∈ \{ } opt = | | 1,G = connected 3-colorable cubic Cmax when the machines − | | C (N) N s ∈ ∈{ } M K Mi idC (J ) J total s(M) | ∈ \{ } id = | | ∑M K have speeds s(M ) > s(M )=s(M ). This algorithm has time Consider four cases, as follows. ∑ (nSopt (M)+1 s(M)t)+nSopt (Mi) s(Mi)t N . | | ∈ 1 2 3 − − ≥| | Cid(J ) J ∑M K s(M) 3 2 M∑K M(inSopt (M)+1 s(M)t)+nSopt (Mi) s(Mi)t N . and substituting the bound| on |N into∈ the above inequality, we complexity O(n ). There is a O(n ) algorithm for optimal If r = 0, we have α(Gi) 3l. From this we obtain n(Gi) ∈ \{ } − − ≥| | | | • ≤ − M K Mi andimmediately substituting obtain the bound the thesis on N ofinto Corollary the above 1. inequality, we scheduling in the Q4 p j = 1,G = bisubcubic Cmax problem α(Gi) l. Thus Col2(Gi) 2l 2(n(Gi) α(Gi)). ∈ \{ } | | | | ≥ | |≤ ≤ − immediatelyNow let us obtain assume thethat thesis (3) of occurs, Corollary then 1. we may simply com- if the machines have speeds s(M1) 12s(M2)=12s(M3)= If r = 1, we have α(Gi) 3l +1. From this we have n(Gi) Applying the equality ≥ • ≤ − pareNow the let maxus assumeCS(K) thatand (3)Cid occurs,(J ) and then the we thesis may followssimply com- imme- 12s(M4) [5]. The authors have also discussed an extension of α(Gi) l, and also we obtain Col2(Gi) 2l 2(n(Gi) Applying the equality 1.5 ≥ | |≤ ≤ − pare the maxCS(K) and Cid(J ) and the thesis follows imme- this algorithm, that is a O(mn ) algorithm for the problem nSopt (M)= N , diately. α(Gi)). ∑ | | M nKS (M)= N , diately.In the rest of the paper we use this corollary with k = 2. Qm p j = 1,G = bipartite,∆(G) m Cmax and machines with If r = 2, we have α(Gi) 3l + 1. From this we have ∑ ∈ opt | ≤ | • ≤ M K | | In the rest of the paper we use this corollary with k = 2. speeds s(M1) m(m 1)s(Mm),s(M2)=...= s(Mm). n(G ) α(G ) l + 1, so in this case Col (G ) 2l + 1 we obtain ∈ ≥ − i − i ≥ | 2 i |≤ ≤ In this paper we analyze the problem of the scheduling of in- 2(n(Gi) α(Gi)). we obtain Algorithm 2 A 2-approximation algorithm for the problem − ∑ (1 s(M)t) s(Mi)t 0, A 2-approximation algorithm for the problem compatible unit-length jobs with respect to two criteria of opti- Finally, let us assume that r = 3. Then we have α(Gi) − − ≥ AlgorithmQm p j = 1 2,G = bisubquartic Cmax M K M(i1 s(M)t) s(Mi)t 0, | | • ≤ ∑∈ \{ } Qm p j = 1,G = bisubquartic Cmax mality. The first criterion is the schedule length minimization. 3l + 2. Like in the previous case we have n(Gi) α(Gi) M K M − − ≥ Input: A bisubquartic graph G. − ≥ ∈ \{ i} K 1 t s(M), | | The second one is the total completion time minimization. The l + 1, and similarly we conclude that Col2(Gi) 2l + 1 | |− ≥ ∑ Input:Output:A bisubquarticA schedule graph G. | |≤ ≤ K 1 t M sK(M), remainder of the paper is organized as follows. In the next sec- 2(n(Gi) α(Gi)). | |− ≥ ∑ ∈ Output:1. (ColA, scheduleCol )=Non-Equitable Coloring(G). so M K 1 2 tion we describe a procedure for 2-coloring of G with maxi- Better− polynomial algorithms for scheduling unit-length jobs with bipartite incompatibility graphs∈ on uniform machines 1. (Col ,Col )=Non-Equitable Coloring(G). ( ) 2. case1 2 So for each connected component Gi, Col2 Gi contains no so K 1 2 mum coloring width. In Section 3 we give a 2-approximation 2. 3.case: s(M1) [ stotal,stotal) : more than 2(n(Gi) α(Gi)) vertices. From these observations t | |− . ∈2 5 algorithm for the problem Qm p = 1,G = bisubquartic C . − ≤ ∑K 1s(M) 3. : s(M ) [ s ,s ) : j max it follows that Col 2(n(G) α(G)). t | M|−K . 4. M11 Col5 total1, Mtotal2,...,Mm Col2. | | 2 Substituting the above≤ inequality∑ ∈s( Mto) (1) we get ∈← 1 2 ← This algorithm is better than Algorithm 4 in [5] in the sense 3. 2-approximation| |≤ Algorithm− for the problem Substituting the above inequalityM K to (1) we get 4. 5. :Ms1(M1)Col[1,sMtotal2,...,, stotalMm) : Col2. ∈ ← ∈1 4 2 5 ← that it has a smaller approximation ratio, it runs in O(n) time Qm p = 1, G = bisubquartic C 5. 6.: s(MM11) [Colstotal2, ,M2s,...,total)M:m Col1. 3. 2-approximationj algorithm formax the problem Substituting the above inequality to (1) we get ∈ 4 5 rather than O(n1.5) time and requires no assumptions as to the j j K 1 6. M ←Col 1, M ,...,1 M ←Col . maxCS (K) Cid(N)+ | |− .. 7. : s1(M1) [2m stotal2 , 4 stotalm ) : 1 Qm p j = 1,G = bisubquartic Cmax opt ≤ K 1s(M) ← ∈1 1 ← machine speeds. In Section 4 we give a 4-approximation al- Observation 1. For a set K M and a set N J and the ideal maxC (K) C (N)+ ∑| M|−K . 7. 8.: s(MLet1) k be[ thestotal smallest, stotal) integer: such that K = M1,...,M | µ | µ Sopt id ∈ ∈ m 4 { k} Qm p = ,G = bisubquartic C machine Mid for ForK, C aid set(N K) is a lowerand bound a set Non the lengthand the of ≤ ∑M K s(M) 8. Let k be the smallest integer9 such that K = M ,...,M gorithm for the problem j 1 Σ j, Observation 1. M J It follows immediately that ∈ and ∑M K s(M) 20 stotal. 1 k | | any subschedule for N on K.⊆ ⊆ It follows immediately that ∈ ≥9 { } where m 2,3,4 . ideal machine Mid for K, Cid(N) is a lower bound on the length It follows immediately that 9. andif n∑
Proof. Without loss of generality we may assume that Sopt was Therefore we assume V0(G)=/0for the problem under con- created greedily, i.e. by the application of the algorithm given sideration. in [3]. The completion time on M is equal to id Corollary 1. Let S be a subschedule created by a greedy as- C (N)=maxC (K) t, (1) signment of N J to K M . If a number k is such that id Sopt − ⊆ ⊆ for some t 0. Let Mi K be any machine such that ∑M K s(M) N K 1 ≥ ∈ k ∈ > | | and N | |− , (2) C (M )=maxC (K). Let n(M) for M K means the ∑M K s(M) N Sopt i Sopt stotal J | |≥k ∈ | | ∈ | | stotal J maximal number of jobs that M can execute in time equal to − | | or Cid(N). Then ∑M K s(M) N K = 1 and k ∈ = | | (3) n(Mj) nS (Mj)+1 s(Mj)t | | s J ≤ opt − total | | for any machine Mj=i K. The above bound results from the then ∈ following observation. Each Mj=i K can complete at most maxCS(K) kCid(J ), ∈ ≤ nSopt (Mj)+1 jobs in time equal to maxCSopt (K). Otherwise, it where Mid is the ideal machine for M . would provide a faster completion of the last job on Mi than Mi does. But this is not possible due to the algorithm for schedule Proof. Let us assume that (2) occurs. Let Mid be the ideal construction. M can complete n(M )=n (M ) s(M )t jobs machine for K. By Lemma 2, we have i i Sopt i − i in time equal to Cid(N). So we have maxC (K) K 1 S 1 + | |− . n(M)= N , C (N) ≤ N ∑ id M K | | | | ∈ Applying the equality ∑ n(M)+nSopt (Mi) s(Mi)t = N , M K M − | | Cid (N) N stotal ∈ \{ i} = | | (n (M)+1 s(M)t)+n (M ) s(M )t N . Cid(J ) J ∑M K s(M) ∑ Sopt − Sopt i − i ≥| | | | ∈ M K Mi and substituting the bound on N into the above inequality, we ∈ \{ } | | immediately obtain the thesis of Corollary 1. Now let us assume that (3) occurs, then we may simply com- Applying the equality pare the maxCS(K) and Cid(J ) and the thesis follows imme- diately. T. Pikies and M. Kubale ∑ nSopt (M)= N , M K | | In the rest of the paper we use this corollary with k = 2. ∈ we obtain Algorithm 2 A 2-approximation algorithm for the problem For the last case we may bound the ratio of maxCS(K) to Cid(J) ∑ (1 s(M)t) s(Mi)t 0, and that of maxC (M K) to C (J), where M is the ideal − − ≥ Qm p j = 1,G = bisubquartic Cmax S n id id M K Mi | | machine for M. By the way k is established, we have ¹⁴⁄20 s > ∈ \{ } Input: A bisubquartic graph G. total K 1 t s(M), > ∑ s(M ) ⁹⁄20 s and ¹¹⁄20 s ∑ s(M ) > ∑ Output: A schedule M K total total M M K | |− ≥ M K 2 ¸ ¸ 2 n > ⁶⁄20 stotal. These inequalities are obtained using the condition ∈ 1. (Col1,Col2)=Non-Equitable Coloring(G). so that ¹⁄4 s > max s(M ). The value ⁹⁄20 s that is present 2. case total total K 1 2 in the inequality determining k is a conveniently chosen t | |− . 3. : s(M1) [ 5 stotal,stotal) : ∈ constant that asserts that 2(∑ M K s(M )) > ⁴⁄5 stotal and that ≤ ∑M K s(M) 4. M1 Col1, M2,...,Mm Col2. ∈ 2 ← 1 2 ← 2(∑M M K s(M)) > ¹⁄2 stotal. By Corollary 1, if n 10(k 1), Substituting the above inequality to (1) we get 5. : s(M1) [ 4 stotal, 5 stotal) : 2 n ¸ ¡ ∈ then the ratio of maxCS(K) to Cid(J) is at most 2. Similarly, if 6. M1 Col2, M2,...,Mm Col1. K 1 ← 1 1 ← n 10(m k 1), then the ratio of maxCS(M K) to Cid(J) maxC (K) C (N)+ | |− . 7. : s(M1) [ stotal, stotal) : ¸ ¡ ¡ Sopt id ∈ m 4 ( ) n ≤ ∑M K s(M) 8. is at most 2. If n 10 m 2 , then all the ratios are less than ∈ Let k be the smallest integer such that K = M1,...,Mk ¸ ¡ 9 { } or equal to 2. □ It follows immediately that and ∑M K s(M) 20 stotal. ∈ ≥ 9. The approximation coefficient 2 is the best possible value K 1 if n < 10(m 2) then Cid(N)+ | |− − in the sense that for jobs with the conflict graph in the shape maxCSopt (K) ∑M K s(M) K 1 10. Find an optimal schedule by a brute-force algorithm. ∈ = 1 + | |− . of three double-stars S , presented in Fig. 1a, the schedule C (N) ≤ C (N) N 11. else 3,3 id id | | constructed by the Algorithm has the length exactly twice the 12. M1,...Mk Col1, Mk+1,...,Mm Col2. ← ← optimal (cf. Fig. 1b, 1c). 13. end if Observation 2. Let G be an incompatibility graph and let 14. end case S be a subschedule for the unit-time jobs corresponding to (a) V(G) V0(G) on M . Let S be k 1 times longer than a sub- − ≥ TheoremTheorem 1. 1. AlgorithmAlgorithm 2 isis 2-approximate2-approximate for the problem problem schedule for V(G) V0(G) on M with the minimal length and − QmQm p j == 1,1 ,GG = bisubquartic Cmax. let a schedule S be an extension of S created by the greedy as- j| j j| max signment of the jobs corresponding to V0(G). Then the length Proof. Let S be a schedule produced by the algorithm.Tytus Pikies, Let Marek Kubale of S is at most k times greater than the minimal schedule length Proof.S be Let a S schedule be a schedule with produced the minimal by the length. algorithm. IfTytuss (LetM Pikies, )Sopt Marek Kubale opt 1 ∈ for G. be[ 2 sa schedule,s )withthen the we minimal may estimate length. IfC s((MM1)) using [²⁄Tytus5Tytuss Corollarytotal, Pikies, Pikies,stotal) Marek Marek Kubale Kubale 1.5 total By Lemmatotal 1, maxCS( M2,...,MSm )1 22maxCSopt (M ) then1. Bywe Lemmamay estimate 1, max CSC(MS(1){M using2,..., CorollaryMm }) ≤ 2max1. ByTytus CLemmaS Pikies,(M 1,) Marek Kubale since at most twice the minimal{ number} of≤ jobs is scheduledopt 1.max1.since By ByCS at( Lemma{ Lemma mostM2, …, twice 1, 1,Mm max max} the) CC minimal 2maxSS(( MM2C2,...,,...,S number(MMMm)m since)) of jobs 2maxat2max most isC scheduledC StwiceSoptopt((MM the)) Bull. Pol. Ac.: Tech. XX(Y) 2016 on M2,...,Mm. ∙ {{ opt }} ≤≤ 3 sinceminimal1.sinceon M By at at,..., Lemmamost mostnumberM twice twice. 1 1,of maxthejobs the2 minimal CminimalisS (scheduledM2,..., number numberM onm M of) of2 jobs, …, jobs2max isM ism scheduled scheduledC. S (M ) If2s(M1) m [ stotal, stotal) then we may estimateoptCS(M1) ononMMIf ,...,s,...,(M M)M ∈ ..[1¼4 s , 2²⁄5 5 s { ) then we }may≤ estimate C (M ) sinceIf 22s at(M most11) mm twice[ 4 stotaltotal the, 5 s minimaltotaltotal) then1 number we may of jobs estimate is scheduledCSS(M11) using Corollary∈2 11 1, because22 2 n Col2 . If the number of usingonIfIfMs2s (,...,(CorollaryMM11))Mm[[. s stotal1,total because,, sstotaltotal) )½1thenthenn ≥| we we Col may may2|. If estimate estimate the numberCCSS((MM 11of)) using Corollary44 1, because55 2 n Col2 . If the number2 of jobs scheduled∈∈ 1 on M22,...,M11m in≥|¸Soptj is| greaterj than 5 n, then usingjobsusingIf scheduleds Corollary( CorollaryM1) [ ons 1, 1,total M because because2,, …, stotalM)mn thennin SoptCol weCol is2 2maygreater.. If If estimate the the than number number ²⁄2C5 nS,( Mthen of of1) jobsmax scheduledC ( M ,...,4 onMM2,...,5) M2maxm22 inCSopt (isM greater), because than we5 n, sched- then maxC (S M ∈, …, 2 M m) 2max1 C≥|≥|S(optM )|,| because we 2schedule2 jobsusingjobs scheduled scheduledS Corollary{ { 2 on on 1,MMm because},...,},...,≤MM inninSSSopt Colisis2 greater greater. If the than than numbernn,, then then of maxCS(MM,...,2,...,MMm22)∙ 2maxmm2 CSoptopt(M ), because we55 sched- ule on 2 m at most twice≥| the number| of jobs2 assigned maxonmax MCC2, …, (({MMM,...,,...,m at MmostM }) )twice≤4 2max2max the numberCC ((MM of)) ,jobs, because because assigned we we sched-to sched- them jobsuleto themon scheduledSSM2 in,...,22S M on,m sincemMmat2 most,...,n M twicemαin(GS theS)optoptopt numberisCol greater[5]. of thanjobs If the assigned5 n number, then {{ opt }}α 4≤≤5 1 uleinmaxule S on onoptC,M M(sinceM,...,,...,,..., ⁴⁄MM5 nmmM atat most most)(G)2max ≥ twice twice ColC the the1 ≥|[5]. number( number If), the| because of of number jobs jobs we assigned assigned of sched- jobs toof them jobsS inscheduled22 S2opt , since¸ onm M5 n,...,¸αjM(G)Sinoptj SColM is1 less[5]. than If the or number equal to scheduled{ on M , …, }M44≤2 in≥ S ism less≥| optthan |or equal to n, then touletoof2 them themjobs on M scheduled in in2,...,SSoptopt,M,2 since sincem onatM mostmnn,..., twiceααoptM((GG))in theSCol numberCol3is11 lessn[5].[5]. of than If If jobs the the or assigned²⁄ number equal number5 to n, then maxCS (M552) CS m(Mn 1)opt . Let us bound the max25 C (M ) Copt (M4 )≥≥ ³⁄opt2 ≥|≥|. Let32 uss|ntotal| bound the ratio of (b) oftoofn jobs themjobs, thenS scheduledopt scheduled in maxSoptCS, since on on(SMoptMM)22,...,n,...,1≥CSαMM(m(mGMstotalin)in1)SSoptopt≥Colisis1 less less[5].. Let than than If us the or or bound equal equal number the to to 5 C¸opt( M ,...,5 ¸Mopt ) 2 sCtotal ( ) 2max2ratioC of({M max, …, S M 2}) ≥to ≥maxm C to≥|( max≥M33) ninnS|opt thisM case.in thisLet case.M 5ofratio5nn, jobs, then then ofS scheduled max max2 CCSSopt(opt{(M on(MMm,...,M))2,...,CMCSSoptoptM}()(mMMtoSin1opt1)) maxSopt22Csiss less.(.M Let Let than) us usin or bound bound this equal case. the the toid0 Let Mid be theS ideal2 machine≥≥ m for ≥M≥2,...,totalStotaloptMm . By Lemma 2, be2 the ideal machine{ for {M2}, …, Mm}3. Byn Lemma 2, we have ratioratioLet5 n, thenM of of max max maxbe theCCCSSS( ideal(optMM(M22,...,,..., machine) MMCmSmopt) for)(toMto1 max{M) max,...,C2CsSSoptoptM((.MM Let}.)) Byin usin Lemma thisbound this case. case. the 2, we haveid {{ ≥ }} { ≥2 total m} LetratioLetweM haveM ofidid be maxbe the theCS ideal ideal( M2 machine,..., machineMm for for) toMM max22,...,,...,CSoptMMm(mM.. By) Byin Lemma Lemma this case. 2, 2, max{ CS( M2,...,} M{m{ ) m}} 2 weLetwe have haveM be the ideal machine for M ,...,+M . By. Lemma 2, id maxCS( {M2,...,Mm }) 2 1 mm −2 . C{id (Col1) {} ≤1 + Col−} 1. we have maxmaxCCSSC(( MM(2Col2,...,,...,)MMmm )) ≤ mmCol| 22 | We also have {id{ 1 }} 11++ | −−1|.. maxCCSC(ididM((ColCol2,...,11)) Mm ) ≤≤ ColmCol112 We also have C{ (Col ) } 1Col+|| − ||. C id(Col )1 10≤ Col1 WeWe also also have have id ( 1 ) | |. 1 Cid Col1 10 Col1| | (c) maxCSopt (M ) ≤ 9| n |.. We also have CCidid ((ColCol11)) 1010 ColCol11 maxC Sopt (M ) ≤ 9 || n ||.. By combining bothmaxmaxC inequalitiesCC(Col((M1M) )) ≤≤ we1099 obtain,Colnn 1 By combining both inequalitiesidSSoptopt we obtain,| |. By combining both inequalities( ) we obtain, ByBy combining combiningmaxC bothS both( maxM inequalities inequalities2,...,CSoptMMm ) we we≤ obtain,10 obtain,9 Coln 1 m 2 maxCS( {M2,...,Mm }) 10 (Col| 1 | +m −2 ). By combiningmax both{ CSopt inequalities(M ) } we≤ obtain,9(| n | + −n ). maxmaxCCSS(( MM22,...,,...,MMmm )) 1010 ColCol11 mm 22 max{{CSopt (M ) }} ≤ 9 ((|| n ||++ −−n ))... Withoutmax lossmaxmaxCS of(CCM generalitySS2,...,((MM)M) m we) ≤ may≤ 1099 assumeColnn 1 thatmnnn 2m. By this Without loss of{ generalityoptopt we} may4 assume(| that| + n −≥m).. By this assumptionmax andC by the(M fact) that≤5 n9 α(nG) Col≥n 1 we obtain WithoutWithoutassumption loss loss and of of generality generality bySopt the fact we we that may may4 n assume assume≥³α(G) that that≥|Colnn mm|we.´. By By obtain this this 5 ≥≥1 Without loss of generalitymaxCS( weM2 may,...,44 ≥assumeMm(())) that≥| n | m. By this assumptionWithoutassumption loss and and of bygenerality by the the fact fact{ wethat that may55nn assumeαα}GG that2.ColColn 1¸1 mwewe. By obtain obtain this assumption and bymax theC factS( Mthat2,..., ⁴⁄45 n≥M ≥m α)(G)≥| ≥| Col≥|1| we obtain assumption and by themax fact{ C thatSopt (Mn ¸) α}(G)≤2¸. Colj 1 jwe obtain Fig. 1. The worst-case example for Algorithm 2: a) a graph 3S3,3 maxmaxCmaxCSS(( CMM22,...,,...,(M5 MM≥)mm )) ≤ ≥| | {{ Sopt }} 22.. and machines with speeds s(M1) = 9, s(M2) = s(M3) = s(M4) = 1; For the last case we( may,..., bound) the ratio of maxCS(K) maxmaxmaxCS CCMSSoptopt2 ((MM)M) m ≤≤ b) Gantt chart for the suboptimal schedule; c) Gantt chart for an For the( last) case we{ may bound( } the) ratio2.. of( max) CS(K) to Cid J and thatmax ofC maxS (CMS M) K≤ to Cid J , where optimal schedule toForForC ( the theJ ) last lastand case case that we we of may maymaxoptC bound bound(M the the\K) ratio ratioto C of of(J max max),CC whereSS((KK)) Mididis the ideal machine forSM .\ By the wayid k is estab- totoMidCForCididis((J theJ the)) last idealandand case that that14 machine we of of max maymax forCC boundSSM((MM. By theKK)) theto ratio9to CC wayidid of((JJk max))is,11, whereC where estab-S(K) lished, we have 20 stotal > ∑M K s(M\\) 20 stotal and 20 stotal 14 ∈ 9 11 Fig. 1. The worst-case example for Algorithm 2: (a) a graph 3S MtoMlished,ididCisidis( theJwe the) have ideal idealand thatmachine machinestotal6 of> max∑ for forM CKMSM(sM(.M.) By ByK≥) the thetostotal way wayCidand(Jkk is)is,s estab-total where estab-≥ 3,3 ∑M M K s(M)141420> stotal. These inequalities\ 9209 are obtained111120 us- Fig. 1. The worst-case example for AlgorithmBull. Pol. 2:Ac.: (a) Tech. a graph 67(1) 3 S 2019 lished,34lished, we we have have ss620 >> ∈ ss((MM)) ≥ ss andand ss ≥ and machines with speeds s(M1)=9,s(M2)=s(M3)=s(M4)=3,31; M∑id ∈is the\ s(M ideal) >2020 machinetotaltotalstotal1 .∑∑ TheseM forM KKM inequalities. By2020 thetotaltotal way are obtainedk2020istotaltotal estab-9 us- ingM M theK condition1420 that s ∈∈> maxs≥≥(M9 ). The value11 s≥≥ Fig.Fig.and(b) 1. machines1. Gantt The The chart worst-case worst-case with for speeds the example example suboptimals(M1)= for for Algorithm9 schedule;Algorithm,s(M2)= (c)2:s 2:(M (a) Gantt(a)3)= a a graph graphs chart(M4)= 3 3forSS33,1;3, an3 ∈ \ 66 1>4 total ( ) 920 total ∑lished,∑MM MM weKKss(( haveMM))>>202020stotalsstotaltotal..∑ These TheseM K s inequalities inequalitiesM 20 stotal are areand obtained obtained20 stotal us- us- ingthat∈∈ the is\\ present condition in thethat inequality4 stotal >∈ max determinings(≥M ). Thek isa value conveniently20 stotal≥ andFig.and(b)optimal machinesGantt machines 1. The schedule. chart worst-case with with for speeds speedsthe suboptimalexampless((MM11)=)= for schedule;99 Algorithm,,ss((MM22)=)= (c)ss 2:((MM Gantt (a)33)=)= a charts graphs((MM44)=)= for 3S31; an1;,3 s(M) > 6 s 11 . These inequalities are obtained99 us- ing∑ingthatM the the isM present condition conditionK in the that that20 inequalitytotal44sstotaltotal>> determiningmaxmaxss((MM)).. Thek Theis a value value conveniently4 2020sstotaltotal (b)and(b)optimal Gantt Gantt machines schedule. chart chart with for for the speedsthe suboptimal suboptimals(M )= schedule; schedule;9,s(M )= (c) (c)s( GanttM Gantt)= chart charts(M for)= for an an1; chosen∈ \ constant that asserts that 2(∑M K s(M)) > 5 stotal and 1 2 3 4 thatthat is is present present in in the the inequality inequality1 > determining determining( ∈) kkisis a a conveniently conveniently4 9 optimaloptimal schedule. schedule. ingchosen the conditionconstant that that asserts4 stotal1 thatmax 2(∑sMMK s.(M The)) value> 5 stotal20 stotaland (b) Gantt chart for the suboptimal schedule; (c) Gantt chart for an that 2(∑M M K s(M)) > 2 stotal. By Corollary∈ 1, if44n 10(k chosenthatchosen is present constant constant∈ in\ that thethat inequality asserts asserts1 that that determining 2 2((∑∑MM KKss((MkMis)))) a>> convenientlysstotaltotal≥ andand− optimal schedule. that) 2(∑M M K s(M)) > 2 stotal( ). By Corollary( ) 1, if n55 10(k Proof. We prove the lemma for a 2-element set K = Mi,Mj . 1 , then the∈ ratio\ of max11CS K to Cid∈∈J is at most4 2. Simi- thatchosenthat 2 2(( constantss( that(MM)))) asserts>> ss that.. By By 2( Corollary Corollarys(M 1,)) 1, if> ifnn ≥s 1010((kandk − Proof. We prove the lemma for a 2-element set K = {Mi,Mj }. 1larly,), then∑∑ ifMM then MM ratio10KK(m of maxk C122)S,total(total thenK) to theC∑id ratioM(JK) ofis max at mostC 5(M 2.total Simi-K) to Let S be any subschedule for N on K and Ni,Nj be the sets of ∈∈ \\ 1 ∈ S ≥≥ −− WeWe prove prove the the lemma lemma for for a a 2-element 2-element set setKK== {MM,,MM }.. 1that1larly,)),, then then 2( if∑n the the≥ ratio10 ratio(ms of( ofM− maxk)) max−>1CC)S,Ss( then(totalKK))to.to the ByCCid ratioid Corollary((JJ of))isis max at at 1, most mostC if (n 2. 2.10 Simi-\ Simi-K()k to Proof.Proof.Let S be any subschedule for N on K and Ni,Nj be thei setsi jj of Cid(J )MisM atK most 2. If 2n 10(m 2), then allS theM ratios are the jobs assigned to the corresponding machines in S{{. We show}} ≥∈ \ − − ≥ \ − LetLetSSbebeWe any any prove subschedule subschedule the lemma for for forNN on aon 2-elementKKandandNNii, set,NNjjKbebe= the theM sets sets,M of of. larly,C1larly,)id,( thenJ if if)nn theis at1010 ratio most((mm ofk 2.k max If11)Cn),,S then then(≥K10) the(to themC ratio ratio−id2()J, of then of) maxis max at allCC most theSS((MM ratios 2.K Simi-K)) aretoto Proof.thethat jobsΣ assigned(N) Σ to(N the). We corresponding first transform machines the inequality in S. Wei showj less than≥≥ or equal−− to−− 2. ≥ − \\ id ≤ S { } CClarly,idid((JJ if))nisis at at10 most most(m 2. 2.k If If1nn), then1010(( themm ratio22)),, then then of max all allC the the(M ratios ratiosK are) areto theLetthethat jobs jobsSΣidbe( assigned assignedN any) subscheduleΣS to( toN the) the. We corresponding corresponding first for N transformon K machinesand machines theNi inequality,Nj in inbeSS.. the We We sets show show of lessThe than approximation or equal to 2. coefficient 2 is the best possibleS value ≤ ≥ − − ≥≥ −− \ thatthethat jobsΣΣ ((N assignedN)) ΣΣSS((N toN)) the.. We We corresponding first first transform transform machines the the2 inequality inequality in S. We show lessClessidThe( thanJ than) approximation oris or at equal equal most to to 2. 2. 2. If coefficientn 10(m 2 is2) the, then best all possible the ratios value are idid (s(M ) N s(M ) N ) 0 in the sense that for jobs≥ with the− conflict graph in the shape ≤≤ i j j i 2 lessTheThe than approximation approximation or equal to 2. coefficient coefficient 2 2 is is the the best best possible possible value value that Σid(N) ΣS(sN(M).i We) N| j first|−s transform(Mj) N| i )| the≥0 inequality inof the three sense double-stars that for jobsS , with, presented the conflict in Fig. graph 1(a), in the the schedule shape ≤ 3 3 ((ss((MM))|NN |−ss((MM ))|NN |))22 ≥00 ininof theThe thethree sense sense approximation double-stars that that for for jobs jobsS3 coefficient,3, with with presented the the 2 conflict conflict is in the Fig. bestgraph graph 1(a), possible in the in the the schedule shape shape value ii jj jj ii constructed by the algorithm has the length exactly twice the to the following form|| |−|− || || 2≥≥ ofinof three thethree sense double-stars double-stars that forS jobsS33,3,3,, presentedwith presented the conflict in in Fig. Fig. graph 1(a), 1(a), the the in the schedule schedule shape to the following form(s(Mi) Nj s(Mj) Ni ) 0 constructedoptimal (cf. by Fig. the 1(b), algorithm 1(c)). has the length exactly twice the | |− | | ≥ toto the the following following form form constructedofconstructedoptimal three (cf.double-stars by byFig. the the 1(b), algorithm algorithmS3 1(c)).,3, presented has has the the in length length Fig. 1(a),exactly exactly the twice twice schedule the the 2s(M )s(M ) N N s(M )2 N 2 + s(M )2 N 2 i j i j i2 j2 j2 i2 optimalconstructedoptimal (cf. (cf. Fig. byFig. the 1(b), 1(b), algorithm 1(c)). 1(c)). has the length exactly twice the to the2 followings(Mi)s(Mj form) N| i ||Nj |≤s(Mi) N| j | + s(Mj) N| i | ≤ 4. 4-approximation algorithm for the problem s(M|)2||N |≤( N + 12)+2| s(|22M )2 N (22N| |+22 ≤1). optimal4. 4-approximation (cf. Fig. 1(b), 1(c)). algorithm for the problem 22ss((MMii))s≤s((MMjj))NiN2ii|NNjj| | sjs(|(MMii)) NNjj ++j2ss((M|Mjij|))| NNii|i Qm p j = 1,G = bisubquartic ΣCj, where m s(Mi|)| ||N||j (|≤|≤Nj + 1)+2|| s(|M|2 j) Ni ( N2||i +||21≤≤). 4.4. 4-approximation 4-approximation algorithm algorithm for for the the problem problem 2s(Mi≤)s(Mj) 2N2|i N| j| |s(Mi) Nj +22s|(M|j)| N| i Qm |p j = 1,G = bisubquartic Σ| Cj, where m ∈ ss((MMii))| NN||jj ((|≤NNjj2++11)+)+|2ss((MM| jj)) NNii ((NNi|i ++|11)≤).. 2,|3,4 | ∈ By adding≤≤s(Mi)s(2|M| j)(|| ||Ni || + Nj + Ni2|+| |N| ||j )||to both sides 4.Qm 4-approximationQm{2,3pp,j4j ==} 11,,GG == bisubquarticbisubquartic algorithmΣ forΣCCjj,, the where where problemmm s(Mi) Nj (| N2|j + 1| )+2| s(M| j)| N|i ( N| i + 1). || || ∈∈ Byand adding by a simple≤s(Mi)s( transformationM|j)(|N|i |+ N wej + obtainNi +| N|j |) to| both sides WeQm{ begin,, ,p, j this}= section1,G = withbisubquartic the following.ΣCj, where m | |22 | |22 | | | | We begin22 33 4 this4 section with the following. ByByand adding adding by a simpless((MMii))ss transformation((MMjj)()(NNii ++ NN wejj + obtain+ NNii ++ NNjj ))toto both both sides sides {{ | }} | ∈ || ||2 || ||2 || || || || Lemma2,3, 3.4 Let K M and N J . Σid(N) is a lower bound andByandadding by by a a simple simples(Mi) transformation transformations(Mj)( Ni + N we wej obtain obtain+ Ni + Nj ) to both sides WeWe begin begin this this section section with with the the following. following. s(Mi)s(Mj)( Ni + Nj )( Ni + Nj + 1) Lemma{ 3. Let} K ⊆M and N ⊆J . Σid(N) is a lower bound | | | | | | | | Weon begin the total this completion section⊆ with time the following.⊆of any subschedule for N on K, and by a simples(Mi)s transformation(Mj)( N| i |+ N| j we)(| obtainN| i |+ N| j |+ 1) ≤ LemmaLemmaon the total 3. 3.LetLet completion K K MM andand time N N of anyJJ.. subscheduleΣΣidid((NN))isis a a lower lower for N bound bound on K, (s(Mi)+s(Mj))(s(M| j)|Ni |( N|i +| 1)+| |s(M|i) Nj ≤( Nj + 1)). where Mid is the⊆⊆ ideal machine⊆⊆ for K. ss((MMii))ss((MMjj)()(NNii ++ NNjj )()(NNii ++ NNjj ++11)) (s(Mi)+s(Mj))(s(Mj) N| i (| N| i |+ 1)+s(Mi) N| j (| N| j |+ 1)). onLemmaonwhere the the Mtotal totalid 3.isLet completion completion the K idealM machineand time time N of of for any anyJ K.. subschedule subscheduleΣid(N) is a forlower for N N onbound on K, K, || ||| |||| ||| || || || || | |≤≤| | ⊆ ⊆ ((ss((MMii)+)+ss((MMij)j))())(s(Mss((MjM)(jj)N)NiNi+i ((NNiij +)(+11N)+)+i +ss((MNMiji))+NN1jj)((NNjj ++11)))).. whereonwhere the M M totalidid isis completionthe the ideal ideal machine machine time of for for any K. K. subschedule for N on K, | | | | | | | | ≤ || || || || Bull. Pol. Ac.:|| Tech.|| || XX(Y)|| 2016 4 (s(Mi)+s(Mj))(s(Mj) Ni ( Ni + 1)+s(Mi) Nj ( Nj + 1)). where4 Mid is the ideal machine for K. | | | | Bull. Pol. Ac.:| Tech.| | XX(Y)| 2016 44 Bull.Bull. Pol. Pol. Ac.: Ac.: Tech. Tech. XX(Y) XX(Y) 2016 2016 4 Bull. Pol. Ac.: Tech. XX(Y) 2016 Tytus Pikies,Tytus Marek Pikies, Kubale Marek Kubale Tytus Pikies,Tytus Pikies, Marek Marek Kubale Kubale Tytus Pikies, Marek Kubale Tytus Pikies, Marek Kubale 1. By Lemma1. By 1, Lemma maxC 1,( M max,...,C M( M ),...,2maxM )C 2max(M )C (M ) S { 2 S {m}2 ≤ m} ≤Sopt Sopt 1. By1. Lemma By Lemma 1, max 1,C maxS( MC2S,...,( M2M,...,m )Mm 2max) 2maxCSopt (CMSopt) (M ) 1. By Lemma 1, maxC ( M ,...,M since) 2max at most1.sinceC By twice at( LemmaM most the) minimaltwice 1, max the{ numberC minimalS({M2,..., of number} jobsM≤m is}) ofscheduled≤ jobs2max isC scheduledSopt (M ) S { 2 m} ≤sincesince at mostSopt at mosttwice twice the minimal the minimal number{ number of jobs} of≤ is jobs scheduled is scheduled since at most twice the minimal numberon ofM jobs2,..., issinceonM scheduledmM. at2,..., mostMm twice. the minimal number of jobs is scheduled ons(MM2on,...,) M[2Ms1,...,(smM. M), m2 .s[ 1 s ) , 2 s ) C (M ) C (M ) on M ,...,Mm. If 1on If24 total1 m5 . total4 totalthen5 total we maythen estimate we may estimateS 1 S 1 2 ∈ 1 ∈ 1 2 2 1 2 If s(MIf1)s(M[14)stotal[ 4,s5totalstotal1, 5)stotalthen) we1then may we estimate may estimateCS(MC1)S(M1) If s(M1) [ stotal, stotal) then we mayusing estimate CorollaryusingC∈S Corollary( 1,M1 1 because)∈ 4 total 1,2 becausen5 totalCol2 n. IfCol the2 number. If the of numberS 1 of 4 5 ∈ ≥|1 1 | ≥| | ∈ 1 usingusing Corollary Corollary 1, because 1, because2 n 2Coln 2 .Col If2 the. If2 number the number of2 of Better polynomial algorithms for scheduling unit-length jobs using Corollary 1, because n Col2jobs. If scheduled thejobs number scheduled on M of2,..., onMmMin2,...,Sopt≥|Mis2m greaterin≥|S|opt thanis2| greater5 n, then than 5 n, then 2 ≥| | 2 2 ≥| max| jobsC ( scheduledjobsMmax,...,2 scheduledC M( onM ),...,M2 on,...,2maxMM2M,...,C)m inM2max(Smoptin),isCS becauseopt greater(is greater) we, than because sched-5 thann, then we5 n, sched- then jobs scheduled on M2,...,Mm in Sopt is greaterS thanjobs2 scheduledn,S thenm 2 on m2 Sopt Mm in Soptopt isM greater than 5 , then max{CmaxS( M5CS,...,( {M}M,...,m≤)Mm2max}) ≤2maxCS (CMS ),( becauseM ), because we sched- we sched- Dividing both the sides by 2s(Mi)s(Mj)(s(Mi)+s(Mj)) we get and by Lemma 3, the total completion time of Col1 on M1 is ule on M2max,...,uleC onM2S(mMMat2,...,2,..., mostMMm twicemat) most the2max numbertwiceopt CS theopt of(M number jobs), because assigned of jobs we assigned sched- Better polynomial algorithms for scheduling unit-length jobs maxCS( M2,...,Mm ) 2maxCSopt (M ), because we{ sched-{ } ≤ } ≤ opt at most 4 times greater than the the total completion time of { } ≤ ule onuleMS 2 on,...,M2M,...,mS4atnM mostm at(G mosttwice4)n twice theCol( numberG the) numberCol of jobs of assigned jobs assigned ( Ni + Nj )( Ni + Nj + 1) ule on M ,...,Mm at most twice the numberto them ofjobs inuletoopt them onassigned, since2 in opt5 ,m sinceαat most5 twiceα 1 the[5]. number If the1 [5]. number of jobs If the assigned number 2 ≥4 4 ≥|≥ | ≥| | Σid(N)= | | | | | | | | Col1 jobs in any other schedule. Hence 4 of jobsto them scheduledtoof themin jobsSoptscheduled inon, sinceSMopt,...,, since5 n onMM5αinn(,...,GS)αM(isGCol) lessin1S thanCol[5].is1 or If less[5]. equal the than If numberthe to or number equal to Dividing both the sides2( bys(M 2s)+(Mis)(sM(M))j)(s(Mi)+s(Mj)) we get and by Lemma 3, the total completion time of Col1 on M1 is to them in Sopt , since n α(G) Col1 [5]. Ifto the them number in opt2 , since≥m5 2 ≥optα≥|m ≥|| opt 1| [5]. If the number i j | | 5 2 of jobsof2 scheduled jobs scheduled on M on,...,MM,...,m≥inM3Smoptnin≥|isS lessopt 3is than| lessn or than equal or equal to to ≥ ≥| n|, then maxofn jobs,C thenS scheduled( maxM )CSC2 onS(MM(M)2,...,1)CSMm(Min1.)S Letopt is us less bound. Letthan the us or bound equal the to at most 4 timesΣS(Col greater1) 4 than(ΣS the(N theM )+ totalΣS completion(Nr)). time of of jobs scheduled on M2,...,Mm in Sopt is5 less2 than25 or equalopt to opt opt 2 opt2 stotal3 n 32 sntotal (s(NMi j+) NNi j( )(NiN+i 1+)+Nsj (+Mi1))Nj ( Nj + 1) opt 1 opt n, then2 n, max thenC maxS (CM≥S ) (MCS) ≥(CM≥S1) (M1) ≥.3 Letn us. Let bound us bound the the Σid(N)= | | | | | || || | | | | | | | Col jobs in any other≤ schedule. Hence 2 3 n 5 5 n, then maxopt CSopt (M )opt CSopt (M21s)total 2 stotal . Let us bound the 1 n, then maxCS (M ) CS (M1) ratio. ofLet max us5ratio boundCS( ofM max the2,...,CSoptM( ≥mM2),...,to≥ maxMoptmC≥)Soptto( maxM≥ 2)CsintotalSopt this(M case.) in this case. ≤ 2(s(Mi)+2ss((M j)))s(M ) | | 5 opt opt 2 stotal { { } ≥ } ≥ i j Thus we obtain ≥ ≥ Let ratioM be ofratioLet the maxM of idealC maxSbe( machineM theC2S,...,( idealM2M for,..., machinem )MMtom,..., max) fortoMC maxSMopt.,...,( ByCMSopt) LemmaM(inM this.) Byin 2, case. thisLemma case. 2, ratio of maxCS( M2,...,Mm ) to maxCS (Mid) in thisid case. { S { 2 } 2m} m 2 Sopt m ( ) ( + )+ ( ) ( + ) ΣS(Col1) 4(ΣSopt (NM1 )+ΣSopt (Nr)). opt Let MLetbeM thebe ideal the machineideal{ machine{ for M} for,...,{M}M,...,.M By Lemma}. By Lemma 2, 2, sΣSM(Nj ).Ni Ni 1 s Mi Nj Nj 1 ≤ { } we have Letidwe M haveid be the ideal machine for2 M2,...,m Mm . By Lemma 2, | | | | | | | | ΣS(J )=ΣS(Col1)+ΣS(Col2) Let Mid be the ideal machine for M2,...,Mm . By Lemmaid 2, { { 2 } m} ≤ { we} havewe have { } If the number≤ of machines is2 greaters(Mi)s than(Mj) 2, the thesis follows Thus we obtain we have wemax haveCS( Mmax2,...,CSM( mM2),...,Mmm) 2 m 2 ΣS(Col1)+4ΣS(Col2) { { } 1 + } − 1. + − . ≤ maxCmaxS( MC2S,...,( M2M,...,m )Mm ) m 2m 2 from inductionΣ onS(NK).. Σ (J )=Σ (Col )+Σ (Col ) maxCS( M ,...,Mm ) m 2 Cidmax(Col{ 1S)C{id (2Col≤}1) m1}Col+ ≤11−+ .Col− 21 . ≤ | | S 4SΣS (1NM )+S 4ΣS2 (Nr)+4ΣS(Col2) { 2 } 1 + − . C (ColC{ )( Col ) ≤ }| ≤Col1| + Col| − |. ≤ opt 1 opt id Cid1 (Col1) ≤ 1 Col1 If the number of machines is greater than 2, the thesis follows Cid (Col1) ≤ WeCol also1 haveWe also have id 1 | || 1| ΣS(Col1)+4ΣS(Col2) | | Algorithm 3 A 4-approximation algorithm for the problem ≤ 4ΣSopt (NM1 )+4ΣSopt (Nr)+4ΣSopt (N Col2 ) | We also| We have also have from induction on K . ≤ | | We also haveC (Col )C (Col10 )Col 10 Col 4ΣS (NM )+4ΣS (Nr)+4ΣS(Col2) We also have id 1 id 1 1 1 Qm p j = 1,G = bisubquartic| | ΣCj, where m 2,3,4 = opt ( 1). opt C (ColC )(Col )|10 Col|10. Col| |. ≤ 4ΣSopt J id Cid1 (Col1) 101 Col1 | | ∈{ } C (Col ) 10 Col maxCSopt (maxMid)C≤Sopt9(1Mn)|≤ 9||. n1|. 4Σ (N )+4Σ (N )+4Σ (N ) id 1 1 | |. AlgorithmInput: A bisubquartic 3 A 4-approximation graph G. algorithm for the problem Sopt M1 Sopt r Sopt Col2 | |. maxCmaxSopt (CMSopt) (≤M9) ≤ n9 n In both cases≤ we have ΣS(J ) 4ΣSopt (J ), hence| Algo-| ( ) maxCSopt (M ) ≤ 9 n A schedule maxCSopt M ≤ 9 Byn combiningBy combining both inequalities both inequalities we obtain, we obtain, QmOutput:p j = 1,G = bisubquartic ΣCj, where m 2,3,4 = 4ΣS (J ). ≤ By combiningBy combining both inequalities both inequalities we obtain, we obtain, | | ∈{ } rithm 3 is 4-approximate.opt Similar observations may be used By combining both inequalities we obtain, Input:1. (ColA1, bisubquarticCol2)=Non-Equitable graph G. Coloring(G). By combining both inequalities we obtain, maxCS( Mmax2,...,CSM( mM2),...,10Mm Col) 1 10 mCol21 m 2 to establish that the algorithm( is) 4-approximate( ) for the prob- { { } (|} | + (| − )|.+ − ). 2. M1 Col1, M2,...,Mm Col2. In both cases we have ΣS J 4ΣSopt J , hence Algo- maxCmaxS( MC2S,...,( M2M,...,m )Mm 10) Col101 Colm1 2m 2 Output: A schedule lems Q2 p = 1,G = bisubquartic≤ ΣC and Q3 p = 1,G = maxCS( M2,...,Mm ) 10 Col1 m 2maxCSopt{ (maxMS {)CS2opt (≤}M9)m} n(≤| 9(||+nn1|−+ ).−n ). ← ← rithm 3 is 4-approximate.j Similar observationsj mayj be used { } (| | + − ). maxCmax({CM ) (M )≤ }9 ≤ 9n (| n |n+ −n ). 1. (Col1,Col2)=Non-Equitable Coloring(G). | | | maxSopt CSopt (M ) ≤ 9 n n tobisubquartic establish thatΣC thej. algorithm is 4-approximate for the prob- maxCSopt (M ) ≤ 9 Withoutn lossnWithout of generality loss of generality weopt may assume we may that assumen m that. Byn thism. By this | Theorem2. M1 Col 2. Algorithm1, M2,...,3Mmis 4-approximateCol2. for the problem The approximation coefficient 4 is the best possible value in WithoutWithout loss of loss generality of generality we4 may we assume may4 assume that≥n thatmn. By≥m this. By this ← ← lems Q2 p j = 1,G = bisubquartic ΣCj and Q3 p j = 1,G = Without loss of generality we may assumeassumption that n Withoutassumptionm and. By by lossthis the and of fact generality by that the5 factn weα that( mayG)5 n assumeColα(1G)we that≥ obtainColn ≥1mwe. By obtain this | | | ≥4 4 ≥|≥ | ≥| ≥ | Qm p j = 1,G = bisubquartic ΣCj, where m 2,3,4 . the sense that for any ε > 0 we may find such integers l and 4 assumption≥assumption and by and the by fact the that fact5 thatn α5 n(G)α(GCol) 1 Colwe1 obtainwe obtain | | ∈{ } bisubquartic ΣCj. assumption and by the fact that n α(G) Colassumptionwe obtain and by the fact that≥ 5 n ≥ α≥|(G) ≥||Col1| we obtain Better polynomial algorithms for scheduling unit-length jobs with bipartite incompatibility graphs on uniform machines | 5 ≥ ≥| 1| maxCS( Mmax2,...,CSM( mM2),...,≥Mm ) ≥| | TheoremProof. Let 2. usAlgorithm begin our3 analysisis 4-approximate with the case for of the a problem k thatThe forapproximation a graph G consisting coefficient of 4l iscopies the best of possible 3S3,3, the value graph in max{CmaxS( MC2S,...,( {M2}M,...,m )2M. m }) 2. maxCmax(CmaxMS()MC2,...,(≤MM)m ) ≤ presented in Fig. 1(a), and for machines with speeds s(M1)= maxCS( M2,...,Mm ) Sopt{ { Sopt } 2}. 2. Qmwithp 4j machines.= 1,G = bisubquartic Let S be a scheduleΣCj, where obtained m by2,3 Algorithm,4 . 3 the sense that for any ε > 0 we may find such integers l and { } 2. maxCmaxSopt (CMSopt) (M )≤ ≤ | | ∈{ } ks(M ) and s(M )=s(M )=s(M ) the algorithm constructs maxC (M ) ≤ maxCSopt (M ) ≤ and let Sopt be any schedule with the minimal total completion k that4 for a graph2 G consisting3 of l4 copies of 3S3,3, the graph Sopt For the lastFor case the welast may case bound we may the bound ratio of the max ratioCS of(K) maxCS(K) Proof.● If ColLet us begin N our N analysis N , with then the by caseLemma of a1, problem C (K)C (K) 4. 4-approximation Algorithm for the problem 2 M2 M3 M4 a schedule S with ΣS(J ) that is at least 4 ε times( greater)= to C For( to) theForandC last the( that case) last ofand wecase max that mayC we of( boundmay maxKC bound) the(to C ratio theK( ) ratioofto), maxC where of( maxS ),C whereS(K) time.j We mayj ¸ j divide[ J into[ setsj NM1 , NM2 , NM3 and NM4 , presented in Fig. 1(a), and for machines with− speeds s M1 For the last case we may bound the ratioid J of maxForidC theSJ(K last) case weS M may boundS M id theJ ratio ofid J max S with 4Col machines. 2 N Let S Nbe a schedule N , hence obtained by Algorithm 3 C ( C) ( ) C (\ C (K) \KC) ( C) ( ) Qm pj = 1, G = bisubquartic ΣCj, 2 M2 M3 M4 ksthan(M the) minimals(M )= one.s( LetM l)=(s10(M )4ε)/(6ε) and let k 180l. M tois theidtoMJ idealCidis(andJ themachine) thatand ideal of that for machine max ofM . maxS M ByforCS theM(M. wayto ByK)kid thetoisJC way estab-id,(J wherek),is where estab- andwhere letj NSMji ∙isbe the anyj set schedule[ of the[ jobs with assignedj the minimal to Mi totalin Sopt completion. 4 and 2 3 ≥ −4 the algorithm constructs≥ to Cid(J ) and that of maxCS(M K) idto Cid(Jid),id where S\ \ id j j opt Then we have M isM theis ideal14 the ideal machine14 machine for M for.M By9 . the\ By way the9 11k wayis estab-k is11 estab- where m {2, 3, 4} a schedule S with ΣS(J ) that is at least 4 ε times greater \ lished,id weMlished, haveid is the westotal have ideal> ∑ machinestotals(>M∑) for Mss(total.M) Byand thestotals waytotalandk iss estab-total time. We may divide J into sets NM , NM , NM and NM , 10 Mid is the ideal machine for M . By the way k is estab-20 14 1420M K M 20K 9 92020 11 1120 2 If Col2ΣS(ColNM22)
Bull. Pol. Ac.: Tech. XX(Y) 2016 5 Better polynomial algorithms for scheduling unit-length jobs
Dividing both the sides by 2s(Mi)sBetter(Mj)(s polynomial(Mi)+s(M algorithmsj)) we get for schedulingand by Lemma unit-length 3, the total jobs completion time of Col1 on M1 is Better polynomial algorithms for schedulingat most 4 times unit-length greater jobs than the the total completion time of ( Ni + Nj )( Ni + Nj + 1) Dividing both the sides by 2s(Mi)s(Mj)(s(Mi)+s(Mj)) we get and by Lemma 3, the total completion time of Col1 on M1 is Σid(N)= | | | | | | Better| | polynomial algorithms for schedulingCol1 jobs unit-length in any other jobs schedule. Hence 2(s(Mi)+s(Mj)) |at most| 4 times greater than the the total completion time of Dividing both the( N sidesi + N byj 2)(s(NMi i)+s(MNjj)(+s(1M) i)+s(Mj)) we get and by Lemma 3, the total completion time of Col1 on M1 is ( )= ΣS(Col1) 4(ΣS (NM )+ΣS (Nr)). DividingΣid N both thes(|M sides|j) N| byi (| 2Nsi|(M+|1)s)+(|Ms(|)(Msi()MN)+j ( Ns(jM+))1)we get atandCol most1 byjobs Lemma 4 times in any 3, greater otherthe total than schedule. completionopt the the1 Hence total timeopt completion of Col on timeM ofis ( Ni +2|(sN(|Mj|)(i)+|Nisi(+MjN))j + 1|) i | | | j | | ≤ 1 1 Σid(N)=≤ | | | | |2s|(Mi|)s(|Mj) ThusatCol most1 wejobs 4 obtain times in( anyCol greater other) 4 than schedule.( the(N the Hence)+ total completion(N )). time of s((NMi j)+2N(sNi((Mj N)(i)+i N+is1(+M)+Nj))sj(M+i1))Nj ( Nj + 1) | | ΣS 1 ΣSopt M1 ΣSopt r Σ (N)= | | | | | | || | | | | | | | Col ≤ id ΣS(N). 1 jobs in( any other) schedule.( ( Hence)+ ( )). ≤ s(Mj)2N(si((MNi)+i 2+ss(1(MM)+i)js))s((MMji)) Nj ( Nj + 1) Thus| ΣS| we(J obtain)=ΣS ColΣS(Col1 1)+4 ΣΣSSopt(ColNM21) ΣSopt Nr | | | | | | | | ≤ If the number of machines is greater than 2, the thesis follows ΣS(Col1) 4(ΣS (NM )+ΣS (Nr)). ≤ Σs(SM(Nj).Ni ( Ni 2+s(1M)+i)ss((MMji)) Nj ( Nj + 1) Thus we obtainΣS(Col1)+4ΣoptS(Col12) opt ≤ | | | | | | | | ΣS(J )=≤ ΣS(Col≤1)+ΣS(Col2) from induction≤ on K . 2s(M )s(M ) ΣS(|N)|. i j Thus we obtain4ΣSopt (NM )+4ΣSopt (Nr)+4ΣS(Col2) If the number of machines is greater than 2, the thesis follows ΣS(J )=≤ ΣS(Col1)+1 4ΣΣS(SCol(Col2)2) ≤ ≤ from inductionΣ onS(NK). 4ΣS (NM )+4ΣS (Nr)+4ΣS (N ) AlgorithmIf the number 3≤A of machines4-approximation| | is greater algorithm than 2, the for thesis the problem follows ΣS(J )=4ΣΣS(SColopt (N1)+M1 )+4ΣΣS(S4Col(ΣColSopt2)2()Nr)+4ΣSopt(Col2Col) 2 ≤ opt 1 opt | | QmfromIf thep inductionj number= 1,G = of onbisubquartic machinesK . is greaterΣCj, where thanm 2, the2 thesis,3,4 follows = 4ΣΣSS(Colopt (JN1)+M).)+4ΣS4(ΣColS 2()Nr)+4ΣS(Col( 2) ) Algorithm| 3 A 4-approximation| | | algorithm∈{ for the} problem ≤ 4ΣSopt NM1 4ΣSopt Nr 4ΣSopt N Col2 from inductionA bisubquartic on K . graph G. ≤ | | Input: 4ΣS (NM )+4ΣS (Nr)+4ΣS(Col2) Qm p j = 1,G = bisubquartic| | ΣCj, where m 2,3,4 In both cases= we4Σ haveSopt (NΣMS)1.()+J4)ΣSopt4(ΣNSropt)+(J4Σ)S, hence(N Col Algo-) Output:Algorithm| A schedule3 A 4-approximation| algorithm∈{ for the} problem ≤ ΣSopt J 1 ≤opt opt 2 rithm 3 is 4-approximate.≤ Similar observations may|T. be Pikies| used and M. Kubale Input:Qm p j =A1 bisubquartic,G =Abisubquartic 4-approximation graph GΣ.Cj, algorithm where m for2, the3,4 problem 4ΣSopt (NM1 )+4ΣSopt (Nr)+4ΣSopt (N Col ) Algorithm1. (Col1,Col 3 2)=Non-Equitable Coloring(G). = 4ΣSopt (J )(. ) ( ) 2 | | ∈{ } toIn establish both cases that≤ we the have algorithmΣS J is 4-approximate4ΣSopt J , for hence the| Algo- prob-| Output:Qm p j = A1,G schedule= bisubquartic ΣCj, where m 2,3,4 ≤ Input:2. M1 A bisubquarticCol1, M2,..., graphMm G.Col2. rithm 3 is 4-approximate.= 4ΣSopt (J ) Similar. observations may be used | ← ←| ∈{ } lemsIn bothQ2 casesp j = 1 we,G have= bisubquarticΣS(J ) Σ4CΣSjoptand(JQ),3 hencep j = 1 Algo-,G = Output:Input:1. (ColA1,A bisubquarticCol schedule2)=Non-Equitable graph G. Coloring(G). | ≤| | bisubquartictorithmIn establishThe both 3 approximation is cases 4-approximate. thatΣC we the. have algorithm coefficientΣ Similar(J is) 4-approximate 4 observations 4isΣ the( bestJ ) ,possible formay hence the be Algo- prob-value used same as in the previous cases. However, the greedy assignment 2.1. M(Col1 ,Col1)=, M2Non-Equitable,...,Mm Col Coloring2. (G). j S Sopt Output:←1A schedule2 ← inlems theQ sense2 p j =|that1, Gfor= anybisubquartic ε > 0 we≤ ΣmayCj and findQ such3 p j =integers1,G = l can be done in time O(nlog m). Hence the total time complexity Theorem 2. Algorithm 3 is 4-approximate for the problem torithmThe establish 3 approximation is| 4-approximate. that the algorithm coefficient Similar is 4 4-approximate is| observations the best possible| formay the value be prob- used in 2.1. M(Col1 1,Col21)=, M2Non-Equitable,...,Mm Col Coloring2. (G). bisubquartic ΣC . 10(m 2) 10(m 2) Qm p j =←1,G = bisubquartic←ΣCj, where m 2,3,4 . andthelemsto establish sensek Qthat2 p that forj that= fora1 ,jgraph theG any= algorithmε bisubquarticG> consisting0 we is may 4-approximateΣ Cof findj land copies suchQ3 integers forofp j 3= theS3,31,l prob-G,and the= is O(n + nlog m + (n + m)m ¡ ) = O(nm ¡ ), which is 2. |M Col , M ,...,M | Col . ∈{ } | | | | Theorem1 2. Algorithm1 2 3 ism 4-approximate2 for the problem graphbisubquarticThe presented approximationΣC .in Fig. coefficient 1a, and 4 for is the machines best possible with valuespeeds in O(n) for a fixed number of machines. Proof. Let← us begin our analysis← with the case of a problem klemsthatQ for2 p aj graph= 1,j GG=consistingbisubquartic of l copiesΣCj and ofQ 3S33,p3,j the= 1 graph,G = QmTheoremp j = 1 2.,GAlgorithm= bisubquartic3 is 4Σ-approximateCj, where m for2, the3,4 problem. sthe(M sense) = ks| that(M| ) for and any s(Mε >) =0 s we(M may) =| s( findM )such the Algorithm integers| l conand- with| 4 machines. Let S be a schedule| obtained∈{ by Algorithm} 3 presentedbisubquarticThe1 approximation in Fig.4ΣCj. 1(a), coefficient and2 for machines3 4 is the bestwith4 possible speeds s value(M1)= in k that for a graph| G consisting of l copies of 3S3,3, theε graph Proof.QmTheoremp j =Let1 2.,G usAlgorithm= beginbisubquartic our3 analysisis 4Σ-approximateCj, with where the m case for2 of, the3, a4 problem. structsksthe(TheM sense4) approximationaand schedule thats(M for2)= anyS withs coefficient(εM>3 )=Σ0S we(Js(M) may4 4that is) the find isbest algorithmat such least possible integers 4 constructs value timesl and in and| let Sopt be any schedule with| the minimal∈{ total completion} presented in Fig. 1(a), and for machines with speeds¡s(M )= withQm p 4j machines.= 1,G = bisubquartic Let S be a scheduleΣCj, where obtained m by2, Algorithm3,4 . 3 greaterakthe schedulethat sense for than athatS graphthewith for minimal anyGΣ consisting(Jε >) one.that0 we Let ofis may atl lcopies least find (10 4 such of 4 3εSε integers)3times/,3(,6ε the) greaterand graphl1and let 3. Final remarks time.Proof. WeLet may us begin divide ourJ analysisinto sets withNM the, NM case, N ofM aand problemNM , S ¸ ¡ | | 1 ∈{2 3 } 4 ks(M4) and s(M2)=s(M3)=s(M4) the algorithm− constructs and let Sopt be any schedule with the minimal total completion kthanpresentedk that 180 the forl minimal. Then ain graph Fig. we one. 1(a),G haveconsisting Let andl for(10 machines of l4copiesε)/( with6ε of) and 3speedsS3 let,3, theks(M graph1801)=l. wherewithProof. 4N machines.LetM is us the begin set Let of ourS thebe analysisa jobs schedule assigned with obtained the to M casei in by ofS Algorithmopt a. problem 3 ¸ time. Wei may divide into sets N , N , N and N , aks schedule(M ) andSs(withM )=ΣS(sJ(M))=≥thats( isM− at) leastthe algorithm 4 ε times constructs≥( greater)= Our analysis is based on 2-coloring of a bipartite graph with andwith let 4 machines.Sopt be any Let scheduleSJbe a schedulewith the minimal obtainedM1 M2 total byM Algorithm completion3 M4 3 Thenpresented4 we have in Fig.2 1(a), and3 for machines4 with− speeds s M1 If Col2 NM2 NM3 NM4 , then by Lemma 1, Col2 than the minimal one. Let l 10(10 4ε)/(6ε) and let k 180l. maximal width. A natural extension of this approach is to con- where NMi is the set of the jobs assigned to Mi in Sopt . aks schedule(M4) andSs(withM2)=ΣS(sJ(M3))=thats( isM at4) leastthe algorithm 4 ε times constructs greater •time.and let| WeSopt|≥| maybe any divide∪ scheduleJ∪into with| sets theN minimalM1 , NM2 total, NM completion3 and| N|≤M4 , ≥ −ε.. − ≥ 2 NM2 NM3 NM4 , hence Thenthan the we minimal have one.( Let6)ll +(410≤ 4ε)/(6ε) and let k 180l. sider 2-colorings with smaller widths. Such colorings seems to where| NM∪ is the∪ set of| the jobs assigned to Mi in Sopt . a schedule S with ΣS J that is at least 4 ε times greater time.If Col We2i mayN divideM2 NMJ3 intoNM4 sets, thenNM by1 , N LemmaM2 , NM 1,3 andColN2 M4 , 10≥ − − ≥ • | |≥| ∪ ∪ | | |≤ TheThenthan optimal the we minimal have assignment one. Let isl to assign(10 ε4. theε)/ jobs(6ε) correspondingand let k 180 tol. be better, e.g. when the machines can be split into two sets with where N isΣ theS(Col set2 of) < the4Σ jobsSopt ( assignedNM2 NM to3 MNinM4 )S. . (4) 2IfNColM2 Mi NM3 N NM4 N, henceN , then∪ by Lemma∪ i opt 1, Col 6l10≥+ 4 ≤− ≥ • | | ∪2|≥|∪M2 ∪| M3 ∪ M4 | | 2|≤ TheanThen independent optimal we have assignment set of vertices is to withassignε cardinality. the jobs αcorresponding(G)=18l to closer sums of speeds. In this case Col1 NM , so we have 2IfNColM2 2 NMΣ3NS(MColN2 M42N),M< hence3 4Σ1 NS M4(N,M thenN byM LemmaNM ). 1, Col2 (4) toThe an optimal independent assignment set of isvertices6l to10+ assign4 ≤ with the cardinality jobs corresponding α(G) = 18 tol It is also interesting to know if Algorithm 2 can be refined • | | ∪|≥|| ∪ ∪|≤|| ∪| opt | 2 ∪ 3 ∪ 4 | |≤ the fastest machine and to assign theε. remaining jobs, with car- 2 NM2 NMΣ3 (ColNM4), henceΣ (N ) 4Σ (N ). toan the independent fastest machine set of verticesand6 lto+ assign4 with≤ cardinality the remainingα(G )=jobs,18 withl to to obtain polynomial time complexity in both the number of In this caseΣSColS(Col12) 36 Bull. Pol. Ac.: Tech. 67(1) 2019