Explorable Uncertainty in Scheduling with Non-Uniform Testing Times

The problem of scheduling with testing in the framework of explorable uncertainty models environments where some preliminary action can influence the duration of a task. In the model, each job has an unknown processing time that can be revealed by running a test. Alternatively, jobs may be run untested for the duration of a given upper limit. Recently, D\"urr et al. [5] have studied the setting where all testing times are of unit size and have given lower and upper bounds for the objectives of minimizing the sum of completion times and the makespan on a single machine. In this paper, we extend the problem to non-uniform testing times and present the first competitive algorithms. The general setting is motivated for example by online user surveys for market prediction or querying centralized databases in distributed computing. Introducing general testing times gives the problem a new flavor and requires updated methods with new techniques in the analysis. We present constant competitive ratios for the objective of minimizing the sum of completion times in the deterministic case, both in the non-preemptive and preemptive setting. For the preemptive setting, we additionally give a first lower bound. We also present a randomized algorithm with improved competitive ratio. Furthermore, we give tight competitive ratios for the objective of minimizing the makespan, both in the deterministic and the randomized setting.


Introduction
In scheduling environments, uncertainty is a common consideration for optimization problems. Commonly, results are either based on worst case considerations or a random distribution over the input. These approaches are known as robust optimization and stochastic optimization, respectively. However, it is often the case that unknown information can be attained through investing some additional resources, e.g. time, computing power or money. In his seminal paper, Kahan [12] has first introduced the notion of explorable or queryable uncertainty to model obtaining additional information for a problem at a given cost during the runtime of an algorithm. Since then, these kind of problems have been explored in different optimization contexts, for example in the framework of combinatorial, geometric or function value optimization tasks.
Recently, Dürr et al. [5] have introduced a model for scheduling with testing on a single machine within the framework of explorable uncertainty. In their approach, a number of jobs with unknown processing times are given. Testing takes one unit of time and reveals the processing time. If a job is executed untested, the time it takes to run the job is given by an upper bound. The novelty of their approach lies in having tests executed directly on the machine running the jobs as opposed to considering tests separately.
In view of this model, a natural extension is to consider non-uniform testing times to allow for a wider range of problems. Dürr et al. state that for certain applications it is appropriate to consider a broader variation on testing times and leave this question up for future research.
Situations where a preliminary action, operation or test can be executed before a job are manifold and include a wide range of real-life applications. In the following, we discuss a small selection of such problems and emphasize cases with heterogeneous testing requirements. Consider first a situation where an online user survey can help predict market demand and production times. The time needed to produce the necessary amount of goods for the given demand is only known after conducting the survey. Depending on its scope and size, the invested costs for the survey may vary significantly.
As a second example, we look at distributed computing in a setting with many distributed local databases and one centralized master server. At the local stations, only estimates of some data values are stored; in order to obtain the true value one must query the master server. It depends on the distance and connection quality from any localized database to the master how much time and resources this requires. Olston and Widom [15] have considered this setting in detail.
Another possible example is the acquisition of a house through an agent giving us more information about its value, location, condition, etc., but demanding a price for her services. This payment could vary based on the price of the house, the amount of work of the agent or the number of competitors.
In their paper, Dürr et al. [5] mention fault diagnosis in maintenance and medical treatment, file compression for transmissions, and running jobs in an alternative fast mode whose availability can be determined through a test. Generally, any situation involving diverse cost and duration estimates, like e.g. in construction work, manufacturing or insurance, falls into our category of possible applications.
In view of all these examples, we investigate non-uniform testing in the scope of explorable uncertainty on a single machine as introduced by [5]. We study whether algorithms can be extended to this non-uniform case and if not, how we can find new methods for it.

Problem Statement
We consider n jobs to be scheduled on a single machine. Every job j has an unknown processing time p j and a known upper bound u j . It holds 0 ≤ p j ≤ u j for all j. Each job also has a testing time t j ≥ 0. A job can either be executed untested, which takes time u j , or be tested and then executed, which takes a total time of t j + p j . Note that a tested job does not necessarily have to be executed right after its test, it may be delayed arbitrarily while the algorithm tests or executes other jobs.
Since only the upper bounds are initially known to the algorithm, the task can be viewed as an online problem with an adaptive adversary. The actual processing times p j are only realized after job j has been tested by the algorithm. In the randomized case, the adversary knows the distribution of the random input parameters of an algorithm, but not their outcome.
We denote the completion time of a job j as C j and primarily consider the objective of minimizing the total sum of completion times j C j . As a secondary objective, we also investigate the simpler goal of minimizing the makespan max j C j . We use competitive analysis to compare the value produced by an algorithm with an optimal offline solution.
Clearly, in the offline setting where all processing times are known, an optimal schedule can be determined directly: If t j + p j ≤ u j then job j is tested, otherwise it is run untested. For the sum of completion times, the jobs are therefore scheduled in order of non-decreasing min(t j + p j , u j ). Any algorithm for the online problem not only has to decide whether to test a given job or not, but also in which order to run all tests and executions of both untested and tested jobs. For a solution to the makespan objective, the ordering of the jobs does not matter and an optimal offline algorithm decides the testing by the same principle as above.

