A Competitive Online Algorithm for Minimizing Total Weighted Completion Time on Uniform Machines

. We consider the classic online scheduling problem on m uniform machines in the online setting where jobs arrive over time. Preemption is not allowed. The objective is to minimize total weighted completion time. An online algorithm based on the directly waiting strategy is proposed. Its competitive performance is proved to be max 2 s max ( 1 − ( 1/ ( 2 􏽐 s i ))) , ( 2 s max / 􏼈 ( 1 + s max ))( 2 . 5 − ( 1/2 m ))} by the idea of instance reduction, where s m is the fastest machine speed after being normalized by the slowest machine speed.


Introduction
Scheduling is a commonly used term in several different contexts including production management, service operations, and computer systems. In a general sense, scheduling is a process of allocating some scarce resources to different activities. It aims to improve the effectiveness and/or efficiency to implement these activities. It is for this fact that scheduling has attracted numerous interests of both practitioners and researchers. In academia, thousands of papers have been published with scheduling as topics. ese works can be roughly classified into two categories, namely, application-oriented research and theoretical research.
From a perspective of applications, researchers try to provide a solution method for a given scheduling problem by utilizing mathematical or computation techniques. e effectiveness and efficiency of the proposed approach are often judged by its performance on randomly generated or benchmark instances or some case data. Along this line, a rich variety of scheduling problems have been investigated, motivated by different applications from real-world situations. Among these problems, a great many are focused on scheduling arising in industries of production and manufacturing. In this field, most of the work can be divided into four types in terms of solution methodology, which are analytical approaches (e.g., branch and bound [1], Lagrangian relaxation [2], and column generation [3]), heuristic dispatch rules [4], metaheuristics (e.g., simulated annealing [5] and genetic algorithms [6]), and machine learning methods (e.g., neural network [7], decision tree [8], and ensemble methods [9]). e detailed discussion of these methods is beyond the scope of this paper. e abovementioned references are just some of the landmark or representative papers in each field. Interested readers can further refer to some classical books (e.g., Brucker [10] and Pinedo [11]). In addition to the abovementioned work about shop-level scheduling methods, some attention has been paid on scheduling-related problems from the perspective of planning and management. For example, Sastoque Pinilla et al. [12] conducted a case study about technology readiness level (TRL) 5C7 project management in the aircraft industry. In addition, with the new requirements and challenges occurring in the context of Industry 4.0, some new technologies and ideas such as Internet of things, cyber-physical systems, and big data analysis have been introduced into the scheduling research [13][14][15].
In contrast, from a theoretical perspective, researchers first try to understand the computational complexity of a given scheduling problem. If the problem is computationally tractable, they then develop a polynomial algorithm that can give optimal solutions in polynomial time for any instance of the problem. If the problem is computationally intractable, they design an algorithm and evaluate it by its theoretically guaranteed performance rather than its performance in numeric simulations. e theoretically guaranteed performance often refers to the worst-case performance. Along this line, most of the work is focused on some classical and simplified scheduling models that are abstracted from similar applications, which can be often denoted by the widely used three-field classification scheme [16]. ese models can be further divided into two categories in terms of whether the full information about jobs is known at the outset or not, namely, off-line models and online models. For the former category, some pioneering works can be found in [17] and [18]. For the online category, some representative works include Hoogeveen and Vestjens [19], Anderson and Potts [20], and Correa and Wagner [21]. Interested readers can further refer to a review by Potts and Strusevich [22]. Following this line of theoretical research, we consider a classical online scheduling problem in this work.

Problem Formulation.
Formally, there is a sequence of jobs denoted by J 1 , J 2 , . . . , J n , which must be scheduled on one of m uniform machines without interruption. Here, uniform means that each machine has a job-independent speed. Each job J j is characterized by a release time r j , a processing requirement p j , and a positive weight w j . When a job is assigned on a machine, the processing time is its processing requirement divided by the machine speed. Without loss of the generality, we assume that the machines are ordered by a nondecreasing speed 1 � s 1 ≤ s 2 ≤ · · · ≤ s m . e objective is to minimize the total weighted completion time of all the jobs. We focus our attention on the online setting, which means that all the characteristics about one job is not revealed to the scheduling algorithm until it is released at its release time. e problem can be denoted by Q m |r j , online| w j C j .

