Approximation Algorithms for Multitasking Scheduling Problems

In this work, we incorporate human factors and real-life operations into newly proposed multitasking scheduling problems with periodic shift activities. It is motivated by personnel resource scheduling with periodic work shifts under the requirement of providing continuous service to customers. We model the problem as two identical parallel machine scheduling with complementary non-available time periods, and consider two models with the objectives of the makespan, i.e. the maximum completion time and respectively the total completion time. We then prove that the Greedy algorithm and SPT rule are of asymptotic and parametric approximation ratios for the two models, respectively.


I. INTRODUCTION
In many scheduling applications, human resources are now becoming one of the critical factors or even the main issues in person-involved scheduling scenarios. Different from machines, people's working efficiency and quality may decrease severely after many hours of work, and consequently they need work shifts. Plenty of papers have been searching for effective shift scheduling strategies to alleviate the above negative effect. In this work, we are inspired by the observation that several persons or work groups may own one shared machine resource. Some of such applications are long distance transportation by truck (drivers can be regarded as parallel machines, and the total mileage can be divided into n sections, which can be regarded as n jobs), medical teams for outpatient and emergencies (medical teams for outpatient and emergencies can be regarded as parallel machines, and patients can be regarded as jobs), etc. Two drivers may share one truck. When one driver is tired, he will rest (can be regarded as machine maintenance) and the other driver will drive. In this way the truck runs all day and all night, while the two drivers can recover energy by having enough rest in their respective nonworking time.
The associate editor coordinating the review of this manuscript and approving it for publication was Muhammad Zakarya . Motivated by the above applications, we incorporate multitasking into parallel machine problem with periodic available time, and design approximation algorithms for different objectives. Our main contributions are proving that the Greedy algorithm and SPT rule are of asymptotic and parametric approximation ratios for the two models, respectively. This is of great significance to the multitasking scheduling problem when the number of jobs is large enough.

II. LITERATURE REVIEW
Scheduling is regarded as an effective tool to help make production plans (Wu and Che, 2020). Recently there is a trend to study machine scheduling under multitasking. Multitasking is a concept originating in computer systems such that multiple processing tasks share a single processing resource such as CPU. Related work refers to Chan et al. In this paper, we study the multitasking scheduling problem with alternate working periods. Different people take use of one shared resource in alternate working periods, which can be described as identical parallel machines with alternate non-available time. At any time point either machine is being available for processing jobs, implying that the shared resource is continuously available all the time. Moreover, the resource may stop processing and hold on an unfinished job while start to process another job, and later on it shifts back to resume the processing of the previously interrupted one. To be explained in the two parallel machines environment, the processing of any job may be preempted (the job being processed is interrupted before completion) by an non-availability period T on one machine, say machine 1, while another job is started at the same time point on machine 2 due to the start of an available time period on that machine. Machine 1 resumes its job processing after the end of time period T . That is, by the concept of multitasking, more than one task is in the status of being processed via some resource at a time. For example, one job is in process while another job is on hold.
For the considered multitasking scheduling problem with alternate working periods, our contributions mainly include: (i) embedding multitasking into parallel machine scheduling problem with alternate periodic available time, (ii) constructing two models with widely studied respective objectives, i.e., the makespan and the total completion time, (iii) devising an approximate algorithm for each model. It is assumed in both models that the processing time of any job is a positive integer (or is scaled to be integer). We prove that Greedy algorithm is asymptotically max{2(1 + b a ), 2(1 + a b )}-approximation for the makespan objective, while SPT (shortest processing time) rule is asymptotically (1 + max{ a b , b a })-approximation for the other objective.
The reminder of this paper is organized as follows. A detailed problem description is given in Section 2. Sections 3 and 4 discuss the objective of the makespan and total completion time, respectively. Section 5 draw the conclusion and some further research directions.

III. PROBLEM DESCRIPTION
There are n jobs to be processed on two identical parallel machines 1 and 2. Each job j is of integer processing time p j ∈ Z + (Z + is a set of positive integers). Machine 1 is with periodic maintenance activities during time intervals where i = 0, 1, 2, . . .. That is, the machine is unavailable for processing jobs within the time intervals. Similarly, machine 2 is unavailable within time intervals [i(a + b) + a, (i + 1)(a + b)] where i = 0, 1, 2, . . .. Machines 1 and 2 have periodic available time intervals with length equal to a and b, respectively. On each machine, jobs can be started in any available time interval, interrupted by some shift activity (each job can be preempted), and then resume its processing at the end of the shift activity. To the best of our knowledge, when combine with available time intervals on both machines, it becomes on continuous available machine with alternate intervals a and b.

