• No results found

Problem Clint Hepner 1 and Cliff Stein

1 Department of Computer Science,

Dartmouth College, Hanover NH, 03755,[email protected]

2 Department of Industrial Engineering and Operations Research,

Columbia University, New York NY, 10027,[email protected]

Abstract. We study the problem of minimizing makespan for the Lazy Bureaucrat Scheduling Problem. We give a pseudopolynomial time al- gorithm for a preemptive scheduling problem, resolving an open prob- lem by Arkin et al. We also extend the definition of Lazy Bureaucrat scheduling to the multiple-bureaucrat (parallel) setting, and provide pseudopolynomial-time algorithms for problems in that model.

1 Introduction

The Lazy Bureaucrat Scheduling Problem is a modification of traditional scheduling models in which the goal is to minimize, rather than maximize, the amount of work done. Thebureaucrat is given a list of jobs that have deadlines. His goal is to do as little work as possible (as defined by a given objective), under thegreedy constraint that he must work on a job if one is available (otherwise, the obvious choice would be to do no work at all). Jobs whose deadlines pass before they are completed expire and can no longer be scheduled; this is desir- able, since unscheduled jobs reduce the amount of work the bureaucrat needs to do. The Lazy Bureaucrat Scheduling Problem was introduced by Arkin et al. [1], who considered several different objectives and variants of the greedy constraint. Arkin et al. motivate the study of this problem with two examples. One supposes an office worker who wants to do as little work as possible while main- taining a busy appearance. For example, suppose he is allowed to go home at 5:00 p.m. At 3:00 p.m., he has two jobs available, which will take 15 minutes and one hour, respectively, to complete. He may work on either, but he must work on one. At 3:15 p.m. he has a personnel meeting which he can skip if he is otherwise busy. He could do the 15-minute job, go to the meeting, then finish the hour-long job by 5:00. However, he can do less work by doing the hour-long job first, which will excuse him from the meeting, followed by the 15-minute job which he completes at 4:15 p.m. The other is the real-life example shown in the movieSchindler’s List[3], in which the factory workers needed to stay busy without making any real contribution to the German war effort.

Research partially supported by NSF Grant EIA-98-02068, NSF Grant DMI-9970063

and an Alfred P. Sloan Foundation Fellowship

M. Penttonen and E. Meineche Schmidt (Eds.): SWAT 2002, LNCS 2368, pp. 40–50, 2002. c

Another example might be a professor scheduling students during his office hour. Being a dedicated teacher, Professor Green does not want to leave before each student present has a chance to ask his question. However, he is leaving for a conference after his office hour, and he would like to finish up as soon as possible so that he has time to pack. Luckily, he knows that some students will leave before seeing him if they get tired of waiting or if they figure out the answer themselves. Therefore, Professor Green may want to see students in an order that will get through all the students as soon as possible, whether or not he actually talks to them.

In this paper, we will study preemptive variants of the Lazy Bureaucrat prob- lem. We further motivate our examination of the preemptive Lazy Bureaucrat problem with the following observation. In the usual deterministic single-machine scheduling models, the use of preemption can “correct” scheduling decisions made prior to the arrival of a new job. When all jobs have the same release date, preemption does not help because the scheduler can already choose from every unscheduled job at every point in time. In the Lazy Bureaucrat Schedul- ing Problem, preemption can be beneficial even when all release dates are equal, since a job can be left partially completed if it is preempted and never resumed. Partially processing a job allows the scheduler to stay busy just long enough for the deadline of a more costly job to pass. We shall use this unique feature of the Lazy Bureaucrat Scheduling Problem to show that preemption can be used to reduce the makespan of a schedule even if the all the release dates are equal.

We also extend the Lazy Bureaucrat Scheduling Problem by allowing multi- ple bureaucrats. We restrict ourselves to a model where each bureaucrat works independently so that one bureaucrat cannot prevent another from working. When preemption is allowed, we also make the restriction that a job can only be run by the bureaucrat that started the job,i.e., migration is not allowed.

Arkin et al. define many different Lazy Bureaucrat scheduling problems in [1] and they present NP-hardness results for most problems. They give polynomial- time algorithms for some special cases, and they give pseudopolynomial-time algorithms for some weakly NP-complete problems. Of particular interest to us is a pseudopolynomial-time algorithm for minimizing the makespan of a schedule for a set of jobs which share a common release date.