Related Work.
In the online setting, parallel machine scheduling problem has obtained much attention. For the case of identical machines, many efficient online algorithms were presented [21,23,24]. When it comes to the setting of uniform machines, i.e., each machine has a different and jobindependent speed, most of the work was focused on the objective of minimizing the makespan [25][26][27]. For the objective of minimizing the total completion time, to the best of our knowledge, the only constant competitive algorithm was the one presented by Hall et al. [18]. ey designed a 8 + ε-competitive algorithm. e result had remained unchanged for more than ten years until Liu et al. [28] extended the result about a two-machine scheduling problem [29] and proposed an online algorithm with a competitive performance of ( ������ 4m − 3 √ + 3)/2 . It performs better than the 8-competitive algorithm when the machine number is not too larger. However, the competitive ratio tends to infinity with m increasing. As mentioned by Hoogeveen and Vestjens [19], for the single-machine case, any online algorithm that schedules a job as soon as the machine is available has an unbounded worst-case performance. e conclusion also holds up for the case of uniform machines. In other words, a waiting strategy is necessary in order to guarantee bounded competitive performance. Two kinds of techniques are commonly used to design waiting strategies. e first one is to shift releasing times forward. e revised releasing times are derived either by a heuristic method [23,30,31] or from a preemptive schedule by solving a related relaxation problem [21,32,33]. e other technique is to apply a directly waiting strategy, which makes the decision to insert appropriate waiting time or to immediately schedule a job by directly comparing processing time with the current time [19,20,34]. Hoogeveen and Vestjens [19] first developed the technique and proposed the delayed shortest processing rule (D-SPT) for the singlemachine scheduling to minimize the total completion time.
ey proved that the D-SPT rule is the best online algorithm for 1|r j , online| C j . e idea behind the D-SPT rule and its competitive analysis was generalized to the weighted case by Anderson and Potts [20]. ey proposed the delayed shortest weighted processing time (D-SWPT) rule and proved it is optimal for 1|r j , online| w j C j . e idea of the directly waiting strategy was further extended to design online algorithms for P m |r j , online| w j C j by Tao [24], Tao et al. [35], and Ma and Tao [36]. e authors designed several waiting strategies and proved their competitive performance.

Our Contribution.
For Q m |r j , online| w j C j , we construct a deterministic online algorithm and prove that it has a competitive ratio of no more than max 2s max (1 − (1/(2 s i ))), (2s max /(1 + s max ))(2.5 − (1/2m))}. To the best of our knowledge, this is the first online algorithm where the approximation ratio depends on the machine speeds. If the fastest machine is not too fast, say less than 4, the algorithm beats the 8 + ε-competitive algorithm [18], which is the best constant competitive algorithm so far. In addition, the performance ratio for our algorithm decreases as the machine number increases. It is contrary to the result in [28], where the competitive ratio increases as the machine number increases. us, our algorithm also outperforms the one in [28] in the case with a larger number of machines.
e remaining sections are organized as follows. In Section 2, the online algorithm is presented. e competitive analysis is detailed in Section 3. Conclusions are given in Section 4.

The LW-SWPR Rule
Inspired by the same idea of the directly waiting strategy mentioned above in the subsection of related work, we construct an online algorithm for Q m | r j , online | w j C j . We call the proposed algorithm the limited waiting shortest weighted processing requirement rule. It is therefore abbreviated to LW-SWPR, which can be described as follows with some notations listed in Table 1: 1. e LW-SWPR Rule. Whenever some idle machines and some jobs are available at time t, choose the machine with the highest speed and choose a job with the smallest value of the ratio p j /w j among all the arrived and unscheduled jobs. If ties occur, choose the smallest index. Say that M i and J j are chosen. Calculate the total processing requirement at all the busy machines at time t, which can be written as schedule J j on the machine M i ; otherwise, wait until a new job is released or the above inequality is satisfied. We note that the LW-SWPR rule can be reduced to the AD-SWPT rule in Tao [24] when all the machines have the same speed, i.e., the model is reduced to the identical-machine model. Next, we will show that the LW-SWPR rule has a machine number independent performance guarantee.

