Information Processing Letters 111 (2011) 423–428
Contents lists available at ScienceDirect
Information Processing Letters www.elsevier.com/locate/ipl
Optimal semi-online algorithms for scheduling problems with reassignment on two identical machines Xiao Min ∗ , Jing Liu, Yuqing Wang College of Mathematics and Information Engineering, Jiaxing University, 314001, China
a r t i c l e
i n f o
a b s t r a c t
Article history: Received 31 May 2010 Received in revised form 13 November 2010 Accepted 3 January 2011 Available online 1 February 2011 Communicated by A.A. Bertossi Keywords: Scheduling Reassignment Competitive ratio Optimal algorithm
In this paper, we consider semi-online minimum makespan scheduling problem with reassignment on two identical machines. Two versions are discussed. In the first version, one can reassign the last job of one machine that is based on the problem proposed by Tan and Yu (2008) [1], in which case the last job of each machine √ is allowed to be reassigned. An optimal algorithm which has the same competitive ratio 2 is presented. In the second version we consider the combination of the next two conditions: the total size of all jobs is known in advance and one can reassign the last job of one machine. For this problem an optimal algorithm with competitive ratio 54 is also given. © 2011 Elsevier B.V. All rights reserved.
1. Introduction This paper studies semi-online scheduling problems with reassignment on identical machines. We are given a sequence of independent jobs 1, 2, . . . , n with processing time p 1 , p 2 , . . . , pn and a set of parallel identical machines M 1 , M 2 , . . . , M n . Each job is also identified by its processing time, preemption is not allowed. The goal is to assign the jobs to the machines so as to minimize the maximum machine load, where the load of a machine is the sum of processing time of the jobs assigned to it. A scheduling problem is called online if jobs come one by one, and we are required to schedule jobs irrevocably on machines as soon as they are given, without any knowledge of successive jobs. If we have full information of job sequence before constructing a schedule, the problem is called offline. In fact, a lot of problems in practice are neither strictly online nor offline, but somehow in between. This means that some partial information about the jobs is available before constructing a schedule or additional algorithmic extension is possible. Such a case is defined as
*
Corresponding author. E-mail address:
[email protected] (X. Min).
0020-0190/$ – see front matter doi:10.1016/j.ipl.2011.01.002
© 2011
Elsevier B.V. All rights reserved.
semi-online. Algorithms for online (semi-online) problems are called online (semi-online) algorithms. Due to their application in practice, various papers and enormous results appeared in the last decade [2,3]. The quality of the performance of an online (semionline) algorithm is measured by its competitive ratio. For an algorithm A, let C A be the objective value produced by A and C ∗ be the optimal value in an offline version. Then the competitive ratio of A is defined as the smallest value c such that for any instance I , C A ( I ) c · C ∗ ( I ). An online (semi-online) scheduling problem has a lower bound ρ if no online (semi-online) algorithm for it has a competitive ratio less than c. An algorithm is called optimal if its competitive ratio matches the lower bound of that problem. Tan and Yu [1] recently proposed a new type semionline scheduling problem on parallel machines with reassignment. They discussed three problems of online scheduling with reassignment, which distinguish from the classical online problem on that those jobs can be reassigned. Reassignment means jobs can be moved from one machine to another after all jobs have been assigned. The first problem is one can reassign the last k jobs, the second is the last job of each machine can be reassigned and the third is one can reassign arbitrary k jobs, they are denoted by P L , P E , P A , respectively. For two identical ma-
424
X. Min et al. / Information Processing Letters 111 (2011) 423–428
chines, three optimal algorithms with competitive ratio
√
4 3
3 , 2
2, are presented. Liu et al. [4] generalized P A to two uniform machines (denoted it by Q A ), obtained a lower (s+1)2
(s+1)2
bound s2 +s+1 and upper bound min{ s+2 , s+s 1 }. Cao and Liu [5] made a further investigation on the generalized veran optimal sion of P E (denoted it by Q E ) and presented √ algorithm with a competitive ratio min{ s + 1, s+s 1 }. Dosa and Han [6] considered another online scheduling problem with reassignment on two uniform machines. When a new job arrives at most K already scheduled jobs can be removed from the schedule, then all removed jobs and new job must be assigned to machines. They presented the related upper bound and lower bound for several versions according to K . Another corresponding problem is online minimum makespan scheduling problem with bounded migration studied by Sivadasan et al. [7]. When a new job arrives, it is allowed to migrate some scheduled jobs under the constraint that the total size of moved jobs is bounded by a certain threshold β times size of the arriving job. For some small β , they obtained several online algorithms with constant competitive ratio. To further shed light on the usefulness of different types of information, some papers considered whether the combination of two types of information can admit to construct a semi-online algorithm with much smaller competitive ratio than that of the case where only one type of information is available in advance. Tan and He [8] presented several kinds of combination which make no sense. Moreover they showed in the same paper that if both the total size and largest size of all jobs are known in advance, or if the total size is known in advance and all jobs come in non-increasing order of their sizes, opti, respectively. mal algorithms have competitive ratios 65 , 10 9 Zhang and Ye [9] considered the combination of suggestive and Largest Last. They √ proposed an optimal algorithm with competitive ratio 2 while each type of above information itself is useless. Epstein [10] showed that if the optimal value is known in advance and jobs come in nonincreasing order by their sizes, optimal algorithm has competitive ratio 10 . Dosa and He [11] first studied the semi9 online versions of where one type of partial information and one type of additional algorithmic extension are combined. Two versions are considered. For the first version that a buffer with length 1 is available and the total size of all jobs is known in advance, an optimal algorithm with competitive ratio 54 is proposed. For the second problem in which two parallel sub-processors are available and the total size is known prior, they gave a 65 -competitive algorithm. In this paper, we consider two semi-online scheduling problems with reassignment on two identical machines. First based on the problem P E introduced by Tan and Yu [1] that the last job on each machine can be reassigned after all jobs have been assigned, we show √ that the optimal algorithm with same competitive ratio 2 can be obtained by only reassigning the last job of one machine. Furthermore, we investigate the combination of the total size of all jobs is known in advance and one can reassign the last job of one machine. An optimal algorithm with competitive ratio 54 which is strictly less than the competitive ratio 43
by each information itself is presented. The two problems mentioned above are denoted by P RO , P SR , respectively. 2. Optimal algorithm for P RO In this section, we consider the problem P RO on two identical machines, where the last job on just one machine can be reassigned √ after all the jobs have been assigned. We prove that 2 is a lower bound of this problem and present an optimal Algorithm RO with a matching competitive ratio. It means that the same competitive ratio can be given but the condition has been reduced from the problem of P E in Tan and Yu [1]. √ Since P RO is weaker than P E , the lower bound 2 of P E is also a lower bound of P RO . Then we get the following result directly. Theorem 2.1.√Any algorithm A for the problem P RO has a competitive ratio 2. The current load of M k just before p i is assigned is denoted by M ki , k = 1, 2, and the final load of M k after the algorithm has finished is also denoted by M k for simplicity. The load of M k after all the jobs have been assigned, just before reassignment, is denoted by M k0 , k = 1, 2. Let L 1i = max{ M 1i , M 2i }, L 2i = min{ M 1i , M 2i }, i = 1, . . . , n.
Algorithm RO (Reassign one job).
√
1. (Assign) When a new job i comes, if L 1i ( 2 +
√
1)( L 2i + p i ) and p i 2L 1i , assign job i to the machine with a larger current load, otherwise assign it to the other machine. 2. (Reassign) 2.1. If all the jobs have been assigned to the same machine, reassign the last job of this machine to the other machine. Stop. 2.2. Denote the last job of the two machines by u , v after all the jobs have been assigned, w.l.o.g., assume that u is on M 1 , v is on M 2 and u comes before v. If M 10 − u > M 20 , reassign the job u to M 2 . Stop; if M 20 − v > M 10 , reassign the job v to M 1 . Stop.
In Step 2.2, we can see that M 10 = M 1v and M 20 = M 2v + v. Thus M 10 − u > M 20 and M 20 − v > M 10 are equivalent to M 1v > M 2v + u + v and M 1v < M 2v , respectively. So we know these two cases cannot occur simultaneously at any time and it guarantees that at most one job will be reassigned in Step 2.2. Note that Step 1 and Step 2.1 of Algorithm RO are the same as the one in Algorithm RE in Tan and Yu [1], while Step 2.2 in these two algorithms are different. Next several lemmas (Lemmas 2.1–2.4) can be directly obtained from Tan and Yu [1]. Lemma 2.1. For any algorithm A and r > 1, if M 2 M 1 rM 2 or M 1 M 2 rM 1 , then the competitive ratio of A is at most 2r . r +1
X. Min et al. / Information Processing Letters 111 (2011) 423–428
Lemma 2.2. In the assignment stage of Algorithm RO, L 1i
√
2L 2i , i = 1, . . . , n.
Lemma 2.3. If T can occur.
>
M 2v , then either
M 1u
<
M 2u
or
M 1u
>
M 2u
+
√
M 2u + T √ ( 2+1)( M 1u +u )−( M 2u + T )
C RO C∗
=1+ √
we
have
1√ √ ( 2+1) 2−1
=
√
=1+
M 2u + T v
1+
√ . ( 2+1) M 1v − M 2v
2M 2v < M 1v derived from M 2v <
Also together with M 1v ,
M 2u + T + v v M 2v
RO
C C∗
Mv
1 +
√ √2 ( 2+1) 2M 2v − M 2v
= 1 +
2.
Subcase 2.2. M 2u < M 1u M 2u + T . This subcase can never happen by Lemma 2.3.
RO Lemma √ 2.4. If Algorithm RO stops at Step 2.1, then C / C ∗ 2.
Subcase 2.3. M 1u > M 2u + T .
√
Similarly to Subcase 2.1, we have M 1u + u > ( 2 +
1)( M 2u + T + v ) or v >
We only need to focus on Step 2.2. RO Lemma √ 2.5. If Algorithm RO stops at Step 2.2, then C / C ∗ 2.
Proof. We prove the claim in two cases in the following: Case 1. M 1v < M 2v .
√
2( M 1u + u ).
√
We first consider the case of M 1u + u > ( 2 + 1)( M 2u + T + v ). If further M 1u M 2u + T + v, no reassignment happens. Since u√is assigned to the machine √with a larger load, then M 1u ( 2 + 1)( M 2u + u ) and u 2M 1u , hence M 1u +
√
√
√
u M 1u + 2M 1u = ( 2 + 1) M 1u ( 2 + 1)( M 2u + T + v ). It is a contradiction. If M 1u > M 2u + T + v, then u is reassigned to M 2 . It fol-
√ √ T + v + u ) = ( 2 + 1) M 2 .
√
lows that M 1 = M 1u ( 2 + 1)( M 2u + u ) ( 2 + 1)( M 2u +
Since v is assigned load, √ to the machine with a larger √ we have M 2u + T ( 2 + 1)( M 1u + u + v ) and v 2 × ( M 2u + T ). Moreover, as M 20 − v = M 2u + T > M 1u + u = M 10 , v is reassigned to M 1 . Hence, M 1 = M 1u + u + v, M 2 = M 2u + T .
√ We have M 2 = M 2u + T ( 2 + 1)( M 1u + u + v ) = √ ( 2 + 1) M 1 , and M 1 = M 1u + u + v < ( M 2u + T ) + √ √ √ 2( M 2u + T ) = ( 2 + 1)( M 2u + T ) = ( 2 + 1) M 2 . √ So C RO /C ∗ 2 comes true by Lemma 2.1.
On the other hand, M 2 = M 2u + T + v + u = ( M 2u + T +
v ) + u < M 1u + u M 1u +
√
√
C RO = M 2 = M 2u + T + v. If M 2u + T + v ( 2 + 1)( M 1u + u ),
then
C RO C∗
√ 2( 2+1) √ 2+1+1
=
√
√
2. If M 2u + T + v > ( 2 + 1)( M 1u +
√ √ √ ( 2 + 1) M 1v − M 2v . Since M 1u > M 2u , we have M 1u > 2M 2u , u ), it follows that v > ( 2 + 1)( M 1u + u ) − ( M 2u + T ) = C RO C∗
√ √2 ( 2+1) 2M 2v − M 2v
whole proof.
M 2v + v v
=1+
2
=1+
M 2v v
Mv
2 1+ √ <1+ ( 2+1) M 1v − M 2v √ = 2. It completes the
1√ √ ( 2+1) 2−1
By Lemmas 2.4–2.5, we obtain the following theorem.
Subcase 2.1. M 1u < M 2u . Since M 10 − u = M 1u < M 2u + T + v = M 20 and M 20 − v = u M 2 + T < M 10 , no reassignment is performed. As v is assigned to√the machine with a smaller √ load, we have M 1u + u > ( 2 + 1)( M 2u + T + v ) or v > 2( M 1u + u ).
√ √ If M 1u + u > ( 2 + 1)( M 2u + T + v ), then u > ( 2 +
1)( M 2u + T + v ) − M 1u and thus M 1u √ ( 2+1)( M 2u + T + v )− M 1u
√
2M 1u = ( 2 + 1) M 1u = ( 2 +
1) M 1 . Hence C RO /√C ∗ 2. At last, if v > 2( M 1u + u ), no reassignment occurs and
Mv
We distinguish three subcases according to the loads of two machines just before the assignment of u.
√
√
therefore
Case 2. M 1v > M 2v .
1+
√
If M 2 > ( 2 + 1) M 1 , then v > ( 2 + 1)( M 1u + u ) −
( M 2u + T ), and thus
Let T be the total size of jobs coming between u and v (not including u and v). Obviously all these jobs are assigned to M 2 . In other words, M 10 = M 1u + u = M 1v and M 20 = M 2u + T + v = M 2v + v. By Lemma 2.2, the loads of two machines will not be equal after the first job is assigned, i.e., M 1v = M 2v . M 1v
425
1+
M u +u C RO 1u C∗ u M1
=1+
M 1u u
<
√ . ( 2+1) M 2u − M 1u
√
Theorem 2.2. The competitive ratio of Algorithm RO for the √ problem P RO is at most 2. Combining Theorem 2.1 with Theorem 2.2, we conclude that Algorithm RO√ is an optimal algorithm for P RO with the competitive ratio 2. 3. Optimal algorithm for P SR
=
Let T be the total size of all jobs. Denote again by M ki the current load of M k just before the assignment of job p i . A job is called big job if its size satisfies p > 2.
then C A = M 2u + T + v = M 2 . If M 2 If v > √ √ ( 2 + 1) M 1 , we have C RO /C ∗ 2 by Lemma 2.1.
Theorem 3.1. Any algorithm A for the problem P SR has a competitive ratio at least 54 even if one can reassign arbitrary l jobs (l 1).
In addition, for M 1u < M 2u , one has Lemma 2.2. So it holds that 1+
1√ √ ( 2+1√ ) 2−1
=
√
RO
C C∗
1+
2M 1u < M 2u by Mu √1
√ ( 2+1) 2M 1u − M 1u
2.
2( M 1u + u ),
426
X. Min et al. / Information Processing Letters 111 (2011) 423–428
Proof. Let T = 8n + 2, n = 2k, k 4. We assume that n l since n tends to infinity finally. 1. The first 3n jobs with unit size arrive and are assigned to M 1 and M 2 . W.l.o.g., we assume M 1 M 2 . If M 1 = 3n, M 2 = 0, then the next two jobs x = y = 2.5n + 1 arrive. If they are assigned to different machine by algorithm A, then C A 3n + (2.5n + 1) − l = 5.5n + 1 − l > 5n; If they are assigned to the same machine, then C A x + y = A
5 2(2.5n + 1) = 5n + 2 > 5n. Hence CC ∗ 4n5n +1 → 4 (n → ∞). So we assume M 2 1. 2. Generally, we show the following property is true by induction. If we have M 2 2 j + 1 before the arrival of (3n + 2 j + 1)-th job, then M 2 2 j + 3 is valid right after (3n + 2 j + 1)-th and (3n + 2 j + 2)-th jobs with unit size arrive, where j = 0, 1, 2, . . . , k − 1. For j = 0, we get M 2 1. Let (3n + 1)-th and (3n + 2)-th jobs with unit size arrive. Before the arrival of (3n + 3)-th job, if we have M 2 < 3, then M 1 > 3n + 2 − 3 = 3n − 1 holds. The next and last two jobs with size x = y = 2.5n arrive. If x, y are assigned to different machine by algorithm A, we have C A 3n − 1 + 2.5n − l = 5.5n − 1 − l > 5n − l. If x, y are assigned to the same machine, we get C A 1 + x + y − l = 1 + 2 × 2.5n − l = 5n + 1 − l > 5n − l,
5n−l 5 then CC ∗ 4n +1 → 4 (n → ∞). So we assume M 2 3 after the arrival of (3n + 1)-th and (3n + 2)-th unit jobs. Assume that it holds for some j , 1 j < k − 1, that is, we have M 2 2 j + 1 before the arrival of (3n + 2 j + 1)-th job. Now (3n + 2 j + 1)-th and (3n + 2 j + 2)-th jobs with unit size arrive. If M 2 < 2 j + 3, we have M 1 > 3n + 2 j + 2 − (2 j + 3) = 3n − 1, and then the next and last two jobs with size x = y = 2.5n − j arrive. If the last two jobs are finally assigned to different machine, we have C A 3n − 1 +(2.5n − j )− l = 5.5n − 1 − j − l. Moreover, it is concluded that C A 5.5n − 1 − j − l 5.5n − 1 − (0.5n − 1) − l = 5n − l since j k − 1 = 0.5n − 1. If these two jobs are assigned to the same machine, we have C A 2 j + 1 + x + y − l = 2 j + A
5n−l 5 1 + 2(2.5n − j )− l = 5n + 1 − l > 5n − l, then CC ∗ 4n +1 → 4 (n → ∞), thus we get M 2 2 j + 3. 3. Assume that there are totally 3n + 2(k − 1) + 2 = 3n + n = 4n jobs with unit size have arrived, by the above property, we conclude M 2 2(k − 1) + 3 = n + 1. Finally the last two jobs arrive, one with size 4n + 1 and another with size 1. No matter how to schedule, one can obtain CA +4n+1−l n+14n = 5n4n++21−l → 54 (n → ∞). 2 C∗ +1 A
By normalizing processing time of all jobs, we can assume that T = 8. Algorithm SR (Known sum and reassign). 1. Let i = 1, M 11 = M 21 = 0. 2. Let p = p i , if no new job arrives, assign p to M 2 . Stop. 3. If M 1i + p M 2i + 2, then assign p to M 1 , i = i + 1,
=
M 1i −1
+ p, go to 2. 4. If M 2i + p 1, then assign p to M 2 , i = i + 1, M 2i = M 2i −1 + p, go to 2. 5. Let p K = p, if there exists k ∈ {1, 2} such that M kK + p K ∈ [3, 5], then assign p K to M k , all remaining jobs M 1i
to anther machine. Stop.
Fig. 3.1. The situation of machine loads performed by Step 8.6.
6. If p K 3, then assign p K to M 2 , all remaining jobs to M 1 . Stop. 7. If p K < 3 and M 1K + p K > 5, then assign p K to M 2 , all remaining jobs to M 1 . Stop. 8. If p K < 3 and M 1K + p K < 3, then put p K to M 1 , all remaining jobs are scheduled according to the following rule: 8.1. If p 2, assign it to M 1 , when the current load of M 1 is in the interval [3, 5], then assign all remaining jobs to M 2 . Stop. 8.2. If the first big job p B after p K arrives, and there exists k ∈ {1, 2} such that M kB + p B ∈ [3, 5], then put p B to M k , all remaining jobs to another machine. Stop. 8.3. Put p B to M 2 , if M 2B + p B 5, then assign all remaining jobs to M 1 . Stop. 8.4. If the incoming job satisfying p 2 exists, put it to M 1 successively. If the current load of M 1 is in the interval [3, 5], then assign all subsequent jobs to M 2 . Stop. 8.5. If the second big job p D after p K arrives, and there exists k ∈ {1, 2} such that M kD + p D ∈ [3, 5], then put p D to M k , all remaining jobs to another machine. Stop. 8.6. Put p D and all remaining jobs to M 1 . 9. Let p ∗ = min{ p K , p D } and reassign p ∗ from M 1 to M 2 . Stop. The situation of machine loads performed by Step 8.6 but just before Step 9 is given in Fig. 3.1. Lemma 3.1. When the algorithm stops and one of the two machines’ current loads lies in interval [3, 5], then true.
C SR C∗
5 4
holds
Proof. Because the total size of all jobs is T = 8, when the algorithm stops, there exists k ∈ {1, 2} such that the final load of M k ∈ [3, 5]. It follows that the total size of another machine satisfies 3 = 8 − 5 Ml 8 − 3 = 5. Thus, we deduce that C SR = max{ M 1 , M 2 } 5 while the optimal value is C ∗
T 2
= 4. So
C SR C∗
5 4
holds.
2
Lemma 3.2. When the algorithm stops, if the load of machine p
p
M 2 satisfies M 2 1, and M 2 + p > 5, then
C SR C∗
54 . p
Proof. Since the final load of M 2 satisfies M 2 1 and p p M 2 + p > 5, we have p > 5 − M 2 5 − 1 = 4. While the load of M 1 satisfies M 1 = T − M 2 < 8 − 5 = 3 < M 2 , then p p C SR = M 2 = M 2 + p 1 + p < 4 + p = 54 p 54 C ∗ . 2
X. Min et al. / Information Processing Letters 111 (2011) 423–428
Lemma 3.3. (1) When job p K arrives, there are at most two big jobs with size greater than 2 after p K in remaining jobs. So the algorithm performs in an appropriate way at Steps 8.2 and 8.5. (2) If the algorithm enters Step 8, and no big job arrives after p K , then the algorithm stops at Step 8.1. (3) If the algorithm enters 8.4, and no big job arrives after p B , then the algorithm stops at Step 8.4. Proof. (1) According to the rule of Algorithm SR and the definition of p K , when p K arrives, we have M 1K M 2K + 2 and M 2K 1, but M 1K + p K > M 2K + 2 and M 2K + p K > 1. Thus M 1K + p K + M 2K > M 2K + 2 + M 2K = 2M 2K + 2 2. It follows that the total size of all remaining jobs is T rK = T − ( M 1K + p K + M 2K ) < 8 − 2 = 6. So we know there are at most two big jobs after p K . (2) If the algorithm enters Step 8, then M 1K + p K < 3, K M 2 1, thus the total size of all remaining jobs satisfies T rK = T − ( M 1K + p K + M 2K ) > 8 − (3 + 1) = 4. In addition, M 1K + p K > M 2K + 2 2 holds. If all of the jobs after p K p satisfy p 2, then there must exist a job p such that M 1 + p ∈ [3, 5], so the algorithm stops at Step 8.1. (3) If the algorithm enters Step 8.4, then the total size of current arrived jobs is M 1B + M 2B + p B < 3 + 3 = 6, and the total size of all remaining jobs is T rB = T − ( M 1B + M 2B + p B ) > 8 − 6 = 2, and M 1B M 1K + p K > 2. Then there exists p p such that M 1 + p ∈ [3, 5], thus the algorithm stops at Step 8.4. 2
Case 3. If the algorithm stops at Step 7, then p K < 3, M 1K + p K > 5 and p K is assigned to M 2 . We have M 2 = M 2K + p K > ( M 1K − 2) + p K = M 1K + p K − 2 > 5 − 2 = 3. Similarly to Case 2, we get again
SR
Proof. Now we prove that the claim CC ∗ 54 always holds at stop-steps in Algorithm SR. Clearly, the algorithm stops at Steps 2, 5, 6, 7, 8.1, 8.3, 8.4, 8.5 and 9. When it stops at SR
Steps 5, 8.1, 8.3, 8.4, 8.5, we get the claim CC ∗ 54 comes true by Lemma 3.1. So we only need to prove the statement is true when Algorithm SR stops at Steps 2, 6, 7, 8.3, 9, respectively. Case 1. If the algorithm stops at Step 2, then the last job pn is assigned to M 2 . It follows that M n1 M n2 + 2, M n2 1 by the rule of the algorithm and we have M n1 + M n2 ( M n2 + 2) + M n2 = 2M n2 + 2 2 × 1 + 2 = 4. Thus pn = T − ( M n1 + M n2 ) > 8 − 4 = 4. Using C SR = M n2 + pn , one obtains that C SR C OPT
5 4
by Lemma 3.2.
When job p K arrives, we have M 1K M 2K + 2, M 2K 1, and M 1K + p K > M 2K + 2, M 1K + p K > 1. Case 2. If the algorithm stops at Step 6, then p K 3 and it is assigned to M 2 . We have 3 M 2 = M 2K + p K 1 + p K . If M 2 5, by Lemma 3.1, we get Lemma 3.2,
SR
C C∗
5 4
also holds.
C SR C∗
54 . If M 2 > 5, by
C SR C∗
54 .
Case 4. If the algorithm stops at Step 8.3, then p B is assigned to M 2 and M 2 = M 2B + p B > 5. In fact, M 2B = M 2K 1. By Lemma 3.2, we also have
C SR C∗
54 .
Case 5. Lastly we consider the case that the algorithm stops at Step 9. Since Step 8.6 has been performed, we have M 1D + p D > 5, 2 < M 2D = M 2K + p B < 3, M 2D + p D > 5. We distinguish two subcases as follows: Subcase 5.1. If p ∗ = p K p D , then p K is reassigned from M 1 to M 2 . It follows M 2K + p B + p K = ( M 2K + p K ) + p B > 1 + 2 = 3 from M 2K + p K > 1. If M 2K + p B + p K 5, we have C SR C∗ M 2K
54 by Lemma 3.1. If M 2K + p B + p K > 5, together with + p B < 3, we get p K > 2. Moreover, by M 1K + p K < 3, we know M 1K < 3 − p K < 3 − 2 = 1. According to the algorithm, it holds that M 2K = 0 and M 2 = p B + p K > 5. At
this moment, p B , p K , p D are three big jobs which satisfy 2 < p K , p B , p D < 3. If p B p D , then p B , p K are the two smaller size jobs among the three big jobs. It means that in the optimal schedule at least two jobs of p K , p B and p D must be assigned to one machine. Thus Algorithm SR yields an optimal schedule since C SR = p B + p D C ∗ . If p B > p D , then the p K , p D are the two smaller jobs among the three big jobs. Combining it with C ∗ p K + p D , we have
Theorem 3.2. The competitive ratio of Algorithm SR is at most 54 .
427
C SR C∗
p B +p K p D +p K
p B +2 p D +2
3+2 2+2
= 54 .
Subcase 5.2. If p ∗ = p D p K , then p K p D > 2. Similarly to Subcase 5.1, we know M 2K = 0 and p D is reassigned from M 1 to M 2 , the load of M 2 satisfies p B + p D > 2 + 2 = 4. Since Step 8.5 does not run, we have p B + p D > 5. If p B p K , then the p B , p D are the two smaller jobs among the three big jobs and the optimal schedule is achieved since C SR = p B + p D C ∗ . If p B > p K , then the p K , p D are the two smaller jobs among the three big jobs, together with C ∗ p K + p D , we still have 3+2 2+2
=
5 . 4
C SR C∗
The whole proof is completed.
p B +p D p K +p D
2
p B +2 p K +2
Acknowledgements The first author is supported by The Outstanding Youth Teachers Foundation of Zhejiang Province, China (70609011). The authors would like to thank the anonymous referees for the careful reading and helpful comments and suggestions, which led to an improved version of the original paper. References [1] Z.Y. Tan, S.H. Yu, Online scheduling with reassignment, Oper. Res. Lett. 36 (2) (2008) 250–254. [2] Y. He, Q.F. Yang, Z.Y. Tan, Semi on-line scheduling on parallel machines (I), Appl. Math. J. Chinese Univ. A 18 (2003) 105–114. [3] Y. He, Q.F. Yang, Z.Y. Tan, Semi on-line scheduling on parallel machines (II), Appl. Math. J. Chinese Univ. A 18 (2003) 213–222.
428
X. Min et al. / Information Processing Letters 111 (2011) 423–428
[4] M. Liu, Y. Xu, C. Chu, F. Zhang, Online scheduling on two uniform machines to minimize the makespan, Theor. Comput. Sci. 410 (21– 23) (2009) 2099–2109. [5] Q. Cao, Z. Liu, Online scheduling with reassignment on two uniform machines, Theor. Comput. Sci. 411 (2010) 2890–2898. [6] G. Dósa, Y. Wang, X. Han, H. Guo, Online scheduling with reassignment on two related machines, Theor. Comput. Sci. 412 (8–10) (2011) 642–653. [7] N. Sivadasan, P. Sanders, M. Skutella, Online scheduling with
bounded migration, Math. Oper. Res. 34 (2) (2009) 481–498. [8] Z.Y. Tan, Y. He, Semi-on-line problems on two identical machines with combined partial information, Oper. Res. Lett. 30 (2002) 408– 414. [9] G.C. Zhang, D.S. Ye, A note on on-line scheduling with partial information, Comput. Math. Appl. 44 (2002) 539–543. [10] L. Epstein, Bin stretching revisited, Acta Inform. 39 (2003) 987–1017. [11] G. Dósa, Y. He, Semi-online algorithms for parallel machine scheduling problems, Computing 72 (2004) 355–363.