Related Work
Our setting is directly based on the problem of scheduling uncertain jobs on a single machine with explorable processing times, introduced by Dürr et al. [5] in 2018. They only consider the special case where t j ≡ 1 for all jobs. For deterministic algorithms, they give a lower bound of 1.8546 and an upper bound of 2. In the randomized case, they give a lower bound of 1.6257 and a 1.7453-competitive algorithm. For several deterministic special case instances, they provide upper bounds closer to the best possible ratio of 1.8546. Additionally, tight algorithms for the objective of minimizing the makespan are given for both the deterministic and randomized cases.
Testing and executing jobs on a single machine can be viewed as part of the research area of queryable uncertainty or explorable uncertainty. The first seminal paper on dealing with uncertainty by querying parts of the input was published in 1991 by Kahan [12]. In his paper, Kahan considers a set of elements with uncertain values that lie in a closed interval. He explores approximation guarantees for the number of queries necessary to obtain the maximum and median value of the uncertain elements.
Since then, there has been a large amount of research concerned with the objective of minimizing the number of queries to obtain a solution. A variety of numerical, geometric and combinatorial problems have been studied in this framework, the following is a selection of some of these publications: Next to Kahan, Feder et al. [9], Khanna and Tan [13], and Gupta et al. [11] have also considered the objective of determining different function values, in particular the k-smallest value and the median. Bruce et al. [2] have analysed geometric tasks, specifically the Maximal Points and Convex Hull problems. They have also introduced the notion of witness sets as a general concept for queryable uncertainty, which was then generalized by Erlebach et al. [7]. Olston and Widom [15] researched caching problems while allowing for some inaccuracy in the objective function. Other studied combinatorial problems include minimum spanning tree [7,14], shortest path [8], knapsack [10] and boolean trees [3]. See also the survey by Erlebach and Hoffmann [6] for an overview over research in this area.
A related type of problems within optimization under uncertainty are settings where the cost of the queries is a direct part of the objective function. Most notably, the paper by Dürr et al. [5] falls into this category. There, the tests necessary to obtain additional information about the runtime of the jobs are executed on the same machine as the jobs themselves. Other examples include Weitzman's original Pandora's Box problem [18], where n independent random variables are probed to maximize the highest revealed value. Every probing incurs a price directly subtracted from the objective function. Recently, Singla [17] introduced the 'price of information' model to describe receiving information in exchange for a probing price. He gives approximation ratios for various well-known combinatorial problems with stochastic uncertainty.

Contribution
In this paper, we provide the first algorithms for the more general scheduling with testing problem where testing times can be non-uniform. Consult Table 1 for an overview of results for both the non-uniform and uniform versions of the problem. All ratios provided without citation are introduced in this paper. The remaining results are presented in [5].
For the problem of scheduling uncertain jobs with non-uniform testing times on a single machine, our results are the following: A deterministic 4-competitive algorithm for the objective of minimizing the sum of completion times and a randomized 3.3794-competitive algorithm for the same objective. If we allow preemption -that is, to cancel the execution of a job at any time and start working on a different job -then we can improve the deterministic case to be 2ϕ-competitive. Here, ϕ ≈ 1.6180 is the golden ratio.
For the objective of minimizing the makespan, we adopt and extend the ideas of Dürr et al. [5] to provide a tight ϕ-competitive algorithm in the deterministic case and a tight 4 3 -competitive algorithm in the randomized case. Our approaches handle non-uniform testing times in a novel fashion distinct from the methods of [5]. As we show in Appendix A, the idea of scheduling untested jobs with small upper bounds in the beginning of the schedule, which works well in the uniform case, fails to generalize to non-uniform tests. Additionally, describing parameterized worst-case instances becomes intangible in the presence of an arbitrary number of different testing times.
In place of these methods, we compute job completion times by cross-examining contributions of other jobs in the schedule. We determine tests based on the ratio between the upper bound and the given test time and pay specific attention to sorting the involved executions and tests in an suitable way.
The paper is structured as follows: Sections 2 and 3 examine the deterministic and randomized cases respectively. Various algorithms are presented and their competitive ratios proven. We extend the optimal results for the objective of minimizing the makespan from the uniform case to general testing times in Section 4. Finally, we conclude with some open problems.

Deterministic Setting
In this section, we introduce our basic algorithm and prove deterministic upper bounds for the non-preemptive as well as the preemptive case. The basic structure introduced in Section 2.1 works as a framework for other algorithms presented later. We give a detailed analysis of the deterministic algorithm and prove that it is 4-competitive if parameters are chosen accordingly. In Section 2.2 we prove that an algorithm for the preemptive case is 3.2361-competitive and that no preemptive algorithm can have a ratio better than 1.8546.