Instance Reduction.
Since it is very difficult to directly analyze the performance for an arbitrary instance, we wish to reduce the searching space for the worst-case instances. is is just the intuition behind the instance reduction method commonly used by Tao et al. [37,38] and Tao [24]. e basic idea is to modify an arbitrary instance to a new instance such that it has a worse performance ratio as well as a more special structure of which we can take advantage to analyze the performance ratio. To simplify the presentation, we list some instances with specified structure in Table 2. We also use these notations to refer to the instance set with the specified structure when no confusion arises. For ease of presentation, we denote that one machine is "idle"/"busy" at the time t if the machine remains idle/busy during the interval of (t − ε, t + ε), where ε is an infinitely small positive value. In order to differentiate the switching time points between the busy and idle states, we further state that the time t is a "starting point of busy time"(abbreviated to SPoint) if the machine remains idle in (t − ε, t) and busy in (t, t + ε) and that the time t is an "ending point of busy time"(EPoint) if the machine is busy in (t − ε, t) and idle in (t, t + ε).
First, we note that the worst-case instances can be obtained among the set of I 1 .
e reason follows. For any instance I which does not belong to the set of I 1 , there exists a time t between the earliest SPoint and the latest EPoint when all the machines are idle. us, we can split the instance I into two smaller instances that consist of jobs scheduled, respectively, before and after t. Denote the two instances by I ′ and I ″ , respectively. According to the LW-SWPR rule, we can readily discover that σ(I ′ ) and σ(I ″ ) maintain the starting times of all the jobs same as in σ(I), i.e., (2) Given any feasible schedule of I, we can construct two feasible schedules for I ′ and I ″ , respectively, by keeping the starting times unchanged. Because the optimal schedule is the one with the minimum objective value among all the feasible schedules, it follows that π(I) ≥ π I ′ + π I ″ . (3) Combining (2) with (3), we can obtain i.e., at least one of the two smaller instances can achieve a performance ratio not less than that of the original instance I. erefore, from the perspective of worst-case instances, we need to focus only on the set of I 1 .
Next, we show in Lemma 1 that I 1 can be further reduced to one of the two new instances I 2 or I 3 with the performance ratio not decreasing. Here, we only give some intuitive explanation while referring readers to [24] for the detailed proof. As mentioned above, jobs within each subqueue are ordered according to the WSPR rule. For I 1 , we can multiply the weights of some jobs by a parameter δ with not changing the mutual relations of the weighted processing requirements among jobs. e result is that jobs are scheduled in the same time intervals as in σ(I 1 ) after this modification. e fact means that the objective value of the online schedule for the modified instance is a monotonously increasing linear function with respect to δ. At the same time, the optimal objective value is a concave function with respect to δ because any feasible schedule remains feasible after modification and the optimal schedule is the one with the minimum objective value among all the feasible schedules. Combining the above observations with Lemma

Notation
Description t e current decision time σ(·) e schedule constructed by the LW-SWPR rule for a given instance. It also refers to the objective value of the schedule when no confusion arises S j e starting time of job J j in the online schedule σ(·) C j e completion time of job J j in the online schedule σ(·) π(·) e optimal schedule for a given instance. It also refers to the objective value of the schedule when no confusion arises 3.1 in [37] which states that the ratio of a convex function to a concave function is maximized at one endpoint of the supported interval, we can modify I 1 to an intermediate instance with a worse performance ratio by setting δ to a specified value. By repeatedly applying the modification, we can reduce I 1 to I 2 or I 3 .
Lemma 1 (see [24]). For any instance I 1 , a new instance I 2 or I 3 can be constructed by modifying the weights in I 1 , such that 3.2. Performance Analysis of I 2 and I 3 . Based on the special structure that I 2 and I 3 possess and the LP lower bound, we can analyze the performance ratio of I 2 and I 3 . First, an appropriate lower bound on the optimal schedule has to be established in order to further analyze the performance ratios of I 2 and I 3 . Because the instances I 2 and I 3 are associated with the special structure, we can only consider the lower bound on these special instances. is can be readily obtained from related results provided by Gu and Lu [39] and Chou et al. [40].
Lemma 2 (see [39,40]). For the Q m |r j , online| w j C j with p j � w j for each job, the optimal schedule satisfies an inequality of μ(I) ≥ r min where r min is the earliest release time.
Next, we analyze the performance ratios of I 2 and I 3 by two lemmas.

