betaFeedback

WorksComputer Science

A QPTAS for Stochastic Scheduling of Bernoulli Jobs

Abstract

We study the classical problem of scheduling jobs with random processing times on mm identical machines to minimize the expected sum of completion times, for Bernoulli jobs: job jj takes time pjp_j with probability qjq_j and time 00 otherwise, and its outcome is revealed when it starts. The benchmark is an optimal adaptive policy. We give a quasi-polynomial-time approximation scheme for every number of machines. Previously, quasi-polynomial time was known to give an O(log⁡N)O(\log N)-approximation, and approximation schemes were known only for a constant number of distinct sizes. The scheme rests on a simple observation: it suffices to round the times at which machines become free, rather than the times at which jobs start, to a grid whose width is proportional to the job size, and an optimal policy stretched by a factor close to one already respects such grids. We also show that every policy that fixes the order of the jobs in advance loses a factor Ω(log⁡N)Ω(\log N), already on two machines, so a constant factor requires adapting the order to the observed outcomes. Further results include a polynomial-time adaptive rule with ratio min⁡{m,1+∑jqj}\min\{m,1+\sum_j q_j\}, a simpler approximation scheme for a constant number of sizes, and #P-hardness of computing the optimal expected cost on two machines.

Introduction

Scheduling jobs on identical parallel machines to minimize the sum of completion times is one of the most basic problems in scheduling. With deterministic processing times it is solved by the shortest-processing-time rule [15, 2]. When processing times are random and only their distributions are known in advance, the scheduler is a policy: it decides which job to start next based on what it has observed so far. The benchmark is the best such policy, which may adapt its decisions to the observed processing times. The problem has been studied for decades [13, 18, 10, 19], and approximation algorithms are known for broad classes of distributions [11, 17, 12, 16, 4, 5]. Their guarantees depend on an upper bound Δ\Delta on the squared coefficient of variation of the processing times, and they become weak when processing times have high variance.

A clean way to isolate the difficulty of high variance is to consider Bernoulli jobs. Job jj has processing time pjp_j with probability qjq_j and 00 otherwise, and the outcome becomes known when the job starts. Such a job either finishes immediately or blocks its machine for a long time, and a good policy has to decide when to risk such a blocking. Even for Bernoulli jobs, constant-factor approximations have been elusive. For general distributions, Im, Moseley, and Pruhs [7] gave a list policy with ratio O(log⁡2N+mlog⁡N)O(\log^2 N + m \log N), and a constant factor with (1+ε)m(1+\varepsilon)m machines when m=Ω(log⁡N)m = \Omega(\log N). Eberle, Fischer, Matuschke, and Megow [EFMM19] showed that index policies lose a factor Ω(Δ1/4)\Omega(\Delta^{1/4}), and gave an O(m)O(m)-approximation when the instance consists of identical deterministic jobs and identical Bernoulli jobs. Gupta, Moseley, and Zhou [6] gave a list policy whose ratio is O~(m)\widetilde{O}(\sqrt{m}), where O~\widetilde{O} hides factors polylogarithmic in NN. Recently, Antoniadis, Hoeksma, Schewior, and Uetz [AHSU25] gave a polynomial-time approximation scheme (PTAS) when the number of distinct sizes pjp_j is a constant. They also gave a quasi-polynomial-time O(log⁡N)O(\log N)-approximation for arbitrary sizes, and left open whether constant factors are possible. On the complexity side, Moseley, Pruhs, Uetz, and Zhou [9] showed that computing the optimal expected cost, deciding whether it is at most a given value, and computing the expected cost of SEPT are #P-hard for jobs with two-point distributions.

Our results

Throughout, NN is the number of jobs, m<Nm < N the number of machines, L\mathcal{L} the input length, P=∑jqjpjP = \sum_j q_jp_j the expected total processing time, and OPT the expected sum of completion times of an optimal adaptive policy. Our main result is an approximation scheme in quasi-polynomial time for every number of machines.

Theorem 1.1. For Bernoulli jobs on mm identical machines and every η∈(0,1]\eta\in(0,1], a policy with expected sum of completion times at most (1+η)OPT(1+\eta)\mathrm{OPT} can be computed in time 2O(η−2log⁡2(N/η))⋅poly⁡(L)2^{O(\eta^{-2}\log^2(N/\eta))} \cdot\operatorname{poly}(\mathcal{L}). Each decision of the policy is a table lookup.

This improves the quasi-polynomial O(log⁡N)O(\log N)-approximation of [AHSU25] to a ratio of 1+η1+\eta. The same dynamic program, without the size reduction, gives a short proof of the PTAS of [AHSU25] for a constant number of sizes, with a running time whose exponent is linear in 1/η1/\eta.

Theorem 1.2. If the jobs have nn distinct sizes, a (1+η)(1+\eta)-approximation can be computed in time (Nm)O(n/η)⋅poly⁡(L)(Nm)^{O(n/\eta)} \cdot\operatorname{poly}(\mathcal{L}) for fixed nn and η\eta.

In polynomial time, we obtain a ratio that does not depend on NN.

Theorem 1.3. A simple adaptive priority rule runs in polynomial time and has expected cost at most min⁡{m,1+∑jqj}⋅OPT\min\{m,1+\sum_j q_j\}\cdot\mathrm{OPT}.

Earlier polynomial-time guarantees for Bernoulli jobs with arbitrary sizes grow with NN [7, 6]. Theorem 1.3 gives a constant factor for every fixed number of machines, and the factor 22 for two machines. The second bound is useful when few jobs are expected to be positive.

Exact computation is hard already for two machines, while approximate evaluation of a given policy is easy.

Theorem 1.4. For Bernoulli jobs on two machines, computing OPT, deciding whether OPT≤x\mathrm{OPT} \le x, and computing the expected cost of the shortest-expected-processing-time rule (SEPT) are #P\#P-hard. On the other hand, the expected cost of any given non-idling policy can be approximated within a factor 1±ρ1 \pm\rho with probability 1−δ1-\delta from O(Nρ−2log⁡(2/δ))O(N\rho^{-2}\log(2/\delta)) simulations.

The hardness part adapts the construction of [9], which uses jobs with two-point distributions on m=N/2m=N/2 machines, to Bernoulli jobs on two machines.

Finally, we show that list policies cannot reach a constant factor.

Theorem 1.5. There are instances on two machines in which every policy that fixes the job order in advance costs Ω(log⁡N)⋅OPT\Omega(\log N)\cdot\mathrm{OPT}.

So the guarantees of [7, 6] for list policies must depend on NN, and the bound O(log⁡2N)O(\log^2 N) of [7] for two machines is tight up to a factor O(log⁡N)O(\log N).

Techniques

Rounding release times instead of start times. A dynamic program over states of an optimal policy must record when each machine becomes free and which jobs remain. Antoniadis, Hoeksma, Schewior, and Uetz [AHSU25] keep the number of states polynomial by transforming an optimal policy into a stratified policy that starts the jobs of each type only at the points of a type-specific grid. Their transformation loses a factor 1+O(nε)1+O(n^\varepsilon) for nn types [AHSU25, Theorem 4.23]. The number of states of their dynamic program grows as mnε−2zmn^{\varepsilon-2z} for some 1≤z≤n1\le z\le n, so the approach needs nn to be a constant.

We round only the times at which machines become free. Fix an integer KK and let γ=1+1/K\gamma=1+1/K. A positive job of size pp started at time ss completes at s+ps+p, and under our reuse rule its machine becomes available again at the first point of the grid (p/K)Z(p/K)\mathbb{Z} that is at least s+ps+p:

Rp(s)=pK(⌈sKp⌉+K)∈[s+p,s+γp).R_p(s)=\frac{p}{K}\left(\left\lceil\frac{sK}{p}\right\rceil+K\right)\in[s+p,s+\gamma p).

The key observation is that an optimal policy stretched by the factor γ\gamma already obeys this rule. If the stretched policy starts the job at γs\gamma s, then the next job on the same machine starts at least at γ(s+p)>Rp(γs)\gamma(s+p)>R_p(\gamma s). Compressing the stretched policy back, by starting the same jobs in the same order as early as the rule allows, can only move start times earlier. So the loss is the factor γ\gamma on the expected sum of start times, for any number of sizes (Lemma 4.2). Start times remain unconstrained, which is why no delays accumulate. Figure 1 shows the three policies in one realization.

Stretching and compressing policies on two machines

Figure 1. Stretching and compressing (Lemma 4.2) for K=2K=2, so that γ=3/2\gamma=3/2, in a realization in which all five jobs are positive. Jobs aa and ee have size 1, jobs bb and cc have size 5, and job dd has size 2. Top: a non-idling policy Π∗\Pi^* on two machines. Middle: the stretched policy Πγ\Pi_\gamma, which multiplies every start time by γ\gamma and keeps the machines; a job of size pp started at time ss releases its machine at Rp(s)R_p(s), before the next start on that machine. Bottom: the compressed policy Π\Pi, which starts the jobs in the same order, each at the current minimum release time. Hatched intervals are reserved by the reuse rule after a job has completed. In Π\Pi, job cc starts at time 1, which is not a multiple of 5/25/2, so its machine stays reserved until R5(1)=15/2R_5(1)=15/2. Job ee therefore starts at time 7 instead of 6, on the other machine, and still before its stretched start time 9. The sums of the start times are 12, 18 and 13.

The remaining work is to count the states of the dynamic program, which consist of the sorted vector of release times and the number of remaining jobs of each size class. For the latter, it is enough to know how many jobs of each class remain: by an exchange argument of Gupta, Moseley, and Zhou [6], some optimal policy starts the jobs of each size class in non-decreasing order of qjq_j (Lemma 2.4). Two counting facts control the release times. At a decision time tt, every release time is one of the K+1K+1 grid points of its class in [t,Rp(t)][t,R_p(t)], so the vector of release times is a multiset of mm values drawn from n(K+1)n(K+1) candidates. The decision times themselves are compositions of at most NN maps RpR_p, and a block encoding of such compositions shows that there are at most (K+1)N+n−1(K+1)^{N+n-1} of them (Lemma 4.4). For a constant number of sizes this gives Theorem 1.2.

For arbitrary sizes we first reduce to the case that all sizes lie within a polynomial ratio. We build on the reduction of [6 AHSU25], which tests very large jobs first and runs very small jobs at the start, but which loses a constant factor. Our version keeps the approximation ratio up to an additive 2ε2\varepsilon (Theorem 3.1). It compares with the optimum through the inequality OPT≥OPT(U)+∑j∉Uqjpj\mathrm{OPT} \ge\mathrm{OPT}(U)+\sum_{j\notin U}q_jp_j for every set UU of jobs. It bounds the cost of the rare event that a very large job is positive by Lemma 2.3, which bounds start times in terms of processed volume. After rounding the sizes to powers of 1+ε1+\varepsilon, the dynamic program has n=O(ε−1log⁡(N/ε))n=O(\varepsilon^{-1}\log(N/\varepsilon)) size classes, which gives Theorem 1.1. After the reduction the number of decision times is polynomial, so the quasi-polynomial running time comes from two sources: the vectors of remaining counts over these nn classes, and the multisets of release times.

A greedy rule that minimizes a surrogate of the cost. For a set SS of started jobs, let Wm−1(S)W_{m-1}(S) be their total realized processing time minus the m−1m-1 largest realized values. For non-idling policies, the start time of the (k+1)(k+1)-st job lies between Wm−1(Sk)/mW_{m-1}(S_k)/m and Wm−1(Sk)W_{m-1}(S_k), where SkS_k is the set of the first kk jobs. So the sum of Wm−1(Sk)W_{m-1}(S_k) over kk approximates the cost within a factor mm. This sum can be minimized exactly by an adaptive greedy rule. Adding a realized value xx increases Wm−1W_{m-1} by min⁡{x,θ}\min\{x,\theta\}, where θ\theta is the (m−1)(m-1)-st largest realized value so far. The rule starts a job of minimum expected increment qjmin⁡{pj,θ}q_j\min\{p_j,\theta\}, breaking ties by qjq_j, and an exchange argument proves its optimality (Lemma 5.2). The bound 1+∑jqj1+\sum_j q_j comes from a different comparison between the sum and the start times. It uses the fact that the (m−1)(m-1)-st largest realized value never exceeds the second earliest time at which a machine becomes free.