Basic Algorithm and Proof of 4-Competitiveness
We now present the elemental framework of our algorithm, which we call (α, β)-SORT. As input, the algorithm has two real parameters, α ≥ 1 and β ≥ 1. The algorithm is divided into two phases. First, we decide for each job whether we test this job or not based on the ratio uj tj . This gives us a partition of [m] into the disjoint sets T = {j ∈ [m] : ALG tests j} and N = {j ∈ [m] : ALG runs j untested}. In the second phase, we always attend to the job j min with the current smallest scaling time σ j . The scaling time is the time needed for the next step of executing j: • If j is in N , then σ j = u j .
• If j is in T and has not been tested, then σ j = βt j .
• If j is in T and has already been tested, then σ j = p j .
Note that in the second case above, we 'stretch' the scaling time by multiplying with β ≥ 1. The intention behind this stretching is that testing a job, unlike executing it, does not immediately lead to a job being completed. Therefore the parameter β artificially lowers the relevance of testing in the ordering of our algorithm. Note that the actual time needed for testing remains t j .
In the following, we show that the above algorithm achieves a provably good competitive ratio. The parameters are kept general in the proof and are then optimized in a final step. We present the computations with general parameters for a clearer picture of the proof structure, which we will reuse in later sections.
In the final optimization step it will turn out that setting α = β = 1 yields a best-possible competitive ratio of 4.
Theorem 1. The (1, 1)-SORT algorithm is 4-competitive for the objective of minimizing the sum of completion times.
Proof. For the purpose of estimating the algorithmic result against the optimum, let ρ j := min(u j , t j + p j ) be the optimal running time of job j. Without loss of generality, we order the jobs s.t. ρ 1 ≥ . . . ≥ ρ n . Hence the objective value of the optimum is be the algorithmic running time of j, i.e. the time the algorithm spends on running job j. We start our analysis by comparing p A j to the optimal runtime ρ j for a single job, summarized in the following Proposition: Part (a) directly estimates testing and running times of tested jobs against the values of the optimum. We will use this extensively when computing the completion time of the jobs. The proof of parts (b) and (c) is very similar to the proof of Theorem 14 in [5] for uniform testing times. We refer to the appendix for a complete write-down of the proof. Note that instead of considering a single bound, we split the upper bound of the algorithmic running time p A j into different results for tested (b) and untested jobs (c). This allows us to differentiate between different cases in the proof of Lemma 1 in more detail. We will often make use of this Proposition to upper bound the algorithmic running time in later sections.
To obtain an estimate of the completion time C j , we consider the contribution c(k, j) of all jobs k ∈ [n] to C j . We define c(k, j) to be the amount of time the algorithm spends scheduling job k before the completion of j. Obviously it holds that c(k, j) ≤ p A k . The following central lemma computes an improved upper bound on the contribution c(k, j), using a rigorous case distinction over all possible configurations of k and j: Lemma 1 (Contribution Lemma). Let j ∈ [n] be a given job. The completion time of j can be written as c(k, j).

S. Albers and A. Eckl
Additionally, for the contribution of k to j it holds that Refer to Appendix D.2 for the proof. Depending on whether j and k are tested or not, the lemma computes various upper bounds on the contribution using estimates from Proposition 1. Finally, the given bound on c(k, j) is achieved by taking the maximum over the different cases.
Recall that the jobs are ordered by non-increasing optimal execution times ρ j , which by Proposition 1 are directly tied to the algorithmic running times. Hence, the jobs k with small indices are the 'bad' jobs with possibly large running times. For jobs with k ≤ j we therefore use the independent upper bound from the Contribution Lemma. Jobs with large indices k > j are handled separately and we directly estimate them using their running time p A k . By Lemma 1 and Proposition 1(b),(c) we have Finally, we sum over all jobs j: Minimizing f (α, β) on the domain α, β ≥ 1 yields optimal parameters α = β = 1 and a value of f (1, 1) = 4. We conclude that (1, 1)-SORT is 4-competitive.
The parameter selection α = 1, β = 1 is optimal for the closed upper bound formula we obtained in our proof. It is possible and somewhat likely that a different parameter choice leads to better overall results for the algorithm. In the optimal makespan algorithm (see Section 4) the value of α is higher, suggesting that α = 1, which leads to testing all non-trivial jobs, might not be the best choice. The problem structure and the approach by Dürr et al. [5] also motivate setting β to some higher value than 1. For our proof, setting parameters like we did is optimal.
In the appendix, we take advantage of this somewhat unexpected parameter outcome to prove that (1, 1)-SORT cannot be better than 3-competitive. Additionally, we show that for any choice of parameters, (α, β)-SORT is not better than 2-competitive.