Lemma 3. For any instance I 2 , the online scheduling by the LW-SWPR rule satisfies
Proof. It does not change the performance ratio to multiply the weights of all the jobs by a positive constant. All the jobs in I 2 have the same weighted processing time and we can normalize the ratio of p j /w j to 1, i.e., w j equals p j . Consider the latest SPoint in σ(I 2 ), and denote it as r L . e "latest" implies that jobs are continuously processed after r L at each machine without idle time between jobs. Now, we analyze the performance ratio by two cases.
Case 1: there does not exist a job which is released before r L and is scheduled at, or after, r L in σ(I 2 ). Consider these jobs that start at or after r L . According to the increasing order of their starting times, denote these jobs by J 1 , J 2 , . . . , J n . e assumption in this case implies that these jobs must be released at, or after, r L . Furthermore, these jobs have no effect on jobs starting before r L . Construct an intermediate instance I 2 ′ which includes all the other jobs in I 2 except J 1 , J 2 , . . . , J n . en, we have Jobs are continuously processed after r L at each machine. So, we can limit the starting time of the j th job in J 1 , J 2 , . . . , J n as S j ≤ r L + S j ≤r L ,C j >r L p j + 1≤i<j p i m i�1 s i , i � 1, 2, . . . , m, j � 1, 2, . . . , n, where the second term is to average the total processing time that have to be finished between r L and S j over all the machines and S j ≤r L ,C j >r L p j represents the total remaining processing time at all the machines at time r L . Let S j ≤r L ,C j >r L p j : � A and n j�1 p j : � B. Along with (7), we can limit σ(I 2 ) by an upper bound as e second term in (10) can be regarded as the total weighted completion time of the jobs of J 1 , J 2 , . . . , J n , Table 2: ree types of instances with specified structure.
Any instance for which there does not exist a time t between the earliest SPoint and the latest EPoint in the online schedule by the LW-SWPR rule, such that all the machines remain idle at t I 2 : An instance which not only possesses the same structure as I 1 but also satisfies that each job has the same weighted processing time An instance which not only possesses the same structure as I 1 but also satisfies that jobs in the last subqueue in the online schedule have the same weighted processing time with weights tending to positive infinity 4 Mathematical Problems in Engineering which are continuously processed starting from the time r L + (A/ s i ) on a single machine, with the processing time of each job multiplied by a constant of 1/ s i . Consider the set of J 1 , J 2 , . . . , J n as a separate instance and further relax the release times of all the jobs to r L ; then, we can develop a lower bound of the optimal schedule π(I 2 ) according to Lemma 2.
According to the LW-SWPR rule, we have ( S j ≤r L ,C j >r L p j / s i ) ≤ r L , i.e., (A/ s i ) ≤ r L . Combining (9) and (10), we have Case 2: there exists at least a job J k which is released before r L and is scheduled at, or after, r L in σ(I 2 ). According to the LW-SWPR rule, J k must satisfy Otherwise, J k would be scheduled before r L . Consider the jobs that are completed after r L . According to the increasing order of their starting times, denote these jobs by J 1 , J 2 , . . . , J n . Construct an intermediate instance which includes all the other jobs in I 2 except J 1 , J 2 , . . . , J n . Divide the set of J 1 , J 2 , . . . , J n into two subsets as follows: Let J j ∈Q 1 p j : � A and J j ∈Q 2 p j : � B.
en, similar to the derivation of (9), we can limit σ(I 2 ) as By relaxing the releasing times of jobs in J 1 , J 2 , . . . , J n to 0, similar to the analysis of (10), we can limit π(I 2 ) as We can derive (A/ s i ) ≥ r L from (12). Furthermore, we can obtain J j ∈Q 1 p 2 j ≥ A 2 /m because there are at most m jobs in Q 1 . In addition, we have the inequality of m i�1 s i ≥ m. Combining these relations with (13) and (15), we can limit the performance ratio of I 2 as Mathematical Problems in Engineering e above two cases show that we can bound the performance ratio of I 2 from above equation by 2s m (1− (1/2 s i )) or (2s m /(s m + 1))(2.5 − (1/2m)) or the performance ratio of an intermediate instance I 2 ′ . Furthermore, in σ(I 2 ′ ), r L is not the latest SPoint anymore. Rewrite I 2 ′ as I 2 and repeat the above analysis until I 2 ′ becomes an empty set. Ultimately the performance ratio of I 2 can be bounded from the above equation by the larger value in 2s m (1 − (1/2 s i )) and (2s m /(s m + 1))(2.5 − (1/2m)). □ Lemma 4. For any instance I 3 , the online schedule by the LW-SWPR rule satisfies Proof. Jobs in the last subqueue of I 3 have the same weighted processing time with weights tending to infinity. Without loss of generality, let w j � δp j for these jobs with δ tending to infinity. In the following calculation of performance ratios, they are all carried out in the sense of limit when δ tends to infinity, with the sign of limit omitted. Denote by Q ∞ the set including all the jobs in the last subqueue of I 3 . Denote by r f the earliest releasing time of jobs in Q ∞ , and by r L the latest SPoint in I 3 . Next, we analyze the performance ratio of I 3 by the following three cases: Case 1: r L ≤ r f . Considering the time r f , according to the LW-SWPR rule, we have After the jobs which start before r f are completed, the jobs in Q ∞ are continuously processed. Assume that the jobs in Q ∞ start being processed in the order of J 1 , J 2 , . . . , J n . Let J j ∈Q ∞ p j : � B. Similar to the analysis in Case 1 in the proof of Lemma 3.5, along with (19), we can derive an upper bound of σ(I 3 ) as where π(I 3 ′ ) indicates a limited value. By relaxing the releasing times of jobs in Q ∞ to r f , we can similarly derive a lower bound of π(I 3 ) as When δ tends to infinity, the relations above immediately imply Case 2: r L > r f . Furthermore, jobs being processed at r L in σ(I 3 ) all belong to Q ∞ . Similar to the proof of Lemma 3, we can construct an intermediate instance I 3 ′ by deleting some jobs from I 3 such that r L is not the latest SPoint in σ(I 3 ′ ) anymore. Furthermore, it holds that Case 3: r L > r f . Furthermore, there are one or more jobs which do not belong to Q ∞ and are being processed at r L in σ(I 3 ). According to the improved AD-SWPT rule, these jobs must start before r f . We further analyze the performance ratio in terms of two subcases.
Case 3.1: there does not exist a job in Q ∞ which is released before r L and is scheduled at, or after, r L in σ(I 3 ). is case implies that jobs starting at, or after, r L are all released at, or after, r L . Except these jobs, we can construct an intermediate instance I 3 ′ , which includes all the other jobs in I 3 . Let S j ≥r L p j � B. Similar to the analysis in Case 1 in the proof of Lemma 3, we can derive Case 3.2: there exists at least a job J k in Q ∞ which is released before r L and is scheduled at, or after, r L in σ(I 3 ). First, consider these jobs which do not belong to Q ∞ and are being processed at r L in σ(I 3 ). Denote the set including these jobs by Q ′ . Let j∈Q′,S j ≤r L ,C j >r L p j : � A ′ . According to the LW-SWPR rule, these jobs must start being processed before r f . It follows that Because J k is released before r L and is scheduled at, or after, r L in σ(I 3 ), we have p k + S j ≤r L ,C j >r L p j Consider the jobs in Q ∞ which are completed after r L . Define two sets as follows: Construct an intermediate instance I 3 ′ , which includes all the jobs in I 3 except jobs in Q 1 and Q 2 . Let J j ∈Q 1 : � A and J j ∈Q 2 : � B. Similar to the analysis in Case 2 in the proof of Lemma 3, considering that jobs in Q 1 and Q 2 can be continuously processed after jobs in Q ′ are completed, we can derive an upper bound on σ(I 3 ) as By relaxing the releasing times of jobs in Q 1 and Q 2 to r f , we can also derive a lower bound on π(I 3 ) as Equation (26) implies that (A + A ′ )/ s i ≥ r L . Furthermore, J j ∈Q 1 p 2 j ≥ A 2 / s i because there are at most m jobs in Q 1 . Combining these relations with (24), (26), and (28) e first inequality is derived by applying (A + A ′ )/ s i ≥ r L and A ′ / s i ≤ r f . e second inequality is obtained by relaxing Q 2 to an empty set and then applying J j ∈Q 1 p 2 j ≥ A 2 /m. e above three cases show that we can bound the performance ratio from the above equation by the maximal value among 2s m (1/(1 − 2 s i )) and (2s m /(s m + 1))(2.5 − (1/2m)) and the performance ratio of the intermediate instance I 3 ′ . Furthermore, in σ(I 3 ′ ), r L is not the latest SPoint anymore. Rewrite I 3 ′ as I 3 and repeat the above analysis. Ultimately the performance ratio of I 3 can be bounded from the above equation by max 2s m (1 − (1/2 s i )), (2s m /(1 + s m ))(2.5 − (1/2m))}.

Conclusions
In this work, we design an online algorithm for Q m |r j , online| w j C j and prove that it is max 2s m (1 − (1/2 s i )), (2s m /(1 + s m ))(2.5 − (1/2m)) -competitive. e result is a generalization from the identicalmachine scheduling considered in [24]. Although the competitive performance is not a constant because it tends to infinity when the fastest machine speed s m tends to infinity, it still makes improvements on the existed results in some extents. e first one is that it improves the result provided by Hall et al. [18] when the fastest machine is not too fast, say less than 4. e second one is that it tends to an s m -related constant when the machine number tends to infinity. In this sense, it also improves the result provided by Liu et al. [28]. Furthermore, it is very hopeful to improve the performance guarantee to an s m -independent value if all the machines are considered besides the idle ones in the scheduling rule. e same analysis method can be employed. It deserves to be further investigated in our future work.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.