Hardness and the list lower bound. The hardness proof follows the construction of [9]. It adds a job with a tiny probability whose size differs by 1/41/4 between two instances, together with jobs of probability 1/21/2 that encode the items of a #Knapsack instance. On these instances SEPT is optimal, by the theorem of Weber, Varaiya, and Walrand [19], which we extend to Bernoulli jobs by a smoothing argument (Lemma 6.1). The difference of the two optimal costs then reveals the number of subsets of large weight.

The list lower bound uses types with piqi2p_iq_i^2 constant. In every prefix of a list, pairs of positive jobs of the same type force a delay that is the same for each type, so every list accumulates delay Ω(log⁡N)\Omega(\log N) per job. A policy that tests jobs until the first positive one and then reorders the rest avoids this.

Organization. § 2 defines the model and collects basic facts. § 3 gives the size reduction, and § 4 gives the dynamic program and proves Theorems 1.1 and 1.2. § 5 proves Theorem 1.3, § 6 proves Theorem 1.4, and § 7 proves Theorem 1.5. § 8 discusses open problems, including relaxations over start-time distributions.

Model and preliminaries

Jobs and policies. There are NN jobs and mm identical machines, all available at time 0. Job jj has an independent random processing time XjX_j with Pr⁡[Xj=pj]=qj\Pr[X_j=p_j]=q_j and Pr⁡[Xj=0]=1−qj\Pr[X_j=0]=1-q_j, where pj>0p_j>0 and qj∈(0,1]q_j\in(0,1] are rationals. We call pjp_j the size of jj, and we call the outcome of jj positive if Xj=pjX_j=p_j and zero otherwise. We write μj=E[Xj]=qjpj\mu_j=\mathbb{E}[X_j]=q_jp_j, P=∑jμjP=\sum_j\mu_j and Λ=∑jqj\Lambda=\sum_jq_j. Jobs of equal size form a size class, and nn denotes the number of size classes.

The outcome of a job becomes known when the job starts: a positive job then occupies its machine for pjp_j time units, and a zero job completes at once. A policy starts the jobs one at a time and without preemption. Each decision chooses a remaining job, a machine, and a start time that is not earlier than the previous start time and at which the machine is not occupied. The decision may depend on the outcomes of the jobs started before and on independent random coins, but not on the outcome of the chosen job. In particular, several jobs may start at the same time, one after another, and each of these decisions sees the outcomes of the earlier ones. Policies may leave machines idle on purpose. For a policy Π\Pi, let SjΠS_j^\Pi and CjΠ=SjΠ+XjC_j^\Pi=S_j^\Pi+X_j be the start and completion times of job jj. The cost of Π\Pi is

cost⁡(Π)=∑jE[CjΠ]=P+∑jE[SjΠ].\operatorname{cost}(\Pi)=\sum_j\mathbb{E}[C_j^\Pi]=P+\sum_j\mathbb{E}[S_j^\Pi].

and OPT is the infimum of the cost over all policies. A policy is an α\alpha-approximation if its cost is at most α⋅OPT\alpha\cdot\mathrm{OPT}. For a set UU of jobs, OPT(U)\mathrm{OPT}(U) denotes the optimum of the instance consisting of the jobs in UU alone on the same mm machines, and P(U)=∑j∈UμjP(U)=\sum_{j\in U}\mu_j.

More generally, a state consists of a set UU of remaining jobs, a current time τ\tau, and the times ℓ1,…,ℓm\ell_1,\ldots,\ell_m at which the machines become free. Only the sorted vector of the times max⁡{ℓi,τ}\max\{\ell_i,\tau\} matters, and we call it the release vector of the state. The outcomes of the remaining jobs are independent of the past. The cost of a policy from a state is the expected sum of the completion times of the jobs in UU.

Non-idling policies. A policy is non-idling if it starts a job whenever a machine is free and jobs remain. Equivalently, it starts every job at the minimum entry of the current release vector, on a machine that is free at that time. Since the outcome of a job is known at its start, waiting reveals no information. Hence an optimal policy need not idle [AHSU25, Lemma 2.1]; we include the short argument.

Lemma 2.1. From every state, some optimal policy is deterministic and non-idling. In particular, OPT is a minimum over finitely many decision trees.

Proof. Let V(ℓ,U)V(\ell,U) be the infimum of the cost from a state with release vector ℓ\ell and remaining jobs UU, with V(ℓ,∅)=0V(\ell,\varnothing)=0. If ℓ≤ℓ′\ell\le\ell' coordinatewise, then V(ℓ,U)≤V(ℓ′,U)V(\ell,U) \le V(\ell',U): a policy for ℓ′\ell' can be run from ℓ\ell with the same start times, using the machine of rank ii in ℓ\ell for the machine of rank ii in ℓ′\ell'.

We show by induction on ∣U∣|U| that V(ℓ,U)V(\ell,U) is attained by a deterministic non-idling policy. Consider any policy and fix the outcome of its coins. Its first decision starts a job xx at some time s≥ℓ1s \ge\ell_1 on a machine that is free at time ss. Afterwards its release vector is obtained from the sorted vector of the values max⁡{ℓi,s}\max\{\ell_i,s\}, whose minimum entry is ss, by replacing that minimum entry by s+Xxs+X_x. Starting xx at time ℓ1\ell_1 instead, on a machine with release time ℓ1\ell_1, gives xx a completion time that is not larger, and the release vector is then obtained from ℓ\ell by replacing its minimum entry ℓ1\ell_1 by ℓ1+Xx\ell_1+X_x. We have ℓi≤max⁡{ℓi,s}\ell_i \le\max\{\ell_i,s\} for every ii and ℓ1+Xx≤s+Xx\ell_1+X_x \le s+X_x. Replacing the minimum entries of two coordinatewise dominated sorted vectors by values x′≤y′x' \le y' and sorting again preserves the domination. So the release vector after the shifted start is dominated by the one after the original start. By monotonicity and induction, continuing with a deterministic non-idling optimal policy is no worse than the original continuation. Averaging over the coins and choosing the best first job proves the claim for UU. There are finitely many deterministic non-idling decision trees, which gives the second statement.

Basic bounds. The following two inequalities are used throughout.

Lemma 2.2. (a) P≤OPT.(a)\ P \le\mathrm{OPT}.

(b) OPT≥OPT(U)+P(J∖U)(b)\ \mathrm{OPT} \ge\mathrm{OPT}(U)+P(J\setminus U) for every set UU of jobs, where JJ is the set of all jobs.

Proof. Part (a) holds because Cj≥XjC_j \ge X_j for every job. For part (b), let Π\Pi be an optimal policy for JJ. Define a policy ΠU\Pi_U for the jobs in UU as follows. It simulates Π\Pi; whenever Π\Pi starts a job j∉Uj\notin U on some machine, ΠU\Pi_U draws an independent virtual outcome distributed as XjX_j and keeps that machine idle for the virtual processing time. This is a valid policy for UU, and the joint distribution of the start times and outcomes of the jobs in UU is the same under ΠU\Pi_U as under Π\Pi. Hence OPT(U)≤∑j∈UE[Cj]\mathrm{OPT}(U) \le\sum_{j\in U}\mathbb{E}[C_j]. The jobs outside UU contribute ∑j∉UE[Cj]≥P(J∖U)\sum_{j\notin U}\mathbb{E}[C_j] \ge P(J\setminus U), and adding the two bounds gives (b).

Free times. Fix a policy and a realization of the outcomes. For 0≤k<N0 \le k < N, let SkS_k be the set of the first kk jobs started and let FkF_k be the start time of the (k+1)(k+1)-st job. For a set SS of started jobs and an integer r≥0r \ge0, let Wr(S)W_r(S) be the total realized processing time of SS minus the sum of the rr largest realized processing times in SS, with Wr(S)=0W_r(S)=0 if ∣S∣≤r|S| \le r. Adding a job to SS never decreases Wr(S)W_r(S): the sum gains the new value if it is not among the rr largest, and otherwise it gains the value that leaves the rr largest. Also, Wr(S)W_r(S) is non-increasing in rr. Gupta, Moseley, and Zhou [6] measure the progress of a policy by its free times; the following lemma relates them to Wm−1W_{m-1}.

Lemma 2.3. Let all machines be free at time 0, and consider a realization in which every job starts at the earliest time at which some machine is free. This holds on every realization of a non-idling policy. Then for every 0≤k<N0 \le k < N,

Fk≤Wm−1(Sk)≤mFk.F_k \le W_{m-1}(S_k) \le mF_k.

Proof. On such a realization every machine is busy without gaps from time 0 until it becomes free. So after kk starts, the time at which machine ii becomes free equals its load LiL_i, the total realized processing time of the jobs started on it, and Fk=f:=min⁡iLiF_k = f := \min_i L_i.

The m−1m-1 jobs with the largest realized processing times in SkS_k lie on at most m−1m-1 machines. Some machine holds none of them, so its load is at most Wm−1(Sk)W_{m-1}(S_k), and ff is at most that load.

For the second inequality, consider a machine with Li>fL_i > f and let JiJ_i be the last job started on it. The job JiJ_i is positive. It started at the earliest free time of that moment, which is at most ff, since the earliest free time never decreases. Hence Li−f≤XJiL_i-f \le X_{J_i}. At most m−1m-1 machines have Li>fL_i > f, and their last jobs are distinct. So the total realized processing time of SkS_k is ∑iLi≤mf+∑i:Li>fXJi\sum_i L_i \le mf + \sum_{i:L_i>f} X_{J_i}, which is at most mfmf plus the sum of the m−1m-1 largest realized processing times in SkS_k. This gives Wm−1(Sk)≤mfW_{m-1}(S_k) \le mf.

Ordering within a size class. Fix an order of the jobs of each size class by non-decreasing qjq_j, breaking ties by index. A policy respects the class orders if, whenever it starts a job of some class, it starts the first remaining job of that class in this order. Gupta, Moseley, and Zhou [6 Lemma 2.2] state that an optimal policy starts the jobs of each size class in increasing order of qjq_j. Their proof in [6 Appendix B] is an exchange that moves a job with smaller qjq_j before an equal-size job with larger qjq_j, using an independent coin, without increasing the cost. We need the following existential form, with the tie-breaking used by our dynamic program, and we include the computation for the exchange.

Lemma 2.4. From every state, some optimal policy is deterministic, non-idling, and respects the class orders.

Proof. We use induction on the number of remaining jobs; the case of at most one job is trivial. By Lemma 2.1, take a deterministic non-idling optimal policy TT, let xx be its first job, and let t0t_0 be its start time, the minimum entry of the release vector. Let aa be the first remaining job of the class of xx, so that qa≤qxq_a \le q_x, and let pp be their common size. It suffices to find an optimal non-idling policy that starts aa first. Indeed, after the outcome of aa is revealed we can then replace the continuation by a deterministic non-idling optimal policy for the resulting state that respects the class orders, which exists by induction. If a=xa=x there is nothing to do, and if qa=qxq_a=q_x, exchanging the names of aa and xx gives such a policy.

So let qa<qxq_a < q_x. The policy TT starts aa on every path. Let T0T_0 and T1T_1 be its continuations after xx is zero and positive, and let σ0\sigma_0 and σ1\sigma_1 be the times at which they start aa. These random times do not depend on the outcome of aa, and σ0,σ1≥t0\sigma_0,\sigma_1 \ge t_0 since the minimum release time never decreases. Let ϑ=(qx−qa)/((1−qa)qx)∈(0,1]\vartheta= (q_x-q_a)/((1-q_a)q_x) \in(0,1]. The policy T′T' starts aa at time t0t_0 on the machine used by TT for xx. If aa is positive, it continues as T1T_1, with xx started in place of aa. If aa is zero, then with probability 1−ϑ1-\vartheta it continues as T0T_0, with xx started in place of aa. With probability ϑ\vartheta it instead starts xx at time t0t_0 and continues as T0T_0 or T1T_1, according to the outcome of xx, treating the node of aa as a zero job.