A Deterministic Algorithm with Preemption
The goal of this section is to show that if we allow jobs to be preempted there exists a 3.2361-competitive algorithm. In his book on Scheduling, Pinedo [16] defines preemption as follows: "The scheduler is allowed to interrupt the processing of a job (preempt) at any point in time and put a different job on the machine instead." The idea for our algorithm in the preemptive setting is based on the so-called Round Robin rule, which is used frequently in preemptive machine scheduling [16,Chapters 3.7,5.6,12.4]. The scheduling time frame is divided into very small equal-sized units. The Round Robin algorithm then cycles through all jobs, tending to each job for exactly one unit of time before switching to the next. It ensures that at any time the amount every job has been processed only differs by at most one time unit [16].
The Round Robin algorithm is typically applied when job processing times are completely unknown. In our setting, we are actually given some upper bounds for our processing times and may invest testing time to find out the actual values. Despite having more information, it turns out that treating all job processing times as unknown in a Round Robin setting gives a provably good result. The only way we employ upper bounds and testing times is again to decide which jobs will be tested and which will not. We again do this at the beginning of our schedule for all given jobs. The rule to decide testing is exactly the same as in the first phase of Algorithm 1: If u j /t j ≥ α, then test j, otherwise run j untested. Again, α is a parameter that is to be determined. It will turn out that setting α = ϕ gives the best result.
The pseudo-code for the Golden Round Robin algorithm is given in Algorithm 2.
Essentially, the algorithm first decides for all jobs whether to test them and then runs a regular Round Robin scheme on the algorithmic testing time p A j , which is defined as in (2). Theorem 2. The Golden Round Robin algorithm is 3.2361-competitive in the preemptive setting for the objective of minimizing the sum of completion times. This analysis is tight. We only provide a sketch of the proof here, the full proof can be found in Appendix D.3.

Algorithm 2: Golden Round Robin
Proof (Proof sketch). We set α = ϕ and use Proposition 1(b),(c) to bound the algorithmic running time p A j of a job j by its optimal running time ρ j .
We then compute the contribution of a job k to a fixed job j by grouping jobs based on their finishing order in the schedule. This allows us to estimate the completion time of job j: Finally, we sum over all jobs to receive ALG ≤ 2ϕ · OPT.
To show that the analysis is tight, we provide an example where the algorithmic solution has a value of 2ϕ · OPT if we let the number of jobs approach infinity.
The following theorem additionally provides a lower bound for the deterministic preemptive setting, giving us a first simple lower bound for this case. The proof is based on the lower bound provided in [5] for the deterministic non-preemptive case. We refer to Appendix D.4 for this proof.

Randomized Setting
In this section we introduce randomness to further improve the competitive ratio of Algorithm 1. There are two natural places to randomize: when deciding which jobs to test and the decision about the ordering of the jobs. These decisions directly correspond to the parameters α and β.
Making α randomized, for instance, could be achieved by defining α as a random variable with density function f α : [1, ∞] → R + 0 and testing j if and only if r j := u j /t j ≥ α. Then the probability for testing j would be given by p = rj 1 f α (x)dx. Using a random variable α like this would make the analysis unnecessarily complicated, therefore we directly consider the probability p without defining a density, and let p depend on r j . This additionally allows us to compute the probability of testing independently for each job.
Introducing randomness for β is even harder. The choice of β influences multiple jobs at the same time, therefore independence is hard to establish.
Additionally, β appears in the denominator of our analysis frequently, hindering computations using expected values. We therefore forgo using randomness for the β-parameter and focus on α in this paper. We encourage future research to try their hand at making β random.
We give a short pseudo-code of our randomized algorithm in Algorithm 3. It is given a parameter-function p(r j ) and a parameter β, both of which are to be determined later.  Proof. Again, we let ρ 1 ≥ . . . ≥ ρ n denote the ordered optimal running time of jobs 1, . . . , n. The optimal objective value is given by (1). Fix jobs j and k. For easier readability, we write p instead of p(r j ). Since the testing decision is now done randomly, the algorithmic running time p A j as well as the contribution c(k, j) are now random variables. It holds For the values of c(k, j) we consult the case distinctions from the proof of the Contribution Lemma 1. If j ∈ N , one can easily determine that c(k, j) ≤ (1 + 1/β)u j for all cases. Note that for this we did not need to use the final estimates with parameter α from the case distinction. Therefore this upper bound holds deterministically as long as we assume j ∈ N . By extension it also trivially holds for the expectation of c(k, j): Doing the same for the case distinction of j ∈ T , we get For the expected value of the contribution we have by the law of total expectation: Note that this estimation of the expected value is independent of any parameters of k. That means, for fixed j we estimate the contribution to be the same for all jobs with small parameter k ≤ j. Of course, as before, for the jobs with large parameter k > j we may also alternatively directly use the algorithmic runtime of k: Putting the above arguments together, we use the Contribution Lemma and linearity of expectation to estimate the completion time of j: Explorable Uncertainty in Scheduling with Non-Uniform Testing Times

