New bounds and algorithms for on-line scheduling: two identical processors, known sum and upper bound on the tasks

In this paper we study a semi on-line version of the classical multiprocessor scheduling problem on two identical processors. We assume that the sum of the tasks and an upper bound γ on the size of each task are known. Each task has to be assigned upon arrival and the assignment cannot be changed later. The objective is the minimization of the maximum completion time on the processors. In this paper we propose new algorithms and improve known lower and upper bounds on the competitive ratio. Algorithms and bounds depend on the value of γ . An optimal algorithm, with respect to the competitive ratio, is obtained for γ ∈ [ 1 n , 2( n +1) n (2 n +1) ] ∪{ 2 n − 1 2 n ( n − 1) } , where n is any integer value, n ≥ 2 .


Description of the problem
In this paper we study semi on-line scheduling on two identical processors, where the sum of the tasks (normalized to 2, without loss of generality) and an upper bound γ on the size of the tasks are known in advance.Tasks arrive one at a time and must be immediately assigned to a processor.No changes are permitted on previous decisions.The objective is to minimize the makespan.

State of the art
The performance of on-line algorithms is often analyzed by studying their competitive ratio as introduced in [8].We indicate with A(I) the value of the solution obtained by an algorithm A on an instance I, and with T * (I) the optimal value of an off-line algorithm, that is an algorithm that has perfect information on all the instance I.The competitive ratio r A of algorithm A is defined as r A = max I A(I) T * (I) .An on-line algorithm A is said to be optimal if no other algorithm A has a competitive ratio r A < r A .
For the on-line version of the multiprocessor scheduling problem on two processors the algorithm which assigns the incoming item to the least loaded processor (LS algorithm) is 3  2 -competitive and is optimal.The result is due to Graham [5], where it has been shown that the algorithm is (2 − 1 m )-competitive for m processors and to Faigle et al [4] who proved that the algorithm is optimal when m = 2 and m = 3.
Several semi on-line versions of the multiprocessor scheduling problem on two processors have been studied.Kellerer et al [7] have studied the cases where a buffer of fixed length is available to store the tasks, or the total size of the tasks is known, or two processors are available for the processing.For each of these problems an optimal 4  3 -competitive algorithm has been provided, which improves the 3 2 of the on-line problem.A 4  3 optimal algorithm has been obtained also for a randomized algorithm (see Bartal et al. [3]).Angelelli [1] has studied the semi on-line version on two processors where, in addition to the sum of the tasks, a lower bound β on the size of each task is known.He has shown that the performance of 4   3   is improved by an optimal algorithm to max(2 − 2β, 1) if the lower bound β is greater than 1  3 .He and Zhang [6] have studied the semi on-line problem where both the bounds β and γ are known.They proved that the LS algorithm is optimal with performance 1 + γ−β 2β .The only semi on-line problem on two processors which has been studied in the literature and is still   partially open is the problem with given sum of the tasks and known upper bound γ.This problem has been introduced in [2] where an optimal 4 3 -competitive algorithm has been presented for γ ≥ 1.For γ < 1, the results are pictured in Figures 1, 2, and 3, where lower and upper bounds on the performance ratio of algorithms are illustrated.Namely, these figures show the bounds for γ ∈ [ 1 n , 1 n−1 ] for n = 2, n = 3 and n integer greater than 3, respectively.

Contribution of the paper
In this paper we improve on lower and upper bounds on the performance of algorithms for the problem described above.The results are summarized in Figures 4, 5, and 6.Our objective was to strengthen the bounds known for γ ∈ [ 1  2 , 1] to the intervals where n is any integer greater than 2. This has been completely achieved for the lower bounds.By comparing Figure 1 to Figures 5 and 6 we note that the shape given in Figure 1 has been reproduced in parametric form with respect to n on every interval . Further relevant results, though partial, have been achieved for upper bounds.In Figure 4 we see that the upper bound on [ 1  2 , 1] has been improved; in Figure 5 and specially in Figure 6 we see the improvement over List Scheduling -the only algorithm which was previously available for small values of γ (large values of n).We note that the proposed algorithms are optimal for γ ∈ . It is still an open problem whether the algorithm, which is optimal for γ = 2n−1 2n(n−1) , can be extended to a neighborhood of such a point.

Structure of the paper
In Section 2, we propose lower bounds on the performance of any algorithm for different values of γ in the range where n is any integer greater than or equal to 2. First, two lower bounds are proposed for γ ∈ [ 2(n+1)  n(2n+1) , 2n−1 2n(n−1) ] and for γ ∈ Next, the bounds are extended to the entire range In Section 3, we propose three algorithms H , S, and H . Algorithms H and H provide the main results of the paper.Algorithm S is used as a "subprogram" for algorithm H . Finally, some conclusions are given.
In this paper we denote with T * and T, respectively, the off-line optimum makespan and the makespan obtained by an on-line algorithm.