IV. THE MODEL OF MAKESPAN
In this section, we consider the objective of makespan. We focus on the approximation performance of Greedy algorithm with the time complexity of O(n) (the pseudocode as shown in Algorithm 1) which assigns jobs one by one to either machine with currently smallest completion time, and processes jobs without any idleness (except for unavailable time, i.e. the machine is in maintenance activities) in between on both machines.
Define by t 1 and respectively t 2 the time at which machine 1 and machine 2 complete their last jobs in \ J n (excluding J n ). Define by S 1 = j∈σ 1 \J n p j and S 2 = j∈σ 2 \J n p j the total processing time of jobs, excluding job J n , on the two machines respectively. We have S 1 + S 2 = J j ∈σ p j − p n , i.e., where * , * indicate rounding up and down for * respectively.
In an optimal schedule, the makespan We consider the following two cases by whether t 1 ≤ t 2 . Case 1. t 1 ≤ t 2 . By Equation (1) and 0 < p n , By the above inequality, t 2 < a+ J j ∈σ p j a a+b < (a + b) + a+b a J j ∈σ p j . In the Greedy schedule, the last job J n is assigned to machine 1 since t 1 ≤ t 2 .
C greedy ≤ max{t 1 + p n a + b a + p n , t 2 } ≤ max{t 1 + ( For the makespan of an optimal schedule, by the case condition t 1 ≤ t 2 and Inequality (2), we have C * ≥ {t 1 , p n , 1 2 J j ∈σ p j }. We bound the ratio of C greedy C * as follows.
Thus, lim In this case, we have by Equation (3) that . For Greedy algorithm, the last job J n is assigned to machine 2, and C greedy ≤ max{t 1 , t 2 + ( p n a+b + 1)b + p n } ≤ max{ a+b b (a + J j ∈σ p j ), t 2 + ( b a+b + 1)p n + b}. Moreover, C * ≥ {t 2 , p n , 1 2 J j ∈σ p j } by the case condition t 1 > t 2 and Inequality (2).
Hence, lim in this case. In the above two cases, lim } in both cases. It completes the proof.

V. THE MODEL OF TOTAL COMPLETION TIME
In this section, we consider the objective of total completion time, i.e., j∈J C j . We mainly prove the approximation performance of the SPT rule which schedules the shortest job to the machine with earliest available time and processes jobs one by one without idleness in between on both machines (the pseudocode as shown in Algorithm 2). The time complexity of this algorithm is O(nlog(n)).

Algorithm 2 Algorithm Based on SPT Rule
Require: n, p j , (a job input instance) 1: Sort all the jobs according to SPT rule, i.e. σ = (J [1] , J [2] , · · · , J [n] ) 2: for j = 1 : n do 3: Calculate the available time of machine 1 and machine 2 4: if machine 1 is available at the earliest time then 5: Assign job j to machine 1 6: else 7: Assign job j to machine 2 8: end if 9: end for Given any job instance , let σ be the corresponding SPT schedule without shift, and σ = σ 1 ∪ σ 2 were sub-schedules σ 1 = (J [1,1] , J [1,2] , . . . , J [1,n 1 ] ) and σ 2 = (J [2,1] , J [2,2] , . . . , J [2,n 2 ] ) contain jobs to be processed on machines 1 and 2 respectively. Let n i (i = 1, 2) be the number of jobs in σ i . n 1 + n 2 = n. Let σ , σ 1 , σ 2 be the corresponding schedules for the scenario with shift activities. Then there are Notice that the jobs as well as their processing sequences in σ i and σ i are the same for i = 1, 2, while their start and completion times are different. Let S j , C j are the start and respectively completion times of job j in schedule σ , and S j , C j are that of the job in schedule σ .
Theorem 2: SPT is asymptotically (1 + max{ a b , b a })approximation for the model to minimize the total completion time.
Proof: For all the jobs in σ 1 , their total completion time is [1,j] ≥ 1≤j≤n 1 (n 1 + 1 − j) = n 1 (n 1 +1) 2 where the above inequality is due to the fact that each job is of at least one unit of time length. As b is a positive constant, we conclude that the last addition item on the righthand side of Inequality (5) can be bounded with n 1 a = o( 1≤j≤n 1 C [1,j] ). Hence, In an optimal schedule, denote by C * j the completion time of job j. We claim that C * j ≥ C j . lim It completes the proof.

VI. DISCUSSION
Different from previous studies, we model the problem with complementary non-available time periods. We find that the asymptotic and parametric approximation ratios for the two models are related to the length of the periodic available time intervals of the two machines, i.e. a and b. What's interesting is that whether the objective is to minimize the makespan or the total completion time, the closer the difference between the periodic available time interval of machine 1 and that of machine 2, the smaller the asymptotic and parametric approximation ratio. To the best of our knowledge, there is no similar conclusion in previous studies.

VII. CONCLUSION
In this work, we incorporate multitasking into parallel machine problem with periodic available time, and design approximation algorithms for different objectives. Future directions may include the discussion for non-periodic available time situation, the evaluation of more practical objectives, and the investigation of mixed integer programming model for this problem.