13
For the total objective value of the algorithm we receive again using linearity of expectation: where we define Having computed this first estimation for the objective of the algorithm, we now consider the ratio λ j (β, p)/ρ j as a standalone. If we can prove an upper bound for this ratio, the same holds as competitive ratio for our algorithm.
Hence the goal is to choose parameters β and p, where p can depend on j, s.t. λ j (β, p)/ρ j is as small as possible. In the best case, we want to compute min β≥1,p∈[0,1] max j λ j (β, p) ρ j .
The choice of parameters is given in the proof of the lemma, which can be found in Appendix D.5. During the proof we use computer-aided computations with Mathematica. The Mathematica code can be found in Appendix E and additionally on the webpage [1] for download.
To conclude the proof of the theorem, we write j · ρ j = 3.3794 · OPT .

Optimal Results for Minimizing the Makespan
In this section, we consider the objective of minimizing the makespan of our schedule. It turns out that we are able to prove the same tight algorithmic bounds for this objective function as Dürr et al. in the unit-time testing case, both for deterministic and randomized algorithms. The decisions of the algorithms only depend on the ratio r j = u j /t j . Refer to the appendix for the proofs.
Theorem 5. The algorithm that tests job j iff r j ≥ ϕ is ϕ-competitive for the objective of minimizing the makespan. No deterministic algorithm can achieve a smaller competitive ratio.
Theorem 6. The randomized algorithm that tests job j with probability p = 1−1/(r 2 j −r j +1) is 4/3-competitive for the objective of minimizing the makespan. No randomized algorithm can achieve a smaller competitive ratio.

Conclusion
In this paper, we introduced the first algorithms for the problem of scheduling with testing on a single machine with general testing times that arises in the context of settings where a preliminary action can influence cost, duration or difficulty of a task. For the objective of minimizing the sum of completion times, we presented a 4-approximation for the deterministic case, and a 3.3794approximation for the randomized case. If preemption is allowed, we can improve the deterministic result to 3.2361. We also considered the objective of minimizing the makespan, for which we showed tight ratios of 1.618 and 4/3 for the deterministic and randomized cases, respectively.
Our results open promising avenues for future research, in particular tightening the gaps between our ratios and the lower bounds given by the unit case. Based on various experiments using different adversarial behaviour and multiple testing times it seems hard to force the algorithm to make mistakes that lead to worse ratios than those proven in [5] for the unit case. We conjecture that in order to achieve better lower bounds, the adversary must make live decisions based on previous choices of the algorithm, in particular depending on how much the algorithm has already tested, run or deferred jobs up to a certain point.

A Jobs with Small Upper Limits
In this section, we motivate our approaches by showing why the uniform algorithm cannot be simply extended to the general problem. An important insight of Dürr et al. was that jobs with small upper bounds can be scheduled immediately without testing at the begin of any competitive algorithm. It turns out this does not generalize to non-uniform testing, which signifies that a new idea is necessary to deal with jobs that have small upper bounds when compared to their testing times. Dürr et al. [5] proved for the special case of uniform testing times t j ≡ 1 that w.l.o.g. any algorithm claiming competitive ratio λ may start by scheduling all jobs j with u j < λ untested in increasing order of u j . Clearly, this statement does not hold directly for the general case, since a single job with 0 < u j < λ, p j = t j = 0 must be tested to yield a finite competitive ratio.
It seems intuitive to extend this idea to non-uniform testing by instead considering the ratio uj tj between upper bounds and test times. We show via a short counterexample that for any λ ≥ 1 scheduling all jobs with uj tj < λ first leads to an arbitrarily bad result.
Consider the following instance: Given an integer m and a small real number ε > 0, we have m jobs with u j = p j = λ and t j = 1 for j = 1, . . . , m. Clearly, all these jobs lie just over the limit λ and are not considered for execution at the beginning of the schedule. Additionally we have a single extra job j 0 with u 0 = m 2 , t 0 = m 2 λ + ε, p 0 = 0. An algorithm obeying the small upper limit rule schedules j 0 first, since we have u0 t0 < λ because of ε > 0. Afterwards the remaining jobs are scheduled optimally, meaning the algorithm runs them untested. Since the order of the remaining jobs is irrelavant, we may assume w.l.o.g. that the algorithm orders them by 1, . . . , m.
For the completion time of j 0 we get C 0 = m 2 and for the other jobs we have C j = m 2 + j · λ. In total the value of the algorithm is: In contrast, the optimal offline schedule starts by running all jobs j = 1, . . . , m untested and then, leaving the large job j 0 for last, tests and runs it. We note here that the optimum only schedules j 0 last if m 2 /λ + ε > λ. We can guarantee this by choosing m large enough.
The problem with scheduling j 0 first is that, while it might be reasonable to run it untested, all m 2 small jobs have to wait for it to finish before being scheduled, leading to a non-optimal result. Hence the problematic decision is the order of the jobs rather than whether the algorithm tests or not.
The algorithm we propose in Section 2 takes into account the ratio between upper bounds and test times, while additionally making sure that the execution length of both tested and untested jobs is considered in the order of the schedule.