Lower bounds
In this section we propose a lower bound on the performance of any algorithm for each value of γ in the interval where n ≥ 2 can be any integer.We first consider lower bounds for γ ∈ and then extend the bounds to the entire interval.
] for some fixed integer n ≥ 2, then no on-line algorithm can have competitive ratio better than n−1 Proof: Let us consider two parametric instances I p , I p , where p ∈ [0, γ] is a parameter whose value corresponds to the size of the first two tasks of each instance.The two instances are defined as follows: While the off-line optimum for both I p and I p is T * = 1, we note that in the optimal assignments for I p and I p the two tasks p are assigned, respectively, to different processors and to the same processor.
When two tasks of size p arrive first, any algorithm H has to decide whether it assigns them to different processors or to the same processor.
1) If algorithm H assigns the two tasks p to different processors, then on instance I p the makespan is 2) If algorithm H assigns the two tasks p to the same processor, then on instance I p the makespan is Thus, in either case T/T * ≥ min(1 − p + 1 n , 2p + (n − 1)γ).This lower bound clearly depends on the parameter p.By maximizing with respect to p, we obtain the bound Note that this value of the parameter fits all the implicit assumptions on p (i.e., for some fixed integer n ≥ 2, then no on-line algorithm can have competitive ratio better than n 2n−1 (1 + (n − 1)γ).
Proof: Let us consider two parametric instances I p , I p , where p ∈ [0, γ] is a parameter whose value corresponds to the size of the first two tasks of each instance.The two instances are defined as follows: , where the equality p + (n − 1) 1−p n−1 = 1 is an identity satisfied for all p.
Here we only have to impose the inequality I p = {p, p, α, β, (2n − 3) tasks of size γ}, where the parameters p, α and β are fixed such that Obviously, we must guarantee that α, β ]. Summarizing the requirements on p induced by instances I p and I p , we assume the inequalities While the off-line optimum for both I p and I p is T * = 1, we note that in the optimal assignments of I p and I p the two tasks p are assigned, respectively, to different processors and to the same processor.Now, consider an algorithm which assigns the first two tasks to the same processor, and calculate the makespan it obtains on instance I p .Inequality (2) together with the condition γ ≥ 1 n implies p ≤ 1 n .Thus, the inequalities hold.
A set of 2n − 2 tasks of size 1−p n−1 must be assigned to the two processors which have loads 2p and 0, respectively.The makespan T produced by the algorithm is either n Consider now an algorithm which assigns the first two tasks to different processors, and calculate the makespan it obtains on instance I p .Observe that an odd number of tasks of size γ must be assigned to two processors whose loads are equal to p. Inequality (1) implies that the residual load [α + β] is not greater than γ.That is, Let us observe that p + (n − 1)γ ≤ 1 + p for γ ≤ 1 n−1 , and derive that no algorithm can guarantee a ratio better than min(p + (n − 1)γ, n 1−p n−1 ) on a set of instances whose off-line optimum is T * = 1.The maximum value for such a lower bound is n(1+(n−1)γ) . In conclusion, for any algorithm, an instance exists such that 2 Now we extend the previous lower bounds to the range for any fixed integer n ≥ 2. The idea is that if a set of instances can be used to prove a lower bound b for a fixed γ , then the same set of instances can also be used to prove the same lower bound b for any other γ > γ because each task p satisfies p ≤ γ < γ.
n for some fixed integer n ≥ 2, then no algorithm can have competitive ratio better than 1 + 1 2n+1 .
Proof: Apply Lemma 1 for γ = 2n−1 2n(n−1) . 2 In conclusion, by a selection of the highest lower bound available for each value of γ, the following general lower bounds can be drawn for γ ∈ ] for some fixed integer n ≥ 2, then no algorithm can have competitive ratio better than 1 + 1 2n+1 .
Proof: This follows from Lemma 3. 2 ] for some fixed integer n ≥ 2, then no algorithm can have competitive ratio better than n−1 Proof: This is the statement of Lemma 1. 2 ] for some fixed integer n ≥ 2, then no algorithm can have competitive ratio better than 1 + 1 2n .
Proof: This follows from the bound given in Lemma 4, which is greater than the one in Lemma 2 for for some fixed integer n ≥ 2, then no algorithm can have competitive ratio better than n 2n−1 (1 + (n − 1)γ).
Proof: This is the statement of Lemma 2 restricted to a shorter interval.2

Algorithms
In this section we propose three algorithms H , S and where n is any integer greater than or equal to 2. While the focus is on the range γ ∈ for n ≥ 2, some results for H will be proved valid also for n = 1.
We shall apply the following notation.The current task is denoted by p. Processors are indicated by P 1 and P 2 .We use index i = 1, 2 for processors P 1 and P 2 , respectively, and then the variable P 3−i indicates the processor alternative to P i .For the sake of avoiding too much notation, P 1 and P 2 are also used to represent the loads of the two processors.
Proof: Suppose that an instance exists such that T > 1 + 1 2n+1 .By the same argument as in the proof of Lemma 9, we derive the contradiction Proof: The competitive ratio follows from Lemma 10 and T * ≥ 1. Optimality follows from the lower bound in Theorem 5. 2 2 ] for some fixed integer n ≥ 2, then algorithm H is nγ-competitive.
Proof: The competitive ratio follows from Lemma 9 and T * ≥ 1. 2 Proof: The competitive ratio follows from Lemma 11 and T * ≥ 1. Optimality for γ = 1 n−1 follows from the lower bound in Theorem 8. 2