In this paper, we give pseudopolynomial-time algorithms for the problem of minimizing makespan when preemption is allowed, assuming a job may only be scheduled if it is possible to finish it by its deadline, in both the single- and multiple-machine settings. We first prove structural results that show any pre- emptive schedule can be converted to a schedule with at most one preemption. Our algorithm converts an instance I of a preemptive problem into a pseu- dopolynomial number of nonpreemptive instances. One of these new instances has the optimal preemptive schedule of I as its optimal nonpreemptive sched- ule. The nonpreemptive version has a pseudopolynomial-time algorithm, so the optimal preemptive schedule can be found in pseudopolynomial time as well. In the multiple-bureaucrat setting, we introduce pseudopolynomial-time algo- rithms for minimizing the makespan of both nonpreemptive and preemptive

schedules with equal release dates by modifying the algorithms for the corre- sponding single-bureaucrat problems. We show that for a fixed number of bu- reaucrats, we can assign jobs to bureaucrats with dynamic programming to find the optimal nonpreemptive schedule. When preemption is allowed, we can again convert a problem instance to a set of nonpreemptive problem instances and take the best optimal nonpreemptive schedule as the optimal preemptive schedule.

2 Preliminaries

Definitions and Notation. Abureaucrat is an entity capable of doing work, sim- ilar to a machine in a traditional scheduling problem. A bureaucrat, however, must obey agreedy principle, which states that if at timetthere is an unsched- uled job that can be run, the bureaucrat must run a job.

An instance of a Lazy Bureaucrat problem is a setJ ofnjobs, a numberm of bureaucrats and a specification of the notion of availability. Each job j has a processing time pj and a deadline dj. We define pmax = maxjpj to be the maximum processing time and dmax = maxjdj to be the maximum deadline. The critical point of a job, c

jt(σ), is the latest point in time, as of timet, that jobj can be scheduled in scheduleσand still complete by its deadline. Ifyjt(σ) is the amount of processing remaining for job j at time t in schedule σ, then c

jt(σ) =dj−yjt(σ). When the scheduleσand the point in timetare clear from context, we abbreviate the critical point and the remaining processing time as c

j andyj, respectively. The starting time of a jobj is referred to asSj, and the completion time Cj is the time at which the job has run forpj units of time. Each job also has a release date rj before which it may not be processed. For the rest of this paper, we assume that all release dates are equal. This means that by the greedy principle, the schedule may never be idle.

In the preemptive setting, the notion of availability must be defined precisely. For example, if a job cannot be completed before its deadline, should the bu- reaucrat be allowed to work on it anyway? Three definitions of availability for incomplete jobs are given in [1], which we will denote as pmtnI, pmtnII, and pmtnIII; see that paper for details. Under pmtnI, a job may be processed at any time before its deadline passes. A job is only available under pmtnII if it can be completed by its deadline; this means a job cannot be scheduled after its critical point. The final constraint,pmtnIII requires a job to be completed if it is started. We consider preemptive problems only of typepmtnII in this paper. To more easily refer to Lazy Bureaucrat problems, we introduce the follow- ing extensions to the three-field classification scheme due to Graham et al. [2] as follows. Since bureaucrats are identified with machines, they continue to be represented by the usually symbols (1, P, R,etc.). The taglazyin the constraints field indicates that the problem is a Lazy Bureaucrat problem. The three objec- tives studied in [1], makespan, total time spent working, and weighted sum of completed jobs, are specified byCmax,ijtij, andjwj(1−Uj), respectively, wheretij is a binary variable that indicates if jobjexecutes at timei, andUj is a binary variable that indicates if jobjdoes not finish (compare with the slightly

different normal meaning ofUj, which is 1 if aj finishes after its deadline). For example, the problem of minimizing the makespan of a nonpreemptive schedule would be 1|lazy|Cmax. If preemption is allowed and only completable jobs are available, the problem would be 1|lazy,pmtnII|Cmax.

Previous Results. Many results for Lazy Bureaucrat problems were given in [1]. A brief summary of results relevant to this paper is given here. In the general nonpreemptive case the Lazy Bureaucrat Scheduling Problem is strongly NP- complete for all three objective functions Cmax, ijtij, and jwj(1−Uj). They are also hard to approximate to within any constant factor. When all re- lease dates are equal, there is a pseudopolynomial-time algorithm. Several special cases have polynomial-time algorithms. When preemption is allowed, hardness results depend on the type of preemption allowed. For all three objective func- tions, the Lazy Bureaucrat Scheduling Problem is polynomially solvable under pmtnI, weakly NP-complete under pmtnII, and strongly NP-complete under pmtnIII. Open problems include finding algorithms for 1|lazy,pmtnII|Cmax, 1|lazy,pmtnII|ijtij, and 1|lazy,pmtnII|jwj(1−Uj) that run in pseu- dopolynomial time, with or without release dates.