B Lower Bounds for (α, β)-SORT
We give two concise lower bounds for the performance of (α, β)-SORT.
First, we show that (1, 1)-SORT cannot be better than at least 3-competitive. Consider n jobs with u j = p j = 1 and t j = 1 − ε for all jobs j. Since u j /t j ≥ 1, (1, 1)-SORT tests all jobs, and since t j < p j , it also runs all tests before executing anything. In total we have an algorithmic value of Comparatively, the optimal runtime of a job is ρ j = 1. This leads to a value of OPT = n 2 /2 + n/2. Therefore we get 3.
Additionally, we can strengthen our analysis by proving a lower bound for the algorithm with general parameter choices α, β ≥ 1. We will show that (α, β)-SORT is at most 2-competitive for all such values.
Consider first the case α > 2. Then the instance consisting of a single job with u j = 2, t j = 1 and p j = 0 is executed untested by the algorithm, while the optimum tests the job. We have ALG / OPT = 2.
For the second case 1 ≤ α ≤ 2, we subdivide into two more cases based on the value of β. Let us start with β > 2. Consider for this n jobs with u j = 2, t j = 1, p j = 2. Since now α ≤ 2, all jobs are tested by the algorithm. In particular, since p j = 2 > β = βt j , all jobs are tested before any executions happen. In total this gives an algorithmic value of Similarly, the optimal value is OPT = 2 · (n 2 /2 + n/2). We receive Finally, consider 1 ≤ α ≤ 2 and β ≥ 2. We need two sets of jobs for this. First, we have a set of n jobs with u j = β, t j = 1 − ε, p j = β, similar to the previous instance. Since u j = β ≥ α > αt j , these jobs are all tested by the algorithm. Since p j = β > βt j , all jobs are tested before any are executed.
Second, we have a set of m jobs with u k = M, t k = 1 + ε, p k = 0, where M is some large number that does not play a role in either solutions. Since the upper bound is large, both the optimum and the algorithm test these jobs. Because βt k > p j > βt j for all jobs k ∈ [m], j ∈ [n], we know that the algorithm sorts the executions as follows: First, all jobs in [n] are tested. Then, all these jobs in [n] are executed. Finally, all jobs in [m] are tested and then immediately executed.
In total, this gives us an algorithmic value of ALG = (1 − ε)n · (n + m) + β n 2 2 + n 2 + βn · m + (1 + ε) while the optimal value is Now we choose m = n and let n → ∞ and ε → 0, giving us This ratio is minimal for β ≥ 2 at β = 2 with a value of 11/5 > 2, finalizing the proof of the lower bound.

C A Simple Algorithm for the Uniform Case
In the following we present a simpler 2-competitive algorithm for the unit-testing problem as compared to the Threshold algorithm from [5]. In the newest version of their complete paper [4], Dürr et al. add a note about this simpler algorithm, which they call DelayAll, and prove its competitive ratio. We present an alternative proof using our methods to highlight the differences between the proof techniques. The algorithm forces tests for all jobs designated for testing before executing any tested job. Since this leads to the same competitive ratio as the current best-known result, this represents an argument for increasing the relevance of testing further jobs as opposed to executing already tested jobs at any point in the schedule. Note that the optimal parameter choice of β = 1 in Algorithm 1 reflects this as well.
The algorithm first runs jobs with u j < 2 untested, then tests all remaining jobs immediately. Finally, all jobs are run in order of shortest processing time first.

Algorithm 4: Force Testing
if uj ≥ 2 then 4 add j to T ; 5 else 6 add j to N ; 7 end 8 end 9 run all jobs j ∈ N untested; 10 test all jobs j ∈ T ; 11 run all j ∈ T in order of SPT; Lemma 3. Force Testing is a 2-competitive algorithm for the objective of minimizing the sum of completion times in the unit-sized testing case.
Proof. Again, we let ρ 1 ≥ . . . ≥ ρ n denote the ordered optimal running time of jobs 1, . . . , n. The optimal objective value is given by (1). By Lemma 1 of [5] we may assume that all jobs fulfill u j ≥ 2 and are tested by the algorithm. We define (π(j)) j to be the SPT order of the processing times p j , such that p π −1 (1) ≥ · · · ≥ p π −1 (n) . This means the job with the largest processing time has index 1 in this ordering, similar to the order of ρ j . Then the value of the algorithm can be computed as follows: Since all jobs are tested first, an amount of n · n is added to the objective. Afterwards, the last job in the ordering π (i.e. the job with the shortest processing time) contributes his processing time n times. The second-to-last job contributes his n − 1 times and so on. In total this gives ALG = n 2 + j∈[n] π(j) · p j .

