Scheduling in the Random-Order Model

Makespan minimization on identical machines is a fundamental problem in online scheduling. The goal is to assign a sequence of jobs to m identical parallel machines so as to minimize the maximum completion time of any job. Already in the 1960s, Graham showed that Greedy is \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(2-1/m)$$\end{document}(2-1/m)-competitive. The best deterministic online algorithm currently known achieves a competitive ratio of 1.9201. No deterministic online strategy can obtain a competitiveness smaller than 1.88. In this paper, we study online makespan minimization in the popular random-order model, where the jobs of a given input arrive as a random permutation. It is known that Greedy does not attain a competitive factor asymptotically smaller than 2 in this setting. We present the first improved performance guarantees. Specifically, we develop a deterministic online algorithm that achieves a competitive ratio of 1.8478. The result relies on a new analysis approach. We identify a set of properties that a random permutation of the input jobs satisfies with high probability. Then we conduct a worst-case analysis of our algorithm, for the respective class of permutations. The analysis implies that the stated competitiveness holds not only in expectation but with high probability. Moreover, it provides mathematical evidence that job sequences leading to higher performance ratios are extremely rare, pathological inputs. We complement the results by lower bounds, for the random-order model. We show that no deterministic online algorithm can achieve a competitive ratio smaller than 4/3. Moreover, no deterministic online algorithm can attain a competitiveness smaller than 3/2 with high probability.


