ContentslistsavailableatScienceDirect
European Journal of Operational Research
journalhomepage:www.elsevier.com/locate/ejor
Discrete Optimization
Scheduling under linear constraints
Kameng Nip
a, Zhenbo Wang
a,∗, Zizhuo Wang
baDepartment of Mathematical Sciences, Tsinghua University, Beijing, China
bDepartment of Industrial and Systems Engineering, University of Minnesota, MN, USA
a rt i c l e i nf o
Article history:
Received 17 June 2015 Accepted 17 February 2016 Available online 26 February 2016 Keywords:
Parallel machine scheduling Linear programming Computational complexity Approximation algorithm
a b s t ra c t
We introduce a parallel machine schedulingproblem in which the processing timesof jobs are not given inadvance but aredeterminedby asystem oflinearconstraints. The objective is tominimize the makespan,i.e., themaximum jobcompletion timeamongall feasiblechoices.Thisnovelproblem ismotivatedbyvariousreal-worldapplication scenarios.Wediscussthecomputationalcomplexityand algorithmsforvarioussettingsofthisproblem.Inparticular,weshowthatifthereisonlyonemachine withanarbitrarynumberoflinearconstraints,orthereisanarbitrarynumberofmachineswithnomore thantwolinearconstraints,orboththenumber ofmachinesand thenumberoflinearconstraintsare fixedconstants,thentheproblemispolynomial-timesolvableviasolvingaseriesoflinearprogramming problems.Ifboththenumberofmachinesandthenumberofconstraintsareinputsoftheproblemin- stance,thentheproblemisNP-Hard.Wefurtherproposeseveralapproximationalgorithmsforthelatter case.
© 2016 Elsevier B.V. All rights reserved.
1. Introduction
A schedulingproblemaims toallocateresources tojobs, soas tomeetaspecificobjective,e.g.,tominimizethemakespanorthe total completion time. One common assumption in the classical schedulingproblemisthattheprocessingtimesofjobsaredeter- ministicandare giveninadvance. However, inpractice,the pro- cessingtimes are usually uncertain/unknown orcould be part of thedecisions.Anumberofworksinthe literaturehaveproposed variousschedulingmodels inwhichtheprocessingtimes areun- certain/unknown,suchasthestochasticschedulingproblem(Dean, 2005; Möhring, Radermacher, & Weiss, 1984; Möhring, Schulz,&
Uetz, 1999) and the robust scheduling problem (Daniels & Kou- velis,1995; Kasperski, 2005; Kasperski & Zielinski, 2008). In the stochastic scheduling problem, it is assumed that the processing times are random variables and the expected makespan is con- sidered.In therobust schedulingproblem, itis assumedthatthe processingtimeofeachjobbelongstoacertainsetandtheobjec- tiveistofindarobustscheduleundersomeperformancecriterion (e.g.,minimize themaximum absolutedeviationoftotal comple- tiontime,orthetotallateness).Notethatineitherthestochastic orthe robust scheduling problems,the processingtimes are still exogenouslygiven.
∗ Corresponding author. Tel.: +861062772796; fax: +861062787945.
E-mail addresses: njm13@mails.tsinghua.edu.cn (K. Nip), zwang@math.tsinghua.
edu.cn (Z. Wang), zwang@umn.edu (Z. Wang).
Inthepresentedpaper,we introduceanewschedulingmodel.
In our model, the processing times of jobs are not exogenously given,insteadtheycanbechosenaspartofthedecisions,butthey must satisfy a setof linearconstraints. We callthis problemthe
“schedulingunderlinearconstraints” (SLC)problem.Notethatthe SLCproblemreduces to theclassical parallel machine scheduling problemP||Cmax when theprocessingtimes ofjobsare given(or equivalently,when thelinearconstraintshave aunique solution).
This problem is relatedto the schedulingproblem with control- lableprocessingtimesstudied intheliterature(Nowicki&Zdrza- lka, 1988, 1990; Shabtay & Steiner,2007). In the latter problem, theprocessingtimesofjobsarecontrolled byfactors suchasthe startingtimesandthesequenceofthejobs,whileinourproblem, theprocessingtimesarepartofthedecisionvariables.
The SLCproblemis alsorelatedto thelotsizing andschedul- ing problemin productionplanning, whichdecides the type and amountofjobstoprocessateachtimeperiodoveratimehorizon (Drexl & Haase,1995; Drexl& Kimms, 1997;Haase, 1994). How- ever,although thesetwoproblems maysharesome similarback- grounds, they are different in many ways: (1) In the SLC prob- lem,each task mustbe completed ina consecutive time interval andcanonlybechosen once,whileinthelotsizingandschedul- ing problem, an activity (e.g., the production of certain type of products) can be scheduled in multiple non-consecutiveperiods;
(2) The objective of the lot sizing and scheduling problem is to minimize the total costs, including the setup costs, the inven- tory holding costs, etc, which is significantly different from the http://dx.doi.org/10.1016/j.ejor.2016.02.028
0377-2217/© 2016 Elsevier B.V. All rights reserved.
Table 1
Example for the industrial production problem.
Composition Alloy Demand
1 2 3 n
Iron 24 8 3 2 ≥56
Copper 3 3 3 1 ≥30
. .
. . . . . . . . . . . . . . . . . . .
Aluminium 4 33 137 100 ≥10 0 0
Max. of alloy Quantity
1 1 0 0 0 ≤10
2 0 1 0 0 ≤7
3 0 0 1 0 ≤20
. .
. . . . . . . . . . . . . . . . . . .
n 0 0 0 1 ≤15
objectiveoftheSLCproblem(Kreipl& Pinedo,2004),whichisto minimizethemakespanoftheschedule;(3)Duetothedifference intheobjective,thekeytradeoff inthesetwoproblemsarediffer- ent.IntheSLCproblem,themainconsiderationishowtobalance the workloadofeach machine, andassign thejobs evenlyacross machines. Incontrast, thekey considerationinthe lotsizing and schedulingproblemis howtodivide thejobsandschedulethem (e.g., how manyunits ofproducts toproduce in each use ofthe machine), which is more similar to that in an EOQ model (see Snyder & Shen,2011);(4)As we willsee later, themathematical programmingformulationfortheSLCproblemisamixedinteger quadraticprogram,whilethecommonformulationforthelotsiz- ing andschedulingproblemisa mixedintegerprogram(e.g.,see DrexlandHaase,1995,page75).Therefore,themethodologiesand researchapproachesarealsodifferent.
Inthefollowing,weprovideafewexamplesthat motivatethe studyoftheSLCproblem.
1. Industrial production problem. Perhaps the earliest motivation fortheschedulingproblemcamefrommanufacturing(e.g.,see Pinedo, 2009,2012). Suppose a manufacturer requires certain amountsofdifferentrawmetals,andheneedstoextractthem fromseveralalloys.Thereareseveralmachinesthatcanextract thealloysinparallel.We focusontheprocedure ofextracting the alloys, of which the goal is to finishas early as possible.
In thisproblem, the processingtimes ofextracting each alloy dependontheprocessingquantities,andtraditionally,theyare predeterminedinadvance.However, inpractice,those quanti- tiesaredeterminedbythedemandsoftherawmetalsandcan be solved asa feasible solutionto a blending problem(Danø, 1960;Eiselt&Sandblom,2007).Sometimes,eachalloyalsohas its own maximumquantity.An exampleof such a scenariois giveninTable1.
In the example shown in Table 1, the demand of iron is 56, andeach unitofalloy1contains24unitsofiron,eachunit of alloy2 contains8 unitsof iron,etc. Let xi be thequantity of alloyi tobe extracted. Then the requirementon the demand ofiron can be represented asa linearinequality 24x1+8x2+ 3x3+· · · +2xn≥56.Furthermore,themaximumamountofal- loy1available is10,which canbe representedasalinear in- equalityx1 ≤10.Similarly, wecan writelinearconstraints for thedemand ofother metalsandthequantity forother alloys.
In this problem, the decision maker needs to determine the nonnegative job quantities x1,...,xn satisfying the above lin- ear constraints,andthen assignthesejobstothe parallelma- chines such that the last completion time is minimized. This problemcanbe viewedasaminimummakespanparallel ma- chinescheduling problem,where theprocessingtimesofjobs satisfysomelinearconstraints.
Table 2
Example for the advertising media selection Problem.
Sum of Each unit time broadcast provides
ad 1 ad 2 ad 3 ad n
Attractions to women 20 100 100 10 ≥500
Attractions to men 15 10 0 80 ≥500
Attractions to teens 30 0 30 100 ≥200
. .
. . . . . . . . . . . . . . . . . . .
Max time for ad 1 1 0 0 0 ≤20
Min time for ad 1 1 0 0 0 ≥10
Max time for ad 2 0 1 0 0 ≤35
. .
. . . . . . . . . . . . . . . . . . .
2.Advertisingmediaselectionproblem.Acompanyhasseveralpar- allel broadcast platforms which can broadcast advertisements simultaneously, suchasmultiplescreensinashoppingmallor different spots on a website. There is a customer who wants to broadcast his advertisements (ad 1,...,n) on these plat- forms.1 Itisrequiredthat each individual advertisementmust bebroadcastwithoutinterruptionandtherunningtimeofeach advertisementhastosatisfysome linearconstraints.Thecom- panyneedstodecidetherunningtimesxiallocatedtoeachad- vertisementi,andalsowhichadvertisementshouldbereleased onwhichplatformaswellasthereleasingorder.Theobjective istominimizethecompletiontime.Anexampleofsuchaprob- lemisgiveninTable2.
Similar to thefirst example,theabove-describedproblemcan be naturallyformulatedasa minimummakespanparallelma- chine scheduling problem in which the parameters (running timesoftheadvertisements)aredeterminedbyasystemoflin- earconstraints.
3.Transportation problem. Bothlinearprogrammingandmachine schedulingproblemshaveextensiveapplicationsinthefieldof transportation management (Eiselt& Sandblom,2007; Pinedo, 2009, 2012). The parallel machine scheduling problem has many similarities with the transportation scheduling models.
Forexample,afleetoftankersoranumberofworkerscanbe considered asa parallel machine environment, andtransport- ingorhandlingcargoisanalogoustoprocessingajob (Pinedo, 2009). Meanwhile, the transportation problem can be formu- latedasa linearprogram.Letxij bethecapacityofcargothat needs to be transported from origin i to destination j. They often have to satisfy certain supply and demand constraints, whichareusuallylinearconstraints.
In practice, the decision maker decides how to assign cargo (jobs)totankersorworkers(parallelprocessors),soastofinish the handlingasquicklyaspossible.This isa parallelmachine scheduling problem. Andthe processingtimesusually depend on xijs,which haveto satisfysome linear constraintsasmen- tionedabove. Thisalsoleadsto a parallelmachine scheduling problemwithlinearconstraints.
Inthispaper,westudytheSLCproblem,discussingthecompu- tationalcomplexityandalgorithmsforthisproblemundervarious settings.Inparticular, weshow that ifthereisonly onemachine withan arbitrarynumberof linearconstraints,orthere isan ar- bitrary number of machines withno more than two linear con- straints,orboththenumberofmachinesandthenumberoflinear constraints are fixed constants, then the problem is polynomial- time solvable via solving a series of linear programming prob- lems. If both the number of machines and the number of con- straints are inputs of the problem instance, then the problem is
1This example can be easily extended to cases with multiple customers.
Table 3
Summary of results.
k = 1 k = 2 k ≥3 (fixed) k ≥3 (input)
m = 1 P P P P
O ( n ) [3.2] O ( n 2L ) [4.1] O ( n 3L ) [3.1] O ((n + k )3L )[3.1]
m ≥2 P P P NP-Hard
(fixed) O ( n ) [3.2] O (n min{m+1,4}L )[4.1,5.1] O (n m+k−1L )[4.1] PTAS [4.2]
m ≥2 P P Unknown Strongly NP-Hard
(input) O ( n ) [3.2] O ( n 4L ) [5.1] min {mm−K, 2 −m1}[5.2]
NP-Hard.Wefurtherproposeseveralapproximationalgorithmsfor thelatter case. We summarizeourresults inTable 3. InTable 3, the parameters n, m, k stand for the number of jobs, machines andconstraints,respectively.The upperlineineach cellindicates the computational complexity ofthe problem, where P refers to polynomial-timesolvable andUnknown refers to complexity un- known;the lower lineindicates the runningtime ifthe problem ispolynomial-timesolvable,ortheperformance ratios ofourap- proximationalgorithms ifitis NP-Hard.The superscriptsindicate thesection wherethecorresponding resultappears.The parame- terListheinput sizeoftheproblemandKisa valuedepending onkandmwhoseexplicitexpressionwillbegiveninSection5.2. Oneinterestingconclusionfromourresultisthatalthoughpar- allel machine scheduling is in general an intractable problem, a seeminglymorecomplicatedproblem— parallelmachineschedul- ingwithlinearconstraints— canbesimplerandtractableinmany cases.This suggeststhat instead offinding a feasible solutionto thelinearconstraintsandthenassigningittothemachines,adeci- sionmakershouldconsiderthemjointly.Inotherwords,itisoften beneficialtoconsidertheproblemwithabig-pictureperspective.
The remainder of the paper is organized as follows: In Section2,weformallystatetheproblemstudiedinthispaperand brieflyreviewsomeexistingresults.Westudythesimplestcasein whichthereisonlyonemachineoroneconstraintinSection3.In Section4,weconsiderthecasewithatleasttwo butstill afixed numberofmachines. InSection 5,weinvestigatethe casewhere thenumberofmachinesisan inputoftheinstance.Finally,some concludingremarksareprovidedinSection6.
2. Problemdescription
Theschedulingproblemunderlinearconstraintsisformallyde- finedasbelow:
Definition1. Givenmidenticalmachinesandnjobs.Theprocess- ingtimesofthejobsarenonnegativeandsatisfyklinearinequal- ities.Thegoalofthe schedulingproblemunderlinear constraints (SLC) is to determine theprocessing times ofthe jobs such that theysatisfythelinearconstraintsandtoassignthejobstothema- chinestominimizethemakespan.
Formally,let xi betheprocessingtime ofjobi.Theprocessing timesx=(x1,...,xn)shouldsatisfy
Ax≥b, x≥0, (1)
whereA∈Rk×nandb∈Rk×1.
Parallel machine scheduling with the objective of minimizing themakespanisoneofthemostbasicmodelsinvariousschedul- ingproblems(e.g.,seeChen,Potts,&Woeginger,1998).Thisprob- lem is NP-Hard even if there are only two machines, and it is stronglyNP-Hardwhenthenumberofmachinesisaninputofthe instance(Gary&Johnson, 1979).Onthealgorithmic side,Graham (1966) proposed a (2−m1)-approximation algorithm for parallel machineschedulingwithmmachines. Thismethod,knownasthe listscheduling(LS)rule,isinfactoneoftheearliestapproximation algorithms. Later, Graham (1969) presented the longest process- ingtime(LPT)rulewithanapproximationratioof(43−31m)anda
polynomial-timeapproximation scheme(PTAS)when thenumber ofmachinesisfixed.Forthecaseofa fixednumberofmachines, Sahni(1976)furtherproposedafullypolynomial-timeapproxima- tion scheme(FPTAS).When the numberofmachinesis an input, HochbaumandShmoys(1987)showedthataPTASexists.
Atfirstsight,theSLCproblemcanbeformulatedasthefollow- ingoptimizationproblem:
min t s.t. m
j=1
yi j=1
∀
i=1,...,nn i=1
xiyi j≤t
∀
j=1,...,mAx≥b x,t≥0
yi j∈
{
0,1} ∀
i,j,where yi j=1 indicates that job i is assigned to machine j. This can be viewed as a nonconvex mixed integer (binary) quadratic programmingproblem (Burer & Letchford, 2012;Köppe, 2011) or amixedinteger(binary)bilinearprogrammingproblem(Adams &
Sherali,1993;Gupte,Ahmed,Cheon,&Dey,2013).Ingeneral,such problems are NP-Hard and extremely hard to solve. In fact, it is unknownwhetherthemixedintegerquadraticprogrammingprob- lemliesinNP(Burer&Letchford,2012;Jeroslow,1973).However, withthespecialstructureoftheproblem,wewillshow thatsev- eralcasesoftheSLCproblemcanbesolvedinpolynomialtimeor approximatedwithinaconstantfactor.
3. Singlemachineorsingleconstraint 3.1. Singlemachine
Ifthereisonlyonemachine,thentheclassicalparallelmachine schedulingproblembecomestrivialsincethe makespanissimply thetotalprocessingtime. Forthe SLCproblem, itisequivalentto solvingthefollowinglinearprogram:
(LP1)
min n
i=1
xi s.t. Ax≥b
x≥0.
Therefore,wehavethefollowingconclusion.Werefertheread- erstoYe(1997)forthecomplexityoftheinteriorpointmethods.
Theorem 1. TheSLC problem with a single machinecan be solved inpolynomialtime,inparticular,inO((n+k)3L)timebytheinterior pointmethods,whereListhesizeofinputlength.
3.2. Singleconstraint
In this subsection, we study the SLC problem with only one constraint,that is,k=1andAisa1×nmatrix.Inthiscase,the linearconstraintscanbewrittenas
n
i=1
aixi≥b, x≥0.
Withoutlossofgenerality,weassumethat a1 ≥a2 ≥≥an
andb≥0.Ifallaiarenonpositive,thenthisproblemistrivial(all xi=0 ifb=0,or infeasibleifb > 0). Therefore,we assume that thereisatleastoneai>0.Wedefinen=min
{
max{
i|
ai>0}
,m}
, wheremisthenumberofmachines,andσ
=ni=1ai.Wehavethe followingresult:
Theorem2. FortheSLCproblemwithoneconstraint,theoptimalde- cisionsarex1=· · · =xn=b/
σ
andxi=0otherwise,andtheoptimal makespanisb/σ
.Proof.Considerthefollowinglinearprogram:
(LP2)
min t s.t. n
i=1
aixi≥b n i=1
xi≤mt
xi≤t
∀
i=1,...,n x,t≥0.Notethat(LP2)canbe viewedasa relaxationoftheSLCprob- lem,since anyoptimalsolution to theSLCproblemis feasibleto (LP2)bychoosingxastheprocessingtimesandtasitsmakespan.
Suppose we havean optimalsolution (x,t) to (LP2). If it is also feasibletotheSLCproblem,thatis,thejobshaveprocessingtimes xandcanbeassignedtothem machineswithmakespanatmost t,thenitmustalsobeoptimaltotheSLCproblem.
Thedualproblemof(LP2)is
(DP2)
max bu
s.t. aiu−yi−
v
≤0∀
i=1,...,nn i=1
yi+m
v
≤1 u,v
,y≥0.Letxi=b/
σ
fori=1,...,n andxi=0otherwise,andt=b/σ
be aprimal solution.Ifn <m,thenletu=1/
σ
,v
=0,yi=ai/σ
fori=1,...,nandyi=0otherwisebeadualsolution;ifn=m, letu=1/
σ
,v
=am/σ
,yi=(ai−am)/σ
fori=1,...,m andyi=0 otherwisebeadualsolution.Ineithercase,wecanverifythat(x, t) and(u,v
,y) areboth feasibleandhavethe sameobjectiveval- ues.Consequently,(x,t)isanoptimalsolutionto(LP2).Sincen≤ m andall thejobshaveprocessingtimeseithert=b/σ
or0,wecan seethat (x,t) is feasibleto theSLCproblem, andhenceit is
optimal.
4. Fixednumberofmachines(m≥2)
Inthissection, wediscussthe casewherethenumberofma- chines mis atleasttwo butisstill afixed constant.Weconsider two further cases: when the number of constraints is also fixed andwhenthenumberofconstraintsisaninputofaninstance.
4.1. Fixednumberofconstraints(k≥2)
Weshowthatwhenbothmandkareatleasttwobutarestill fixedconstants,theSLCproblemispolynomial-timesolvable.First, weprovethefollowingpropertyoftheSLCproblem:
Lemma1. TheSLCproblemhasanoptimalsolutioninwhichatmost m+k−1jobshavenonzeroprocessingtimes.
Proof. WeprovethatgivenanyoptimalsolutiontotheSLCprob- lem, we can find an optimal solution that satisfies the desired property. To show this, suppose we have an optimal solution to theSLCprobleminwhichIl isthesetofjobsthatareassignedto machinel.Weconstructthefollowinglinearprogram:
(LP3)
min t s.t. Ax≥b
i∈Il
xi≤t
∀
l=1,...,m x,t≥0.Itcanbeseenthatanyoptimalsolutionto(LP3)isoptimaltothe SLC problem. Note that there are totally m+k linear constraints (exceptforthenonnegativeconstraints)in(LP3),thereforeeachof itsbasicfeasiblesolutionshasatmostm+knonzeroentries.Now considerthevariabletinanybasicfeasiblesolution.Ift=0,then
Algorithm1Enumerationalgorithmforfixedmandfixedk. 1: foreachsubsetJ ofJwithm+k−1jobsdo
2: for each possible assignment of the jobs in J to the mmachinesdo
3: Solve(LP3)whilesettingxi=0fori∈J. 4: if(LP3)isfeasiblethen
5: Letthe processingtimes ofjobsbethe optimal solution to(LP3),andrecordthescheduleandthemakespan.
6: endif 7: endfor 8: endfor
9: return the schedule with the smallest makespan among all theseiterationsanditscorrespondingprocessingtimes.
alltheprocessingtimesarezeroandthelemmaholds.Otherwise, thereareatmostm+k−1nonzeroxisinthisbasicfeasiblesolu- tion.Thisimpliesthatthere existsan optimalsolutionwhichhas atmostm+k−1 nonzeroprocessing timesandthus the lemma holds.
ByLemma 1,there exists an optimalsolution that contains a constantnumberofnonzeroprocessingtimes.Inviewofthis,we canfindtheoptimalsolutionby enumeration.Ourapproach isto firstenumerateallthenonzeroprocessingtime jobsandfixtheir assignments.Thenwesolve(LP3)tofindthebestprocessingtimes.
WedenoteJasthejob setandstate thedetailsofthisprocedure inAlgorithm1:
Theorem3. Algorithm1returnsanoptimalsolutiontotheSLCprob- lemanditscomputationalcomplexityisO(nm+k−1L).
Proof. The optimality follows from Lemma 1, and the fact that there mustbe an assignment inthe enumeration which is iden- ticalto the assignment in the true optimalsolution. Then when onesolves(LP3)withthatassignment,anoptimalsolutionwillbe obtained.
NowwestudythetotalrunningtimeofAlgorithm1.Thereare atmostO((m+nk−1)(m+k−1)m)=O(nm+k−1)casesintheenu- merationalgorithm.Ineachcase,weneedtosolveonelinearpro- gram(LP3),whichhasm+kvariables(m+k−1forxand1fort) andthesamenumberofconstraints.Therunningtimeforsolving thelinearprogramisO((m+k)3L).Therefore,intotal,Algorithm1 requiresO(nm+k−1(m+k)3L)=O(nm+k−1L)operations.
Weclosethissubsectionbyconsideringthesimplecaseswhere m=1andk=2.InSection 3.1,weshow thatthesecasescan be solvedinO(n3L) timevia solvingthelinearprogram(LP1). Notice that usingthe enumerationalgorithm above,the worst-caserun- ningtimeinthiscasecanbeimprovedtoO(n2L).
4.2.Arbitrarynumberofconstraints(k≥2)
Nowwe considerthecaseinwhichthenumberofconstraints kisalsoaninputintheproblem.Inthiscase,itiseasytoseethat theclassicalparallelmachineschedulingproblemisaspecialcase oftheSLCproblem,aswe canset Ain(1)to bean identity ma- trixandbto be the predeterminedprocessingtimesof thejobs.
Therefore,the hardnessresultfortheparallel machinescheduling problemalsostandsfortheSLCproblem, i.e., theSLCproblemis NP-Hard when the number of machines is fixed and is strongly NP-Hardwhenthenumberofmachinesisaninput(Gary&John- son,1979).Inthefollowing,wefocusondesigningapproximation algorithmsforthiscase.
Wefirstdesign aPTASforthe casewherethe numberofma- chines is fixed and the number of constraints is an input. The
Algorithm2PTASforfixedmandarbitraryk. 1: Given
∈(0,1)andPdefinedasbefore.
2: Let h= (m−1)/
, and divide [0,P] into T0=0, T1=
P/m,...,Ti+1=(1+
)i
P/m,...,Tl−1=(1+
)l−2
P/m, Tl=P, where l is defined such that (1+
)l−2
P/m<P≤ (1+
)l−1
P/m.
3: foreachsubsetJhofJwithhjobsdo
4: foreachcombinationofPi∈
{
T1,...,Tl}
,i∈Jhdo 5: SetQi=Tj−1ifPi=Tj,∀
i∈Jh6: LetJr=J
\
Jh.Solvethefollowinglinearprogram:(LP4)
min n
i=1
xi s.t. Ax≥b
xj≤xi
∀
j∈Jr,i∈JhQi≤xi≤Pi
∀
i∈Jh x≥0.7: if(LP4)isfeasiblethen
8: Lettheprocessingtimesofjobsbe theoptimalsolution to (LP4), and J0 be the jobs in Jh that have processing timesin[T0,T1].
9: foreachpossibleassignmentofthejobsinJh
\
J0 tothemmachinesdo
10: Apply listscheduling to the remaining jobsin J0∪Jr, andrecordthescheduleandtheprocessingtimes.
11: endfor
12: endif 13: endfor 14: endfor
15: return the schedule with the smallest makespan among all theseiterationsanditscorrespondingprocessingtimes.
resultis based on guessing the optimal values of the large jobs andthePTAS fortheparallel machineschedulingproblemwitha fixednumberofmachinesbyGraham(1969).
Before describingouralgorithm,wedefine Ptobetheoptimal valueofthefollowinglinearprogram:
min n
i=1
xi
s.t. Ax≥b x≥0.
Apparently,Pisan upperbound andP/misalower boundofthe optimalmakespantotheSLCproblem.Inaddition,Pispolynomial intheinputsizes, nandk.Weuse x
todenotethesmallestin-tegerthat isgreater thanorequal tox. ThePTAS forthiscaseis describedinAlgorithm2.
Theorem 4. Algorithm 2 is a PTAS for the SLC problem when the numberofconstraintskis aninputoftheinstance, andthenumber ofmachinesmisafixedconstant.
Proof.First we calculate the computational complexity of Algorithm2.Fixing
,Step3requires(nh)enumerations.Notethat (1+
)l−2
P/m<P, thus l<logm/log(1+
)+2≤2logm +2, wherethe last inequality follows fromthe fact that log(1+
)≥
/2 when0<
< 1.Therefore,the numberofiterationsinStep 4 is lh≤(2logm +2)h, which is polynomially bounded by the input size. In each iteration, solving the linear program (LP4) requiresO((n+k)3L)operations.The numberofiterationsinStep 9isO(mh) andthelistschedulingrequiresO(nlogm) time.Bythe fact that m and
are fixed constants, the total running time is
polynomialtime.
Now we provethat thereturned schedulehasa makespanno largerthan1+
oftheoptimalmakespan.Letx∗andCmax∗ bethe processingtimes andthe makespanof thetrue optimalsolution, respectively.WeconsidertheiterationinAlgorithm2inwhichthe jobsofJhareexactlythehlargestjobsintheoptimalschedule,the valuex∗i fallsin[Qi,Pi]foreachi∈Jh,andtheassignmentofjobs inJhJ0 isthesameasthoseoftheoptimalsolution,whereJ0 are thejobsinJhwhichhaveprocessingtimesin[T0,T1]=[0,
P/m].
In thisiteration, the linear program must be feasible asx∗ is a feasible solutionto (LP4). Denote theprocessingtimes andthe makespan returned in this iteration by x and Cmax, respectively.
We studythelast completedjob j oftheschedule.First, suppose thatjisinJhJ0.Considerthescheduleinwhichwekeeponlythe jobsinJhJ0,andthejobsareassignedtothesamemachinesasthe optimalschedule.WedenoteCx∗ andCxasthemakespans ofthe aboveschedulewithprocessingtimesx∗andxrespectively.Notice that xi≤(1+
)x∗i forall i ∈JhJ0 by the thirdset ofconstraints of(LP4),thereforeCx≤(1+
)Cx∗.ByStep9ofthealgorithm,the last completedjobj ∈JhJ0 impliesthat themachinethatjob jis assignedtoonlycontainsjobsinJhJ0.Therefore,Cmax=Cxinthis caseanditfollowsthatCmax=Cx≤(1+
)Cx∗≤(1+
)C∗max.
Next we consider the case in which the last completed job j is in J0∪Jr. There are two further cases. If j ∈ J0, then we have xj≤
P/m≤
Cmax∗ ≤ mm−1Cmax∗ , since P/m isa lower bound ofthe optimalmakespantotheproblem.Ifj∈Jr,thensincejisnotone ofthelargesthjobs,we musthavexj≤1hn
i=1xi.Andsince x∗is feasibleto (LP4) andx isthe optimalsolutionto(LP4), itfollows thatxj≤1hn
i=1xi≤1hn
i=1x∗i ≤mhCmax∗ ≤mm−1C∗max.Therefore,xj≤
m
m−1C∗maxfor all jobjinJ0∪Jr.
Then since the jobsinJ0∪Jrare scheduled by listscheduling, wehave
Cmax≤ 1 m
n
i=1
xi+
1−1 m
xj≤ 1 m
n
i=1
x∗i+
1−1 m
xj≤
(
1+)
Cmax∗wherethefirstinequalityisbecausej isthelastjobinthesched- uleandweused thelistschedulingrule,thesecond inequalityis becausexis areoptimalto(LP4) inthat iteration,andthelastin- equalityisbecausexj≤mm−1Cmax∗ asdiscussedabove.
Finally,notethatthemakespanreturnedbyAlgorithm2cannot beworsethanthisschedule,thusTheorem4holds.
5. Arbitrarynumberofmachines(m≥2)
Inthissection, wediscussthecasewherethe numberofma- chines is an input. We first consider the case where there are two constraints, andthen look at the case with more than two constraints.
5.1. Twoconstraints(k=2)
Inthissection, we demonstratethat whenthere areonly two constraints, the SLC problem can be solved in polynomial time even ifthe number of machinesis an input ofthe instance. We startfromthefollowinglinearprogram,whichissimilarto(LP2):
(LP5)
min t s.t. n
i=1
a1ixi≥b1
n i=1
a2ixi≥b2 n
i=1
xi≤mt
xi≤t
∀
i=1,...,nx,t≥0.
Next,weshowthatallbasicfeasiblesolutionsof(LP5)arefea- sibleto the SLCproblem. Then sinceany optimalsolutionto the
Algorithm3LP-basedalgorithmforarbitrarymandk=2. 1: Findan optimalbasicfeasiblesolution(x,t)tothelinearpro-
gram(LP5),andletxbetheprocessingtimesofthejobs.
2: Schedulethejobswithprocessingtimesxi=t solely.
3: Fortheremaining (at mosttwo)jobs with0<xi<t,ifthere isonly one idle machine, assign thesejobs on that machine;
otherwise,assignthejobseachonasolomachine.
4: Returnx,Cmax=t,andtheschedule.
SLCproblemisfeasibleto(LP5)bychoosingtasitsmakespan,we knowthattheoptimalbasicfeasiblesolutionto(LP5)mustalsobe anoptimalsolutiontotheSLCproblem.Westartfromthefollow- inglemma:
Lemma2. Inany basicfeasible solution of(LP5), thereareatmost two variables inx satisfying 0< xi < t. Anditmust be oneof the followingcases:(a)exactlymvariablesinx satisfyingxi=t withall otherxi=0;(b)exactlym−1variablesinxsatisfyingxi=t,andat mosttwovariablesinxsatisfying0<xi<twithsumatmostt;or (c) nomorethan m−2variablesin xsatisfying xi=t,andatmost twovariablesinxsatisfying0<xi<t.
Proof. If t=0, then the lemma trivially holds. Otherwise, we count thenumberofnonzerovariables inthebasicfeasiblesolu- tion.We adda slackvariablezitothe constraintxi ≤tso thatit isrepresentedasxi+zi=t,
∀
i=1,...,n.Foranyfixed i,ifxi=0 or xi=t,then thenumber ofnonzeros (among xi andzi) inthe equality xi+zi=t is exactly one, otherwise it is two. However, since there aren+3 constraintsin total,there areat mostn+3 nonzeroentriesinabasicfeasiblesolutionofwhichatmostn+2 areinxiandzi.Therefore,foranybasicfeasiblesolution,therecan onlybeatmosttwoindicesi∈{
1,...,n}
suchthat0<xi<t.The remainderofthelemmafollowsimmediately.Lemma 2 can be used directly to obtain an algorithm for the SLC problem. We describe it as the LP-based algorithm (Algorithm3).NoticethatinStep3ofAlgorithm3,Lemma2guar- anteesthatthesumoftheprocessingtimesoftheremaining jobs (atmosttwo)isatmosttifthereisonlyoneidlemachine.There- fore,thereturned scheduleisfeasibleandthemakespan ist,the optimal value of (LP5). Thus, we findan optimalsolution to the SLCproblem.
ThemaincomputationinAlgorithm3istofindanoptimalba- sicfeasible solution.InKorteandVygen(2012) (Theorem4.16),a techniqueisintroducedtotransformafeasiblesolutioninalinear program to a basic feasible solution by eliminating the inequal- ity constraints one by one, andin each round, it solves a linear program,whichrequiresO(n3L) operations.Thusthetotalrunning timeofAlgorithm3isO(n4L).
Theorem5. TheSLCproblemwitharbitrarymachinesandk=2con- straintscanbesolvedinO(n4L)bytheLP-basedalgorithm.
Note that the LP-based algorithm can also be applied if the number of machines is fixed. When the number of machines is large,theperformanceoftheLP-basedalgorithmisbetterthanthe enumerationalgorithmwepresentedinTheorem3,whichrequires O(nm+1L)operations.
5.2. Fixedorarbitrarynumberofconstraints(k≥3)
As mentioned in the previous section, the SLC problem is strongly NP-Hard ifthe numberof constraints isan input ofthe instance.Inthissection,wedesigntwoapproximation algorithms forthiscase. The firstone isderived fromthe propertyof paral- lel machine schedulingproblems, andthe other one isbased on
Algorithm4Modifiedlistschedulingalgorithmforarbitrarykand m.
1: Solvethelinearprogrambelow:
(LP6)
min m1 n i=1
xi+
1−m1
z s.t. Ax≥b
xi≤z
∀
i=1,...,nx≥0, z≥0.
Denotetheoptimalsolutionasxandz.
2: Letxbetheprocessingtimesofthejobs.Schedulethejobsby thelistschedulingrule.
3: ReturnxandCmax.
thetechniqueoflinear programming.Notice that the approxima- tionalgorithmscanalsobeappliedtothecasewherethenumber ofconstraintsisfixedandgreaterthantwo,however,thecomplex- ityofthatcaseremainsunknown.
First,wedesignasimpleapproximationalgorithmbyadapting thewell-known list schedulingrule(Graham,1966). We firstde- cidetheprocessingtimesbysolvingaspecificlinearprogram,and thenschedulethejobsviathelistschedulingrule.Thedetails are giveninAlgorithm4.
We prove that the modifiedlist schedulingalgorithm has the sameapproximationratiofortheSLCproblemasfortheclassical parallelmachineschedulingproblem.
Theorem 6. The modified list scheduling algorithm is a (2−m1)- approximationalgorithmfortheSLCproblem.
Proof. Therunningtime forsolvingthe linearprogramis O((n+ k)3L),and for list schedulingisO(nlogm).Thereforethetotalrun- ningtimeisO((n+k)3L+nlogm),whichispolynomialinthein- putsize.
Letx∗,x∗maxandCmax∗ betheprocessingtimes,themaximumof theprocessingtimesandthemakespanofanoptimalschedule,re- spectively.Letx,xmax,andCmax bethosereturnedbyAlgorithm4. Consider thelast completed jobj.Bythe listschedulingrule,we have
Cmax≤ 1 m
n
i=1
xi+
1− 1 m
xj≤ 1 m
n
i=1
xi+
1− 1 m
xmax
≤ 1 m
n
i=1
x∗i+
1− 1 m
x∗max≤
2− 1 m
C∗max.
Thesecondlastinequalityholdssincethelinearprogram(LP6) returnstheminimumvalueofsuchanobjectivefunction.Andthis bound istight fromthe tight exampleofthe listscheduling rule fortheclassicalproblem.
Thesecond approximationalgorithmisbasedontheidea pre- sentedinSection5.1.However, itisnot clearhowtodirectlyex- tend (LP5) to obtain an optimal solution in polynomial time. To seethis, considerasimpleexamplewithn=4,m=3,andk=3, andtheconstraintsarex1+x2=x1+x3=x1+x4=5.Ifwetryto generalize(LP5),wewillgetthefollowinglinearprogram:
min t
s.t. x1+x2=x1+x3=x1+x4=5 x1+x2+x3+x4≤3t
0≤x1,x2,x3,x4≤t.
Itcanbeverifiedthattheuniqueoptimalsolutiontothislinear programis(x1,x2,x3,x4,t)=(3,2,2,2,3).However,thejobswith processingtimesx2,x3,x4 cannotbeassignedtothetworemain- ingmachineswithmakespannotexceedingthree.Therefore,(LP5)
Table 4
Values of K and the approximate ratios for different k and m.
k ˜ k = k + 1 −√
k K ratio m/ (m −K)
m = 100 m = 10 m = 100 m = 10
1 1 0 0 1 1
2 1.59 0 0 1 1
3 2.27 0.50 0.50 1.0050 1.0526
4 3 1 1 1.0101 1.1111
5 3.76 1.50 1.50 1.0152 1.1765
10 7.84 4.67 4.67 1.0490 1.8750
20 16.53 12 8.18 1.1364 5.50 0 0
50 43.93 36.86 8.78 1.5837 8.20 0 0
100 91 81 8.90 5.2632 9.10 0 0
maynotgiveafeasiblesolutiontotheSLCprobleminthiscase.In thefollowing,wemodifyittoderiveanapproximationalgorithm.
Weconsiderthefollowinglinearprogram:
(LP7)
min t s.t. Ax≥b
n i=1
xi≤
(
m−K)
txi≤t
∀
i=1,...,nx≥0, whereKisdefinedas:
K=
⎧ ⎪
⎨
⎪ ⎩
m− k
k+1−m, ifk˜>m,
max
k˜
− kk+1− k˜
,k˜− k k+1−k˜, ifk˜≤m, wherek˜=k+1−√
kand
xisthelargestintegerthatislessthanorequaltox.
Notice that K=0fork=1,2and0< K ≤min{m,k}fork ≥ 3(seeTable4forvariousvaluesofK),andKisarationalnumber sincekandmareintegers.Whenk=2,(LP7)reducesto(LP5),as consideredinSection5.1.Ifk≥3,however,theoptimalsolutionto theSLCproblemmaynotbefeasibletothislinearprogram.There- fore,theoptimalsolutionto(LP7)maynotbeanoptimalsolution totheSLCproblem.Nevertheless,weprovethattheoptimalsolu- tionto (LP7) isstill feasible andhasan objectivevalue nolarger thanafactoroftheoptimalmakespan.
Similar to the casewherek=2,we have thefollowing prop- erty:
Lemma3. Thereareatmostkvariablesinxsatisfying0<xi<tfor anybasicfeasiblesolutionofthelinearprogram(LP7).
WeomittheproofwhichisanalogoustothatofLemma2. Lemma4. Foreachbasicfeasiblesolutionofthelinearprogram(LP7) witht> 0,ifithasexactlylvariable(s)inx satisfyingxi=t,where l∈
{
m− K,m− K−1,...,max{
m−k,0}}
,thenithasaddition- allyatmostkvariablesinxwitheachprocessingtime0<xi<tand theirtotalprocessingtimeisatmost k+1−km+lt.Proof.Notice thatthere areatmostm− K
variablesinx satis-fyingxi=tbythesecondsetofconstraintsof(LP7),andatmostk variablesinxsatisfying0<xi<tbyLemma3.Ifthereareexactly lvariable(s) inx satisfyingxi=t,then the sumoftheremaining (atmost) k variables inx satisfying 0< xi < t is no larger than (m−l−K)t.It remainstoshow that m−l−K isnogreaterthan
k k+1−m+l.
Forthis,wedefineafunction f(x)=x−k+1k−x forx∈
{
1,...,k}
.Itiseasy toseethatf(x) isincreasing whenx≤˜kanddecreasing whenx≥k˜. Therefore, when k˜>m, we have m−l−K=m−l− f(m)≤m−l−f(m−l)=k+1−km+l;when ˜k≤m,we havem−l−
K=m−l−maxx∈{1,...,k}f(x)≤m−l−f(m−l)=k+1−mk +l. There- fore,thelemmaholds.
Lemma5. Let(x,t)beabasicfeasiblesolutionof(LP7),thenwecan constructafeasible scheduleoftheSLCproblemwitha makespanof atmostt.
Proof. Ifk ≤m andthisbasicfeasiblesolutionhasatmostm−k variablesinxsatisfyingxi=t(thosejobsmustbeassignedsolely), then by Lemma3,thereare atmostk variables inx satisfying0
<xi<tandthosecorrespondingjobscanalsobe assignedsolely andwearedone.
Next,we consider the casewhere m < k orm ≥ k butthere are more than m−k variables in x such that xi=t. Let l de- note the number of variables in x such that xi=t. By the case assumption and the constraint in (LP7), l∈
{
m− K,m− K− 1,...,max{
m−k,0}}
. Without loss ofgenerality, we can assume thereareexactlykjobshavingprocessingtimesxi<t,withsome jobshavingpossiblyzeroprocessingtimes.We nowshowhowto constructafeasibleschedulewithamakespanatmostt.First,we assigntheljobswithprocessingtimesxi=t tol machinessolely.Thenwefindthesmallestk+1−m+l jobswithprocessingtimes smaller than t. We claim that these jobs havea total processing time of at most t, and hence can be fit into a single machine.
If not, it follows that any k+1−m+l of the k jobs with pro- cessing timessmallerthan t havea total processingtime greater thant.Thenwe havethefollowingkinequalities(modkforeach index):
x1+x2+· · · +xk+1−m+l>t, x2+x3+· · · +xk+2−m+l>t, ..
.
xk−1+xk+· · · +xk−1−m+l>t, xk+x1+· · · +xk−m+l>t.
(2)
Onthe one hand,summingup inequalitiesin (2)we obtain (k+ 1−m+l)(x1+x2+· · · +xk)>kt, or x1+x2+· · · +xk>k+1−km+lt. On the other hand, by Lemma 4, the total processing time of thejobswithprocessingtimesxi <t isatmost k+1−km+lt,which leadstoacontradiction.Finally,thereareatmostk−(k+1−m+ l)=m−l−1 jobseach withprocessingtime smallerthan t, and m−l−1remainingmachines.Assigningthesejobssolelyprovides afeasiblesolutionwithamakespanofatmostt.
SimilartoLP-basedalgorithmfork=2,wecanfindanoptimal basic feasible solution of (LP7) in polynomial time andobtain a feasibleapproximated schedulefortheSLCproblem.We alsocall it LP-based algorithmand summarizeit inAlgorithm 5.Next we studyitsapproximationratio.
Theorem 7. The schedule returned by the LP-based algorithm has a makespan of Cmax=t≤mm−KCmax∗ , where C∗max is the optimal makespanoftheproblem.
Algorithm5LP-basedalgorithmforgeneralSLC.
1: Findan optimalbasicfeasiblesolution(x,t)ofthelinearpro- gram(LP7),andletxbetheprocessingtimesofthejobs.
2: Letlbethenumberofjobswithprocessingtimesxi=t.Sched- ulethesejobssolely.Ifthereisanyremainingjob,continuethe followingprocess.
3: Find the smallestk+1−m+l jobs withprocessingtime 0<
xi<t,andscheduletheminasinglemachine.
4: Schedule the remaining jobs in the remaining m−l−1 ma- chinessolely.
5: Returnx,Cmax=t,andtheschedule.