Explorable Uncertainty in Scheduling with Non-Uniform Testing Times 21
The SPT-rule is optimal on a single machine, see e.g. [16]. Therefore if we re-order the jobs in the final step of the algorithm, the result can only get worse. We re-order according to the optimal order of ρ j and receive j · (2 + p j ).
If ρ j = 1 + p j , then it holds that 2 + p j ≤ 2(1 + p j ) = 2ρ j . Similarly, if ρ j = u j , then by u j ≥ 2 for all jobs we have 2 + p j ≤ u j + u j = 2ρ j . Inserting this into our estimation, we receive This analysis is tight, as can be seen by a simple example of n jobs with large upper bounds and processing times p j = 0. While the algorithm obliviously runs all tests first and has a completion time of n for every job, the optimum tests and immediately runs every job, resulting in a value of n 2 /2 + n/2. By this example we also see that while this oblivious algorithm has the same theoretical competitive ratio as the Threshold algorithm in [5], there are instances where Threshold clearly performs better.
We also note that the idea of forcing tests cannot be extended to non-unit testing times. In the presence of arbitrarily large testing times, we may not prioritize these tests over potentially small execution times.
(a) Let j ∈ T . Assume ρ j = t j + p j . Then the result follows immediately from non-negativity of testing and running times. On the other hand, let ρ j = u j . Then, since j ∈ T and α ≥ 1, we have t j ≤ 1 α u j ≤ ρ j . By definition of the upper bound we also have p j ≤ ρ j . (b) Let j ∈ T . By definition u j /t j ≥ α and p A j = t j + p j . If the optimum tests j, then ρ j = t j + p j and therefore p A j = ρ j . If, on the other hand, ρ j = u j , then: (c) Now let j ∈ N and hence u j /t j < α as well as p A j = u j . If the optimum doesn't test j, then ρ j = u j and therefore p A j = ρ j . If it does, then ρ j = t j +p j and:

D.2 Proof of Lemma 1
Proof. Let j ∈ [n]. By definition, the completion time C j is the point in time in the schedule when the entire execution of j, including a potential test in our case, is finished. Since our algorithm schedules all jobs on a single machine without waiting times, the completion time is equal to the amount of time the algorithm spends scheduling any job (including j itself) before reaching this point. Hence, by the definition of the contribution: the properties of the sets J 1 j and J 2 j to estimate as follows: For the sum of completion times, we receive where the last inequality follows from (5).
We also show that this analysis of the Golden Round Robin algorithm is tight. For this, consider n jobs with u j = p j = 1 and t j = 1/ϕ for all jobs. Since u j /t j ≥ ϕ, the algorithm tests all jobs and therefore runs a round robin scheme on n jobs with runtime p A j = 1 + 1/ϕ = ϕ. We receive ALG = n 2 ϕ. On the other hand, OPT does not test anything and has a total value of OPT = n 2 /2 + n/2. The final ratio is then