The policy T′T' is non-idling, and it continues as a copy of T1T_1 with probability qa+(1−qa)ϑqx=qxq_a+(1-q_a)\vartheta q_x=q_x and as a copy of T0T_0 with probability 1−qx1-q_x. Each copy is entered with the same release vector as in TT, because aa and xx have the same size. In a copy of T1T_1, the job run at the node of aa is positive with probability qaqx/qx=qaq_aq_x/q_x=q_a. In a copy of T0T_0, it is positive with probability (1−qa)(1−ϑ)qx/(1−qx)=qa(1-q_a)(1-\vartheta)q_x/(1-q_x)=q_a. In both cases this outcome is independent of all other jobs. So every job other than aa and xx has the same expected completion time in TT and T′T'. For aa and xx, a direct computation from the branch probabilities above gives

ET[Ca+Cx]−ET′[Ca+Cx]=(1−qx)(qx−qa)qx(E[σ0]−t0)+(qx−qa)(E[σ1]−t0)≥0,\mathbb{E}_{T}[C_a+C_x]-\mathbb{E}_{T'}[C_a+C_x]=\frac{(1-q_x)(q_x-q_a)}{q_x}\bigl(\mathbb{E}[\sigma_0]-t_0\bigr)+(q_x-q_a)\bigl(\mathbb{E}[\sigma_1]-t_0\bigr)\ge0,

where the terms with the factor pp cancel. So T′T' is an optimal non-idling policy that starts aa first. □

The stronger statement that reordering the jobs of each size class by qjq_j never increases the cost of a given policy, as stated in [AHSU25, Lemma 2.2], does not hold in general. For instance, let m=1m=1 and take jobs aa and bb of size 1 with qa=1/10q_a=1/10 and qb=9/10q_b=9/10, and a deterministic job dd of size 100. The policy that starts bb first, then dd and aa if bb is zero, and aa and dd if bb is positive, costs 112.89. Its reordered version starts aa first and continues with the same tree, and costs 191.29. We use only the existential form.

An approximation-preserving size reduction

This section reduces the problem to instances whose sizes lie within a polynomial ratio, at a loss of 2ε2\varepsilon in the approximation ratio. We build on the reduction of Gupta, Moseley, and Zhou [6 Lemma 3.3 and Appendix C], which tests very large jobs first and runs very small jobs at the start, at the cost of a constant factor. Antoniadis, Hoeksma, Schewior, and Uetz [AHSU25, Lemma A.1] adapt it to turn an α\alpha-approximation for instances whose sizes are powers of c≥2c\ge2 into a (c2+cα)(c^2+c\alpha)-approximation. The version below keeps the ratio α\alpha up to an additive 2ε2\varepsilon. It uses Lemma 2.2(b) to compare with the optimum, and Lemma 2.3 to bound the cost of the rare event that a very large job is positive.

If m≥Nm\ge N, starting every job at time 0 is optimal. If m=1m=1, the policy that starts the jobs in non-decreasing order of μj\mu_j (SEPT) is optimal [13]; § 5 recalls the argument for adaptive policies. We therefore assume 2≤m<N2\le m<N. Fix ε∈(0,1]\varepsilon\in(0,1] and set

T=NPε,σ=εPN2,D=Nσ=εPN.T=\frac{NP}{\varepsilon},\qquad\sigma=\frac{\varepsilon P}{N^2},\qquad D=N\sigma=\frac{\varepsilon P}{N}.

Call a job large if pj≥Tp_j\ge T, small if pj<σp_j<\sigma, and medium otherwise, and let LL, QQ and MM be the sets of large, small and medium jobs. The sizes of the medium jobs lie in [σ,T)[\sigma,T), so their ratio is less than N3/ε2N^3/\varepsilon^2.

Given a policy AA for the instance consisting of the medium jobs alone, the policy ΠA\Pi_A for the whole instance works as follows.

  1. At time 0, start the large jobs one after another on one machine, as long as their outcomes are zero.

  1. If a large job is positive, schedule all remaining jobs from that moment on by list scheduling in any fixed order: whenever a machine is free, start the next job of the list on it.

  1. Otherwise all large jobs are zero and have completed at time 0. List-schedule the small jobs from time 0, wait until time DD, and then run AA on the medium jobs with every start time shifted by DD.

Theorem 3.1. If cost⁡(A)≤α⋅OPT⁡(M)\operatorname{cost}(A)\le\alpha\cdot\operatorname{OPT}(M) for some α≥1\alpha\ge1, then cost⁡(ΠA)≤(α+2ε)⋅OPT⁡\operatorname{cost}(\Pi_A)\le(\alpha+2\varepsilon)\cdot\operatorname{OPT}.

Proof. Let EE be the event that some large job is positive.

The event EE. On EE, all decisions before the first positive large job occur at time 00, and the rest is list scheduling. So on every realization in EE, every job starts at the earliest time at which some machine is free, and Lemma 2.3 bounds every start time by Wm−1(Sk)≤W1(Sk)≤W1(J)W_{m-1}(S_k) \le W_1(S_k) \le W_1(J), using m≥2m \ge2 and the monotonicity of WrW_r. If ℓ\ell is a positive large job, then W1(J)W_1(J) is at most the total realized processing time minus XℓX_\ell. Summing over all large jobs therefore gives, on every realization,

1EW1(J)≤∑ℓ∈L1[Xℓ>0]∑i≠ℓXi\mathbf{1}_E W_1(J) \le\sum_{\ell\in L} \mathbf{1}[X_\ell> 0] \sum_{i \ne\ell} X_i

By independence, E[1[Xℓ>0]Xi]=qℓμi\mathbb{E}[\mathbf{1}[X_\ell> 0]X_i] = q_\ell\mu_i for i≠ℓi \ne\ell. Moreover ∑ℓ∈Lqℓ≤∑ℓ∈Lμℓ/T≤P/T\sum_{\ell\in L} q_\ell\le\sum_{\ell\in L} \mu_\ell/T \le P/T. Hence E[1EW1(J)]≤P2/T\mathbb{E}[\mathbf{1}_E W_1(J)] \le P^2/T, and

E[1E∑jSj]≤N⋅P2T=εP.\mathbb{E}\left[\mathbf{1}_E \sum_j S_j\right] \le N \cdot\frac{P^2}{T} = \varepsilon P.

The complement of EE. On the complement, every large job starts at time 00. The small jobs have total realized processing time at most ∣Q∣σ≤D|Q|\sigma\le D, so every machine has completed its small jobs by time DD, and all machines are free when AA starts. Every medium job starts at time DD plus its start time under AA. The event EE depends only on the large jobs, so conditioning on its complement does not change the distribution of the other outcomes. Therefore

E[1E‾∑j∉LSj]≤(∣Q∣+∣M∣)D+∑j∈ME[SjA]≤εP+cost⁡(A)−P(M).\mathbb{E}\left[\mathbf{1}_{\overline{E}} \sum_{j \notin L} S_j\right] \le(|Q| + |M|)D + \sum_{j \in M}\mathbb{E}[S_j^A] \le\varepsilon P + \operatorname{cost}(A) - P(M).

Combining. Adding the two bounds,

cost⁡(ΠA)=P+E[∑jSj]≤P(L)+P(Q)+cost⁡(A)+2εP≤P(L∪Q)+αOPT⁡(M)+2εP.\operatorname{cost}(\Pi_A) = P + \mathbb{E}\left[\sum_j S_j\right] \le P(L) + P(Q) + \operatorname{cost}(A) + 2\varepsilon P \le P(L \cup Q) + \alpha\operatorname{OPT}(M) + 2\varepsilon P.

By Lemma 2.2(b) with U=MU = M we have OPT⁡(M)+P(L∪Q)≤OPT⁡\operatorname{OPT}(M) + P(L \cup Q) \le\operatorname{OPT}, and by Lemma 2.2(a) we have P≤OPT⁡P \le\operatorname{OPT}. Since α≥1\alpha\ge1, the right-hand side is at most αOPT⁡+2εOPT⁡\alpha\operatorname{OPT} + 2\varepsilon\operatorname{OPT}.

A dynamic program over rounded release times

In this section the instance is arbitrary, with nn size classes and all machines free at time 00. We fix an integer K≥1K \ge1 and set γ=1+1/K\gamma= 1 + 1/K. The dynamic program optimizes over policies whose machines are released only at points of size-dependent grids. The main point is that stretching an optimal policy by the factor γ\gamma already makes it respect these grids, so the loss is a factor γ\gamma on OPT⁡−P\operatorname{OPT} - P regardless of the number of size classes.

The reuse rule

For a size pp, let gp=p/Kg_p = p/K and define

Rp(s)=gp(⌈sgp⌉+K)(s≥0).R_p(s) = g_p\left(\left\lceil\frac{s}{g_p}\right\rceil+ K\right) \qquad(s \ge0).

Lemma 4.1. For every size pp and every s≥0s \ge0: (a) s+p≤Rp(s)<s+γps+p \le R_p(s) < s+\gamma p; (b) RpR_p is non-decreasing; (c) Rp(s)R_p(s) is an integer multiple of gpg_p.

Proof. We have gp⌈s/gp⌉∈[s,s+gp)g_p\lceil s/g_p\rceil\in[s, s+g_p) and Kgp=pKg_p = p, so Rp(s)∈[s+p,s+p+gp)=[s+p,s+γp)R_p(s) \in[s+p,s+p+g_p) = [s+p,s+\gamma p). Parts (b) and (c) are immediate.

A reuse-rule policy is a policy in which a positive job of size pp started at time ss keeps its machine unavailable until time Rp(s)R_p(s). The job itself completes at time s+ps+p, and the machine stays idle during [s+p,Rp(s))[s+p,R_p(s)). A zero job leaves its machine available at once. The time from which a machine may be used again is its release time. A reuse-rule policy is grid-non-idling if it always starts the next job at the current minimum release time, on a machine attaining it.

Stretching and compressing an optimal policy

Lemma 4.2. There is a grid-non-idling reuse-rule policy Π\Pi that respects the class orders and satisfies SjΠ≤γSjΠ∗S_j^\Pi\le\gamma S_j^{\Pi^*} for every job jj and every realization, where Π∗\Pi^* is a deterministic optimal policy as in Lemma 2.4 and both policies see the same outcomes. In particular, cost⁡(Π)≤P+γ(OPT⁡−P)\operatorname{cost}(\Pi) \le P+\gamma(\operatorname{OPT}-P).

Proof. Figure 1 illustrates the proof in one realization.

Stretching. Let Πγ\Pi_\gamma start every job on the same machine as Π∗\Pi^* at γ\gamma times its start time in Π∗\Pi^*. At time γt\gamma t, the policy Πγ\Pi_\gamma has observed exactly the outcomes that Π∗\Pi^* has observed at time tt, so it can make the same decisions. Suppose a job ii of size pp is positive, starts at time ss on some machine in Π∗\Pi^*, and the next job on that machine starts at time s′≥s+ps' \ge s+p. In Πγ\Pi_\gamma the machine is released at Rp(γs)<γs+γp≤γs′R_p(\gamma s) < \gamma s+\gamma p \le\gamma s' by Lemma 4.1(a). After a zero job, the next start on the machine is at γs′≥γs\gamma s' \ge\gamma s. So Πγ\Pi_\gamma is a reuse-rule policy, possibly with idle time, with SjΠγ=γSjΠ∗S_j^{\Pi_\gamma}=\gamma S_j^{\Pi^*}.

Compressing. The policy Π∗\Pi^* makes its decisions in non-decreasing order of start time, so Πγ\Pi_\gamma starts the jobs in the same order. The policy Π\Pi starts the jobs in this order, each at its own current minimum release time and on a machine attaining it. This is possible online: the kk-th job of the order is determined by the outcomes of the first k−1k-1 jobs, which Π\Pi has already observed. The order within each size class is that of Π∗\Pi^*, so Π\Pi respects the class orders.

For vectors b∈Rmb \in\mathbb{R}^m and τ≥0\tau\ge0, let b∨τb \vee\tau be the vector (max⁡{b1,τ},…,max⁡{bm,τ})(\max\{b_1,\tau\},\ldots,\max\{b_m,\tau\}) sorted increasingly. Let aa and bb be the sorted release vectors of Π\Pi and Πγ\Pi_\gamma just before the kk-th start, and let τk\tau_k be the start time of the kk-th job in Πγ\Pi_\gamma. We show by induction that a≤b∨τka \le b \vee\tau_k coordinatewise. Initially a=b=0a=b=0. The policy Πγ\Pi_\gamma starts the kk-th job at τk\tau_k on a machine released by τk\tau_k, so the corresponding entry of b∨τkb \vee\tau_k equals τk\tau_k, the minimum of b∨τkb \vee\tau_k. Hence Π\Pi starts the job at time sk=a1≤τks_k=a_1\le\tau_k. If the job is zero, neither release vector changes. If it is positive with size pp, the new release vector of Π\Pi is obtained from aa by replacing its minimum entry by Rp(sk)R_p(s_k) and sorting. Likewise, since Rp(τk)≥τkR_p(\tau_k)\ge\tau_k, the vector b′∨τkb'\vee\tau_k for the new release vector b′b' of Πγ\Pi_\gamma is obtained from b∨τkb\vee\tau_k by replacing the entry τk\tau_k of the used machine by Rp(τk)R_p(\tau_k) and sorting. Since Rp(sk)≤Rp(τk)R_p(s_k)\le R_p(\tau_k) by Lemma 4.1(b), the new vectors satisfy the same coordinatewise domination: replacing the minimum entries of two dominated sorted vectors by values x≤yx\le y and sorting again preserves domination. Finally τk+1≥τk\tau_{k+1}\ge\tau_k, so b′∨τk+1≥b′∨τkb'\vee\tau_{k+1}\ge b'\vee\tau_k coordinatewise. This completes the induction, and SjΠ=sk≤τk=γSjΠ∗S_j^\Pi=s_k\le\tau_k=\gamma S_j^{\Pi^*} for the kk-th job jj.

Summing over the jobs, cost⁡(Π)=P+∑jE[SjΠ]≤P+γ∑jE[SjΠ∗]=P+γ(OPT⁡−P)\operatorname{cost}(\Pi)=P+\sum_j\mathbb{E}[S_j^\Pi]\le P+\gamma\sum_j\mathbb{E}[S_j^{\Pi^*}]=P+\gamma(\operatorname{OPT}-P). □\square

The dynamic program

Number the size classes 1,…,n1,\ldots,n, let pcp_c be the size of class cc, and let NcN_c be the number of jobs in it. We optimize over grid-non-idling reuse-rule policies that respect the class orders of § 2, which sort each class by qjq_j and break ties by index. A state is a pair (ℓ,ν)(\ell,\nu). Here ℓ=(ℓ1≤⋯≤ℓm)\ell=(\ell_1\le\cdots\le\ell_m) is the sorted vector of release times, in absolute time. The vector ν=(ν1,…,νn)\nu=(\nu_1,\ldots,\nu_n) counts the remaining jobs of each class; the remaining jobs of class cc are the last νc\nu_c jobs of its order. For νc>0\nu_c>0, let jc(ν)j_c(\nu) be the first remaining job of class cc, and let ℓ(c)\ell^{(c)} be the vector obtained from ℓ\ell by replacing ℓ1\ell_1 by Rpc(ℓ1)R_{p_c}(\ell_1) and sorting. Let ece_c denote the cc-th unit vector. Define V(ℓ,0)=0V(\ell,0)=0 and, for ν≠0\nu\ne0,

V(ℓ,ν)=min⁡c:νc>0[ℓ1+qjpc+(1−qj)V(ℓ,ν−ec)+qjV(ℓ(c),ν−ec)],j=jc(ν).V(\ell,\nu)=\min_{c:\nu_c>0}\left[\ell_1+q_jp_c+(1-q_j)V(\ell,\nu-e_c)+q_jV(\ell^{(c)},\nu-e_c)\right],\qquad j=j_c(\nu).

Lemma 4.3. V((0,…,0),(N1,…,Nn))V((0,\ldots,0),(N_1,\ldots,N_n)) is the minimum cost of a grid-non-idling reuse-rule policy that respects the class orders. A policy attaining it chooses, in each state, a class cc attaining the minimum and starts jc(ν)j_c(\nu).

Proof. In such a policy, the next job starts at time ℓ1\ell_1, so the expected completion time of the job started in state (ℓ,ν)(\ell,\nu) is ℓ1+qjpc\ell_1+q_jp_c. After the start, the state is (ℓ,ν−ec)(\ell,\nu-e_c) if the job is zero and (ℓ(c),ν−ec)(\ell^{(c)},\nu-e_c) if it is positive. The outcomes of the remaining jobs are independent of the past, the costs add up, and the machines are identical. So the minimum expected cost of the remaining jobs depends only on the state and satisfies the recursion. The recursion is acyclic because ∑cνc\sum_c\nu_c decreases.

Counting the states

Lemma 4.4. All release times that occur in the dynamic program lie in a set of size at most ((K+1)N+n−1n)\binom{(K+1)N+n-1}{n}.

Proof. Write gc=gpcg_c=g_{p_c} and Rc=RpcR_c=R_{p_c}. A release time is either 00 or equal to Rc(t)R_c(t) for a decision time tt at which a positive job of class cc starts. The time tt is itself 00 or an earlier release time. Following this chain backwards shows that every release time has the form v=Rck∘⋯∘Rc1(0)v=R_{c_k}\circ\cdots\circ R_{c_1}(0), where k≤Nk\le N because the maps correspond to distinct positive jobs. We encode such a composition by a vector in Z≥0n\mathbb{Z}_{\ge0}^n.

Split the sequence c1,…,ckc_1,\ldots,c_k into blocks. The first block ends at the last occurrence of the class with the largest grid width in the sequence, and the remaining suffix is split in the same way. The largest grid widths of successive blocks strictly decrease. Consider a block of length rr whose largest grid width is gg, which maps the value uu to the value vv. Each map Rc′R_{c'} in the block has gc′≤gg_{c'}\le g and increases its argument by an amount in [Kgc′,(K+1)gc′)[Kg_{c'},(K+1)g_{c'}), by Lemma 4.1(a). Hence Kg≤v−u<(K+1)rgKg\le v-u<(K+1)rg. The last map of the block has grid width gg, so vv is a multiple of gg, and we can write v=g(⌈u/g⌉+a)v=g(\lceil u/g\rceil+a) for an integer aa. Since g⌈u/g⌉∈[u,u+g)g\lceil u/g\rceil\in[u,u+g), the two bounds on v−uv-u give K≤a≤(K+1)r−1K\le a\le(K+1)r-1.

The encoding records the value aa of each block at the coordinate of the block’s largest class, and 00 at every other coordinate. Processing the nonzero coordinates in decreasing order of grid width, starting from u=0u=0, reconstructs vv. With κ≥1\kappa\ge1 blocks, the coordinates sum to at most (K+1)k−κ≤(K+1)N−1(K+1)k-\kappa\le(K+1)N-1. The number of vectors in Z≥0n\mathbb{Z}_{\ge0}^n with coordinate sum at most (K+1)N−1(K+1)N-1 is ((K+1)N+n−1n)\binom{(K+1)N+n-1}{n}.

For example, let K=1K=1, so that Rp(s)=p(⌊s/p⌋+1)R_p(s)=p(\lfloor s/p\rfloor+1) and the grid width of each size is the size itself, and let the sizes be 44, 22 and 11. Applying the maps R1,R4,R2,R4,R1,R1R_1,R_4,R_2,R_4,R_1,R_1 in this order to 00 produces the values 1,8,10,16,17,181,8,10,16,17,18. The first block R1,R4,R2,R4R_1,R_4,R_2,R_4 ends at the last occurrence of the largest size and maps 00 to 16=4(⌊0/4⌋+4)16=4(\lfloor0/4\rfloor+4), so its value of aa is 44. The second block R1,R1R_1,R_1 maps 1616 to 18=1⋅(⌊16/1⌋+2)18=1\cdot(\lfloor16/1\rfloor+2), so its value of aa is 22. With the coordinates ordered by decreasing size, the encoding is (4,0,2)(4,0,2), and its coordinate sum 66 is at most (K+1)k−κ=10(K+1)k-\kappa=10. Decoding computes 1616 and then 1818 by the same two formulas, without the intermediate values 1,8,101,8,10 and 1717. The maps R4,R4,R4,R4,R1,R1R_4,R_4,R_4,R_4,R_1,R_1 have the same encoding and the same value.

Lemma 4.5. For every decision time tt, the number of sorted release vectors ℓ\ell with ℓ1=t\ell_1=t that occur in the dynamic program is at most (m+d−1d−1)\binom{m+d-1}{d-1}, where d=n(K+1)d=n(K+1).

Proof. Consider a machine whose last positive job belongs to class cc and started at time s≤ts \le t. Its release time satisfies t≤ℓi=Rc(s)≤Rc(t)=gc(⌈t/gc⌉+K)t \le\ell_i = R_c(s) \le R_c(t) = g_c(\lceil t/g_c\rceil+ K), and ℓi\ell_i is a multiple of gcg_c. Hence ℓi∈{gc(⌈t/gc⌉+a):0≤a≤K}\ell_i \in\{g_c(\lceil t/g_c\rceil+ a) : 0 \le a \le K\}. A machine without a positive job has release time 00, which happens only if t=0t = 0 and is then contained in this set with a=0a = 0. So every entry of ℓ\ell takes one of at most dd values, and a sorted vector of mm such entries is a multiset of size mm drawn from dd values.

Theorem 4.6. For every instance with nn size classes and every integer K≥1K \ge1, a policy Π\Pi with

cost⁡(Π)≤P+(1+1K)(OPT⁡−P)\operatorname{cost}(\Pi) \le P + \left(1 + \frac{1}{K}\right)(\operatorname{OPT} - P)

can be computed in time

((K+1)N+n−1n)(m+n(K+1)−1n(K+1)−1)∏c=1n(Nc+1)⋅poly⁡(N,m,L),\binom{(K+1)N+n-1}{n} \binom{m+n(K+1)-1}{n(K+1)-1} \prod_{c=1}^{n}(N_c+1)\cdot\operatorname{poly}(N,m,\mathcal{L}),

where L\mathcal{L} is the input length. Each decision of Π\Pi is then a table lookup.

Proof. By Lemma 4.2, some policy in the class optimized by the dynamic program has cost at most P+γ(OPT⁡−P)P+\gamma(\operatorname{OPT}-P). By Lemma 4.3, the dynamic program finds a policy in this class of minimum cost. By Lemmas 4.4 and 4.5, the number of states is at most the product of the three factors. Each transition takes O(n+m)O(n+m) arithmetic operations. All release times are multiples of 1/(K⋅lcm⁡)1/(K\cdot\operatorname{lcm}), where lcm is the least common multiple of the size denominators. All values of VV are rationals whose denominators divide the product of K⋅lcm⁡K\cdot\operatorname{lcm} and the denominators of all qjq_j. So the numbers have polynomial bit length.

Corollary 4.7. For every fixed number nn of size classes and every fixed η∈(0,1]\eta\in(0,1], a (1+η)(1+\eta)-approximation can be computed in time (Nm)O(n/η)poly⁡(L)(Nm)^{O(n/\eta)}\operatorname{poly}(\mathcal{L}).

Proof. Take K=⌈1/η⌉K=\lceil1/\eta\rceil in Theorem 4.6, so that cost⁡(Π)≤P+(1+η)(OPT⁡−P)≤(1+η)OPT⁡\operatorname{cost}(\Pi) \le P+(1+\eta)(\operatorname{OPT}-P) \le(1+\eta)\operatorname{OPT}. The three factors are at most ((K+1)N+n)n((K+1)N+n)^n, (m+n(K+1))n(K+1)(m+n(K+1))^{n(K+1)} and (N+1)n(N+1)^n, and their product is (Nm)O(n/η)(Nm)^{O(n/\eta)} for fixed nn and η\eta. This proves Theorem 1.2.

For comparison, the dynamic program of Antoniadis, Hoeksma, Schewior, and Uetz has O(N2nε−2nmnε−2)O(N^{2n\varepsilon^{-2n}m^{n\varepsilon^{-2}}}) states, where 1≤z≤n1 \le z \le n depends on how the sizes group [AHSU25, Lemma 6.8].

Proof of Theorem 1.1

Let η∈(0,1]\eta\in(0,1]. Replacing η\eta by 1/⌈1/η⌉≥η/21/\lceil1/\eta\rceil\ge\eta/2, we may assume that 1/η1/\eta is an integer; then all rounded sizes below have bit length polynomial in L\mathcal{L} and 1/η1/\eta. Let ε=η/5\varepsilon=\eta/5. If m=1m=1 or m≥Nm\ge N, an optimal policy is known (Section 3), so assume 2≤m<N2 \le m < N. Define the medium jobs as in Section 3. Round the size of every medium job jj up to pj′=σ(1+ε)⌈log⁡1+ε(pj/σ)⌉p'_j=\sigma(1+\varepsilon)^{\lceil\log_{1+\varepsilon}(p_j/\sigma)\rceil}, so that pj≤pj′<(1+ε)pjp_j \le p'_j < (1+\varepsilon)p_j, and keep qjq_j. Call the result the rounded medium instance. Its sizes lie in [σ,(1+ε)T)[\sigma,(1+\varepsilon)T), so it has n≤log⁡1+ε(N3/ε2)+2=O(ε−1log⁡(N/ε))n \le\log_{1+\varepsilon}(N^3/\varepsilon^2)+2=O(\varepsilon^{-1}\log(N/\varepsilon)) size classes.

Rounding loses a factor 1+ε1+\varepsilon. Take an optimal policy for the medium jobs and run it on the rounded medium instance with all start times multiplied by 1+ε1+\varepsilon. A positive job that occupies [s,s+pj][s,s+p_j] in the original policy occupies [(1+ε)s,(1+ε)s+pj′][(1+\varepsilon)s,(1+\varepsilon)s+p'_j], which is contained in [(1+ε)s,(1+ε)(s+pj)][(1+\varepsilon)s,(1+\varepsilon)(s+p_j)]. So the stretched policy is valid, and each of its completion times is at most 1+ε1+\varepsilon times the original one. Hence the optimum of the rounded medium instance is at most (1+ε)OPT⁡(M)(1+\varepsilon)\operatorname{OPT}(M).

The dynamic program. Apply Theorem 4.6 to the rounded medium instance with K=⌈1/ε⌉K=\lceil1/\varepsilon\rceil. This gives a policy A whose cost on the rounded instance is at most (1+1/K)(1+1/K) times its optimum, which is at most (1+ε)2OPT⁡(M)(1+\varepsilon)^2\operatorname{OPT}(M). Run AA on the original medium jobs and keep each machine unavailable until the release time computed from the rounded size. The start times are the same as on the rounded instance, and every completion time is at most the corresponding one there, since pj≤pj′p_j \le p'_j. So the cost of AA on the medium jobs is at most (1+ε)2OPT⁡(M)(1+\varepsilon)^2\operatorname{OPT}(M).

The ratio. By Theorem 3.1 with α=(1+ε)2\alpha=(1+\varepsilon)^2, the policy ΠA\Pi_A has cost at most ((1+ε)2+2ε)OPT⁡≤(1+5ε)OPT⁡=(1+η)OPT⁡((1+\varepsilon)^2+2\varepsilon)\operatorname{OPT} \le(1+5\varepsilon)\operatorname{OPT}=(1+\eta)\operatorname{OPT}, using ε≤1\varepsilon\le1.

The running time. We have K+1≤2/ε+1K+1\le2/\varepsilon+1 and d=n(K+1)=O(ε−2log⁡(N/ε))d=n(K+1)=O(\varepsilon^{-2}\log(N/\varepsilon)). After the size reduction, the number of possible release times is polynomial. Every release time is a multiple of some gc=pc′/Kg_c=p'_c/K and at most γNpmax⁡′\gamma Np'_{\max}, and pmax⁡′/pc′<(1+ε)N3/ε2p'_{\max}/p'_c < (1+\varepsilon)N^3/\varepsilon^2. So there are at most 1+∑c(γNKpmax⁡′/pc′+1)=O(nKN4/ε2)1+\sum_c(\gamma NKp'_{\max}/p'_c+1)=O(nKN^4/\varepsilon^2) release times, and this bound can replace the first factor in Theorem 4.6. The second factor is at most (m+d)d≤(N+d)d=exp⁡(O(ε−2log⁡2(N/ε)))(m+d)^d\le(N+d)^d=\exp(O(\varepsilon^{-2}\log^2(N/\varepsilon))), since m<Nm<N. The third is at most (N+1)n=exp⁡(O(ε−1log⁡Nlog⁡(N/ε)))(N+1)^n=\exp(O(\varepsilon^{-1}\log N\log(N/\varepsilon))). The rounding and the reduction take polynomial time. So the total running time is 2O(η−2log⁡2(N/η))poly⁡(L)2^{O(\eta^{-2}\log^2(N/\eta))}\operatorname{poly}(\mathcal{L}).

A polynomial-time mm-approximation

This section analyzes a simple adaptive priority rule. Fix distinct ranks ρ(j)\rho(j) for the jobs. For m≥2m\ge2, the policy GG maintains the multiset AA of the m−1m-1 largest realized processing times among the jobs started so far, padded with zeros, and its minimum θ=min⁡A\theta=\min A. Whenever a machine is free, GG starts a remaining job that minimizes, in lexicographic order,

(qjmin⁡{pj,θ},qj,ρ(j)).(q_j\min\{p_j,\theta\},q_j,\rho(j)).

After each start GG updates AA. The policy is non-idling: whenever a machine is free, for instance right after a zero outcome, it starts the next job. For m=1m=1, GG is SEPT. Initially θ=0\theta=0, so GG first tries the jobs with the smallest qjq_j. Each decision scans the remaining jobs, so GG runs in O(N2)O(N^2) arithmetic operations.

Theorem 5.1. For every instance, cost⁡(G)−P≤min⁡{m,1+Λ}⋅(OPT⁡−P)\operatorname{cost}(G)-P\le\min\{m,1+\Lambda\}\cdot(\operatorname{OPT}-P), where Λ=∑jqj\Lambda=\sum_j q_j. In particular, cost⁡(G)≤min⁡{m,1+Λ}⋅OPT⁡\operatorname{cost}(G)\le\min\{m,1+\Lambda\}\cdot\operatorname{OPT}.

For m=1m=1, consider a non-idling policy that starts the jobs J1,…,JNJ_1,\ldots,J_N in this order, where JkJ_k may depend on earlier outcomes. The processing time of JkJ_k adds to its own completion time and to those of all later jobs, and JkJ_k is chosen before its outcome is revealed. So the cost is ∑k(N−k+1)E[μJk]\sum_k(N-k+1)\mathbb{E}[\mu_{J_k}], which SEPT minimizes [13]; by Lemma 2.1 this proves the theorem for m=1m=1. From now on assume m≥2m\ge2 and write r=m−1r=m-1. The analysis compares policies through the quantity

H(Π)=E[∑k=0N−1Wr(Sk)].H(\Pi)=\mathbb{E}\left[\sum_{k=0}^{N-1}W_r(S_k)\right].

which depends only on the adaptive order in which Π\Pi starts the jobs. For every policy, ∑jSj=∑kFk\sum_j S_j=\sum_k F_k, and for a non-idling policy Lemma 2.3 applies on every realization. So for every non-idling policy Π\Pi,

∑jE[SjΠ]≤H(Π)≤m∑jE[SjΠ].(1)\sum_j\mathbb{E}[S_j^\Pi]\le H(\Pi)\le m\sum_j\mathbb{E}[S_j^\Pi]. \tag*{(1)}

The greedy rule minimizes HH

Consider the increments Dk=Wr(Sk+1)−Wr(Sk)D_k=W_r(S_{k+1})-W_r(S_k). If the multiset of the rr largest realized processing times so far has minimum θ\theta, then a new realized value xx changes WrW_r by min⁡{x,θ}\min\{x,\theta\}. So expected increment of job jj is dj(θ)=qjmin⁡{pj,θ}d_j(\theta)=q_j\min\{p_j,\theta\}. Since Wr(S0)=0W_r(S_0)=0, we have ∑k=0N−1Wr(Sk)=∑k=0N−1(N−1−k)Dk\sum_{k=0}^{N-1}W_r(S_k)=\sum_{k=0}^{N-1}(N-1-k)D_k. For the remaining decisions, the relevant state is the set RR of remaining jobs together with the multiset AA. If ∣R∣=s|R|=s and the next ss increments are D1′,…,Ds′D'_1,\ldots,D'_s, the future part of the objective is ∑i=1s(s−i)Di′\sum_{i=1}^{s}(s-i)D'_i.

Lemma 5.2. For every multiset AA and every set RR of remaining jobs, the greedy rule minimizes E[∑i=1s(s−i)Di′]\mathbb{E}[\sum_{i=1}^{s}(s-i)D'_i] over all adaptive orders.

Proof. We use induction on s=∣R∣s=|R|; the case s≤1s\leq1 is trivial. The objective equals (s−1)D1′(s-1)D'_1 plus the future part of the objective from the state after the first decision, which has s−1s-1 remaining jobs. So by induction, every order may continue greedily after its first decision without becoming worse. Let aa be the job chosen by the greedy rule, let θ=min⁡A\theta=\min A, and write μb=qbpb\mu_b=q_bp_b. Take an optimal order that is greedy after its first decision, and suppose it starts with a job j≠aj\ne a. We construct an order that starts with aa and is no worse.

Case 1: pa≤θp_a\leq\theta. Then da(θ′)=μad_a(\theta')=\mu_a for every θ′≥θ\theta'\geq\theta, while db(θ′)d_b(\theta') is non-decreasing in θ′\theta' for every other job bb. The threshold never decreases, so after jj the job aa is still the greedy choice. The optimal order thus starts with j,aj,a. Swap them to a,ja,j. In both orders, aa contributes the increment XaX_a, because pa≤θp_a\leq\theta is at most the threshold at any later time, and jj contributes min⁡{Xj,θ}\min\{X_j,\theta\}, because aa does not change AA. Both orders end in the same state, and the swap changes the expected objective by μa−dj(θ)≤0\mu_a-d_j(\theta)\leq0.

Case 2: pa>θp_a>\theta and pj≤θp_j\leq\theta. Now jj does not change AA, so after jj the job aa is again the greedy choice. Swapping j,aj,a to a,ja,j leads to the same state and changes the expected objective by qaθ−μj=da(θ)−dj(θ)≤0q_a\theta-\mu_j=d_a(\theta)-d_j(\theta)\leq0.

Case 3: pa>θp_a>\theta and pj>θp_j>\theta. First, qa=min⁡bqbq_a=\min_b q_b and qaθ≤μbq_a\theta\leq\mu_b for every remaining job bb. If θ>0\theta>0, a job bb with qb<qaq_b<q_a would have db(θ)≤qbθ<qaθ=da(θ)d_b(\theta)\leq q_b\theta<q_a\theta=d_a(\theta), contradicting the choice of aa; if θ=0\theta=0, the second key selects a job of minimum qq. Moreover qaθ=da(θ)≤db(θ)≤μbq_a\theta=d_a(\theta)\leq d_b(\theta)\leq\mu_b.

Let θ2\theta_2 be the second smallest element of AA, with θ2=∞\theta_2=\infty if r=1r=1. After a positive outcome of aa, the new threshold is θa=min⁡{pa,θ2}\theta_a=\min\{p_a,\theta_2\}; after a positive outcome of jj it is θj=min⁡{pj,θ2}\theta_j=\min\{p_j,\theta_2\}. Let u=min⁡{pa,pj,θ2}u=\min\{p_a,p_j,\theta_2\} and

B={b∈R∖{a,j}:μb<qau}.\mathcal{B}=\{b\in R\setminus\{a,j\}:\mu_b<q_au\}.

Every b∈Bb\in\mathcal{B} has qb≥qaq_b\geq q_a and therefore pb=μb/qb<up_b=\mu_b/q_b<u. So after aa or jj is positive, the jobs of B\mathcal{B} do not change AA, and each of them contributes the increment XbX_b.

We first determine the optimal order, which is greedy after jj. If jj is positive, the threshold is θj≥u\theta_j\geq u. Every b∈Bb\in\mathcal{B} then has key db(θj)=μb<qaud_b(\theta_j)=\mu_b<q_au, and aa has key qamin⁡{pa,θj}=qauq_a\min\{p_a,\theta_j\}=q_au. Every other job cc has key min⁡{μc,qcθj}≥qau\min\{\mu_c,q_c\theta_j\}\geq q_au. If a job c∉Bc\notin\mathcal{B} has key exactly qauq_au and qc=qaq_c=q_a, then μc≥qau≥qaθ\mu_c\geq q_au\geq q_a\theta, so cc and aa had equal first and second keys at the start, and the rank favours aa. So the order processes B\mathcal{B} in the order of the keys (μb,qb,ρ(b))(\mu_b,q_b,\rho(b)), during which AA does not change, and then aa. If jj is zero, the order starts aa next. If aa is then positive, the same argument with θa≥u\theta_a\geq u shows that it processes B\mathcal{B} next, in the same order.

The new order starts with aa. If aa is positive, it processes B\mathcal{B} in the same order and then starts jj. If aa is zero, it starts jj, and if jj is positive it then processes B\mathcal{B} in the same order. In each case it then continues as the optimal order does from the same state. Writing XBX_{\mathcal{B}} for the sequence of outcomes of the jobs in B\mathcal{B} in this order, the increments are as follows.

outcomes of aa and jjoptimal ordernew order
both zero0,00,00,00,0
aa positive, jj zero0,θ,XB0,\theta,X_{\mathcal{B}}θ,XB,0\theta,X_{\mathcal{B}},0
aa zero, jj positiveθ,XB,0\theta,X_{\mathcal{B}},00,θ,XB0,\theta,X_{\mathcal{B}}
both positiveθ,XB,u\theta,X_{\mathcal{B}},uθ,XB,u\theta,X_{\mathcal{B}},u

Table 5.

In every row the two segments have the same length and end in the same state, because the final multiset AA does not depend on the order of insertion. The weights of consecutive positions differ by exactly one. So the new order is worse by θ+∑b∈Bμb\theta+ \sum_{b\in B} \mu_b in the second row and better by the same amount in the third row. The outcomes of the jobs in BB are independent of those of aa and jj. So the expected change is

(qa(1−qj)−(1−qa)qj)(θ+∑b∈Bμb)=(qa−qj)(θ+∑b∈Bμb)≤0.(q_a(1-q_j)-(1-q_a)q_j)\left(\theta+\sum_{b\in B}\mu_b\right)=(q_a-q_j)\left(\theta+\sum_{b\in B}\mu_b\right)\le0.

Proof of Theorem 5.1

The bound with factor mm follows from Lemma 5.2 and (1). Let Π∗\Pi^* be a non-idling optimal policy (Lemma 2.1). Then cost⁡(G)−P=∑jE[SjG]≤H(G)≤H(Π∗)≤m(OPT⁡−P)\operatorname{cost}(G)-P=\sum_j \mathbb{E}[S_j^G]\le H(G)\le H(\Pi^*)\le m(\operatorname{OPT}-P).

For the factor 1+Λ1+\Lambda it suffices, by the same chain, to show that H(Π)≤(1+Λ)∑jE[SjΠ]H(\Pi)\le(1+\Lambda)\sum_j\mathbb{E}[S_j^\Pi] for every non-idling policy Π\Pi. Fix such a policy and a realization. Before the (k+1)(k+1)-st start, let ℓ1(k)≤ℓ2(k)\ell_1(k)\le\ell_2(k) be the two smallest times at which machines become free. Then Fk=ℓ1(k)F_k=\ell_1(k). Let JkJ_k be the job started at that position, χk∈{0,1}\chi_k\in\{0,1\} its outcome indicator, and θk\theta_k the (m−1)(m-1)-st largest realized processing time among the first kk started jobs, or 00 if there are fewer than m−1m-1 positive ones.

We first show that θk≤ℓ2(k)\theta_k\le\ell_2(k). Each of the first kk jobs started at a time at most Fk−1≤ℓ1(k)≤ℓ2(k)F_{k-1}\le\ell_1(k)\le\ell_2(k). So a started job with realized processing time x>ℓ2(k)x>\ell_2(k) is still running at time ℓ2(k)\ell_2(k), since it started at a nonnegative time. It therefore occupies a machine that becomes free only after time ℓ2(k)\ell_2(k). Jobs running at the same time occupy distinct machines, and at most m−2m-2 machines become free after time ℓ2(k)\ell_2(k). So at most m−2m-2 realized processing times exceed ℓ2(k)\ell_2(k), which gives the claim.

If JkJ_k is zero, neither WrW_r nor the earliest free time changes. If it is positive with size pp, then Wr(Sk+1)−Wr(Sk)=min⁡{p,θk}W_r(S_{k+1})-W_r(S_k)=\min\{p,\theta_k\} and Fk+1−Fk=min⁡{p,ℓ2(k)−ℓ1(k)}F_{k+1}-F_k=\min\{p,\ell_2(k)-\ell_1(k)\}. Since θk≤ℓ2(k)=ℓ1(k)+(ℓ2(k)−ℓ1(k))\theta_k\le\ell_2(k)=\ell_1(k)+(\ell_2(k)-\ell_1(k)) and ℓ1(k)≥0\ell_1(k)\ge0, in both cases

Wr(Sk+1)−Wr(Sk)≤Fk+1−Fk+χkFk.W_r(S_{k+1})-W_r(S_k)\le F_{k+1}-F_k+\chi_kF_k.

Here FNF_N denotes the earliest free time after the last start; it receives weight zero below. Both Wr(S0)W_r(S_0) and F0F_0 are zero. Multiplying the inequality by N−1−kN-1-k and summing over kk gives

∑k=0N−1Wr(Sk)≤∑k=0N−1Fk+∑k=0N−1(N−1−k)χkFk.\sum_{k=0}^{N-1}W_r(S_k)\le\sum_{k=0}^{N-1}F_k+\sum_{k=0}^{N-1}(N-1-k)\chi_kF_k.

The choice of JkJ_k and the value FkF_k are determined before the outcome of JkJ_k is revealed, so E[χk∣history]=qJk\mathbb{E}[\chi_k\mid\text{history}]=q_{J_k}. On every realization Fl≥FkF_l\ge F_k for l>kl>k, hence

∑kqJk(N−1−k)Fk≤∑kqJk∑l>kFl=∑lFl∑k<lqJk≤Λ∑lFl.\sum_k q_{J_k}(N-1-k)F_k\le\sum_k q_{J_k}\sum_{l>k}F_l=\sum_l F_l\sum_{k<l}q_{J_k}\le\Lambda\sum_l F_l.

Taking expectations, H(Π)≤(1+Λ)E[∑kFk]=(1+Λ)∑jE[SjΠ]H(\Pi)\le(1+\Lambda)\mathbb{E}[\sum_kF_k]=(1+\Lambda)\sum_j\mathbb{E}[S_j^\Pi]. Finally, cost⁡(G)−P≤min⁡{m,1+Λ}(OPT⁡−P)≤min⁡{m,1+Λ}OPT⁡−P\operatorname{cost}(G)-P\le\min\{m,1+\Lambda\}(\operatorname{OPT}-P)\le\min\{m,1+\Lambda\}\operatorname{OPT}-P, which gives the second claim.

The factor mm is tight for GG. Take m−1m-1 jobs of size KK with q=1−K−3q=1-K^{-3} and KK deterministic jobs of size 11. The rule GG starts the long jobs first, since θ=0\theta=0 and they have the smaller qq. With probability close to one they occupy m−1m-1 machines until time KK, while the unit jobs run on the remaining machine. So cost⁡(G)≥(1−o(1))K2/2\operatorname{cost}(G)\ge(1-o(1))K^2/2, whereas running the unit jobs first on all machines costs K2/(2m)+O(mK)K^2/(2m)+O(mK).

Exact evaluation is hard, approximate evaluation is easy

Moseley, Pruhs, Uetz, and Zhou [9] show that computing the optimal expected cost, deciding whether it is at most a given value, and computing the expected cost of SEPT (and of its weighted version) are #P\#\mathrm{P}-hard for processing times with two-point distributions. Their instances have one machine for each of the nn items of the knapsack instance and 2n2n jobs, so m=N/2m = N/2. They combine jobs that encode the items of a knapsack instance with blocker jobs that are positive with small probability, show that an optimal policy starts the blockers first, and then use the theorem of Weber, Varaiya, and Walrand [19]. We adapt this construction to Bernoulli jobs on two machines. We also show that the expected cost of a given non-idling policy can nevertheless be approximated efficiently.

SEPT for stochastically ordered Bernoulli jobs

Recall that X≤stYX \leq_{\mathrm{st}} Y means Pr⁡[X>x]≤Pr⁡[Y>x]\Pr[X > x] \leq\Pr[Y > x] for all xx. Weber, Varaiya, and Walrand [19] prove that if the processing times are stochastically ordered, then SEPT minimizes the expected sum of completion times on identical machines that become available at arbitrary given times. They assume, for convenience, that the processing times have densities, and their induction considers strategies that start a job whenever a machine becomes available. The next lemma states the version we need, for Bernoulli jobs, in the model of § 2 with machine ii unavailable before a given time tit_i. We take from [19] only an exchange inequality for list policies and redo the induction, using Lemma 2.1.

Lemma 6.1. Let X1≤st⋯≤stXNX_1 \leq_{\mathrm{st}} \cdots\leq_{\mathrm{st}} X_N be Bernoulli jobs, and let the machines become available at given times t1,…,tm≥0t_1,\ldots,t_m \geq0. The list policy that starts the jobs in the order 1,…,N1,\ldots,N, each at the earliest time at which some machine is available, minimizes ∑jE[Cj]\sum_j \mathbb{E}[C_j] among all policies.

Proof. For a list λ\lambda of jobs and a vector τ\tau of availability times, let c(τ;λ)c(\tau;\lambda) be the expected cost of the list policy λ\lambda from τ\tau. For k>1k > 1, let Lk∗L_k^* be the list of the jobs in {2,…,N}∖{k}\{2,\ldots,N\}\setminus\{k\} in increasing order.

An exchange inequality. For every τ\tau and every k>1k > 1,

c(τ;(k,1)+Lk∗)≥c(τ;(1,k)+Lk∗),(2)c(\tau;(k,1)+L_k^*) \geq c(\tau;(1,k)+L_k^*), \tag*{(2)}

where ++ denotes concatenation. Weber, Varaiya, and Walrand prove (2) for stochastically ordered processing times with densities and every vector of availability times, in the proof of their theorem [19 pp. 845–846]. In their notation the inequality reads R(τ;L1,k)≥R(τ;Lk,1)R(\tau;L_{1,k}) \geq R(\tau;L_{k,1}) for the reward r(t)=−tr(t)=-t, and its proof uses only their Lemmas 1–3. For Bernoulli jobs, let δ>0\delta> 0, let U1,…,UNU_1,\ldots,U_N be independent and uniform on [0,1][0,1], and let Yj=Xj+δUjY_j=X_j+\delta U_j. The variables YjY_j have densities, and Y1≤st⋯≤stYNY_1 \leq_{\mathrm{st}} \cdots\leq_{\mathrm{st}} Y_N, because adding independent copies of the same variable preserves the stochastic order. So (2) holds for the processing times YjY_j. For a fixed list, couple the two runs through Yj=Xj+δUjY_j=X_j+\delta U_j. At each start, the coordinatewise distance between the two sorted vectors of availability times grows by at most δ\delta, since sorting is 1-Lipschitz in the maximum norm. So every start time changes by at most NδN\delta, and every list cost changes by at most N(N+1)δN(N+1)\delta. Letting δ→0\delta\to0 proves (2) for the jobs XjX_j.

Optimality. We show by induction on NN that, for every τ\tau, the list (1,…,N)(1,\ldots,N) is optimal from τ\tau; the case N=1N=1 is trivial. By Lemma 2.1, some optimal policy from τ\tau is deterministic and non-idling; let kk be its first job, started at the minimum entry of τ\tau. After the outcome of kk is revealed, the continuation is a policy for the other jobs from the resulting availability times. All of them are at least the start time of kk, so the continuation problem is an instance of the lemma with fewer jobs, and by induction the list of the other jobs in increasing order is optimal there. So the list (k)(k) followed by the other jobs in increasing order is optimal from τ\tau. If k=1k=1, this is the list (1,…,N)(1,\ldots,N). Otherwise it is (k,1)+Lk∗(k,1)+L_k^*, which by (2) is no better than (1,k)+Lk∗(1,k)+L_k^*. After job 1 starts, the list (k)+Lk∗(k)+L_k^* is a policy for the jobs 2,…,N2,\ldots,N, so by induction the list (2,…,N)(2,\ldots,N) is no worse. Hence (1,…,N)(1,\ldots,N) is optimal. □

Hardness of exact computation

Theorem 6.2. For Bernoulli jobs on m=2m=2 machines, each of the following problems is #P-hard under polynomial-time Turing reductions: computing OPT; deciding whether OPT≤x\mathrm{OPT}\le x for a given rational xx; and computing the expected cost of SEPT. This holds even when one job has small qq, one job is deterministic, all other jobs have q=1/2q=1/2, and all sizes are integers.

We reduce from #Knapsack: given positive integers a1,…,aka_1,\ldots,a_k and an integer B0B_0 with 0≤B0<S=∑iai0\le B_0<S=\sum_i a_i, count the subsets I⊆[k]I\subseteq[k] with ∑i∈Iai≤B0\sum_{i\in I}a_i\le B_0. Counting the subsets with sum exactly B0B_0 is #P-hard, because the NP-hardness reduction for this problem [8] can be made parsimonious [14]. That count is the number of subsets with sum at most B0B_0 minus the number with sum at most B0−1B_0-1, where the latter is 0 if B0=0B_0=0. So #Knapsack is #P-hard as well. Let KNOK_{\mathrm{NO}} be the number of subsets with sum larger than B0B_0; the answer is 2k−KNO2^k-K_{\mathrm{NO}}. Set

kˉ=k+1,h=2S,B=h+B0,Q=64kˉ2B,q=1Q.\bar{k}=k+1,\qquad h=2S,\qquad B=h+B_0,\qquad Q=64\bar{k}^{2}B,\qquad q=\frac{1}{Q}.

For L∈{L−,L+}L\in\{L_-,L_+\} with L−=B+14L_-=B+\frac{1}{4} and L+=B+12L_+=B+\frac{1}{2}, the instance ILI_L has two machines and the following k+3k+3 jobs:

  • for each i∈[k]i\in[k], a job of size aia_i with probability 1/21/2;

  • a job HH of size hh with probability 1/21/2;

  • a job bb of size LL with probability qq;

  • a deterministic job dd of size B+1B+1.

The job bb has mean qL<1/2qL<1/2, which is smaller than every other mean. So SEPT starts bb, then the jobs aia_i in increasing order of size, then HH, then dd.

Lemma 6.3. In the instances IL±I_{L_\pm}, consider a state at time 0 in which bb has not started and a machine is free at time 0. Some optimal continuation from this state is non-idling and starts bb next, at time 0.

Proof. We use induction on the number of remaining jobs; the case of one job is trivial. By Lemma 2.1, some optimal continuation is deterministic and non-idling, so it starts its first job at time 0. Every job other than bb is positive with probability at least 1/21/2, and every positive processing time is at least 1.

Suppose exactly one machine is free at time 0, and a non-idling optimal continuation starts a job i≠bi\ne b there. The other machine runs a job that started at time 0 and has at least one time unit left. So if ii is positive, both machines are busy until time 1, and E[Sb]≥1/2\mathbb{E}[S_b]\ge1/2. Let c0c_0 be the minimum expected sum of start times for the remaining jobs other than bb from the current state, allowing idle time. Simulating bb with an independent virtual outcome, as in Lemma 2.2(b), shows that the continuation’s start times of the jobs other than bb sum to at least c0c_0 in expectation. So its expected sum of start times is at least c0+1/2c_0+1/2. Now start bb instead. If bb is zero, continue optimally, with expected sum of start times c0c_0. If bb is positive, which happens with probability qq, run the remaining jobs one after another. At most k+3≤2kˉk+3 \le2\bar{k} jobs remain, each of size at most B+1≤2BB+1 \le2B. So every start time is at most 4kˉB4\bar{k}B, and the sum of start times is at most 8kˉ2B8\bar{k}^{2}B. This alternative has expected sum of start times at most c0+q⋅8kˉ2B=c0+1/8<c0+1/2c_0+q\cdot8\bar{k}^{2}B=c_0+1/8<c_0+1/2, a contradiction. So every non-idling optimal continuation starts bb at time 0.

Suppose both machines are free at time 0, and a non-idling optimal continuation starts i≠bi\ne b at time 0. After ii starts, a machine is still free at time 0, so by induction we may replace the continuation by one that starts bb next, at time 0. Exchanging the order of ii and bb leaves both start times equal to 0. It also leads to the same remaining jobs and the same multiset of machine release times in every realization, so the cost is unchanged.

Proof of Theorem 6.2. By Lemma 6.3, some optimal policy starts bb at time 0. Afterwards the machines become available at times (0,0)(0,0) if bb is zero and (0,L)(0,L) if bb is positive. The remaining jobs are stochastically ordered. A job of size aia_i with probability 1/21/2 is dominated by one of size ai′≥aia_{i'}\ge a_i with the same probability. The job HH dominates all of them because h=2S>aih=2S>a_i. The job dd dominates HH because B+1>hB+1>h. By Lemma 6.1, SEPT is optimal from either state, so SEPT is optimal for IL−I_{L_-} and IL+I_{L_+}. So computing OPT and computing the cost of SEPT coincide on these instances.

We compare the two instances under SEPT, with the same outcomes for all jobs. If bb is zero, the two schedules are identical. Suppose bb is positive, and let W=∑iaiZiW=\sum_i a_i Z_i be the total realized processing time of the jobs a1,…,aka_1,\ldots,a_k, where ZiZ_i are their outcome indicators. Since W≤S<B<L−W\le S<B<L_-, all these jobs run on the free machine before time LL, and HH starts there at time WW. If HH is zero, dd starts at time WW. If HH is positive and W≤B0W\le B_0, then HH completes at W+h≤B<L−W+h\le B<L_-, and dd starts at time W+hW+h. If HH is positive and W>B0W>B_0, then W≥B0+1W\ge B_0+1, so HH runs until W+h≥B+1>L+W+h\ge B+1>L_+, and dd starts at time LL on the other machine. Only in the last case do the start times differ, by L+−L−=1/4L_+-L_-=1/4. The completion time of bb itself also differs by 1/41/4 when bb is positive. Hence

OPT⁡(IL+)−OPT⁡(IL−)=q4(1+12⋅KNO2k)=q4(1+KNO2kˉ).\operatorname{OPT}(I_{L_+})-\operatorname{OPT}(I_{L_-})=\frac{q}{4}\left(1+\frac{1}{2}\cdot\frac{K_{\mathrm{NO}}}{2^k}\right)=\frac{q}{4}\left(1+\frac{K_{\mathrm{NO}}}{2^{\bar{k}}}\right).

and two exact evaluations determine KNOK_{\mathrm{NO}}. All numbers have bit length polynomial in the input. Multiplying all sizes by 4 makes them integers and does not change the argument.

For the decision version, note that all processing times are multiples of 1/41/4 and the probability of every joint outcome is a multiple of 1/(Q2kˉ)1/(Q2^{\bar{k}}). So OPT is a multiple of 1/(4Q2kˉ)1/(4Q2^{\bar{k}}). It is also at most 8kˉ2B+(k+3)(B+1)8\bar{k}^{2}B+(k+3)(B+1). Binary search with polynomially many threshold queries therefore recovers OPT exactly.

Approximate evaluation

Theorem 6.4. Let Π\Pi be a non-idling policy whose decisions can be simulated in polynomial time. For ρ,δ∈(0,1)\rho,\delta\in(0,1), an estimate C^\widehat{C} with (1−ρ)cost⁡(Π)≤C^≤(1+ρ)cost⁡(Π)(1-\rho)\operatorname{cost}(\Pi)\le\widehat{C}\le(1+\rho)\operatorname{cost}(\Pi) with probability at least 1−δ1-\delta can be computed from ⌈3Np−2ln⁡(2/δ)⌉\lceil3Np^{-2}\ln(2/\delta)\rceil simulations of Π\Pi.

Proof. For a realization ω\omega, let V(ω)=∑jXj(ω)V(\omega)=\sum_j X_j(\omega) and C(ω)=∑jCjΠ(ω)C(\omega)=\sum_j C_j^\Pi(\omega). A non-idling policy completes every job by time V(ω)V(\omega), so 0≤C(ω)≤NV(ω)0\le C(\omega)\le NV(\omega), and C(ω)=0C(\omega)=0 if V(ω)=0V(\omega)=0. Sample realizations from the following distribution Q\mathbb{Q}. Choose a job ii with probability μi/P\mu_i/P, set Xi=piX_i=p_i, and draw all other outcomes from their own distributions. The policy sees only the outcomes it observes when starting jobs. Under Q\mathbb{Q}, the density of a realization with respect to the true distribution is

∑iμiP1[Xi=pi]qi=V(ω)P.\sum_i \frac{\mu_i}{P}\frac{\mathbf{1}[X_i=p_i]}{q_i}=\frac{V(\omega)}{P}.

Hence the estimator Z=PC/VZ = PC/V satisfies EQ[Z]=cost⁡(Π)\mathbb{E}_{Q}[Z] = \operatorname{cost}(\Pi). It takes values in [0,NP][0,NP], and its mean is at least PP. The multiplicative Chernoff bound for the average of ⌈3Nρ−2ln⁡(2/δ)⌉\lceil3N\rho^{-2}\ln(2/\delta)\rceil independent copies of Z/(NP)∈[0,1]Z/(NP) \in[0,1], whose mean is at least 1/N1/N, gives the claim.

The same argument applies to every policy whose realized sum of completion times is at most βNV(ω)\beta N V(\omega) for a constant β\beta, with the number of simulations multiplied by β\beta. For instance, β=γ\beta=\gamma for the grid-non-idling reuse-rule policies of § 4.

List policies lose a logarithmic factor

A list policy fixes an order of the jobs before any outcome is observed and starts the jobs in this order. The order may depend on the instance and on random coins. Eberle, Fischer, Matuschke, and Megow [EFMM19] show that index policies, which rank each job by its own distribution, are not constant-factor approximations. Im, Moseley, and Pruhs [7] give a list policy with ratio O(log⁡2N+mlog⁡N)O(\log^2 N+m\log N), which is O(log⁡2N)O(\log^2 N) on two machines. Gupta, Moseley, and Zhou [6] compute a list policy whose ratio is O~(m)\widetilde{O}(\sqrt{m}), where O~\widetilde{O} hides factors polylogarithmic in NN. The following theorem shows that a dependence on NN is necessary for every list policy, even on two machines and even if the policy may idle. So the bound of [7] for two machines is tight up to a factor O(log⁡N)O(\log N).

Theorem 7.1. For every integer b≥2b \ge2, let M=2bM=2^b and consider two machines with MM jobs of each type i=0,…,b−1i=0,\ldots,b-1, where a job of type ii has

pi=M24iandqi=2iM2.p_i=\frac{M^2}{4^i}\qquad\text{and}\qquad q_i=\frac{2^i}{M^2}.

Let N=bMN=bM. Every list policy costs at least Mb2/128Mb^2/128, whereas OPT⁡≤6Mb\operatorname{OPT}\le6Mb. Hence every list policy has ratio at least b/768≥log⁡2N/1536b/768\ge\log_2 N/1536.

The sizes are the distinct integers 4b−i>44^{b-i}>4, and Mqi≤1/2Mq_i\le1/2. The means μi=2−i\mu_i=2^{-i} decrease rapidly with the type, while piqi2=M−2p_iq_i^2=M^{-2} does not depend on the type. Every policy has P=∑iM2−i=2M−2P=\sum_i M2^{-i}=2M-2.

Proof of the lower bound. Fix a deterministic list; for a random list, the bound follows by averaging over the coins. For 0≤k<N0\le k<N, let FkF_k be the start time of the (k+1)(k+1)-st job of the list, let kik_i be the number of type-ii jobs among the first kk, and let Bi∼Bin⁡(ki,qi)B_i\sim\operatorname{Bin}(k_i,q_i) be the number of positive ones among them. At time FkF_k all these kk jobs have started and a machine is free, so at most one of them is still running. So at least (Bi−1)+(B_i-1)_+ positive jobs of type ii have completed for each ii, and since two machines process at most 2Fk2F_k units of work by time FkF_k,

2Fk≥∑i=0b−1pi(Bi−1)+.2F_k\ge\sum_{i=0}^{b-1}p_i(B_i-1)_+.

For ki≥2k_i\ge2, keeping only the event that exactly two jobs are positive gives

E[(Bi−1)+]≥(ki2)qi2(1−qi)ki−2≥14ki(ki−1)qi2,\mathbb{E}[(B_i-1)_+]\ge\binom{k_i}{2}q_i^2(1-q_i)^{k_i-2}\ge\frac{1}{4}k_i(k_i-1)q_i^2,

because (1−qi)ki−2≥1−Mqi≥1/2(1-q_i)^{k_i-2}\ge1-Mq_i\ge1/2. The bound also holds for ki≤1k_i\le1, as both sides are then zero. Using piqi2=M−2p_iq_i^2=M^{-2} and ∑i(ki−k/b)2≥0\sum_i(k_i-k/b)^2\ge0,

E[Fk]≥18M2∑iki(ki−1)≥18M2(k2b−k).\mathbb{E}[F_k]\ge\frac{1}{8M^2}\sum_i k_i(k_i-1)\ge\frac{1}{8M^2}\left(\frac{k^2}{b}-k\right).

For N/2≤k<NN/2 \le k < N we have k≥bM/2≥2bk \ge bM/2 \ge2b, so k2/b−k≥k2/(2b)≥bM2/8k^2/b-k \ge k^2/(2b) \ge bM^2/8 and E[Fk]≥b/64\mathbb{E}[F_k] \ge b/64. There are N/2N/2 such values of kk, so the cost is at least P+(N/2)(b/64)≥Mb2/128P+(N/2)(b/64) \ge Mb^2/128.

Proof of the upper bound. Consider the following policy. On machine 1, start jobs in increasing order of type until the first positive outcome; all earlier jobs are zero and complete at time 0. If all jobs are zero, every job completes at time 0. Otherwise, let ii be the type of the first positive job. Leave that job on machine 1, and process all remaining jobs one after another on machine 2, starting at time 0, in decreasing order of type.

Let EiE_i be the event that the first positive job has type ii. It requires a positive job among the MM jobs of type ii, so Pr⁡[Ei]≤Mqi=2i/M\Pr[E_i] \le Mq_i=2^i/M. Condition on the history up to the first positive job. The types below ii are exhausted, and the remaining jobs keep their original distributions. On a single machine, the processing time of a job is added to the start time of each later job. In decreasing order of type, a job of type j≥ij \ge i has at most M(j−i+1)M(j-i+1) later jobs, and there are at most MM jobs of type jj, each of mean 2−j2^{-j}. So the conditional expected sum of start times is at most

M2∑j≥i(j−i+1)2−j≤M222−i∑t≥0(t+1)2−t=4M22−i.M^2\sum_{j\ge i}(j-i+1)2^{-j}\le M^2 2^{2-i}\sum_{t\ge0}(t+1)2^{-t}=4M^2 2^{-i}.

Averaging over the disjoint events EiE_i, the expected sum of start times is at most ∑i(2i/M)⋅4M22−i=4Mb\sum_i(2^i/M)\cdot4M^2 2^{-i}=4Mb. So the cost is at most P+4Mb≤6MbP+4Mb\le6Mb.

The ratio follows from OPT≤6Mb\mathrm{OPT}\le6Mb and log⁡2N=b+log⁡2b≤2b\log_2N=b+\log_2b\le2b. The adaptive policy above changes its order after the first positive outcome.

Open problems

The main open question is whether Bernoulli jobs admit a polynomial-time approximation scheme, or at least a polynomial-time constant-factor approximation, when mm is part of the input. After the size reduction, the dynamic program of § 4 is quasi-polynomial for two reasons. It records the number of remaining jobs in each of the O(ε−1log⁡(N/ε))O(\varepsilon^{-1}\log(N/\varepsilon)) size classes, and it records the release times as a multiset over O(ε−2log⁡(N/ε))O(\varepsilon^{-2}\log(N/\varepsilon)) candidate values. A polynomial-time scheme needs a more compact description of both, and by Theorem 7.1 it must be adaptive.

A natural alternative is to round a relaxation over start-time distributions. For Bernoulli jobs, such a relaxation can include, for every deadline uu, the expected-rank constraints of the laminar matroid that allows at most m(⌊u/h⌋+1)m(\lfloor u/h\rfloor+1) positive jobs of size at least hh to start by time uu. Constraints that act on one deadline at a time are not enough. On one machine, take jobs with pi=2N−i+1p_i=2^{N-i+1} and qi=1/piq_i=1/p_i for i=1,…,Ni=1,\ldots,N, so that OPT=N(N+1)/2\mathrm{OPT}=N(N+1)/2. Start job ii at time 0 with the probability that no larger job is positive, and at time pip_i otherwise. This satisfies every such rank constraint, because the first positive job of size larger than uu together with all positive smaller jobs forms an independent set. It also keeps the expected processing in every interval below the length of the interval, because ∑iqi<1\sum_i q_i<1. Its objective is below 2N2N. On one machine, the inequality ∑jμjE[Sj]≥∑i<jμiμj\sum_j\mu_j\mathbb{E}[S_j]\ge\sum_{i<j}\mu_i\mu_j of Möhring, Schulz, and Uetz [11] closes this gap, but its analog for mm machines contains a term proportional to Δ\Delta. Whether a relaxation that combines both kinds of constraints has a constant integrality gap for Bernoulli jobs is open.

Two intermediate questions seem natural. The first is a polynomial-time approximation scheme for every fixed number of machines, that is, in time Nf(m,ε)⋅poly⁡(L)N^{f(m,\varepsilon)}\cdot\operatorname{poly}(\mathcal{L}). The second is a polynomial-time approximation whose ratio is o(m)o(m) and independent of NN.

AI usage disclosure

AI agents were used for exploratory discussions during the development of the proofs and to assist with drafting and revising the manuscript. The author takes full responsibility for the paper’s contents and correctness.

References

  1. [2]John Bruno, Edward G. Coffman, Jr., and Ravi Sethi. Scheduling independent tasks to reduce mean finishing time. Communications of the ACM, 17(7):382–387, 1974.
  2. [4]Varun Gupta, Benjamin Moseley, Marc Uetz, and Qiaomin Xie. Greed works—online algorithms for unrelated machine stochastic scheduling. Mathematics of Operations Research, 45(2):497–516, 2020.DOI
  3. [5]Varun Gupta, Benjamin Moseley, Marc Uetz, and Qiaomin Xie. Corrigendum: Greed works—online algorithms for unrelated machine stochastic scheduling. Mathematics of Operations Research, 46(3):1230–1234, 2021.DOI
  4. [6]Anupam Gupta, Benjamin Moseley, and Rudy Zhou. Minimizing completion times for stochastic jobs via batched free times. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1905–1930, 2023. Full version: arXiv:2208.13696.arxiv.org/abs/2208.13696
  5. [7]Sungjin Im, Benjamin Moseley, and Kirk Pruhs. Stochastic scheduling of heavy-tailed jobs. In Proceedings of the 32nd International Symposium on Theoretical Aspects of Computer Science (STACS), volume 30 of LIPIcs, pages 474–486, 2015.DOI
  6. [8]Richard M. Karp. Reducibility among combinatorial problems. In Raymond E. Miller and James W. Thatcher, editors, Complexity of Computer Computations, pages 85–103. Plenum Press, 1972.
  7. [9]Benjamin Moseley, Kirk Pruhs, Marc Uetz, and Rudy Zhou. Minimizing completion times of stochastic jobs on parallel machines is hard. arXiv:2601.17425, 2026.arxiv.org/abs/2601.17425
  8. [10]Rolf H. Möhring, Franz J. Radermacher, and Gideon Weiss. Stochastic scheduling problems I: General strategies. Zeitschrift für Operations Research, 28(7):193–260, 1984.DOI
  9. [11]Rolf H. Möhring, Andreas S. Schulz, and Marc Uetz. Approximation in stochastic scheduling: The power of LP-based priority policies. Journal of the ACM, 46(6):924–942, 1999.DOI
  10. [12]Nicole Megow, Marc Uetz, and Tjark Vredeveld. Models and algorithms for stochastic online scheduling. Mathematics of Operations Research, 31(3):513–525, 2006.DOI
  11. [13]Michael H. Rothkopf. Scheduling with random service times. Management Science, 12(9):707–713, 1966.DOI
  12. [14]Janos Simon. On the difference between one and many. In Proceedings of the 4th International Colloquium on Automata, Languages and Programming (ICALP), volume 52 of Lecture Notes in Computer Science, pages 480–491, 1977.
  13. [15]Wayne E. Smith. Various optimizers for single-stage production. Naval Research Logistics Quarterly, 3(1–2):59–66, 1956.DOI
  14. [16]Martin Skutella, Maxim Sviridenko, and Marc Uetz. Unrelated machine scheduling with stochastic processing times. Mathematics of Operations Research, 41(3):851–864, 2016.DOI
  15. [17]Martin Skutella and Marc Uetz. Stochastic machine scheduling with precedence constraints. SIAM Journal on Computing, 34(4):788–802, 2005.DOI
  16. [18]Gideon Weiss and Michael Pinedo. Scheduling tasks with exponential service times on non-identical processors to minimize various cost functions. Journal of Applied Probability, 17(1):187–202, 1980.DOI
  17. [19]Richard R. Weber, Pravin Varaiya, and Jean Walrand. Scheduling jobs with stochastically ordered processing times on parallel machines to minimize expected flowtime. Journal of Applied Probability, 23(3):841–847, 1986.DOI

Paper details

vlnc:W_bv3jqefb
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

AI agents

View statement
Looking for related papers…
Contents