Algorithm S
Theorem 12 guarantees that algorithm H is optimal when γ ∈ [ 1 n , 2(n+1) n(2n+1) ] and Theorem 14 that algorithm H is optimal if γ = 1 n−1 .Thus, we now need to focus on the range γ ∈ ( 2(n+1) n(2n+1) , 1 n−1 ) and look for an algorithm with a performance 1 + δ somewhere in between the lower bounds given by Theorems 6, 7 and 8 -which are certainly greater than 1 + 1 2n+1 -and the best performance guaranteed by List Scheduling and by the algorithm H . Thus assume δ < min(nγ − 1, γ 2 , 1 2n−1 ).It is easy to see that if a processor has load in the range [1 − δ, 1 + δ] for a fixed δ < γ/2, then it is possible -by assigning all the remaining tasks to the other processor -to control the makespan such that T ≤ 1 + δ.On the other hand, if both processors have their loads in the range (1 + δ − γ, 1 − δ), then it is not possible to find an assignment rule which guarantees T ≤ 1 + δ (a task of size γ will violate the bound 1 + δ on both processors).Now, the point is whether or not it is possible to find a set E of values such that if both processors are loaded less than 1 + δ and a processor has load in E, then the makespan can be controlled such that T ≤ 1 + δ.With this objective in mind we define the safe region E = Safe Algorithm S (S.1) -If p + P i ∈ E for some i = 1, 2, then assign p to P i (S.2) -else if P i ∈ E 0 for some i = 1, 2, then assign p to P 3−i (S.3) -else if P i ∈ E for some i = 1, 2, then assign p to P 3−i (S.4) -else assign p to min(P 1 , P 2 ) Note that rules (S.2) and (S.3) are not redundant.Indeed, if P 2 ∈ E 0 and P 1 ∈ E 1 , rule (S.2) assigns p to processor P 1 , which is not guaranteed by rule (S.3) itself.
The following Lemma proves that the name safe region is appropriate.
Proof: Let us assume the inequalities If rule (S.1) is matched (assume without loss of generality p + P 1 ∈ E), then task p is assigned to processor P 1 .Inequalities (12) and (13) still hold, and obviously P 1 ∈ E after the assignment of p to P 1 .
In conclusion, if any of the rules (S.1), (S.2) or (S.3) is matched by a task p when P 1 , P 2 ≤ 1 + δ, all successive tasks will match either (S.2) or (S.3), while the inequalities (12) and ( 13) are guaranteed at each iteration. 2 The hypotheses upon which Lemma 15 is based are certainly satisfied when the initial load of the two processors is in the safe region, that is E contains 0. The following three lemmas exploit this lucky case, but unfortunately do not improve on the performance of algorithm H . Proof: In this case E n−1 = [0, β] where β = 1 + 1 2n−1 − (n − 1)γ ≥ 0. Since both processors start at 0, rule (S.3) is matched and Lemma 15 applies. 2

Algorithm H
Since we are looking for a performance better than 1+min(nγ −1, γ 2 , 1 2n−1 ), and for δ < nγ −1 we have sup E n < 0, we will not take into account E n anymore.Moreover, for δ < 1 2n−1 we have inf E n−1 > 0, and this means that the initial load of the two processors is not in the safe region E, but in its complement with respect to [0, 2].We shall call this complement the risky region A. That is, are the component ranges.
We already know that if the load of a processor happens to enter the safe region, then algorithm S guarantees, by Lemma 15, a makespan (and also a performance) T ≤ 1 + δ.
In the next lemma we investigate what happens if the arriving task p is such that Lemma 15 cannot be applied.In such a case, the loads of the two processors must be both in the risky region.Task p may be so small that it is not able to move the load of any processor from its current risky component to the next one.The following lemma takes into consideration the opposite case, i.e. when task p is big enough to force the load of a processor to move from a risky component to the next one.The claim is that if task p forces the load of one processor to move from range A k to range A k−1 , skipping range E k−1 , then the same task, if assigned to the other processor, would force its load to exit its current risky range A h and move either to the safe region E h−1 or to the risky range A h−1 .
Lemma 19 Suppose that P 1 ∈ A k and P 2 ∈ A h for some k, h > 1 and δ ≥ max( 1+(n−1)γ 4n−1 , n−1 2n−1 γ) for some fixed integer n ≥ 2. Lemma 19 can be used to calculate lower bounds on some tasks of instances that keep an algorithm from loading the processors in the safe region.Remark: If rule (H.1) or (H.2) is matched, then algorithm H is stopped and algorithm S takes decisions on task p and all the remaining tasks.Therefore, we can apply the bound derived for S, as follows.