D.4 Proof of Theorem 3
Proof. We prove the theorem by reducing a worst case scenario in the preemptive setting to the worst case provided for the non-preemptive setting in [5]. More specifically, we prove that given a preemptive algorithm for the adversarial scenario as defined in Chapter 3.2 of [5], there exists a non-preemptive algorithm with competitive ratio at least as good as the given preemptive algorithm. Similarly, the optimal offline algorithm is always non-preemptive. We are given an instance with t j = 1 and u j =ū ≥ 1 for all jobs. The adversarial strategy in [5] fixes a parameter δ ∈ [0, 1] and then decides the runtime p j of all jobs as follows: • If a job is executed untested by the algorithm, set p j = 0.
• If a job is tested by the algorithm, set p j = u j .
• If the number of jobs already decided is larger than δn, then always set p j = 0.
This strategy can be easily extended to the preemptive case, where we just have to make sure that once an algorithm decides to test a job, it may not retract this decision later in order to deceive the adversary. If an algorithm starts testing a job (or execute it untested) even for a very small amount of time, it must continue to abide by this decision. Assume now that we are given a schedule produced by an algorithm ALG pre which may be preemptive. We know that all jobs run untested by ALG pre have processing time p j = 0 as well as all jobs that have been decided after more than δn other jobs have already been fixed. The rest of the jobs have processing time p j = u j .
We fix an ordering of the execution instances of the algorithm, which are defined as the exact points in time where the algorithm finishes either an untested execution, a test, or the execution of an already tested job.
We then define a new algorithm ALG * , which will be non-preemptive, by the following rule: Go through the schedule of ALG pre starting at time 0. Whenever you encounter an execution instance in the schedule of ALG pre , schedule the corresponding execution or test completely without preemption in ALG * .
By definition, the ordering of the execution instances stays the same from ALG pre to ALG * . Therefore the completion time of any job can only get better, i.e. C * j ≤ C pre j . Additionally, the exact same set of jobs is tested as before and the set of δn jobs that is decided first by the adversary is unchanged. Hence, the behavior of the adversary is the same for both algorithms and the optimal schedule does not change.
Combining these arguments, we know that the competitive ratio of the nonpreemptive algorithm can not be worse than that of the preemptive version: To complete the proof, we cite section 3.2 of [5], where it is proven that for instances with t j = 1, u j =ū ≥ 1 with an adversarial strategy defined as above there exists no deterministic algorithm with competitive ratio better than 1.8546. We have just proven that for all preemptive algorithms in this setting there always exists a non-preemptive algorithm with the same or better competitive ratio. Therefore this lower bound also holds for the preemptive version of the problem.
We use the mathematical solver Mathematica for some of the following computations. Please consult Appendix E or webpage [1] for the complete Mathematica code for this section. Using this code, we compute the intersection and receive the following value for p: For most feasible values of β and r, this fraction lies between [0, 1], but not for all. We will have to make sure that our final choice of p fulfills this requirement. We insert this value for p into either of the above linear functions. Afterwards the result depends only on r and β. Since r is our job parameter, we must consider the worst case (i.e. the maximum case) in dependence of r ≥ 1. Therefore we run a parameter search for β, such that this worst-case value is minimized. See the Mathematica code for the exact computation. The result of the search was β ≈ 1.2574 with a value of approximately 3.3794 and a maximizing value of r ≈ 1.4386.
We therefore want to choose β =β := 1.2574 and p(r) as in equation (6). For this value of β, the definition of p(r) is non-negative for all r ≥ 1. However, for some values of r the definition is larger than 1. This is obviously not admissible and therefore we choosep (r) := min(p(r), 1).
Consult Figure 3 for an illustration of this definition. Since we now restricted the choice ofp for some values of r to 1, we need to make sure that the maximum value of our two functions for p = 1 in these cases is smaller than the upper bound already provided. Otherwise our worst case estimate would increase. Using Mathematica, we determine that the value of p(r) is only larger than 1 for values r >r ≈ 2.1637. We again consult Mathematica to compute max r>r λ j (β, 1) ρ j 3.2574, which is smaller than 3.3794. Therefore This concludes the proof.

D.6 Proof of Theorem 5
Proof. Since every job contributes the same amount to the objective regardless of where in the schedule it is placed, we can assume worst case instances consist of only a single job. This statement is formalized in Lemma 20 of the full version of Dürr et al. [4]. We therefore consider a single job j with upper bound u j , processing time p j and testing time t j . As seen in some of the previous proofs, a case distinction on the value of OPT = ρ j = min(u j , t j + p j ) is usually a good strategy. Therefore consider first OPT = u j . If the algorithm tests j, then by definition ALG = t j + p j as well as r j ≥ ϕ. Hence ALG where we used p j ≤ u j and the defining property of the golden ratio. If on the other hand, the algorithm does not test j, then ALG = u j = OPT. Now consider OPT = t j + p j . If the algorithm tests j, then ALG = t j + p j = OPT. If it does not, then we have ALG = u j as well as r j < ϕ and therefore where we used p j ≥ 0. It remains to show that no algorithm can achieve a better ratio. For this we use the proof from Dürr et al. [5], which we include for completeness. Consider an instance with a single job j with u j = ϕ, t j = 1. An algorithm that tests the job has competitive ratio ϕ if the adversary sets p j = 0. An algorithm that doesn't test j has competitive ratio 1 + 1/ϕ = ϕ for the case p j = u j .

D.7 Proof of Theorem 6
Proof. Consider a worst case instance consisting of a single job j with upper bound u j , processing time p j , and testing time t j . We can compute the expected value of the algorithmic solution: Again, we do a case distinction. If OPT = u j then Otherwise, if OPT = t j + p j then To achieve a good competitive ratio, we want to minimize the maximum of these two functions. We again do this by computing their intersection point as in the proof of Lemma 2. To simplify presentation, we only show that the resulting value for p is indeed optimal: We insert p = 1 − 1/(r 2 j − r j + 1) into both expressions and receive after a bit of algebra: This function is maximized at r j = 2 with value 4/3. To proof optimality of this algorithm we provide a randomized instance where every deterministic algorithm is at most 4/3-competitive. This proof is again adopted from Dürr et al. [5]. Consider a single job instance with u j = 2, t j = 1 that has p j = 0 and p j = 2 both with probability 1/2. Both the deterministic algorithm that tests the job and the one that doesn't test have expected makespan 2. The optimal solution has an expected value of 3/2. Therefore every deterministic algorithm is at most 4/3-competitive. Applying Yao's principle [19] gives the desired result.