Introduction
We study one of the most basic scheduling problems.Consider a sequence of jobs J = J 1 , . . ., J n that has to be assigned to m identical parallel machines.Each job J t has an individual processing time p t , 1 ≤ t ≤ n.Preemption of jobs is not allowed.The goal is to minimize the makespan, i.e. the maximum completion time of any job in the constructed schedule.Both the offline and online variants of this problem have been studied extensively, see e.g.[1,2,[5][6][7][8] and references therein.
We focus on the online setting, where jobs arrive one by one.Whenever a job J t is presented, its processing time p t is revealed.The job has to be scheduled immediately on one of the machines without knowledge of any future jobs J s , with s > t.Given a job sequence J , let A(J ) denote the makespan of an online algorithm A on J .Let O P T (J ) be the optimum makespan.A deterministic online algorithm A is c-competitive if A(J ) ≤ c • O P T (J ) holds for all J [9].The best competitive ratio that can be achieved by deterministic online algorithms is in the range [1.88, 1.9201].No randomized online algorithm is known that beats deterministic ones, for general m.
In this paper we investigate online makespan minimization in the random-order model.Here an input instance / job sequence is chosen by an adversary.Then a random permutation of the input elements / jobs arrives.The random-order model was considered by Dynkin [10] and Lindley [11] for the secretary problem.Over the last years the framework has received quite some research interest and many further problems have been studied.These include generalized secretary problems [11][12][13][14][15], the knapsack problem [12,15], bin packing [16], facility location [17], matching problems [18][19][20], packing LPs [21] and convex optimization [22].
We present an in-depth study of online makespan minimization in the random-order model.As a main contribution we devise a new deterministic online algorithm that achieves a competitive ratio of 1.8478.After almost 20 years this is the first progress for the pure online setting, where an algorithm does not resort to extra resources in handling a job sequence.

Previous work:
We review the most important results relevant to our work and first address the standard setting where an online algorithm must schedule an arbitrary, worst-case job sequence.Graham in 1966 showed that the famous Greedy algorithm, which assigns each job to a least loaded machine, is (2 − 1 m )-competitive.Using new deterministic strategies the competitiveness was improved in a series of papers.Galambos and Woeginger [23] gave an algorithm with a competitive ratio of (2 − 1 m − ǫ m ), where ǫ m tends to 0 as m → ∞.Bartal et al. [5] devised a 1.986-competitive algorithm.The bound was improved to 1.945 [24] and 1.923 [25].Fleischer and Wahl [2] presented an algorithm that attains a competitive ratio of 1.9201 as m → ∞.Chen et al. [26] gave an algorithm whose competitiveness is at most 1 + ε times the best possible factor, but no explicit bound was provided.Lower bounds on the competitive ratio of deterministic online algorithms were shown in [3,25,[27][28][29][30].For general m, the bound was raised from 1.707 [28] to 1.837 [27] and 1.854 [29].Rudin [3] showed that no deterministic strategy has a competitiveness smaller than 1.88.
For randomized online algorithms, there is a significant gap between the best known upper and lower bounds.For m = 2 machines, Bartal et al. [5] presented an algorithm that achieves an optimal competitive ratio of 4/3.To date, there exists no randomized algorithm whose competitiveness is smaller than the deterministic lower bound, for general m.The best known lower bound on the performance of randomized online algorithms tends to e/(e − 1) ≈ 1.581 as m → ∞ [31,32].
Recent research on makespan minimization has examined settings where an online algorithm is given extra resources when processing a job sequence.Specifically, an algorithm might have a buffer to reorder the incoming job sequence [6,33] or is allowed to migrate jobs [34].Alternatively, an algorithm has information on the job sequence [33,[35][36][37], e.g. it might know the total processing time of the jobs or even the optimum makespan.
In the random-order model only one result is known for makespan minimization on identical machines.Osborn and Torng [4] showed that Greedy does not achieve a competitive ratio smaller than 2 as m → ∞.Recently Molinaro [38] studied online load balancing with the objective to minimize the l p -norm of the machine loads.He considers a general scenario with machine-dependent job processing times, which are bounded by 1.For makespan minimization he presents an algorithm that, in the worst case, is O(log m/ε)-competitive and, in the random-order model, has an expected makespan of (1 + ε)O P T (J ) + O(log m/ε), for any ε ∈ (0, 1].Göbel et al. [39] consider a scheduling problem on one machine where the goal is to minimize the average weighted completion time of all jobs.Under random-order arrival, their competitive ratio is logarithmic in n, the number of jobs, for the general problem and constant if all jobs have processing time 1.
Our contribution: We investigate online makespan minimization in the random-order model, a sensible and widely adopted input model to study algorithms beyond the worst case.Specifically, we develop a new deterministic algorithm that achieves a competitive ratio of 1.8478 as m → ∞.This is the first improved performance guarantee in the random-order model.The competitiveness is substantially below the best known ratio of 1.9201 in the worst-case setting and also below the corresponding lower bound of 1.88 in that framework.
A new feature of our algorithm is that it schedules an incoming job on one of three candidate machines in order to maintain a certain load profile.The best strategies in the worst-case setting use two possible machines, and it is not clear how to take advantage of additional machines in that framework.The choice of our third, extra machine is quite flexible: An incoming job is placed either on a least loaded, a heavily loaded or -as a new option -on an intermediate machine.The latter one is the (h + 1)-st least loaded machine, where h may be any integer with h ∈ ω(1) and h ∈ o( √ m).
When assigning a job to a machine different from the least loaded one, an algorithm has to ensure that the resulting makespan does not exceed c times the optimum makespan, for the targeted competitive ratio c.All previous strategies in the literature lower bound the optimum makespan by the current average load on the machines.Our new algorithm works with a refined lower bound that incorporates the processing times of the largest jobs seen so far.The lower bound is obvious but has not been employed by previous algorithms.
The analysis of our algorithm proceeds in two steps.First we define a class of stable job sequences.These are sequences that reveal information on the largest jobs as processing volume is scheduled.More precisely, once a certain fraction of the total processing volume n t=1 p t has arrived, one has a good estimate on the h-th largest job and has encountered a certain number of the m + 1 largest jobs in the input.The exact parameters have to be chosen carefully.
We prove that with high probability, a random permutation of a given input of jobs is stable.We then conduct a worst-case analysis of our algorithm on stable sequences.Using their properties, we show that if the algorithm generates a flat schedule, like Greedy, and can be hurt by a huge job, then the input must contain many large jobs so that the optimum makespan is also high.A new ingredient in the worst-case analysis is the processing time of the h-th largest job in the input.We will relate it to machine load in the schedule and to the processing time of the (m + 1)-st largest job; twice the latter value is a lower bound on the optimum makespan.
The analysis implies that the competitive ratio of 1.8478 holds with high probability.Input sequences leading to higher performance ratios are extremely rare.We believe that our analysis approach might be fruitful in the study of other problems in the random-order model: Identify properties that a random permutation of the input elements satisfies with high probability.Then perform a worst-case analysis.
Finally in this paper we devise lower bounds for the random-order model.We prove that no deterministic online algorithm achieves a competitive ratio smaller than 4/3.Moreover, if a deterministic online algorithm is c-competitive with high probability, then c ≥ 3/2.

Strong competitiveness in the random-order model
We define competitiveness in the random-order model and introduce a stronger measure of competitiveness that implies high-probability bounds.Recall that traditionally a deterministic online algorithm A is c-competitive if A(J ) ≤ c • OP T (J ) holds for all job sequences J = J 1 , . . ., J n .We will refer to this worst-case model also as the adversarial model.
In the random-order model a job sequence J = J 1 , . . ., J n is given, which may be specified by an adversary.(Alternatively, a set of jobs could be specified.)Then a random permutation of the jobs arrives.We define the expected cost / makespan of a deterministic online algorithm.Let S n be the permutation group of the integers from 1 to n, which we consider a probability space under the uniform distribution, i.e. each permutation in S n is chosen with probability 1/n!.Given σ ∈ S n , let J σ = J σ(1) , . . ., J σ(n) be the job sequence permuted by σ.The expected makespan of A on J in the random-order model is holds for all job sequences J .
We next define the notion of a deterministic online algorithm A being nearly c-competitive.The second condition in the following definition requires that the probability of A not meeting the desired performance ratio must be arbitrarily small as m grows and a random permutation of a given job sequence arrives.The subsequent Lemma 2 states that a nearly c-competitive algorithm is c-competitive in the random-order model.Definition 1.A deterministic online algorithm A is called nearly c-competitive if the following two conditions hold.
• The algorithm A achieves a constant competitive ratio in the adversarial model.
• For every ε > 0, there exists an m(ε) such that for all machine numbers m ≥ m(ε) and all job sequences J there holds Lemma 2. If a deterministic online algorithm is nearly c-competitive, then it is c-competitive in the random-order model as m → ∞.
Proof.Let C be the constant such that A is C-competitive in the adversarial model.We may assume that C > c.Given 0 < δ ≤ C − c, we show that there exists an m(δ) such that, for all m ≥ m(δ), we have A rom (J ) ≤ (c + δ)OP T (J ) for every job sequences J .Let ε = δ/(C − c + 1).Since A is nearly c-competitive, there exists an m(ε) such that, for all m ≥ m(ε) and all inputs J , there holds P ε (J ) = P σ∼Sn [A(J σ ) ≥ (c + ε)OP T (J )] ≤ ε.Set m(δ) = m(ε).We obtain

Description of the new algorithm
The deficiency of Greedy is that it tends to generate a flat, balanced schedule in which all the machines have approximately the same load.An incoming large job can then enforce a high makespan relative to the optimum one.It is thus crucial to try to avoid flat schedules and maintain steep schedules that exhibit a certain load imbalance among the machines.However, in general, this is futile.Consider a sequence of m identical jobs with a processing time of, say, P m+1 (referring to the size of the (m + 1)-st largest job in an input).Any online algorithm that is better than 2-competitive must schedule these m jobs on separate machines, obtaining the flattest schedule possible.An incoming even larger job of processing time p max will now enforce a makespan of P m+1 + p max .Observe that OPT ≥ max{2P m+1 , p max } since there must be one machine containing two jobs.In particular P m+1 + p max ≤ 1.5OPT.Hence sensible online algorithms do not perform badly on this sequence.
This example summarizes the quintessential strategy of online algorithms that are good on all sequences: Ensure that in order to create a schedule that is very flat, i.e. such that all machines have high load λ, the adversary must present m jobs that all are large relative to λ.In order to exploit this very flat schedule and cause a high makespan the adversary needs to follow up with yet another large job.But with these m + 1 jobs, the optimum scheduler runs into the same problem as in the example: Of the m + 1 large jobs, two have to be scheduled on the same machine.Thus the optimum makespan is high, compensating to the high makespan of the algorithm.
Effectively realizing the aforementioned strategy is highly non-trivial.In fact it is the central challenge in previous works on adversarial makespan minimization that improve upon Greedy [2,5,[23][24][25].These works gave us clear notions of how to avoid flat schedules, which form the basis for our approaches.Instead of simply rehashing these ideas, we want to outline next how we profit from random-order arrival in particular.

How random-order arrival helps
The first idea to profit from random-order arrival addresses the lower bound on OPT sophisticated online algorithms need.In the literature only the current average load has been considered, but under random-order arrival another bound comes to mind: The largest job seen so far.In order for an algorithm to perform badly, a large job needs to come close to the end of the sequence.Under random-order arrival, it is equally likely for such a job to arrive similarly close to the beginning of the sequence.In this case, the algorithm knows a better lower bound for OPT.The main technical tool will be our Load Lemma, which allows us to relate what a job sequence should reveal early from an analysis perspective to the actual fraction of jobs scheduled.This idea does not work for worst-case orders since they tend to order jobs by increasing processing times.
Recall that the general challenge of our later analysis will be to establish that there had to be m large jobs once the schedule gets very flat.In classical analyses, which consider worst-case orders, these jobs appear with increasing density towards the end of the sequence.In random orders this is unlikely, which can be exploited by the algorithm.
The third idea improves upon the first idea.Suppose, that we were to modify our algorithm such that it could handle one very large job arriving close to the end of the sequence.In fact, assume that it could only perform badly when confronted with h very large jobs.We can then disregard any sequence which contains fewer such jobs.Recall that the first idea requires one very large job to arrive sufficiently close to the beginning.Now, as h grows, the probability of the latter event grows as well and approaches 1.This will not only improve our competitive ratio tremendously, it also allows us to adhere to the stronger notion of nearly competitiveness introduced in Section 2. Let us discuss how such a modification is possible: The first step is to design our algorithm in a way that it is reluctant to use the h least loaded machines.Intuitively, if the algorithm tries to retain machines of small load it will require very large jobs to fill them.In order to force these filling jobs to actually be large enough, our algorithm needs to use a very high lower bound for OPT.In fact, here it uses another lower bound for the optimum makespan, 2P t m+1 , twice the (m + 1)-st largest job seen so far at time t.Common analysis techniques can only make predictions about P t m+1 at the very end of the sequence.It requires very subtle use of the random-order model to work around this.

Formal definition
Formally our algorithm ALG is nearly c-competitive, where c is the unique real root of the polynomial Q Given J , ALG is presented with a job sequence/permutation J σ = J σ(1) , . . ., J σ(n) that must be scheduled in this order.Throughout the scheduling process ALG always maintains a list of the machines sorted in non-increasing order of current load.At any time the load of a machine is the sum of the processing times of the jobs already assigned to it.After ALG has processed the first t jobs J σ(1) , . . ., J σ(t) , let M t 1 , . . ., M t m be any ordering of the m machines according to non-increasing load.More specifically, let l t j denote the load of machine M t j .Then l t 1 ≥ . . .≥ l t m and l t 1 is the makespan of the current schedule.
ALG places each incoming job J σ(t) , 1 ≤ t ≤ n, on one of three candidate machines.The choice of one machine, having an intermediate load, is flexible.Let h = h(m) be an integer with ALG will assign the incoming job to the machine with the smallest load, the (h + 1)-st smallest load or the i-th largest load.When scheduling a job on a machine that is different from the least loaded one, an algorithm has to ensure that the resulting makespan does not exceed c * times the optimum makespan, where c * is the desired competitiveness.All previous algorithms lower bound the optimum makespan by the current average machine load.Algorithm ALG works with a refined lower bound that incorporates the processing time of the largest job and twice the processing time of the (m + 1)-st largest job seen so far.These lower bounds on the optimum makespan are immediate but have not been used in earlier strategies.
Formally, for j = 1, . . ., m, let L t j be the average load of the m − j + 1 least loaded machines M t j , . . ., M t m , i.e.
p s be the average load of all the machines.For any j = 1, . . ., n, let P t j be the processing time of the j-th largest job among the first t jobs J σ(1) , . . ., J σ(t) in J σ .If t < j, we set P t j = 0. We let p t max = P t 1 be the processing time of the largest job among the first t jobs in J σ .Finally, let L = L n , P j = P n j and p max = p n max .The value O t = max{L t , p t max , 2P t m+1 } is a common lower bound on the optimum makespan for the first t jobs and hence OP T (J ), see Proposition 5 in the next section.Note that immediately before J σ(t) is scheduled, ALG can compute L t and hence O t because L t is 1/m times the total processing time of the jobs that have arrived so far.
We next characterize load imbalance.Let The schedule at time t is the one immediately before J σ(t) has to be assigned.The schedule is flat if ALG handles each incoming job J σ(t) , with processing time p σ(t) , as follows.If the schedule at time t is steep, the job is placed on the least loaded machine M t−1 m .On the other hand, if the schedule is flat, the machines will not violate the desired competitiveness.The job is placed on this machine If this is the case, the job is put on M t−1 m−h .Otherwise, J σ(t) is finally scheduled on the least loaded machine M t−1 m .A pseudo-code description of ALG is given below.The job assignment rules are also illustrated in Figures 1 and 2.
Algorithm 1 The scheduling algorithm ALG 1: Let J σ(t) be the next job to be scheduled.Assign J σ(t) to the least loaded machine M t−1 m ; 4: else // the schedule is flat 5: In the next section we will prove the following theorem, Theorem 3, which uses the notion from Section 2. Lemma 2 then immediately gives the main result, Corollary 4.
Theorem 3. ALG is nearly c-competitive, with c < 1.8478 defined as above.
Corollary 4. ALG is c-competitive in the random-order model as m → ∞.

Analysis of the algorithm 4.1 Analysis basics
We present some results for the adversarial model so that we can focus on the true random-order analysis of ALG in the next sections.First, recall the three common lower bounds used for online makespan minimization.Proposition 5.For any J , there holds OP T (J ) ≥ max{L, p max , 2P m+1 }.Moreover, for any permutation J σ , there holds Proof.The optimum makespan OP T (J ) cannot be smaller than the average machine load L for the input, even if all the jobs are distributed evenly among the m machines.Moreover, the job with the largest processing time p max must be scheduled non-preemptively on one of the machines in an optimal schedule.Thus OP T (J ) ≥ p max .Finally, among the m + 1 largest jobs of the input, two must be placed on the same machine in an optimal solution.Hence OP T (J ) ≥ 2P m+1 .For any permutation J σ , the value O t cannot decrease as jobs J t arrive.
Proof.Let J = J 1 , . . ., J n be an arbitrary job sequence and let J t be the job that defines ALG's makespan.If the makespan exceeds c • OP T (J ), then it exceeds c • O t .Thus ALG placed J t on machine M t−1 m , cf. lines 4 and 5 of the algorithm.This machine was a least loaded one, having a load of at most L. Hence ALG(J Since R(J ) ≤ 1 we immediately obtain the following result, which ensures that ALG satisfies the first condition of a nearly c-competitive algorithm, see Definition 1.
Corollary 7. ALG is 2-competitive in the adversarial model.
We next identify a class of plain job sequences that we do not need to consider in the randomorder analysis because ALG's makespan is upper bounded by c times the optimum on these inputs.
Otherwise it is called proper.
Let J = J 1 , . . ., J n be any job sequence that is processed/scheduled in this order.Observe that if it contains at most m jobs, i.e. n ≤ m, and ALG cannot place a job J t on machines M t−1 i or M t−1 m−h because the resulting load would exceed c • O t , then the job is placed on an empty machine.Using Proposition 6 we derive the following fact.Lemma 9.For any plain job sequence J = J 1 , . . ., J n , there holds ALG(J ) ≤ c • OP T (J ).
If a job sequence J is plain (proper), then every permutation of it is.Hence, given Lemma 9, we may concentrate on proper job sequences in the remainder of the analysis.We finally state a fact that relates to the second condition of a nearly c-competitive algorithm, see again Definition 1.
Lemma 10.Let J = J 1 , . . ., J n be any job sequence that is scheduled in this order and let J t be a job that causes ALG's makespan to exceed (c + ε)OP T (J ), for some ǫ ≥ 0. Then both the load of ALG's least loaded machine at the time of the assignment as well as p t exceed (c − 1 + ε)OP T (J ).
Proof.ALG places J t on machine M t−1 m , which is a least loaded machine when the assignment is done.If l t−1 m or p t were upper bounded by (c − 1 + ε)OP T (J ), then the resulting load would be l t−1 m + p t ≤ (c− 1+ ε)OP T (J )+ max{L, p t } ≤ (c− 1+ ε)OP T (J )+ OP T (J ) = (c+ ε)OP T (J ).

Stable job sequences
We define the class of stable job sequences.These sequences are robust in that they will admit an adversarial analysis of ALG.Intuitively, the sequences reveal information on the largest jobs when a significant fraction of the total processing volume n t=1 p t has been scheduled.More precisely, one gets an estimate on the processing time of the h-th largest job in the entire sequence and encounters a relevant number of the m + 1 largest jobs.If a job sequence is unstable, large jobs occur towards the very end of the sequence and can cause a high makespan relative to the optimum one.
We will show that ALG is adversarially (c + ε)-competitive on stable sequences, for any given ε > 0. Therefore, the definition of stable sequences is formulated for a fixed ε > 0. Given J , let J σ = J σ(1) , . . ., J σ(n) be any permutation of the jobs.Furthermore, for every j ≤ n and in particular j ∈ {h, m + 1}, the set of the j largest jobs is a fixed set of cardinality j such that no job outside this set has a strictly larger processing time than any job inside the set.Definition 11.A job sequence J σ = J σ(1) , . . ., J σ(n) is stable if the following conditions hold.
• There holds n > m.
• Once L t ≥ (c − 1) i m L, there holds p t max ≥ P h .• For every j ≥ i, the sequence ending once we have L t ≥ ( j m + ε 2 )L contains at least j + h + 2 many of the m + 1 largest jobs in J .
• The sequence ending right before either (a) L t ≥ i m (c − 1)εL holds or (b) the h-th largest job of J is scheduled contains at least h + 1 many of the m + 1 largest jobs in J .Otherwise the job sequence is unstable.
Given ε > 0 and m, let P ε (m) be the infimum, over all proper job sequences J , that a random permutation of J is stable, i.e.
As the main result of this section we will prove that this probability tends to 1 as m → ∞.
Main Lemma 1.For every ε > 0, there holds The above lemma implies that for any ε > 0 there exists an m(ε) such that, for all m ≥ m(ε) and all J , there holds P σ∼Sn [J σ is stable] ≥ 1 − ε.In Section 4.3 we will show that ALG is (c + ε)-competitive on stable job sequences.This implies P σ∼Sn [ALG(J σ ) ≥ (c + ε)OP T (J )] ≤ ε.Given Lemma 7, we obtain the following corollary.
In the remainder of this section we describe how to establish Main Lemma 1.We need some notation.In Section 3 the value L t j was defined with respect to a fixed job sequence that was clear from the context.We adopt the notation L t j [J σ ] to make this dependence visible.We adopt a similar notation for the variables L, P t j , P j , p t max and p max .For an input J and σ ∈ S n , we will use the notation . Again, we use a similar notation for the variables P t j and p t max .At the heart of the proof of Main Lemma 1 is the Load Lemma.Observe that after t time steps in a random permutation of an input J , each job has arrived with probability t/n.Thus the expected total processing time of the jobs seen so far is t/n • n s=1 p s .Equivalently, in expectation L t equals t/n • L. The Load Lemma proves that this relation holds with high probability.We set t = ϕn.
Load Lemma.Given any ε > 0 and ϕ ∈ (0, 1], there exists an m(ε, ϕ) such that for all m ≥ m(ε, ϕ) and all proper sequences J , there holds Proof.Let us fix a proper job sequence J .We use the shorthand We will first treat the case that we have p max [J ] = 1 and every job size in J is of the form (1 + δ) −j , for some j ≥ 0. Note that we have in particular c − 1 ≤ L ≤ 1 c−1 because we are working with a proper sequence.For j ≥ 0 let h j denote the number of jobs J t of size (1 + δ) −j and, given σ ∈ S n , let h σ j denote the number of such jobs J t that additionally satisfy σ(t) ≤ ⌊ϕn⌋, i.e. they are are among the ⌊ϕn⌋ first jobs in the sequence J σ .We now have The random variables h σ j are hypergeometrically distributed, i.e. we sample ⌊ϕn⌋ jobs from the set of all n jobs and count the number of times we get one of the h j many jobs of processing time (1 + δ) −j .Hence, the random variable h σ j has mean By Chebyshev's inequality we have In particular, by the Union Bound, with probability we have for all j, We conclude that the following holds: In particular, with probability P (m), we have Hence, if we choose m large enough we can ensure that So far we have assumed that p max [J ] = 1 and every job in J has a processing time of (1+δ) −j , for some j ≥ 0. Now we drop these assumptions.Given an arbitrary sequence J with 0 < p max [J ] = 1, let ⌊J ⌋ denote the sequence obtained from J by first dividing every job processing time by p max [J ] and rounding every job size down to the next power of (1+δ) −1 .We have proven that inequality (1) holds for ⌊J ⌋.The values L and L[σ] only change by a factor lying in the interval [p max , (1+δ)p max ) when passing over from ⌊J ⌋ to J .This implies that Combining this with inequality (1) for ⌊J ⌋ (and the triangle inequality), we obtain Thus the lemma follows.
We note that the Load Lemma does not hold for general sequences.A counterexample is a job sequence in which one job carries all the load, while all the other jobs have a negligible processing time.The proof of the Load Lemma relies on a lower bound of R(J ), which is c − 1 for proper sequences.
We present two consequences of the Load Lemma that will allow us to prove that stable sequences reveal information on the largest jobs when a certain processing volume has been scheduled.Consider a proper J .Given J σ = J σ(1) , . . ., J σ(n) and ϕ > 0, let N (ϕ)[J σ ] be the number of jobs J σ(t) that are among the m + 1 largest jobs in J and such that L t ≤ ϕL.Lemma 13.Let ε > 0 and ϕ ∈ (0, 1].Then there holds We will just state the core argument here and leave the rather technical proof to Section 5.
Proof sketch.The Load Lemma basically matches load ratios L t /L with ratios t/n on the time line of job arrivals, up to some margin of error.We can then infer that at least ⌊ϕm⌋ + h + 1 of the m + 1 largest jobs are among the first (ϕ + ε)n jobs in a job sequence J σ , with a probability that tends to 1 as m → ∞.In expectation (ϕ + ε)(m + 1) of the m + 1 largest jobs occur in this prefix, which is strictly more than ⌊ϕm⌋ + h + 1, for m large enough.Formally, we show that (a slight variant of) the random variable N (ϕ + ε)[J σ ] is hypergeometrically distributed and has variance at most m + 1.Using Chebyshev's inequality we derive Lemma 13.Lemma 14.Let ε > 0 and ϕ ∈ (0, 1].Then there holds Proof.Let us fix any proper sequence J and set which is a finite set whose size only depends on ε and ϕ.Given φ ≥ ϕ, let u( φ) be the smallest element in Λ greater or equal to φ.Then and if we have In particular, in order to prove the lemma it suffices to verify that lim m→∞ inf J proper The latter is a consequence of applying Lemma 13 to all φ ∈ Λ and the Union Bound.
We can now conclude the main lemma of this section: Proof of Main Lemma 1: A proper job sequence is stable if the following four properties hold.
• Once L t ≥ (c − 1) i m • L we have p t max ≥ P h .• For every j ≥ i the sequence ending once we have L t ≥ j m + ε 2 L contains at least j + h + 2 of the m + 1 largest jobs.
• The sequence ending right before L t ≥ i m (c − 1)εL holds contains at least h + 1 of the m + 1 largest jobs.
• The sequence ending right before the first of the h largest jobs contains at least h + 1 of the m + 1 largest jobs.
By the Union Bound we may consider each property separately and prove that it holds with a probability that tends to 1 as m → ∞.Let ϕ = (c − 1) i m and choose ε > 0. By the Load Lemma, for m ≥ m(ε, ϕ), after t = ⌊ϕn⌋ jobs of a proper job sequence J σ have been scheduled, there holds L t ≤ (c − 1) i m • L with probability at least 1 − ε.Observe that ϕ is a fixed problem parameter so that m(ε, ϕ) is determined by ε.The probability of any particular job being among the first t jobs in J σ is ⌊ϕn⌋/n.Thus p t max ≥ P h holds with probability at least 1 − (1 − ⌊ϕn⌋/n) h .Since J σ is proper, we have n > m.Furthermore, h = h(m) ∈ ω(1).Therefore, the probability that the first property holds tends to 1 as m → ∞.
The second property is a consequence of Lemma 14 with ϕ = i m .The third property follows from Lemma 13.We need to choose the ε in the statement of the lemma to be i m (c − 1)ε.Finally we examine the last property.In J σ we focus on the positions of the m + 1 largest jobs.Consider any of the h largest jobs.The probability that it is preceded by less than h + 1 of the m + 1 largest jobs is (h + 1)/(m + 1).Thus the probability of the fourth property not to hold is at most h(h + 1)/(m + 1).Since h ∈ o( √ m), the latter expression tends to 0 as m → ∞.

An adversarial analysis
In this section we prove the following main result.
Consider a fixed ε > 0. Given Lemma 7, we may assume that 0 < ε < 2 − c.Suppose that there was a stable job sequence J σ such that ALG(J σ ) > (c + ε)OP T (J σ ).We will derive a contradiction, given that m is large.In order to simplify notation, in the following let J = J σ be the stable job sequence violating the performance ratio of c + ε.Let J = J 1 , . . ., J n and OP T = OP T (J ).
Let J n ′ be the first job that causes ALG to have a makespan greater than (c + ε)OP T and let b 0 = l n ′ −1 m be the load of the least loaded machine There holds λ start < λ end .The critical makespan of ALG is bounded by b 0 +OP T < (1+ Since ALG does not achieve a performance ratio of c + ε on J we have Our main goal is to derive a contradiction to this inequality.
The impact of the variable P h : A new, crucial aspect in the analysis of ALG is P h , the processing time of the h-th largest job in the sequence J .Initially, when the processing of J starts, we have no information on P h and can only infer P m+1 ≥ λ start b 0 .The second property in the definition of stable job sequences ensures that p t max ≥ P h once the load ratio L t /L is sufficiently large.Note that ALG then also works with this estimate because P h ≤ p t max ≤ O t .This will allow us to evaluate the processing time of flatly scheduled jobs.In order prove that P m+1 is large, we will relate P m+1 and P h , i.e. we will lower bound P m+1 in terms of P h and vice versa.Using the relation we can then conclude P m+1 ≥ λ end b 0 .In the analysis we repeatedly use the properties of stable job sequences and will explicitly point to it when this is the case.
Proof.Consider the function The function F is linear and strictly increasing in λ.Hence for the proposition to hold it suffices to verify that F (λ start ) ≥ 0. We can now compute that F (λ start ) ≈ 0.04865 > 0.
Note that the following proof determines the choice of our competitive ratio c, which was chosen minimal such that Q Proof.We calculate that Thus we see that g(1 − ε) − λ end > 0 and can conclude the lemma.

Analyzing large jobs towards lower bounding P h and P m+1
Let b > (c − 1 + ε)OP T be a value such that immediately before J n ′ is scheduled at least m − h machines have a load of at least b.Note that b = b 0 satisfies this condition but we will be interested in larger values of b as well.We call a machine b-full once its load is at least b; we call a job J a b-filling job if it causes the machine it is scheduled on to become b-full.We number the b-filling jobs according to their order of arrival J (1) , J (2) , . . .and let t(j) denote the time of arrival of the j-th filling job J (j) .Recall that our main goal is to show that P m+1 ≥ λ end b 0 holds.To this end we will prove that the b 0 -filling jobs have a processing time of at least λ end b 0 .As there are m such jobs, the bound on P m+1 follows by observing that J n ′ arrives after all b 0 -filling jobs are scheduled and that its processing time exceeds λ end b 0 as well.In fact, since OP T ≥ b 0 , we have We remark that different to previous analyses in the literature we do not solely rely on lower bounding the processing time of filling jobs.By using the third property of stable job sequences, we can relate load and the size of the (m + 1)-st largest job at specific points in the time horizon, cf.Lemma 22.
In the following we regard b as fixed and omit it from the terms filling job and full.Let λ = max{λ start b, min{g b (P h ) , λ end b}}.We call a job large if it has a processing time of at least λ.Let t = t(m − h) be the time when the (m − h)-th filling job arrived.The remainder of this section is devoted to showing the following important Lemma 17.Some of the underlying lemmas, but not all of them, hold if m ≥ m(ε) is sufficiently large.We will make the dependence clear.Lemma 17.At least one of the following statements holds: • All filling jobs are large.
Before we prove the lemma we derive two important implications towards a lower bound of P m+1 .
Proof.Apply the previous lemma, taking into account that b ≥ b 0 , and use that there are m many b 0 -filling jobs followed by J n ′ .The latter has size at least λ by inequality (3).
We also want to lower bound the processing time of the (m+1)-st largest job at time t.However, at that time only m − h filling jobs have arrived.The next lemma ensures that, if additionally P h is not too large, this is not a problem.The proof of the lemma makes use of the fourth property of stable job sequences.In particular we would not expect such a result to hold in the adversarial model.
Proof.We will show that the first statement in Lemma 17 implies the second one if P h ≤ (1 − ε)b holds.In order to conclude the second statement it suffices to verify that at least m + 1 jobs of processing time λ have arrived until time t.By the first statement we know that there were m − h large filling jobs coming before time t.Hence it is enough to verify that h + 1 large jobs arrive (strictly) before the first filling job J.
To show that there are h + 1 jobs with a processing time of at least P m+1 before the first filling job J, we use the last property of stable job sequences.If J is among the h largest jobs, we are done immediately by the condition.Else J had size at most P h ≤ (1 − ε)b.Assume J = J t was scheduled on the machine M t−1 j , for j ∈ {i, m − h, m}, and let l = l t−1 j be its load before J was scheduled.Because J is a filling job we have In particular, before J was scheduled, the average load at that time was at least Again, by the last property of stable job sequences, at least h + 1 jobs of processing time at least P m+1 were scheduled before this was the case.
We introduce late and early filling jobs.We need a certain condition to hold, see Lemma 22, in order to show that the early filling jobs are large.We show that if this condition is not met, the fact that the given job sequence is stable ensures that P t m ≥ λ.Let s be chosen maximal such that the s-th filling job is scheduled steeply.If s ≤ i, then set s = i + 1 instead.We call all filling jobs J (j) with j > i that are scheduled flatly late filling jobs.All other filling jobs are called early filling jobs.In particular the job J (s+1) and the filling jobs afterwards are late filling jobs.The following proposition implies that the fillings jobs after J (m−h) , if they exist, are all late, i.e. scheduled flatly.
Proof of Proposition 20.Let h < h and t = t(m − h) be the time the (m − h)-th filling job J arrived.We need to see that J was scheduled flatly.Assume that was not the case.We know that for j ≤ m − h we have l t−1 j ≥ b > (c − 1 + ε)OP T .In particular we have For the last inequality we need to choose m large enough.If the schedule was steep at time t, then we had for every j ≤ k But then the average load at time t − 1 would be: For the second inequality we need to observe that we have k ≥ (4c − 7)m + 2h and that the previous term decreases if we decrease k.One also can check that the second last term is minimized if h = 0.But now we have shown L t−1 > OP T , which is a contradiction.Hence the schedule could not have been steep at time t − 1.
We need a technical lemma.For any time t, let L This lemma comes down to a mere computation.While being simple at its core, we have to account for various small error terms.These arise in three ways.Some are inherent to the properties of stable sequences.Others arise from the rounding involved in the definition of certain numbers, i in particular.Finally, the small number h introduces such an error.While all these errors turn out to be negligible, rigorously showing so is technical.We thus leave the proof to Section 5.The reader highly familiar with other works on online makespan minimization may have wondered about our different choice of the value i.It should be noted that i is chosen maximal, such that Lemma 21 holds true.Otherwise, if λ = g b (P h ), we choose l = cP h − λ and get Here the last equality follows from the definition of g b .The lemma follows in the case λ = g b (P h ).Before proving Lemma 24 let us observe the following, strengthening its condition.
Lemma 25.We have L .
The second inequality is obvious because for every r the loads l t r can only increase as t increases.For the first inequality we note that by definition the job J (j) was scheduled steeply and hence on a least loaded machine.This machine became full.Thus it is not among the m − j least loaded machines at time t(j).In particular L t(j) j+1 , the average over the m − j smallest loads at time t(j), is also the average of the m − j + 1 smallest loads excluding the smallest load at time t(j) − 1. Therefore it cannot be less than L t(j)−1 j .Proof of Lemma 24.Let i < j ≤ s such that J (j) was an early filling job.By Lemma 25 we have L By definition J (j) was scheduled on a least loaded machine M t(j)−1 m which had load less than L t(j)−1 j < b−λ end b before and at least b afterwards because it became full.In particular J (j) had size λ end b.
For k < j ≤ i the job J (j) is scheduled steeply because we have by Lemma 25 Thus for k < j ≤ i the job J (j) is scheduled on the least loaded machine M t(j)−1 m , whose load l t(j)−1 m is bounded by Hence the job J (j) had a size of at least λ end b.We also observe that we have In particular for 1 ≤ j ≤ k any filling job J (j) filled a machine with a load of at most max{l Hence it had a size of at least λ end b.
We now conclude the main lemma of this subsection, Lemma 17.
Proof of Lemma 17.By Lemma 23, all late filling jobs are large.We distinguish two cases depending on whether or not L

Lower bounding P h and P m+1
In this section we establish the following relations on P h and P m+1 .

Lemma 26. There holds P
For the proof we need a way to lower bound the processing time of a job J t depending on P t m+1 : Lemma 27.Let J t be any job scheduled flatly on the least loaded machine and let b = l t−1 m−h be the load of the (h + 1)-th least loaded machine.Then J t has a processing time of at least f b (P t m+1 ).
Proof.From the fact that J t was not scheduled on the (h + 1)-th least loaded machine M t m−h we derive that p Proof of Lemma 26.Assume for a contradiction that we had P h ≤ (1 − ε)b 0 .Let J = J t be the smallest among the h last b 0 -filling jobs.Then J has a processing time p ≤ P h .We want to derive a contradiction to that.Let b 1 = l t−1 m−h be the load of the (m − h)-th machine right before J was scheduled.Because this machine was b 0 -full at that time we know that b Now we can derive the following contradiction: For the second inequality, we use the monotonicity of g b 1 (−).The third inequality follows from Lemma 27 and the last one from Proposition 15.

Establishing Main Lemma 2:
Let m ≥ m(ε) be sufficiently large.The machine number m(ε) is determined by the proofs of Proposition 20 and Lemma 21, and then carries over to the subsequent lemmas.Let us assume for a contradiction sake that there was a stable sequence J such that ALG(J ) > (c + ε)OP T (J ).
As argued in the beginning of Section 4.

Lower bounds
We present lower bounds on the competitive ratio of any deterministic online algorithm in the random-order model.Theorem 29 implies that if a deterministic online algorithm is c-competitive with high probability as m → ∞, then c ≥ 3/2.
Theorem 28.Let A be a deterministic online algorithm that is c-competitive in the random-order model.Then c ≥ 4/3 if m ≥ 8.
Theorem 29.Let A be a deterministic online algorithm that is nearly c-competitive.Then c ≥ 3/2.
A basic family of inputs are job sequences that consist of jobs having an identical processing time of, say, 1.We first analyze them and then use the insight to derive our lower bounds.Let m ≥ 2 be arbitrary.For any deterministic online algorithm A, let r(A, m) be the maximum number in N∪{∞} such that A handles a sequence consisting of r(A, m)•m jobs with an identical processing time of 1 by scheduling each job on a least loaded machine.Lemma 30.Let m ≥ 2 be arbitrary.For every deterministic online algorithm A, there exists a job sequence J such that A rom (J ) ≥ (1 + 1 r(A,m)+1 )OP T (J ).We use the convention that 1 ∞+1 = 0.
Proof.For r(A, m) = ∞ there is nothing to show.For r(A) < ∞, consider the sequence J consisting of (r(A, m) + 1) • m identical jobs, each having a processing time of 1.It suffices to analyze the algorithm adversarially as all permutations of the job sequence are identical.After having handled the first r(A, m) • m jobs, the algorithm A has a schedule in which every machine has load of r(A, m).By the maximality of r(A, m), the algorithm A schedules one of the following m jobs on a machine that is not a least loaded one.The resulting makespan is r(A, m) + 2. The lemma follows since the optimal makespan is r(A, m) + 1.
Proof of Theorem 28.Let m ≥ 8 be arbitrary.Consider any deterministic online algorithm A. If r(A, m) ≤ 2, then, by Lemma 30, there exists a sequence J such that A rom (J ) ≥ 4 3 • OP T (J ).Therefore, we may assume that r(A, m) ≥ 3. Consider the input sequence J consisting of 4m − 4 identical small jobs of processing time 1 and one large job of processing time 4. Obviously OPT(J ) = 4.
Let i be the number of small jobs preceding the large job in J σ .The random variable i takes any (integer) value between 0 and 4m−4 with probability 1 4m−3 .Since r(A, m) ≥ 3 the least loaded machine has load of at least l = i m when the large job arrives.Thus A(J σ ) ≥ l + 4. The load l takes the values 0, 1 and 2 with probability m 4m−3 and the value 3 with probability m−3 4m−3 .Hence the expected makespan of algorithm A is at least For the last inequality we use that m ≥ 8.
Proof of Theorem 29.Let m ≥ 2 be arbitrary and let A be any deterministic online algorithm.If r(A, m) = 0, then consider the sequence J consisting of m jobs with a processing time of 1 each.On every permutation of J algorithm A has a makespan of 2, while the optimum makespan is 1.
If r(A, m) ≥ 1, then consider the sequence J consisting of 2m − 2 small jobs having a processing time of 1 and one large job with a processing time of 2. Obviously OP T (J ) = 2.If the permuted sequence starts with m small jobs, the least loaded machine has load 1 once the large job arrives.Under such permutations A(J σ ) ≥ 3 = 3 2 • OPT(J ) holds true.The probability of this happening is m−1 2m−1 .The probability approaches 1 2 and in particular does not vanish, for m → ∞.Thus, if A is nearly c-competitive, then c ≥ 3/2.
We will upper bound the probability of the opposite event by a term approaching 0 for m → ∞.The random variable Ñ ϕ + ε 2 [σ] is hypergeometrically distributed and therefore has expected value Recall that for proper sequences n > m holds.For the second inequality we require m and hence in also n to be large enough such that 1 n ≤ ε 10 holds.Again, the variable Ñ ϕ + ε 2 [σ] is hypergeometrically distributed and its variance is thus ≤ m + 1.
Note that we have for m large enough: Hence, using Chebyshev's inequality, we have and this term vanishes as m → ∞.
If s > i + 1, the schedule was steep at time t = t(s) − 1 and hence Since l t k ≥ l t i ≥ b, the previous inequality holds for s = i + 1, too, no matter whether J (s) = J (i+1) was scheduled flatly or steeply.We hence get, for all s ≥ i + 1, In the above difference, we first examine the first term, which is minimized if s = i + 1.With this setting it is still lower bounded by In the second term of the above difference k m−i = 2i−m m−i is increasing in i, where i ≤ (2c−3)m+h+1.We choose m large enough such that There holds α −1 < 0.5.Thus the second term in the difference is upper bounded by 2hb m .Recall that b > (c − 1 + ε)OP T .Furthermore, 0 < ε < 2 − c such that c − 1 + ε < 1.Therefore, we obtain In the previous term we intentionally highlighted three variables.It is easy to check that if we decrease these variables, the term decreases, too.We do this by setting k = (4c − 7)m and i = (2c − 3)m (while ignoring the non-highlighted occurrences of i).We also assume that m is large enough such that ε 4 ≥ 3h+2 m .Then the previous lower bound on L t can be brought to the following form: Using that i+1 m < 2c − 3 + h+2 m and evaluating the term in front of s−i−1

Figure 1 :Figure 2 :
Figure 1: A steep schedule.ALG only considers the least loaded machine.k i
j be the average load on the machines numbered s to m − h.Lemma 21.If L t(s)−1 s ≥ α −1 b holds and m ≥ m(ε), we have L t(s)−1 > s m + ε 2 • L.

Lemma 24 .
If L t(s)−1 s < α −1 b holds, the early filling jobs have a processing time of at least λ end b.
1 b holds.If it does, all filling jobs are large by Lemma 24 and the first statement in Lemma 17 holds.Otherwise, the second statement in Lemma 17 holds byLemma 22.
1 ≥ b 0 > (c − 1 + ε)OP T holds and it makes sense to consider b 1 -filling jobs.Let t be the time the (m − h)-th b 1 -filling job arrived.By Lemma 17 we have P t m+1 ≥ λ = max{λ start b 1 , min{g b 1 (P h ) , λ end b 1 }}.If we have λ = λ end b 1 ≥ λ end b 0 we have already proven P m+1 ≥ λ end b 0 and the lemma follows.So we are left to treat the case that we have P t m+1 ≥ λ = max{λ start b 1 , g b 1 (P h )}.