We consider the classical online scheduling problem over single and parallel machines with the objective of minimizing total weighted flow time. We employ an intuitive and systematic analysis method and show that the weighted shortest processing time (WSPT) is an optimal online algorithm with the competitive ratio of
In the context of scheduling problems, the flow time of a job is the total time it stays in the system. Sometimes it is also called response time. It is equal to the delay of waiting for service plus the actual service time. The total (weighted) flow time captures the overall quality of service of the system, which is a natural and important measure in many applications such as networks and parallel computing [
In this work, we consider the online scheduling over parallel machines with the objective of minimizing the total weighted flow time. Formally, there is a set of
When the objective is to minimize the total (weighted) completion time, it is well known that optimal deterministic online algorithms with the competitive ratio of
Since the lower bound is so strong, an intuitive idea is to impose some additional assumptions on the original problem. A widely used assumption is that the ratio of the longest to the shortest processing time is not greater than a constant, say
To the best of our knowledge, no positive results exist when nontrivial weights are considered and preemption is not allowed. In this work, we show that the weighted shortest processing time (WSPT) rule is optimal with the competitive ratio of
The paper is organized as follows. In Section
For any instance
It can be easily shown that the worst-case instance can be obtained among such instances for which the schedules by WSPT rule are composed of a single block. A block means a time interval in which jobs are processed contiguously without keeping all the machines idle at the same time. Denote any one of these instances by
We will further show that a new instance with a more simple and special structure can be obtained by modifying the weights of jobs in
Let
It can be easily shown that the above lemma still holds when the interval is open at some endpoint in the condition that the limitation of
For an arbitrary instance
Assume that
Denote the last job of the next-to-last subblock in
Modify the weight
Denote the intermediate instance after this adjustment by
If If
By repeatedly applying the above transformation procedure, we can eventually obtain a new instance, such that the schedule by WSPT for the new instance is composed of a single subblock, or there are jobs with positive infinite weights in the last subblock of the schedule for the new instance. For the former one, for ease of exposition, we still use
Denote the first job in the single subblock of
Similar to the previous adjustment, modify the weight
We use
After finite steps, all the jobs lie in
In this section, we show that WSPT is optimal with the competitive ratio of
We know that the worst-case instance can be achieved among such instances, for which the schedules by WSPT are composed of a single block. From Lemma
The WSPT algorithm is optimal with the competitive ratio of
For the new instance
As for another new instance
Next, we show that
Consider the following instance. The first job
When
According to the above analysis, we can immediately obtain that the WSPT algorithm is optimal with the competitive ratio of
The WSPT schedule and optimal schedule for
Next, we will extend the result for the single machine in Section
For an instance
Moreover, if the
Hereafter, we refer to the lower bound in Corollary
For simplicity, we give the result via three Lemmas.
For any instance
All the jobs in the instance
Taking how the LP schedule is constructed, we can bound the flow time
Denote the two bounds in ( If If
In the case of parallel machines, for the instance
When there is no idle time on each machine before it completes its processing in
For the sake of exposition, we take an instance with three machines; for example, see Figure
Construct an intermediate instance denoted by
In order to bound the later term in the above expression, similar to the proof of Lemma
In addition, for the virtual
Another trivial lower bound on
Combining (
Similar to the analysis of the two cases in the proof of Lemma
In addition, it can be obtained from
According to the above analysis, we can obtain
By repeating the above transformation, we can get a sequence of intermediate instances with (
The schedule obtained by WSPT for
In the case of parallel machines, for the instance
For ease of presentation, we still take an instance with three machines; for example, see Figure
The schedule obtained by WSPT for
Following Lemmas
The WSPT algorithm is
In this work, we consider the single and parallel machines online scheduling problem of minimizing the total weighted flow time. We show that WSPT rule is optimal with the competitive ratio of
In the competitive analysis, we introduce an intuitive and systematic method. The method is aiming to derive an upper bound on the competitive ratio of the online algorithm. The analysis method exploits the possible structure of the worst-case instance with respect to the given online algorithm. The basic idea behind it is to begin with an arbitrary instance and transform it by modifying the instance, such that the modified instance shows a more special structure of which we can take advantage to analyze the performance ratio. The analysis method deserves to be extended to other online algorithms in our further work.
The authors would like to thank Junjie Zhou and Ye Tao for the useful discussion. This work is supported by the National Science Foundation of China (no. 11201391 and no. 61203176) and Fujian Natural Science Foundation of China (no.2013J01103).