Better Algorithm of Ordinal Online Schedule for Jobs with Similar Sizes on Two Machines ()
1. Introduction
The scheduling problem on m parallel identical machines is defined as follows: Given a job set
of n jobs where job
has non-negative processing time
, assign the jobs on m machines
so as to minimize the maximum completion times of the jobs on each machine. The earliest algorithm for on-line scheduling jobs on parallel machines is the List Scheduling (LS) algorithm, which was introduced by Graham [1] . Many models and algorithms for online scheduling are proposed later on. In classic scheduling problem, there is no constraints on the size of job. However, in practice, the size of job can neither be too large nor too small. This motivates researchers to study scheduling problems when the sizes of all jobs are known in
with
[2] - [7] .
In this paper, we will consider ordinal online scheduling jobs with sizes in
on two parallel machines. The model of ordinal online scheduling was proposed by Liu et al. [8] . It is assumed that the values of the processing times are unknown, but that the order of the jobs by non-increasing processing time is known, i.e., without loss of generality that
. An algorithm named Pm was developed for the system of m machines and it is proved that the algorithm is the best online algorithm for
. In current research, it will be proved that, for
, the worst case performance ratio of algorithm P2 can not be improved even if the sizes of all jobs are known in
for any
. Then a better algorithm named S is proposed for
and its worst case performance ratio is given.
The rest of the paper is organized as follows. In Section 2, some definitions and the algorithm S and P2 are given. Section 3 analyzes the competitive ratio of the algorithm S. Finally, some concluding remarks are given in Section 4.
2. Some Definitions and Algorithms
Definition 1. Given m parallel machines, let
be any list of jobs. Algorithm A is a heuristic algorithm. Let
and
be the makespan of algorithm A and the makespan of an optimal off-line algorithm respectively. We refer to
as the worst case performance ratio of algorithm A.
In the following of this paper, we always assume that the number of machines is two (i.e.
) and the sizes of job list
satisfies
and
if no specific explanation is given.
Algorithm P2 [8] . Jobs are assigned to machines as follows:
i.e.
Algorithm S.
Jobs are assigned to machines as follows:
i.e.
The two algorithms are the same for assigning the first four jobs. The differences are that P2 assign the first two jobs on M2 and the third on M1 for job set
. However algorithm S assign the two consecutive job
on two machines alteratively.
In the following, we consider the worst case performance ratio of algorithm P2 and S. We will show that algorithm S is better than P2 under the assumption of
for
.
3. Main Results
Theorem 1. For algorithm P2, its worst case performance ratio is
. Furthermore, its worst case performance ratio can not be improved if
satisfy
for any
.
Proof: The first conclusion is a direct result from Liu et al. [8] . For the second conclusion, consider job list
satisfying
By the rules of P2, we get
It is obvious that
and
. Hence
In the following of this paper, let
to denote the completion time of machine Mi in the schedule assigned by algorithm S.
Lemma 2. Given any job list
, the following inequality holds
Proof: By the rules of S algorithm, we get
That means it is enough to prove
. We consider it according to the four cases of
,
,
,
.
Case 1:
. In this case,
Hence the following inequalities hold:
That means
.
Case 2:
. In this case,
Hence the following inequalities hold:
That means
. Similarly it is easy to show that the conclusion is true for the case of
and
.
Theorem 3. For any job list
with
and
, algorithm S has worst case performance ratio
(1)
Proof: Suppose (1) is not true. For
the following inequalities hold by Lemma 2:
That means
. Similarly
also holds for
. That means there are at most four jobs assigned on any machine in
any optimal schedule, i.e.,
. It is easy to prove that algorithm S is optimal if
. Now consider
. In this case
Hence
For the case of
, there are exactly three jobs on each machine in any optimal schedule. If
, we get
If
we have
For the case of
, the following holds
In any optimal schedule, exactly four jobs are assigned on one machine and exactly three jobs are assigned on another. If the machine assigned four jobs in optimal schedule has at least one job from set
, then the following inequality holds:
Hence we get
Otherwise the optimal schedule is that
and
are assigned separately on two machines. Let
,
,
. It is easy to see that
holds. We analyze the following two cases. In the case of
, we get
the last inequality results from
.
In the case of
we get
For
, there are exactly four jobs assigned on each machine and there is a machine on which at least two jobs from
are assigned in any optimal schedule. Hence the following inequality holds:
Therefore if
we get
If
we get
By the conclusions above, we get
Hence (1) is true for
.
Now we consider the case of
according to the four cases of
. In the following, we will use
and
to denote the job set assigned on machine Mi by algorithm S and optimal algorithm, respectively.
For the case of
, we have
,
,
. Without loss of generality, suppose
. Then it is easy to see that there exists
satisfying
. If
, then
. By
we get
. Therefore
If
, then
. By
we get
. Therefore
For the case of
, we have
,
,
. Without loss of generality, suppose
. Therefore there exists
satisfying
. In the following we consider this case according to the two subcases of
and
.
In this case of
, if
holds, then the following is true:
If
holds, we consider the following two subcases of
and
.
For the case of
,
holds by
. By
and
we get
. Therefore
For the case of
, by
we get
. By rules of S algorithm, we have
That means
. Therefore
Similarly we can prove the case of
.
By the same way used above, we can also show that (1) is true for the case of
and
for
. Now we show the tightness of the bound.
For
, Let
with
. By
the rules of S algorithm, we have
, i.e.,
. It is easy to see that
. Hence
It is easy to show the tightness for
by job list
with
,
and for
by job list with
,
.
4. Concluding Remarks
In this paper, we consider ordinal on-line scheduling for jobs with known sizes in
and non-decreasing processing times on two parallel machines system. Firstly it is proved that the worst case performance ratio of the existing algorithm P2 can not be improved even if the job processing times are known in
for any
. Secondly, an algorithm named S is proposed and its worst case performance ratio is given as follow:
which is better than algorithm P2. Just two machines are considered here. It is an interesting problem to consider general m machines system to design better algorithm.
Acknowledgements
The authors would like to express their thanks to the National Natural Science Foundation of China for financially supporting under Grant No. 11471110 and the Foundation Grant of Education Department of Hunan (No. 16A126).