Normal-form preemption sequences for an open problem in scheduling theory

Structural properties of optimal preemptive schedules have been studied in a number of recent papers with a primary focus on two structural parameters: the minimum number of preemptions necessary, and a tight lower bound on shifts , i.e., the sizes of intervals bounded by the times created by preemptions, job starts, or completions. These two parameters have been investigated for a large class of preemptive scheduling problems, but so far only rough bounds for these parameters have been derived for speciﬁc problems. This paper sharpens the bounds on these structural parameters for a well-known open problem in the theory of preemptive scheduling: Instances consist of in-trees of n unit-execution-time jobs with release dates, and the objective is to minimize the total completion time on two processors. This is among the current, tantalizing “threshold” problems of scheduling theory: Our literature survey reveals that any signiﬁcant generalization leads to an NP-hard prob-B lem, but that any signiﬁcant, but slight simpliﬁcation leads to tractable problem with a polynomial-time solution. For the above problem, we show that the number of preemptions necessary for optimality need not exceed 2 n − 1; that the number must be of order Ω( log n ) for some instances; and that the minimum shift need not be less than 2 − 2 n + 1 . These bounds are obtained by combinatorial analysis of optimal preemptive schedules rather than by the analysis of polytope corners for linear-program formulations of the problem, an approach to be found in earlier papers. The bounds immediately follow from a fundamental structural property called normality , by which minimal shifts of a job are exponentially decreasing functions. In particular, the ﬁrst interval between a preempted job’s start and its preemption must be a multiple of 1 / 2, the second such interval must be a multiple of 1 / 4, and in general, the i -th preemption must occur at a multiple of 2 − i . We expect the new structural properties to play a prominent role in ﬁnally settling a vexing, still-open question of complexity.


Introduction
We study structural properties of optimal preemptive schedules of a classic problem of scheduling unit execution time (UET) jobs with precedence constraints and release dates on two processors. Optimal nonpreemptive schedules for this and related problems have been well researched in the literature for various objective functions and restrictions . Fujii et al. (1971) present a matching-based algorithm, and Coffman and Graham (1972) devise a job-labeling algorithm for minimum-makespan nonpreemptive schedules. Garey and Johnson introduce O(n 2 ) and O(n 2.81 ) time algorithms for minimizing maximum lateness for jobs, respectively, without release dates (Garey and Johnson 1976), and with release dates (Garey and Johnson 1977). Gabow (1982) designed an almost linear-time algorithm for the minimum-makespan problem. Leung et al. (2001) and Carlier et al. (2014) extend these results to precedence delays.  focus on minimization of total completion time and present an O(n 9 ) time shortest-path optimization algorithm for scheduling jobs with release dates. They also conjecture that there always exist so-called ideal schedules that minimize both maximum completion time and total completion time for jobs with release dates. This has been known to hold true for equal release dates without preemptions (Coffman and Graham 1972) and with preemptions (Coffman et al. 2003) . Coffman et al. (2012) prove the Baptiste-Timkovsky conjecture and give an O(n 3 ) algorithm for the minimization of total completion time for jobs with release dates-a major improvement over the O(n 9 ) time algorithm in .
Optimal preemptive schedules have proven more challenging to compute efficiently, especially for jobs with release dates and the total-completion-time criterion. Coffman et al. (2012) prove that these schedules are not ideal, that is, for some instances any schedule minimizing total completion time will be longer than the schedule minimizing maximum completion time. That holds even for in-tree precedence constraints. This last result serves as a point of departure for this paper, with its focus on in-tree precedence constraints, release dates, and the criterion of total-completion-time, the problem P2| pmtn, in-tree, r j , p j = 1| C j in the wellknown three-field notation. Despite numerous efforts, the computational complexity of the problem remains open: reducing the number of processors to m = 1 renders the problem polynomially solvable ); and so does dropping the precedence constraints (Herrbach and Leung 1990); dropping the release dates (Coffman et al. 2003); and assuming out-trees instead of in-trees (Baptiste and Timkovsky 2001;Brucker et al. 2003;Huo and Leung 2005). With this background in mind, we focus on key structural properties of optimal preemptive schedules for the problem P2| pmtn, in-tree, r j , p j = 1| C j . The complexity of the problem studied in this paper remains also open for m = 3 machines. This holds for both nonpreemptive and preemptive cases and for both makespan and total-completion-time objectives. Sauer and Stone (1987) study the problem with no release dates and maximum-completion-time (makespan) minimization. They show that, for every optimal preemptive schedule, there is an optimal preemptive schedule with at most n preemptions, where preemptions occur at multiples of 1/2, and go on to define a shift that is the duration of an interval between two consecutive time points, each of which is a job start, a job end, a job resumption, or a job preemption. The shortest necessary shift in an optimal schedule is then called its resolution. 1 The minimum resolution over all instances of a given preemptive scheduling problem is called the problem resolution. Following Sauer and Stone (1987), the minimum number of preemptions and the minimum resolution necessary for optimal schedules have become two main structural parameters in preemptive scheduling. They have been investigated for a large class of preemptive scheduling problems by Baptiste et al. (2011) who give general bounds for these parameters. Coffman et al. (2015) provide bounds on the resolutions of various scheduling problems-we refer the reader to their work for a comprehensive overview. In particular, they show upper bounds of m −n/(m+1) and m −(n−1)/(m+1) on resolutions for problems P| pmtn, in-tree, r j , p j = 1|C max and P| pmtn, in-tree, r j , p j = 1| C j , respectively, where n is the number of jobs and m is the number of processors. Thus, for the problem P2| pmtn, in-tree, r j , p j = 1| C j studied in this paper one immediately obtains an upper bound of 2 −(n−1)/3 on its resolution. As for lower bounds, Coffman et al. (2015) shows that the resolution of P| pmtn, pr ec, r j | w i C j is at least (m + n) −(2n+1)/2 .
The papers of Sauer and Stone (1987), Baptiste et al. (2011), andCoffman et al. (2015) obtain their resolution bounds by analyzing the corners of feasibility regions of linear programs designed for specific problems. Our approach is combinatorial and does not make use of the theory of linear programming. It yields a lower bound of 2 −2n−1 on the problem resolution of P2| pmtn, in-tree, r j , p j = 1| C j , which is a significant improvement for in-trees over the lower bound of (n + 2) −(2n+1)/2 that can be derived directly from Coffman et al. (2015).
We introduce in this paper the concept of normal schedules where shifts decrease as a function of time: The first shift is a multiple of 1/2, the second one is a multiple of 1/4, and in general, the i-th shift is a multiple if 2 −i . We prove that there exist optimal schedules that are normal for in-trees. However, we conjecture that this is no longer the case for arbitrary precedence constraints, i.e., there are instances for which no optimal schedule is normal. The normality of a schedule implies that each shift is a multiple of 2 −2n+1 , which is a much stronger claim than the usual requirement that all shifts are no shorter than the problem resolution. Normality also implies that there exists an optimal schedule with a finite number (in particular, a number not exceeding 2n −1) of events which are times when jobs start, end, or are preempted. Thus, 2n − 1 is an upper bound on the number of preemptions necessary for optimality. We also observe that a job may be required to preempt at a point which is neither a start nor the end of another job in order to ensure optimality.
These preemption events unrelated to job starts or completions seem to be confined to rather contrived instances; they are more the exception than the rule in preemptive scheduling. We also prove that there exists a sequence of problem instances indexed by n for which the number of preemptions in the corresponding optimal schedules is Ω(log n). Thus, a tight upper bound on the number of preemptions required for optimality must be at least logarithmic in n.

Our approach and results: a general overview
In Sect. 3, we exhibit a sequence of problem instances indexed by n where the number of preemptions of a single job is of order Ω(log n). In the remaining sections we focus on proving our lower bound on the minimum shift. We start by showing that an optimal schedule is a concatenation of blocks, each with at most three jobs. No job starts or completes inside a block but there is at least one job start at the beginning of a block, and/or at least one job completion at the end of a block. This is done in Sects. 4.2 and 4.3. A block is called l-normal if each job duration in the block is a multiple of 1/2 l+1 , and the block length is a multiple of 1/2 l . In a normal schedule the first block must be 1-normal, the second 2-normal and so on. These concepts are introduced in Sect. 4.4, where it is verified that, in a normal schedule with q blocks, each preemption occurs at a multiple of 1/2 q+1 , where q ≤ 2n − 1. Our goal is to show that there exists an optimal schedule that is normal. Our proof is by contradiction. We begin by assuming an optimal schedule that is also maximal in the sense that it has a latest possible abnormality point i, i.e., a latest block i which is not i-normal . We show that such a block must have exactly three jobs. One completes at the end of the block and has an (i + 1)-normal duration, but the durations of the other two are not (i + 1)-normal, as shown by Lemma 12. These two jobs then trigger an alternating chain of jobs to which they also belong, as shown in Sect. 6. The completion times of the jobs in the chain are not (i + 1)-normal, which makes it possible under normalblock circumstances to either extend the chain by one job or prove that the abnormality point must exceed i; this is our main result in Theorem 3. Thus, we get a contradiction in either case since the number of jobs is finite and the schedule is maximal. The normal-block circumstances here mean that the alternating chain does not end with a certain structure that we call an A-configuration, a configuration that prevents us from extending the alternating chain. However, we show that there always exists a maximal schedule that does not include an A-configuration. This is done in Sect. 5, where the key result is Theorem 2. The main result of the paper follows and states that there is a normal schedule that is optimal for P2| pmtn, in-tree, r j , p j = 1| C j .  Fig. 1 The precedence constraints and release dates for J p , p ≥ 2 3 How many preemptions of a job is required?
In this section we show that, for any given number n of jobs, it is sometimes necessary to preempt a job p = Ω(log n) Fig. 1.) We prove that the job a p 4 should complete exactly at 2 p + 3 − 1/2 p+1 in any optimal schedule. This is done by first proving that no feasible schedule (optimal or not) can complete a p 4 earlier (cf. Proposition 1), and then by proving that staring a p 4 later leads to a schedule that cannot be optimal (cf. Proposition 3).
Proposition 1 Let p ≥ 0 be any integer. If P is a preemptive schedule for J p , then the total length of the job a p 4 executing in [2 p + 2, +∞) is at least 1 − 1/2 p+1 .
Suppose that the lemma holds for integers smaller than p and we prove it for p. Let P be a preemptive schedule for J p . We consider all jobs that must execute in time interval I = [2 p, s(P, a p 4 )]. Each job in A p \{a p 4 } executes in this interval, because r (a) = 2 p and a ≺ a p 4 for each a ∈ A p \ {a p 4 }. By induction hypothesis and by the facts that a ≺ a p 4 for each a ∈ J p−1 , we obtain that a part of a p−1 4 that executes in I is of length at least 1 − 1/2 p . Thus, the total length of all jobs that execute in I in P is at least 4 − 1/2 p . Therefore, s(P, a p 4 ) ≥ 2 p + |I |/2 = 2 p + 2 − 1/2 p+1 .

Fig. 2 a The execution of the jobs in
(See Fig. 2.) Note that, when p > 0, C(P p , a p−1 4 ) = C(P p−1 , a p−1 4 ) = 2 p + 1 − 1/2 p and hence P p is feasible. This gives the following.
Proposition 2 Let p ≥ 0 be any integer. There exists a schedule for J p that completes a p 4 at 2 p + 3 − 1/2 p+1 .
Proof We prove the lemma by contradiction, i.e., suppose that, for some p ≥ 0, there exists an optimal schedule P p such that C(P p , a p 4 ) = 2 p + 3 − 1/2 p+1 . Let, without loss of generality, p be the minimum integer for which this holds. One can verify the lemma for p = 0 and hence p > 0. By Proposition 1, By Proposition 2 and by the minimality of p, there exists an optimal schedule P p−1 for J p−1 that executes at least 1 − 1/2 p units of a p−1 4 in [2 p, +∞). We argue that the total length of a p−1 4 , denoted by x, that executes in P p in interval [2 p, +∞) equals exactly 1−1/2 p . By Proposition 1, Define a schedule P that equals P p−1 in the interval [0, 2 p] and equals P p in the interval [2 p, +∞). Note that P is not feasible only if the total length of a p 4 executing in P (that equals 1/2 p + x) is greater than 1. However, We then obtain a schedule P by removing the total length of x − 1 + 1/2 p of a p−1 4 from P in a way that minimizes the completion time of a p−1 4 in P, which gives C(P, a Thus, by the optimality of P p , x − 1 + 1/2 p = 0, i.e., x = 1 − 1/2 p as required. In the schedule P p , the jobs that are executed in time interval [2 p, C(P p , a p 4 )] are the ones in A p and x units of a p−1 4 . By a case analysis one can prove that Note that, by construction, Moreover, x = 1 − 1/2 p and the minimality of p imply that This, (1) and C(P p , a p 4 ) = 2 p + 3 − 1/2 p+1 imply that P u is not optimal. This gives the desired contradiction.
Note that is follows that in each optimal schedule P for J p , C(P, a j 4 ) = 2 p + 3 − 1/2 j+1 . Since a j 4 is a successor of all jobs in J j , we obtain that there is, in P, idle time on exactly one processor in interval (2( j + 1) − 1/2 j+1 , 2( j + 1)). Also note that, for each j ∈ {0, . . . , p}, no idle time is possible in the interval I = (2 j, 2( j + 1) − 1/2 j+1 ) because, for j > 0, a , 1 a j 2 , a j 3 and a part of a j−1 4 of length 1 − 2 j must execute in I , and for j = 0, a 0 1 , a 0 2 and a 0 3 must execute in I . This completes the proof of the claim.
Note that for any given p ≥ 0, the number of jobs in J p equals 4( p + 1). Proposition 3 gives us that each optimal schedule for J p has a job that completes at a time point that is a multiple of 1/2 p+1 but is not a multiple of 1/2 p . This gives that there exists a set of n jobs J such that there exists no optimal solution to P2| pmtn, in-tree, r j , p j = 1| C j for J in which each job start, completion and preemption occurs at a time point that is a multiple of 1/2 n/4−1 . We note that this upper bound on the resolution of this problem is slightly weaker than the bound 2 −(n−1)/3 proved in Coffman et al. (2015). Our main result of this section is the following lower bound on the number of preemption of one job in an optimal schedule. Theorem 1 Given any positive integer p, there exists an instance of the problem P2| pmtn, in-tree, r j , p j =1| C j , such that in any optimal schedule for the instance, this is a job that is preempted at least p = Ω(log |J |) times, where J is the job set of the instance.
Proof Let P p be an optimal schedule for J . Thus P p satisfies the conditions in Proposition 3. By Theorem 4, we may assume that P p is normal.
The precedence constraints between the jobs in J p are as in Fig. 1. We extend the precedence relation to J by additionally enforcing: We first construct a schedule P as follows. Take P p and extend it by executing a so that C(P , a) = 2( p+1)+1/2 p+1 and executing b 1 , . . . , b l . . , l}, where b 0 = a p 4 . By Proposition 3, such a schedule P exists and a is preempted p times in P .
Let P be an optimal normal schedule for J . By Theorem 4, such a schedule exists. Suppose for a contradiction that a is preempted at most p−1 times in P. By Proposition 3, we have C(P, a) < C(P , a) and C(P, a p 4 ) > C(P , a p 4 ). The number of events in P (respectively in P ) in interval [0, C(P, a p 4 )] (respectively, [0, C(P , a p 4 )]) is at most 2|J p | + 3 because each event either equals 0 or is the start or completion time of a job. Since both schedules are normal, Thus, by definition of l, By Proposition 3, P restricted to the jobs in J p is not optimal for J p . This in particular implies This, together with (4), implies Since, by construction of P , we obtain that the total completion time of P is strictly smaller than that of P, which gives a required contradiction.

Preliminaries
Let J be a set of n unit UET jobs. The release date for job a, denoted by r (a), is the earliest start time for a in any feasible schedule of J . We assume that r (a) is an integer for all a ∈ J .
For two jobs a and b, we say that a is a predecessor of b, and that b is a successor of a, if all feasible schedules require that b not start until a has finished. We write a ≺ b to denote this relation. In contrast, a ⊀ b means that b can start prior to the completion time of a. Two jobs a and b are said to be independent if a ⊀ b and b ⊀ a. For B ⊆ J , we say that the jobs in B are independent if each pair of jobs in B is independent. This work deals with in-tree precedence constraints, i.e., for each job a there exists at most one job b such that a ≺ b.
The symbol R + denotes the set of nonnegative real numbers. Given a schedule P and a job a ∈ J , define s(P, a) and C(P, a) to be the start and completion times of a in P, respectively. A job is called release date pinned in P if it starts at its release date in P. The total completion time of a schedule P of J is given by a∈J C(P, a). We say that a preemptive schedule P is optimal if the sum of its job completion times is minimum among all preemptive schedules for J .

Events, partitions and basic schedule transformations
For a given schedule P, define a vector e = (e 1 , . . . , e q ), where 0 = e 1 < e 2 < · · · < e q , such that The elements of e are called the events of P. The part of P in time interval [e i , e i+1 ] is called the i-th block of P, or simply a block of P, i ∈ {1, . . . , q − 1}. Given i ∈ {1, . . . , q − 1}, let ξ i : J → R + be a function such that for each a ∈ J , ξ i (a) is the total length of a executed in the i-th block of P. Then, (ξ 1 , . . . , ξ q−1 ) is called the partition of P. Denote by (P, e, ξ ) the schedule P with events e and partition ξ . Unless specified otherwise, it is understood that e has q components. For each a ∈ J , τ P (a) is the integer i ∈ {1, . . . , q − 1} such that C(P, a) = e i+1 . In other words, the τ P (a)-th block is the last block in which job a appears. Whenever P is clear from context we will simply write τ (a).
For any function f : J → R + , let In the following we will analyze schedules by investigating their events and partitions. Informally speaking, the events and the partition of a schedule P are insufficient to uniquely reconstruct the schedule P but they suffice to build a schedule with the same total completion time as P. The schedules built from a list of events and a partition may differ in how pieces of jobs are executed within the blocks. The main advantage of our approach is that in order to construct a block in [e i , e i+1 ] one only needs to solve the problem P2| p j , pmtn|C max where the execution time of a job a is ξ i (a); the proof of Lemma 1 gives more details. We formalize this observation in the next two lemmas.
Proposition 4 Let (P, e, ξ ) be a schedule. The following conditions hold for each i ∈ {1, . . . , q − 1}: Proof Condition (i) follows from the fact that no job in J (ξ i ) starts or completes in (e i , e i+1 ), i ∈ {1, . . . , q − 1}. (Note that r (a) > e i is not possible for a ∈ J (ξ i ) because then we would have s(P, a) ∈ (e i , e i+1 ) which would contradict e i and e i+1 being two consecutive events of P.) Conditions (ii) and (iii) follow directly from the fact that P is a feasible schedule for J . (Note that (iii) in particular implies that the jobs in J (ξ i ) are independent.) We often rely on rearrangements of the events e of a schedule P which result in new schedules P with events that differ from those in e. The resulting schedule P , however, may still be analyzed in the time intervals [e i , e i+1 ], i ∈ {1, . . . , q −1} defined by the original e. For this analysis, we need the following lemma, in which vectors of increasing real numbers beginning with 0 are regarded as sequences of time points.
Lemma 1 If there exist q time points e 1 < · · · < e q and q − 1 functions ξ i : Proof For any given i ∈ {1, . . . , q − 1}, it is enough to construct the part of schedule P, denoted by P i , in the time interval [e i , e i+1 ]. By (i) and (ii), this is equivalent to solving the problem P2| p j , pmtn|C max where the execution time of each job a is ξ i (a). It is easy to see that such a schedule P i exists if and only if the duration of [e i , e i+1 ] is at least the larger of the maximum of the execution times ξ(a) and the sum of these times averaged over the two processors, i.e., Thus, (ii) guarantees that P i exists. Finally note that (iii) guarantees that the precedence constraints between jobs in different blocks are met.
We close this section by introducing two basic transformations of a given schedule (P, e, ξ ): the cyclic shift and the swapping of two jobs. Let ε > 0 and j > 0. Let B = {a 1 , . . . , a j } ⊆ J be j different jobs and let {i 1 , . . . , i j } ⊆ {1, . . . , q − 1} be j blocks of P such that ξ i k (a k ) ≥ ε and ξ i k+1 (a k ) ≤ e i k+1 +1 − e i k+1 − ε for k ∈ We define a cyclic shift of B by ε on {i 1 , . . . , i j } in P, or just a cyclic shift if it is clear from context, as follows. Let be the events and the partition, respectively, obtained by replacing a piece of a k+1 of length ε in block j k+1 of P with a piece of a k of length ε for each k ∈ {1, . . . , j}, where i j+1 = i 1 . This transformation may not result in a feasible schedule because the precedence constraints or release dates may be violated. However, if neither is violated, then the assumptions of Lemma 1 are met for P with the events e , and the partition ξ exists. If P exists, then in addition we assume that the blocks of P enforce the following restrictions: -For each a k ∈ B, if C(P, a k ) = e i k +1 and i k+1 < i k (taking i j+1 = i 1 ), then C(P , a k ) = e i k +1 − ε, which reduces the completion time of job a k by as much as possible with respect to the cyclic shift. -If C(P, a k ) ≤ e i k+1 (taking i j+1 = i 1 ), then C(P , a k ) = e i k+1 + ε, which increases the completion time of job a k by as little as possible with respect to the cyclic shift.
Note that, in general, e does not consist of the events of P , and the number of events of P may be different than the number of events of P.
Finally, we introduce the notion of swapping of two jobs which is used in Sects. 4.4 and 6 to reduce total completion time of a schedule by applying the shortest processing time (SPT) rule to two jobs that complete in consecutive blocks. Let P be a schedule with events e and partition ξ . Let a and a be two jobs such that C(P, a ) = e τ (a) , s(P, a) ≤ s(P, a ) and a is independent of any job in J (ξ τ (a) ). We define a transformation of swapping a and a that results in a new schedule P as follows (see Fig. 3). Find a set of indices I ⊆ {1, . . . , τ (a) − 1} such that for each j ∈ I , 0 < ε( j) ≤ min e j+1 − e j − ξ j (a), ξ j (a ) , ε(max I ) is minimum and j∈I ε( j) = ξ τ (a) (a). Such a set I exists because of the constraints imposed on a and a . The schedule P is obtained by performing the following three steps: -For each j ∈ I , remove a piece of a of length ε( j) from the j-th block of P. -Remove the piece of a executing in the τ (a)-th block and add a piece of a of length ξ τ (a) (a) to the τ (a)-th block of P. -Add a piece of a of length ε( j) to the j-th block of P for each j ∈ I .

Lemma 2
Given schedule (P, e, ξ ), let a, a be two jobs such that C(P, a ) = e k , s(P, a) ≤ s(P, a ) and a is independent of any job in J (ξ k ), where k = τ P (a). Then, the schedule P obtained by swapping a and a in P is feasible and a ∈J C(P , a ) ≤ a ∈J C(P, a ) with the inequality being strict when s(P, a) < s(P, a ) and ξ k−1 (a) < e k − e k−1 .
Proof The fact that P is feasible follows directly from its construction. Suppose that s(P, a) < s(P, a ) and ξ k−1 (a) < e k − e k−1 . If k − 1 / ∈ I , then C(P , a) ≤ e k−1 + ξ k−1 (a) < e k . Otherwise, the restriction on taking ε(max I ) = ε(k − 1) to be minimum implies, due to s(P, a) < s(P, a ), that ξ k−1 (a) + ε(k − 1) < e k − e k−1 and hence C(P , a) = e k−1 + ξ k−1 (a) + ε(k − 1) < e k . Thus, the total completion time of P is strictly smaller than that of P as required.

Properties of optimal schedules
We now give some key properties of optimal schedules and describe three configurations that are forbidden in optimal schedules. These results will be used in subsequent sections.
The following lemma states that if a job a completes in the i-th block of an optimal schedule P, i.e., τ (a) = i, then the part of a that executes in that block spans the block. Such a job a is called a spanning job in block i. Proof The proof is by contradiction. There exists ε > 0 such that at most one job executes in I = [e τ (a)+1 − ε, e τ (a)+1 ] on each machine in P and ε ≤ e τ (a)+1 − e τ (a) − ξ τ (a) (a). Let B be the set of the jobs that execute in I . Clearly, a ∈ B and 1 ≤ |B| ≤ 2. There exists a job b ∈ J \ B such that ξ τ (a) (b ) = 0. Indeed, otherwise a could be executed in [e τ (a) , e τ (a) + ξ τ (a) (a)] without making any other changes in the schedule. Since the new schedule completes a earlier (because ξ τ (a) (a) < e τ (a)+1 − e τ (a) ), this would contradict the optimality of P. Then C(P, b ) > τ(a) and we can use some of the space of ξ τ (a) By Lemma 1, there exists a schedule P such that for each Proof Suppose for a contradiction that there is idle time of length ε > 0 in [e i , e i+1 ] on one of the processors in P. We get a contradiction by obtaining another schedule P such that By Lemma 3, τ (a) > i and hence ε > 0. By Lemma 1, the desired schedule P obtained from P by moving the piece of a that executes in [C(P, a) − ε , C(P, a)] to the i-th block of P is feasible.
Given schedule (P, e, ξ ), two jobs a and b with τ (a) < τ (b) are said to interlace if job b is not spanning in block τ (a) and there exists t < τ(a) such that job a is not spanning in block t, ξ t (b) > 0, r (a) < e t+1 and a is independent of all jobs in J (ξ t )∪· · ·∪J (ξ τ (a) ). Note that, informally speaking, the above constraints imply that a piece of a executed in [C(P, a) − ε, C(P, a)], for some ε > 0, can be exchanged with a piece of b of length ε executing in the t-th block of P. We formalize this observation in the next lemma.

Lemma 5
If P is an optimal schedule, then no two jobs interlace in P.
Proof Let e and ξ be the events and the partition of P, respectively. Suppose for a contradiction that two jobs a and b with τ (a) < τ(b) interlace and t is the block in the definition. Let Note that ε > 0. By Lemma 1, there exists a schedule P with e and partition ξ such that The schedule P is feasible for two reasons. First, r (a) < e t+1 implies that if s(P, a) < e t+1 , then r (a) ≤ e t and if s(P, a) ≥ e t+1 , then s(P , a) ≥ e t+1 − ε according to the definition of the transformation, which implies that a does not start prior to its release date in P . Second, the fact that a is independent of all jobs in J (ξ t ) ∪ · · · ∪ J (ξ τ (a) ) implies that a does not violate the precedence constraints in P . For each c ∈ J \ {a}, C(P, c) = C(P , c) and C(P, a) > C(P , a). This contradicts the optimality of P.

Lemma 6 Let (P, e, ξ ) be an optimal schedule. Let I = [x, y] be an interval and let B ⊆ J be such that a ∈ B if and only if the total length of job a executing in I is strictly between 0 and y − x.
If jobs in B are independent, C(P, a) ≥ y and r (a) ≤ x for each a ∈ B, then |B| ≤ 2.
Proof It follows from definition of set B that no job completes in (x, y). We first argue that Suppose for a contradiction that C(P, b) = y for some job b ∈ B. Since the total length of b in I is less than y − x, there exists a non-empty interval I ⊆ I such that no part of b executes in I . We obtain a schedule P by exchanging the part of P that executes in I with the part of P that executes in [y − |I |, y]. Since the release date of each job that executes in I is at most x and the jobs whose parts execute in I are independent, we obtain that P is indeed a feasible schedule. Then, C(P , b) = y − |I | < y = C(P, b) and C(P , a) ≤ C(P, a) for each a ∈ J \ {b}, which completes the proof of (5).
We now prove the lemma. Suppose for a contradiction that |B| > 2. Let b be a job in B with minimum completion time in P. Since |B| > 2, Lemma 3 implies that there exists b ∈ B such that τ (b) < τ(b ) and b is not a spanning job in chunk where p and p are the total lengths of b and b respectively executing in I . Due to the choice of b , ε > 0. We obtain a schedule P by first exchanging the pieces of b of total length ε executing in I with a piece of b of length ε executing in chunk τ (b). The resulting P may not be feasible in I , however, the McNaughton's rule can readily turn this part into a feasible schedule. This provides a feasible schedule P because the release date of each job whose part executes in I is at most x and the jobs that execute in I in P are independent. By (5) Note that if a job completes at y in P, then the total length of this job in I equals y − x; otherwise the job would belong to B contradicting (5). Thus, no job completes later in P than in P-a contradiction with the optimality of P.
for some a ∈ J , then by Lemma 3, a is spanning in block i and the lemma holds. Thus, assume that no job finishes in the i-th block of P. If |J (ξ i )| ≤ 2, then it remain to prove (i): if no job a is spanning in block i, then by Lemma 4, there is no idle time in the i-th block of P, which would violate |J (ξ i )| ≤ 2. This completes the proof of case |J (ξ i )| ≤ 2. We prove, by contradiction, that |J (ξ i )| = 3 is not possible if no job completes at e i+1 . Denote B = {a ∈ J 0 < ξ i (a) < e i+1 − e i }. Clearly, |B| > 1. On the other hand, |B| < 3 for otherwise the job in B with smallest completion time interlaces with one of the two other jobs in B, which contradicts Lemma 5. Thus, |B| = 2. Denote B = {b, b } and assume without loss of generality that C(P, b) ≤ C(P, b ). According to Lemma 3, job b is spanning in block τ (b). Also job b is spanning in block τ (b), since otherwise b and b interlace, which is not possible according to Lemma 5. The only job, call it c , in e τ (b) ) for otherwise this job and b interlace-again a contradiction with Lemma 5. Thus, in particular, τ (b) > i + 1. This situation is depicted in Fig. 4. Let , then we obtain a schedule P by swapping b and c. By Lemma 2, P is feasible. Moreover, if job b is non-spanning in block τ (b) − 1, then the total completion time of P is smaller than that of P, which completes the proof. If, on the other hand, job b is spanning in block where ξ is the partition of P , in which case b and b interlace in P -a contradiction with Lemma 5. Thus, it remains to consider the situation when no such c exists. This, since e τ (b) is an event of P, implies that c ends is an event of P and no job in Y can start at e τ (c ) . Therefore, one of jobs {c , b} must be non-spanning in block τ (c). Swapping this job with c gives, by Lemma 2, a schedule with smaller total completion time that that of P, which provides the required contradiction and completes the proof of the lemma.
The following two lemmas describe additional configurations that cannot be present in an optimal schedule. The first situation is depicted in Fig. 5a, while the statement of Lemma 9 is shown in Fig. 5b.

Lemma 8
Given schedule (P, e, ξ ), let e j be an event in P and jobs c, c , and d be such that Then, P is not optimal.
Proof By Lemma 7 (ii), one of jobs c or c , say c, satisfies ξ t (c) = 0, where e t = s(P, d). We then have s(P, d) < s(P, c) for otherwise c and d would interlace, thus we get a contradiction by Lemma 5. Therefore, we can swap jobs c and d. By Lemma 2, the resulting schedule is feasible and has smaller total completion time than P, as required.

Lemma 9
Let schedule (P, e, ξ ) be optimal and jobs a and a be such that -ξ j (a) > 0, ξ j (a) > 0, j < j − 1 and job a is spanning in block t for each t ∈ { j + 1, . . . , j − 1}; -ξ j (a ) = 0 and C(P, a ) = e j ; -No successor of a starts at e j .
Proof If s(P, a ) < e j+1 , then due to ξ j (a ) = 0, s(P, a ) < e j . But then, a and a would interlace, which is not possible in an optimal schedule according to Lemma 5.
By assumption, a is independent of any job in J (ξ j ). Also, s(P, a) ≤ e j+1 ≤ s(P, a ). Then, τ (a) > j follows from an observation that otherwise swapping a and a in P would produce, by Lemma 2, a schedule with smaller total completion time than that of P.

Abnormality points and maximal schedules
We now define normal schedules, abnormality points and maximal schedules. In particular Lemma 12 gives key necessary conditions for an abnormality point.
For any x ∈ R + and nonnegative integer l, we say that x is l-normal if x = l /2 l for some integer l . We say that a block of a schedule P is l-normal if the length of the block is l-normal and the total execution time of each job in the block If a schedule P with q events e and partition ξ is not normal, then the minimum index i ∈ {1, . . . , q − 1} such that the i-th block of P is not i-normal is called the abnormality point of P. If a schedule is normal, then its abnormality point is denoted by ∞ for convenience. We have the following simple observations. Observation 1 If x is l-normal, then x is l -normal for each l ≥ l.
Observation 2 If i = ∞ is the abnormality point of a schedule P with events e, then e i is (i − 1)-normal.
According to our definition, if an i-th block of a schedule P is i-normal, then ξ i (a) is (i + 1)-normal for each a ∈ J , however, this does not necessarily imply that job preemptions occur at (i + 1)-normal time points in the i-th block of P. Such job preemptions can possibly take place only strictly between e i and e i+1 since both e i and e i+1 are i-normal by assumption. By the next observation, we may assume without loss of generality that i-normal blocks have job preemptions only at (i + 1)-normal time points.
Observation 3 If the i-th block of a schedule P is i-normal, then there exists a schedule P with the same events, partition and total completion time as that of P, in which each preemption, resumption, job start and job completion in the i-th block occurs at (i + 1)-normal time point.
Proof It follows from the McNaughton's algorithm.
Let us introduce a partial order, denoted by , to the set of all schedules. For schedules P and P , we write P P if and only if one of the following holds: -P = P ; -P is optimal, while P is not; -Both P and P are optimal and, additionally, P is normal while P is not; -Both P and P are optimal, but neither is normal. Additionally i ≤ i , where i and i are the abnormality points of P and P , respectively.
Any element in J that is maximal under the partial order is called a maximal schedule.
The next lemma, informally speaking, allows us to further consider only those maximal schedules with abnormality point i = ∞ in which the abnormality of the i-th block is due to the length of the jobs in this block, and not due to the length of this block.

Lemma 11
Let P be a maximal schedule with the events e 1 , . . . , e q . If i = ∞ is the abnormality point of P, then there exists a maximal schedule P with abnormality point i such that e 1 , . . . , e i , e i+1 , . . . , e q are its events and e i+1 −e i is i-normal.
Proof If i = τ (a) for some a ∈ J , then by Lemma 3, e i+1 = e i + ξ i (a). By Lemma 10, ξ i (a) is i-normal. Thus, P = P is the required schedule, which proves the lemma. Hence, i = τ (a) for each a ∈ J , i.e., no job completes at e i+1 . Note that e i+1 = s(P, a) for some a ∈ J . Suppose for a contradiction that e i+1 − e i is not i-normal. Thus, e i+1 is not i-normal. Lemma 4 implies that there is no idle time in the i-th block of P. Thus, |J (ξ i )| ≥ 2 and therefore there exists d ∈ J (ξ i ) that is non-spanning in block i + 1 because a starts at e i+1 .

Case 1 There is an
No job completes at e i+1 and therefore the jobs in J (ξ i )∪ J (ξ i+1 ) are independent. Thus, by Lemma 1, there exists a schedule P with events e and partition ξ , where Moreover, due to the McNaughton's rule, one can assume that s(P , a) = x. By Observation 2, e i is (i − 1)-normal and hence, by Observation 1, x − e i is i-normal. Since the first i − 1 blocks are identical in P and P , and e i+1 = x, P is the desired schedule, which completes the proof in this case.
Suppose first that exactly two blocks intersect (e i , x), and there exists a job b such that One of the two blocks is of length at least (x − e i )/2. By Observation 2, e i + (x − e i )/2 is inormal. Hence, due to the condition in Case 2, this must be the (i + 1)-st block. However, the schedule with events (e 1 , . . . , e i , e i + e i+2 − e i+1 , e i+2 , . . . , e q ) and partition (ξ 1 , . . . , ξ . . , ξ q−1 ) would satisfy the assumption in Case 1. This allows us to construct the desired schedule P as in Case 1.
Suppose now that exactly two blocks intersect (e i , x) and there exists no job b such that Observe that the corresponding set {a, b, d} ⊆ B in Lemma 6 is of size at least 3. Moreover, since no job completes in (e i , e i+2 ), B contains only independent jobs.
Finally, we consider the case when more than two blocks intersect (e i , x). Thus, the job a does not complete before x. Moreover, no job completes at e i+2 because otherwise either P is not optimal or e i+2 is i-normal by Lemma 10. Since e i+2 < x we get a contradiction in either case. Therefore, there is a job a that starts at e i+2 . Clearly, a does not complete before x. Thus, Lemma 6 for I = [e i , min{x, e i+3 }] again gives a contradiction. Observe that the corresponding set {a, a , d} ⊆ B in Lemma 6 is of size at least 3. Moreover, since no job completes in (e i , e i+3 ), B contains only independent jobs.
Lemma 12 Let P be a maximal schedule. If i = ∞ is the abnormality point of P, then |A i (P)| = 2 and |J (ξ i )| = 3.
Proof Let e and ξ be the events and the partition of P, respectively. By Lemma 11, e i+1 − e i is i-normal. We have |J (ξ i )| > 2 because otherwise by Lemmas 4 and 3, Finally, the following observation shows that the abnormality point of a schedule does not decrease after a certain type of schedule modifications. The observation directly follows from the definition of normality.

Lemma 13
Let P be a schedule and ε = l /2 l for some integers l and l . If P is a schedule that is obtained from P by a sequence of modifications, each modification being a removal of a piece of length that is a multiple of ε from a j-th block and an insertion of this piece into a j -th block, where min{ j, j } ≥ l − 1, then the abnormality point of P is not smaller than that of P.
We close this section with a brief summary of key properties of optimal and maximal schedules obtained in this section.
An optimal schedule is a concatenation of blocks. The structure of any block is as follows. Each non-empty block has a spanning job, and pieces of at most three jobs can be present in a block; if two jobs are present in a block, then both are spanning (cf. Lemmas 4 and 7) while if three jobs are present in a block, then one of them completes in the block (cf. Lemma 7) and it is the only spanning job in this block (cf. Lemma 3). The latter property from Lemma 3 is general-each job that ends in a block is spanning. We also emphasize that interlacing of jobs is not allowed in optimal schedules (see Lemma 5). This observation is heavily used throughout the paper.
Later on in Sect. 4.4 we switch our focus to optimal schedules that are also maximal. Lemma 11 shows that we may assume without loss of generality that, in a maximal schedule with abnormality point i = ∞, the length of block i is i-normal and thus there exists a job a in block i such that the length of a in this block is not i-normal. Then, Lemma 12 says that there must be another job b, different from a, that has its total length in block i not i-normal either. Note that, due to Lemmas 3, 4 and 7, this implies that neither a nor b is spanning in block i, none of them finishes in this block and there must be a third spanning job that finishes in block i.

A-configurations
In this section we first define an undesirable structure that may appear in a schedule; we refer to this structure as an A-configuration. Our proof that there exists a normal optimal schedule for each J , given in Sect. 6, relies on the key assumption that there exists a maximal schedule without Aconfigurations, or A-free maximal schedule, for each set of jobs J . The proof proceeds by contradiction. The abnormality point implies the existence of an alternating chain in a maximal schedule (Sect. 6.1 for definition of alternating chains). In Sect. 6.3, we show that if A-configuration is not present in the part of the schedule that follows the alternating chain, then we are able to extend this chain by adding one more job. Thus we arrive at the required contradiction since this method allows us to extend the alternating chain ad infinitum in the presence of a finite number of jobs.
Therefore, the A-configurations are undesirable and the main goal of this section is to prove that an A-free maximal schedule exists for each J . Our proof is by contradiction: informally speaking, we take a maximal schedule having an A-configuration as early as possible, and, after some schedule transformations, we either obtain a new schedule with smaller total completion time or with an earlier A-configuration. In the former case we clearly obtain a contradiction. In the latter case, a contradiction occurs only if the new schedule is maximal, i.e., its abnormality point is not smaller than that of the initial schedule. For this reason, while performing the initial schedule transformations we must ensure that they do not change the abnormality point in the latter case. The proof works for in-trees, however, it does not for general precedence constraints. The question whether there is an A-free maximal schedule for each J and general precedence constraints remains open.
Let (P, e, ξ ) be a schedule. We say that P has an Aconfiguration of length ( > 0) starting at e j if there exist two jobs a and b such that -C(P, a) = e j and C(P, b) = e j for some j > j; -[e j − , e j ] is a maximal interval where a executes nonpreemptively; b executes non-preemptively in [e j , e j ], and b does not execute in [e j − , e j ]; s(P, b) < e j − ; a and each job in J (ξ j ) ∪ · · · ∪ J (ξ j ) are independent.
We also say that the jobs a and b form the A-configuration. See Fig. 6 for an exemplary A-configuration. If no pair of jobs form an A-configuration in P, then P is called A-free. For any time interval I , if for any x ∈ I ∩ {e i : i = 1, . . . , q} there is no A-configuration at x in P, then P is A-free in I . The main result of this section is the following theorem.
Theorem 2 If any maximal schedule has an abnormality point i = ∞, then there exists an A-free maximal schedule.
We first provide several technical lemmas before presenting our proof of Theorem 2. A schedule P of abnormality point i is said to be A-maximal if it is maximal and, unless i = ∞, one of the following two statements is true: -P is A-free; -any maximal schedule is not A-free, and P has the earliest starting A-configuration among maximal schedules.

Proposition 5 Let P be A-maximal. If a and b form an Aconfiguration in P with C(P, a) < C(P, b), then s(P, a) ≤ s(P, b).
Proof Suppose for a contradiction that s(P, a) > s(P, b).
Then, swapping jobs a and b in P produces, by Lemma 2, a schedule with smaller total completion time than that of P-a contradiction.
The first of the following two lemmas describes a situation that guarantees an A-configuration, while the second a situation that cannot happen in an A-maximal schedule with an A-configuration.
Proposition 6 Given maximal schedule (P, e, ξ ), let e j be an event in P and jobs a, c, c 1 , and d be such that (i) C(P, c 1 ) = e j , C(P, c) = e j+1 , and C(P, d) = e j+2 ; Fig. 7a for an illustration.) Proof Let k < j − 1 be the maximum index such that in block k − 1 job c is non-spanning but spanning in block t for each t ∈ {k, . . . , j − 1}. Note that by (i), (ii) and Lemma 4, k is well defined. We prove, by induction on t ∈ {1, . . . , j −k}, that The resulting schedule is feasible and has smaller total completion time than P. Thus P is not optimal-contradiction. This proves (6). If 0 < ξ k−1 (c) < e k − e k−1 , then by modifying the schedule in block k − 1 we may without loss of generality assume that c resumes at e k . Thus, (6) implies that c and d form an A-configuration of length e j+1 − e k at e j+1 . (P, e, ξ ) be an A-maximal schedule. Suppose that jobs a and b form an A-configuration at e j in P with C(P, a) < C(P, b). Then there exists no e t ≤ s(P, b) such that (see Fig. 7b for an illustration, where it is possible that job c ends at the start of b):  If ε = , then the total completion time of P is strictly smaller than that of P, because a resumes at C(P, a) − in P, i.e., C(P , a) < C(P, a) − . We get a contradiction since P is optimal.

Proposition 7 Let
Otherwise, if ε < , then a and b form an A-configuration in P at C(P, a) − ε. Also, C(P , a) = C(P, a) − ε. Let i be the abnormality point of P. If i ≤ t − 1, then the fact that P and P are the same in [0, e t−1 ], we obtain that the abnormality point of P equals i and P is A-maximal. If i > t − 1, then by (iv), i > j and hence ε is t-normal and, by Lemma 13, P is A-maximal. Therefore, we obtain a contradiction in both cases, which proves the lemma.
The following lemma describes how two jobs that form an A-configuration start in an A-maximal schedule. See Fig. 9 for an illustration of the two possible cases: the two jobs can start at different time points, or at the same time. (P, e, ξ ) such that the earliest A-configuration formed by a and b with C(P, a) < C(P, b) satisfies the following properties: (ii) 0 ≤ j − j ≤ 1, and (iii) e j +1 is an integer.

Proposition 8 Suppose that each A-maximal schedule has an A-configuration. Then, there exists an A-maximal schedule
Proof Let P be A-maximal. Let a and b form the earliest Aconfiguration in P. By Proposition 5, s(P, a) ≤ s(P, b) = e j . Without loss of generality assume that s(P, b) is as late as possible.
Then job a is spanning in block j since otherwise a and b interlace and we get a contradiction by Lemma 5. Moreover, since otherwise, by Lemma 7, it holds J (ξ j ) = {a, b, c} and C(P, c) = e j +1 . The latter implies, by Lemma 3, that job c is spanning in block j , which contradicts that job a is spanning in block j and proves (7). We prove (iii) first. Suppose for a contradiction that e j +1 is not an integer and let h be the greatest integer smaller than e j +1 . Since e j +1 is an event and, by definition of Aconfiguration, none of the jobs a and b ends at e j +1 , (7) implies that some job c starts at e j +1 .
We show that ξ j +1 (b) = 0, which will make our first transformation in (9) feasible. This holds for j + 1 = τ (a), since by definition of A-configuration b / ∈ J (ξ τ (a) ). For j + 1 < τ(a), we have ξ j +1 (b) = 0 or job a is spanning in block j + 1 for otherwise a and b interlace and we get a contradiction by Lemma 5. However, ξ j +1 (b) > 0 and job a is spanning in block j +1, which imply J (ξ j +1 ) = {a, b, c}. Thus, by Lemma 7, some job must finish at e j +1 and since j + 1 < τ(b) < τ(b), this job must be c. By Lemma 3, job c is spanning in block j + 1-a contradiction. Therefore, Since τ (a) > j + 1, we obtain by (7) and definition of A-configuration that no job ends at e j +2 and hence Lemma 7 implies that job c is spanning in block j + 1. Now take ε = min ξ j +1 (c), e j +1 − max{h, e j } and let P be a schedule with events e and partition ξ , where Figure 10a illustrates the transformation from P to P for ε = e j +1 −h, when h > e j . Observe that (8) and ξ j (b) ≥ ε ensure the feasibility of P . Also, by (7) and Lemma 12, we have i = j , where i is the abnormality point of P possibly equal ∞. Clearly, if i < j , then P and P have the same abnormality point i since the two schedules are identical in [0, e j ]. If i > j , then by Lemma 11, ξ j +1 (c) is ( j + 1)normal and Lemma 13 implies the same abnormality point i for both P and P . Finally, the A-maximality of P implies that a and b form an A-configuration in P . Therefore, if h ≤ e j , then P is A-maximal and it can be ensured that s(P , b) > s(P, b), which contradicts our assumption about P. If h > e j , then P is A-maximal and satisfies (iii) as required. To simplify notation we set P := P in the reminder of the proof.
We now prove (i) and (ii). Observe that by (iii), s(P, b) is not an integer and thus ( 1 0 ) for otherwise P would not be optimal-a contradiction. Suppose first that s(P, a) = s(P, b) = e j . If a job a in J (ξ j −1 ) does not complete at e j , i.e., a is preempted at e j , then C(P, a ) > e τ (b) for otherwise, by Lemma 3, at most one of jobs {a, b} can be spanning in block τ (a ) and thus the other job in {a, b} and a would interlace, which contradicts Lemma 5. However, if C(P, a ) > e τ (b) , then job a is spanning in block τ (b) for otherwise a and b interlace, which again contradicts Lemma 5. Thus, |J (ξ τ (b) )| = 2 by Lemma 3. Therefore, a job in J (ξ j −1 ) \ {a } completes at e j . The other conditions of the lemma trivially follow when s(P, a) = s(P, b). Now let s(P, a) = s(P, b). By assumption, s(P, a) < s(P, b). Informally, the proof is divided into two stages. In the first stage we consider block j − 1 and we prove that J (ξ j −1 ) = {a, c} and that τ (c) = j − 1-see Eqs. (11), (12) and (13) and Fig. 10b. In the second stage we prove that a starts at e j −1 . The proof of the latter is done by contradiction, i.e., we suppose that a starts before e j −1 . This assumption implies that P looks as shown in Fig. 10c in the interval [e j −3 , e j +1 ], which allows us to get the desired contradiction thanks to Proposition 6.
First we prove by contradiction that By (10), J (ξ j −1 ) \{a} = ∅. Take any c ∈ J (ξ j −1 ) \{a}. By (7), ξ j (c) = 0. Since job a is non-spanning in block j −1, the conditions (i)-(iv) of Proposition 7 are all satisfied by jobs a and c, and t = j . (Condition (iv) holds as j is not the abnormality point of P by (7) and Lemma 12.) Therefore we get a contradictions, and (11) holds.
Next, we show that If no job completes at e j , then Lemma 7 and (10) immediately imply (12). If some job, say c, completes at e j , then Lemma 3 implies that job c is spanning in block j − 1. Since a completes after e j , a = c. This and (11) imply (12).
Finally to complete the first stage, we prove by contradiction that To that end take ε = min{ξ j −1 (c), ξ j (b)} and let P be a schedule with events e and partition ξ , where Note that which, by (iii), implies that s(P , b) ≥ r (b). Thus, P is feasible and, by assumption, optimal. Also, by (7), (12) and Lemma 12, we have i / ∈ { j −1, j }, where i is the abnormality point of P. Thus, as before, i is the abnormality point of P . Indeed, it follows from the fact that the two schedules are identical in [0, e j ] (which covers the case when i < j ), and from Lemma 13 (that covers the case when i > j ). Moreover, P contains a block that ends at e j +1 and contains the jobs a, b and c, none of which completes at e j +1 -a contradiction with Lemma 7. Therefore, (13) holds, and thus due to Eqs. (11), (12) and (13), the schedule in the interval [e j −1 , e j +1 ] looks like in Fig. 10b.
In the second stage we argue that s(P, a) = e j −1 .
Suppose for a contradiction that this is not the case. By (11), c does not start at e j −1 . Since a does not starts at e j −1 either, there is a job, say c that ends at e j −1 , otherwise e j −1 would not be an event. By Lemma 3, which implies as follows: First we observe that there is no job d = c that completes at e j −1 . Indeed, otherwise Lemma 8 applied to c = d, c , d = c, and e j = e j −1 gives the required contradiction. Now, if c ∈ J (ξ j −2 ), then the conditions (i)-(iv) of Proposition 7 are all satisfied by jobs a, b and c, and t = j − 1-a contradiction. (Condition (iv) holds as neither j − 1 nor j is the abnormality point of P by (7), (12), and Lemma 12.) Therefore, ξ j −2 (c) = 0. Thus, J (ξ j −2 ) ⊆ {a, c }, because if a job different than a and c that does not complete at e j −1 is present in J (ξ j −2 ) then, by (12) and (13), this job interlaces with c that contradicts Lemma 5. This implies (16) as required.
If job c is non-spanning in block j − 3, then by (12), (16) and C(P, c ) = e j −1 , s(P, c ) < e j −2 , which implies that c and c form an A-configuration of length e j −1 − e j −2 at e j −1 , which leads to a contradiction with A-maximality of P. Thus we have We prove that i.e., we prove that P in the interval [e j −3 , e j +1 ] is as shown in Fig. 10c. First, we have ξ j −3 (c 1 ) > 0 for some c 1 / ∈ {a, c, c }. Otherwise J (ξ j −3 ) ⊆ {a, c, c }, and since e j −2 is an event, s(P, a) = e j −2 . Then, however, conditions (i)-(iv) of Proposition 7 are all satisfied by jobs a, b, c, and t = j − 2-a contradiction (observe that h − s(P, a) < 1, thus (i) is satisfied; condition (iv) holds as none of j − 2, j −1, j is the abnormality point of P by (7), (12), (15), (16), and Lemma 12). Second, each such c 1 completes at e j −2 for otherwise, by (12), (16) and (17), c 1 and c interlacea contradiction by Lemma 5. Thus, by Lemma 3, job c 1 is spanning in block j − 3. This, and (17) imply (18). Thus, P looks in the interval [e j −3 , e j +1 ] as shown in Fig. 10c. Finally, by Proposition 6 applied to c = c , c 1 , d = c, a, and e j = e j −2 , we obtain that c and c form an A-configuration at e j −1 . Thus, again, we get a contradiction since P is Amaximal. Hence, (14) holds. Therefore the lemma follows by (7), (12), and (14).
Suppose that jobs a and b form an A-configuration in P with C(P, a) < C(P, b). For ε ≥ 0, we define an operation of ε-exchanging a and b in an interval [e k , C(P, b)], k < τ(b), as follows. First, all pieces of a and b are removed from the blocks k, . . . , τ (b). Note that the total length of all removed pieces of a and b is respectively. Then, the empty gaps are filled out with the total length τ (b) t=k ξ t (a) − ε of a and the total length of τ (b) t=k ξ t (b) + ε of b in such a way that b completes as early as possible. Note that the new schedule is feasible only if ε = 0. Whenever the transformation of ε-exchanging will be used with ε > 0, then some other appropriate changes in the schedule will be made to ensure feasibility.
For ε > 0, we extend the operation of ε-exchanging of two jobs to sub-chains as follows. Let A = (a 1 , . . . , a l = a) and B = (b 1 , . . . , b l = b) be two sub-chains in P that start at t, and such that a and b form an A-configuration in P, where s(P, a) ≤ s(P, b). (Note that we either have l = l or l = l − 1.) Let d be any job that executes in [t − ε, t]. The operation of (ε, d)-exchanging of A and B in P leads to a schedule P obtained by making the following changes to P: in P , where take t 1 = t, t j = s(P, a j ) for j ∈ {2, . . . , l} and t l+1 = e j +1 such that e j = s(P, b); -For each j ∈ {1, . . . , l }, b j is executed in [u j +ε, u j+1 + ε] in P , where take u 1 = t, u j = s(P, b j ) for j ∈ {2, . . . , l } and u l +1 = e j +1 ; -A piece of d executing in [t − ε, t] is placed in [t, t + ε] in P (the "room" for this job is made by postponing b 1 ); -In the interval [e j +1 , C(P, b)] ε-exchanging of a and b is made.
The transformation is illustrated in Fig. 11 for d = b 1 . Note that in this particular case the total completion times of P and P are equal.
The new schedule P is feasible under certain conditions. First, the value of ε must be selected in such a way that εexchanging of a and b is possible in the above-mentioned interval. Second, d should not be a predecessor of a 1 . Also, the release dates of jobs a 1 , . . . , a l need to be respected and a 1 must be non-preemptively executed in [t, t + ε]. We summarize those conditions in the following lemma. (a 1 , . . . , a l = a) and (b 1 , . . . , b l = b), starting at t, be two sub-chains in P such that a and b form an A-configuration of length in P. If ε ≤ , r(a 1 ) ≤ t − ε and r (a j ) ≤ s(P, a j ) − ε for each j ∈ {2, . . . , l}, a 1 executes non-preemptively in [t, t + ε], and some job d that is not a predecessor of a 1 executes non-preemptively in [t − ε, t], then the schedule P obtained by (ε, d)-exchanging of the two sub-chains in P is feasible.

Proof of Theorem 2
Let (P, e, ξ ) be a maximal schedule that satisfies the properties in Proposition 8. Let (a 1 , . . . , a l = a) be the chain in P that starts at t a and let (b 1 , . . . , b l = b) be the chain in P that starts at t b . By definition of chains and Proposition 8 we have Case 1 t a ≥ t b .
In this case we perform a transformation shown in Fig. 12 as described below. By Proposition 8, there exists an integer h such that both jobs a and b execute non-preemptively in  a), h] and [s (P, b), h], respectively. We have e p = t a for some event e p .
Let e j = s(P, b). By Proposition 8, h − e j = ξ j (b). Let be the length of the A-configuration formed by a and b. Clearly C(P, a) − > h by definition of A-configuration and Proposition 8.
Let A = (a 1 , . . . , a l ) and let B be the sub-chain of the chain (b 1 , . . . , b l = b) that starts at t a with a job b and ends with the job b. By definition of t a , ξ p−1 (a 1 ) < e p − e p−1 .
where h is the greatest integer smaller than t a and when l = 1, (C(P, a 1 ) − e p )/2, when l > 1 and C(P, d) = t a , C(P, a 1 ) − e p , otherwise.
The latter ensures that d, if it completes at t a in P, does not complete after s(P , a 2 ) in P . Note that, by definition of t a , no predecessor of a 1 ends at t a and ξ p−1 (a 1 ) < e p − e p−1 . Hence, in particular, ε > 0. Let P be the schedule obtained by (ε, d)-exchanging of A and B in P. By Proposition 9, P is feasible. If ε = , then the total completion time of P is strictly smaller than that of P and we get a contradiction since P is optimal. Thus, consider ε < . Then, the total completion time of P does not exceed that of P. To see that we observe that by (19) and (20) we have s(P, b) − t a < l. Also, if two jobs in J (ξ p−1 ) \ {a 1 } complete at t a , then either at least one of them is a predecessor of b , which implies that s(P, b ) = t a , or otherwise we obtain from Lemma 8 that s(P, b ) = t a . Therefore, no more than l jobs in {d, b 1 , . . . , b l } complete in [t a , h] in P. Thus, no more than l jobs get delayed by ε each as a result of the exchange, however, each job in the chain (a 1 , . . . , a l = a) completes by ε earlier at the same time.
Finally, we show that P and P have the same abnormality point. Clearly, this holds if i < p−1. Also, if i > j , then ε is p-normal. To see this we observe that e p , e p−1 , ξ p−1 (a 1 ) and t a are clearly all p-normal. By Lemma 10, C(P, a 1 )−t a is pnormal. Also e j = t a +(C(P, b )−t a )+k −2, where k is the number of jobs in B, is p-normal. If l = 1, then s(P, a) and h are p-normal, which implies p-normality of y. For l > 1, we argue that y is also p-normal and for that we need only consider y = (C(P, a 1 )−e p )/2. Then, b is not present in the ( p − 1)-st block for otherwise b would be selected as d. The length of ( p −1)-st block, e p −e p−1 , is by definition ( p −1)normal. By Lemma 3, ξ p−1 (d) = e p − e p−1 . By Lemma 5, each job in J (ξ p−1 ) \ {a 1 } must complete at e p . This proves, again by Lemma 3, that |J (ξ p−1 )| = 2. By Lemma 10, ξ p−1 (a 1 )+ξ p (a 1 )+ξ p+1 (a 1 ) = ξ p−1 (a 1 )+C(P, a 1 )−t a is ( p − 1)-normal. Since ξ p−1 (a 1 ) ∈ {0, e p − e p−1 }, we obtain that ξ p−1 (a 1 ) is ( p − 1)-normal. Thus, (C(P, a 1 ) − t a )/2 is p-normal as required. Therefore, ε is p-normal and, by Lemma 13, P and P have the same abnormality point for i > j . Also, by Proposition 8, and chain definition, we have |J (ξ k )| = 2 for each k ∈ {p, . . . ,j }. Thus,by Lemma 12,i / ∈ {p,. . . ,j }. Finally, consider i = p − 1. Then, if i is no longer the abnormality point i of P , then i > i-a contradiction since P is A-maximal. Therefore, i is the abnormality point of P , and hence we proved that P and P have the same abnormality point. To complete the case proof we note that a and b form an A-configuration in P at C(P , a) = C(P, a) − ε, which contradicts the Amaximality of P.
Case 2 t a < t b . We first define t a = max t < t b t = t a or t ∈ {s(P, a 1 ), . . . , s(P, a l )} and a to be the job from the chain (a 1 , . . . , a l ) that starts or resumes at t a . By (19)-(22), it holds a = a l−l +1 or a = a l−l +2 , and only one job, namely a , from the chain  (a 1 , . . . , a l ) is executed in (t a , t b ). By definition t a < t b , also we have t a = e p for some event e p .
We first prove that exactly one job that is not in the chain (a 1 , . . . , a l t b ] and completes at t b . Indeed, if l = 1, then this follows from Proposition 8. If l > 1, then any job not in the chain (a 1 , . . . , a l , otherwise this job interlaces with b 1 -a contradiction with Lemma 5. Finally, we show that two or more jobs not in the chain (a 1 , . . . , a l If there are at least three such jobs, then the last two of them form an A-configuration, which contradicts the A-maximality of P. For exactly two, c and c completing in this order, by Claim 1, c and c form an A-configuration at e p+1 -a contradiction since P is A-maximal. Also, observe that for l = l + 1, job b 1 resumes at t b and thus b 1 and d form an A-configuration at e p+1 by Claim 1-a contradiction since P is A-maximal. Thus, let l ≥ l in the reminder of the lemma. Now we prove that our schedule P satisfies the following claim that we have used above (see Fig. 13a for illustration of Claim 1): Claim 1 Suppose that t a = e p is an event in P and that there exist jobs a , c, and d such that

Then jobs c and d form an A-configuration at e p+1 .
Proof If ξ p−1 (c) < e p − e p−1 , then the jobs c and d form an A-configuration of length e p+1 − e p at e p+1 -the lemma holds. Thus, We now prove that in interval [e p−1 , e p+2 ] the schedule P is as in Fig. 13, i.e., there exists a job c 1 such that First, we show that ξ p−1 (c 1 ) > 0 for some c 1 / ∈ {a , c, d}. Otherwise, by (23) and (ii), s(P, a ) = e p since e p is an event. Thus, J (ξ p−1 ) = {c, d}. Now, take where h is the greatest integer smaller than t a . Observe that ε > 0. Let A = (a 1 , . . . , a l ) and let B = (d, b 1 , . . . , b l = b) be the sub-chain that starts at e p+1 . Perform the (ε, d)exchanging of A and B in P as in Case 1 (the completion time of c does not change in this transformation when d = b 1 because a from the τ (a )-th block is placed in the ( p − 1)-st block and d from ( p − 1)-st block is placed in the (τ (d) + 1)st block) to get a contradiction. Observe that, by (iv), d = b 1 for l = l + 1 and thus the (ε, d)-exchanging of A and B indeed produces schedule P with total completion time that does not exceed that of schedule P. Also, by Lemma 4, there is no idle time in the ( p − 1)-st block of P. This implies, by Lemma 10, that ξ p−1 (d) = e p − e p−1 is ( p − 1)-normal, which by arguments in Case 1 implies that the abnormality points of P and P are the same.
Second, by Lemma 5, c 1 and d cannot interlace, which implies C(P, c 1 ) = e p . By Lemma 3, job c 1 is spanning in block p − 1. Thus, by (23) we have {c 1 , c} = J (ξ p−1 ). Finally, s(P, d) < e p−1 is due to (iii) and J (ξ p−1 ) = {c 1 , c}. This completes the proof of (24). Equation (24) allows us to apply Proposition 6 to c, c 1 , d, a = a , and e j = e p to conclude that c and d form an A-configuration at e p+1 . This contradicts the A-maximality of P and completes the proof of Claim 1.
Let e j = s(P, b). Now, let y = t≥ p ξ t (b 1 ) and z = t≥ p ξ t (a l−l +1 ). First we prove that z ≤ y. This holds due to Proposition 8 when l = 1 and hence let l ≥ l > 1. If z > y, then swap a and b and then do the (ε, a l−l +1 )exchanging of (b 1 , . . . , b l ) and (a l−l +1 , . . . , a l ) (note the order of the chain, which is important) both starting at t b , where ε = s(P, b) − s(P, a) + λ and 0 < λ < min{ , z − y, ξ j (b)}. This transformation is shown in Fig. 14a. Let the resulting schedule be P . The swapping increases the total completion time by s(P, b) − s(P, a) and the (ε, a l−l +1 )exchanging decreases it by ((l − 1) − l )ε-observe that after the swapping of a and b the completion time of job a = a l does not change in the exchange. Therefore, the overall change equals −λ and thus to get a contradiction it suffices to prove that P is feasible.
Observe that s(P, b) − s(P, a) = C(P, b 1 ) − C(P,) a l−l +1 . By Proposition 8, e j +1 is an integer. Thus, r (b) < e j +1 implies r (b) ≤ e j +1 − 1. Moreover, s(P , b) ≥ e j +1 − 1. Therefore, by the definition of a sub-chain, all jobs b 2 , . . . , b l respect their release dates in P . Since z > y, we have that s(P, b 1 ) < t a and hence b 1 respects its release date in P . Thus, z ≤ y for the reminder of the proof. We consider the following three subcases. Case 2a t a = s(P, a l−l +1 ). (Schedule transformation performed in this case is shown in Fig. 14b.) Then, z = 1. Since z ≤ y, we have y = 1. If some job in J (ξ p−1 ) does not complete at t a , then this case reduces to Case 1. Otherwise, two jobs in J (ξ p−1 ) complete at t a . Thus, by Lemma 7, for at least one job in J (ξ p−1 ), say job c , we have ξ t (c ) = 0, where e t = s(P, d). Therefore, c and d interlace if s(P, c ) < s(P, d)-a contradiction by Lemma 5, or we can swap jobs c and d if s(P, c ) > s(P, d). In the latter case the resulting schedule (see Fig. 14b) reduces the total completion time of P by Lemma 2. This schedule is not feasible when c ≺ a l−l +1 and we restore feasibility by applying a 0-exchanging of b and a in [e j +1 , C(P, b)] followed by (t b − t a , a l−l +1 )-exchanging of (b 1 , . . . , b l ) and (a l−l +1 , . . . , a l ) both starting at t b . The new schedule P is feasible since c ⊀ b 1 for in-trees, and since, by Proposition 8, s(P , b) ≥ e j +1 − 1 ≥ r (b), which shows that all b 1 , . . . , b l respect their release dates in P . Thus, we get a contradiction since P is optimal. Case 2b t a = s(P, a l−l +2 ). Since l ≥ l , ξ p−1 (a l−l +1 ) = e p −e p−1 . Also, t a < t b implies that b 1 resumes at t b = e p+1 . Thus, by Claim 1, d and b 1 form an A-configuration at e p+1 , which contradicts the A-maximality of P. Case 2c t a = s(P, a l−l +1 ) and t a = s(P, a l−l +2 ). By definition of t a , we have t a = t a and a 1 resumes at t a . Since t a is an event of P some job, say c, completes at e p . By Lemma 3, job c is spanning in block p − 1. If another job completes at e p , then we get a contradiction by Lemma 8. Hence, by Lemma 5, J (ξ p−1 ) ⊆ {c, d, b 1 , a 1 }. Note that z ≤ y, l ≥ l and t a < t b imply that l = l. By definition of t a , job a 1 is non-spanning in block p −1. By Lemma 5, d and b 1 do not interlace, which implies ξ p−1 (b 1 ) = 0. Therefore, ξ p−1 (d) > 0. This allows us to obtain a contradiction by performing an analogous transformation as in Claim 1.
Observe that for the proof of Theorem 2 it is crucial to show that P and P have the same abnormality point. This needs to be proven in Case 1, Claim 1, 5 and 5. In 5 and 5 the proof reduces to the proof for Case 1 and Claim 1. In Claim 1 the proof also reduces to the proof for Case 1 but the ξ p−1 (d) is new in definition of ε as compared to Case 1 so we provide an appropriate comment about this ξ p−1 (d) in Claim 1. Finally, in Case 1 we explicitly prove that P and P have the same abnormality point.

Alternating chains
In this section we prove that there always exists an optimal normal schedule for P2| pmtn, in-tree, r j , p j | C j . Our proof is by contradiction. We show that an abnormality point i = ∞ in a maximal schedule implies that there is an alternating chain, see Sect. 6.1 for its definition, in the schedule. Each job in that chain completes at the moment which is not i-normal. This fact allows us to either make the alternating chain longer, which is shown in Sect. 6.3, or find an optimal schedule with an abnormality point higher than i. Thus in either case we get a contradiction, in the former, since the number of jobs is finite and we cannot extend the chain ad infinitum, in the latter since the initial schedule is maximal.

Basic definitions and properties
Given schedule (P, e, ξ ), let I = { j, . . . , j } ⊆ {1, . . . , q − 1}. For two jobs a and a , We say that a covers a in I if for each t ∈ I , ξ t (a ) > 0 implies ξ t (a) = e t+1 − e t . Let P be a maximal schedule of abnormality point i = ∞. Job sequence (d 1 , . . . , d l ) is called an alternating chain in P if d 1 ∈ A i (P) and d 1 executes non-preemptively in [e i+1 , C(P, d 1 )] and additionally, unless if l = 1, the following conditions are satisfied: If then (d 1 , . . . , d l ) is said to be almost alternating.
The following lemma excludes almost alternating chains from maximal schedules. The lemma does not require that the maximal schedules are A-free.

Lemma 14
Let P be a maximal schedule of abnormality point i = ∞. There exists no almost alternating chain in P.
Proof Suppose for a contradiction that (d 1 , . . . , d l ) is an alternating chain with C(P, d l−1 ) = C(P, d l ). Let first l > 3 and let U be the set of odd indices in {3, . . . , l}. Denote by ξ the partition of P. We fist prove that the total length of d 2 executed in [C(P, d 1 ), C(P, d l )], namely ξ i+2 (d 2 ), is i-normal. From the definition of alternating chain we know that there is no idle time in this interval and only the jobs from the chain execute in it. Hence, This implies, by Lemmas 10 and 11, that the three following numbers are i-normal: . Therefore, ξ i (d 1 ) and ξ i (d 2 ) are (i + 1)-normal, and since e i+1 is i-normal due to Lemma 3, i is not the abnormality point of P-a contradiction. Now consider l = 2. Let e be the events of P. Denote x = ξ i+1 (d 1 ) = ξ i+1 (d 2 ). By assumption and by definition of alternating chain, d 1 and d 2 complete at e i+2 and hence ξ i (d 1 ) + x = s 1 /2 i and ξ i (d 2 ) + x = s 2 /2 i for some integers s 1 and s 2 . By definition of alternating chain, A i (P) = {d 1 , d 2 } and hence x is not (i + 1)-normal. Thus, x = s /2 i+1 + ε for some 0 < ε < 1/2 i+1 . Then, Thus, 2ε is i-normal, which implies that ε is (i + 1)normal-a contradiction with 0 < ε < 1/2 i+1 .
For j > 2, if j is even (respectively, odd), then let U be the set of even (respectively, odd) integers in {1, . . . , j − 1}. Let u = 1 if j is odd and let u = 2 if j is even. Then, Again, by Lemma 10, ξ i (d u ) is the only term in the above expression that is not (i + 1)-normal. Thus, C(P, d j ) is not (i + 1)-normal.

Transformations using alternating chains
Consider a schedule P of abnormality point i and an alternating chain (d 1 , . . . , d l ) (l > 1) and J (ξ τ (d l ) ) = {x, y, d l }. Let u = 2 if l is odd, and u = 1 if l is even. Let ε > 0 be the largest ε such that where U is the set of the indices in {1, . . . , l} having the same parity as l, and We define a transformation of ε-pushing of d l that produces a schedule P as follows (see Fig. 15 In this way we ensure that each job d j , j ∈ U , completes ε earlier in P than in P. -For each j ∈ {3, . . . , l} \ U , the part of d j that executes in [C(P, d j−2 ), C(P, d j )] in P is executed in [C(P, d j−2 ) + ε, C(P, d j ) + ε] in P . In this way we ensure that each job d j , j / ∈ U , completes ε later in P than in P. +ε ... The transformation of ε-pushing of d l will be a key transformation used to extend an alternating chain of a maximal schedule P in the proof of Theorem 3-the main result of the next section. The extension, as alluded earlier, requires that P is A-free. Actually, it suffices that P is A-free in the interval that starts with the completion of d l , the last job of the chain. However, since the ε-pushing of d l may change P itself we need to prove that the resulting schedule is A-free in the interval that starts with the completion of d l , which the transformation may have changed, in order to unable further extensions of the chain. Thus, we need the following lemma.

Lemma 16
Suppose that (d 1 , . . . , d l ) (where l > 1) is an alternating chain in a maximal schedule P that is A-free in [C(P, d l ), ∞), and J (ξ τ (d l ) ) = {x, y, d l }. If ε is selected as in (25) and (26), then the schedule P obtained from P by ε-pushing of d l is maximal, A-free in [C(P , d l ), ∞), and (d 1 , . . . , d l ) is an alternating chain in P .
Proof An ε-pushing of d l results in a feasible schedule P (note that at most one of d 1 and d 2 can have release date in [e i , e i+1 ]) with the total completion time not exceeding that of P. Thus, P is optimal. Note that an odd l would results in P having smaller total completion time than that of P. Thus, l is even. If the ε makes at least one of the tree inequalities in (25) an equality, then the i-th block becomes i-normal and we get a contradiction in case of a maximal P. On the other hand, if an ε makes all three inequalities in (25) holding strict, then (d 1 , . . . , d l ), l > 1, is an alternating chain in P .
We prove, by contradiction, that the schedule P is A-free in [C(P , d l ), ∞). Suppose that some jobs a and b form an A-configuration at a point t ≥ C(P , d l ) in P . Note that t ≥ C(P, d l ) is not possible because P and P are identical from C(P, d l ) on and P is A-free in [C(P, d l ), ∞) by assumption. Thus, t = C(P , d l ). Therefore, a = d l and b ∈ {x, y}.
Let λ ∈ [0, C(P , b) − C(P , d l )] be a maximal real number such that for each ε ∈ [0, λ) there exists a feasible schedule P ε such that (d 1 , . . . , d l ) is an alternating chain in P ε and ε -pushing of d l in P ε results in P. Since l is even, the total completion time of P ε is the same as the total completion time of P for each ε ∈ [0, λ). Informally speaking, P ε is obtained by performing a modification that is 'opposite' to pushing of d l . By definition of A-configuration, d l is independent of any job that executes in the interval (C(P , d l ), C(P , b)) in P . Thus, the maximality of λ implies that taking ε = λ would result in a schedule P ε in which one of the following holds: -Job sequence (d 1 , . . . , d l ) is not an alternating chain in P ε . Then we have two possibilities. The first possibility is that t = C(P ε , d j ) = C(P ε , d j+1 ) for some j ∈ {1, . . . ,(d 1 ,. . . ,d j+1 ) is an almost alternating chain-a contradiction with Lemma 14. The second possibility is that either d 1 or d 2 is not present in the i-th block of P ε . Then, the abnormality point of P ε is greater than i-a contradiction with the maximality of P. -C(P ε , d l ) = C(P, b). This would imply that C(P ε , b)< C(P, b) and this is not possible due to the optimality of P. . . , l − 1}. In this case a contradiction follows from Lemma 15.
again obtain a contradiction with Lemma 15.
Therefore, the lemma is proved.
Finally, we observe that the ε-pushing of d l can readily be extended to the case where one of the jobs x or y starts in (C(P, d l−1 ), C(P, d l )) but neither of them completes in that interval.

Extending an alternating chain
We first prove that a single-job alternating chain is present in each maximal (and thus in A-maximal) schedule of abnormality point i = ∞.

Proposition 10
If P is a maximal schedule of abnormality point i = ∞, then a job in A i (P) with minimum completion time forms an alternating chain in P.
We prove the lemma by contradiction. More precisely, the assumption that b does not form an alternating chain in P allows us to conclude that P is not maximal. We may assume without loss of generality that c covers b in I . Indeed, if this is not the case, then we transform P as follows. Let t ∈ I be such that ξ t (b) > 0 and job c is non-spanning in block t. Take ε = min{ξ t (b), ξ i (c), e t+1 − e t − ξ t (c)}. Note that ε > 0 and, by Lemmas 4 and 7, has the same total completion time and the same events as P and either: ξ i (b) = e i+1 − e i (which happens when ε = ξ i (c)); or ξ t (b) = 0 (which happens when ε = ξ t (b)); or ξ t (c) = e t+1 − e t (which happens when ε = e t+1 − e t − ξ t (c)). In the former case we would obtain a schedule with abnormality point greater than i, which is not possible due to the maximality of P. After repeating this transformation as long as c does not cover b in I we obtain the desired schedule. Now we prove that τ (b) = i + 1. Suppose for a contradiction that τ (b) > i + 1. Thus, since c covers b in I , and e τ (b) is an event of P, we have ξ τ (b)−1 (b) = ξ τ (b)−1 (c) = 0 and there exists a ∈ J \ {b, c} such that C(P, a) = e τ (b) . Find the maximum j, j < τ(b)−1, such that ξ j (b) = 0. Note that j ≥ i. Since job c covers b in I , c is spanning in block j. By Lemma 7, a / ∈ J (ξ j ). Lemma 9 applied to a = b, a = a, j and j = τ (b) gives τ (b) > j = τ (b)-a contradiction. This proves that (b) is an alternating chain in P.

Proposition 11
Let (d 1 , . . . , d l ) be an alternating chain in a maximal schedule P. Then, there is no idle time in block τ (d l−1 ) + 1 of P.
Proof Let e be the q events of P and let ξ be its partition. Let i be the abnormality point of P. Since P has an alternating chain, i = ∞. Suppose for a contradiction that there is idle time in the (τ (d l−1 ) + 1)-st block of P. By Lemma 3, at most one job completes in the (τ (d l−1 )+1)-st block of P. By Lemma 4, no job that does not complete in the (τ (d l−1 ) + 1)st block can be present in this block. Thus, d l is the only job in block (τ (d l−1 ) + 1) and the total length of the idle time is x = e τ (d l−1 )+2 − e τ (d l−1 )+1 . Construct a schedule P by performing an ε-pushing of d l in P with ε = min {α, β, γ , x/2} . Denote the resulting schedule by P . To complete the proof we observe that C(P , d j ) = r (a) for some job a and some j ∈ {3, . . . , l} (when ε = γ ) or C(P , d j−1 ) = C(P , d j ) for some j ∈ {2, . . . , l} (when ε ∈ {β, x/2}) or there is no d j in the i-th block of P for some j ∈ {1, 2} (when ε = α). Therefore, the choice of ε always results in P that has all blocks j, j ∈ {1, . . . , i}, being j-normal-a contradiction with the lemma assumption that P is maximal.
The next theorem states that if a maximal schedule P with an alternating chain (d 1 , . . . , d l ) has no A-configuration at t ≥ C(P, d l−1 ), then there exists another maximal schedule P with longer alternating chain (d 1 , . . . , d l , d l+1 ) with no A-configuration at t ≥ C(P , d l ).
Theorem 3 Let P be a maximal schedule of abnormality point i = ∞. If (d 1 , . . . , d l ), l ≥ 1, is an alternating chain in P and P is A-free in [C(P, d l−1 ), ∞), where C(P, d 0 ) is the (i + 1)-st event of P, then there exists a job d l+1 such that (d 1 , . . . , d l , d l+1 ) is an alternating chain in some maximal schedule P that is A-free in [C(P , d l ), ∞).
We leave the proof of the theorem to the end of the section. Theorem 2 guarantees that a maximal A-free schedule exists for in-trees. If this schedule is not normal, then we have a single-job alternating chain in it by Proposition 10. Theorem 3 guarantees that the alternating chain can be always extended by one job. However, the process of extending the alternating chain may result in a schedule which is not A-free in general-the source of this lies in Lemma 16. Luckily, we do not need the resulting schedule to be A-free-it suffices that it has no A-configuration at a completion of d l , the last job from the alternating chain, or later-see the assumptions of Theorem 3. The above gives a sketch of the proof of the following theorem.
Theorem 4 There exists a normal optimal schedule for each instance of problem P2| pmtn, in-tree, r j , p j | C j .
Proof Take a maximal schedule P and suppose for a contradiction that P is not normal. Let i = ∞ be its abnormality point. By Proposition 10, A i (P) = {d 1 , d 2 }, and (d 1 ) is an alternating chain in P. Next, by Theorem 2, there is a maximal schedule P 1 with its abnormality point i and alternating chain (d 1 ) which is also A-free. Thus, in particular, P 1 is Afree in [x, ∞), where x is the (i + 1)-st event of P 1 . Finally, by Theorem 3 and a simple inductive argument, there exists a schedule P n+1 with an alternating chain of l = n + 1 jobs, contradicting the fact that the number of jobs equals n.
Corollary 1 For the given set of n jobs, there exists an optimal schedule for P2| pmtn, in-tree, r j , p j | C j such that each job start, preemption, resumption, or completion occurs at a time point that is a multiple of 1/2 2n .
We will perform several schedule modifications leading to some maximal schedule P that is A-free in [C(P , d l ), ∞) and has an alternating chain (d 1 , . . . , d l+1 ). We point out that some steps of the proof redefine the job d l+1 selected above. By assumption, d 1 ∈ A i (P), and by the choice of d 2 , d 2 ∈ A i (P). Thus, (C1) follows for (d 1 , . . . , d l+1 ).
We now prove that Note that if l = 1, then (27) follows from Proposition 10 and from the choice of d 1 and d 2 . Thus, l ≥ 2 from now on.
We begin by proving, by contradiction, that d l+1 executes non-preemptively in [C(P, d l−1 ), C(P, d l )]. First, we observe that no job, except for d l , completes in the interval (C(P, d l−1 ), C(P, d l )] for otherwise job d l+1 must complete in (C(P, d l−1 ), C(P, d l )] and thus jobs d l−1 and d l+1 form an A-configuration in P-a contradiction since P is A-free in [C(P, d l−1 ), ∞).
Second, |J \{d l , d l+1 }| ≤ 1, where J is the set of jobs executed in (C(P, d l−1 ), C(P, d l )]. Otherwise, there is a pair of jobs in {x, y, d l }, where {x, y} ⊆ J \ {d l , d l+1 }, that interlace-contradiction by Lemma 5 and by the fact that d l is preempted in (C(P, d l−1 ), C(P, d l )]. Indeed, this pair of job consists of a job z ∈ {x, y, d l } with minimum completion time among those three jobs, and a job in {x, y, d l } \ {z} that is non-spanning in block τ (z).
Finally, we show that without loss of generality results in a schedule P that either has all blocks j, j ∈ {1, . . . , i}, being j-normal (this happens when ε ∈ {α, β, γ })-a contradiction with the lemma assumption that P is maximal; or it has d l and d l+1 as the only two   . . , d l+1 ) in P.
We argue that there is no idle time in the (τ (d l ) + 1)-st block of P. Our argument is by contradiction. If there is idle time in the block, then by (27), d l+1 is the only job there. Thus, d l+1 completes at e τ (d l )+2 or there is a release date pinned job a that starts at e τ (d l )+2 , i.e., r (a) = e τ (d l ) +2 . In the former case we have an alternating chain (d 1 , . . . , d l+1 ) with idle time in block τ (d l ) + 1 which contradicts Proposition 11 and completes the proof. In the latter case we use an extended ε-pushing of d l+1 (the operation of the ε-pushing can be generalized in a straightforward way to the case when d l+1 is preempted in interval [C(P, d l ), C(P, d l+1 )], see also Fig. 16b-we omit a formal definition of the extended pushing) with which results in a schedule P that has all blocks j, j ∈ {1, . . . , i}, being j-normal-a contradiction with the lemma assumption that P is maximal. (See Fig. 16b for an illustration of this schedule transformation when ε = r (a) − C(P, d l ).) Therefore, without loss of generality we may assume there is no idle time block τ (d l ) + 1, and thus some job a = d l+1 starts or resumes at e τ (d l ) +1 .
We next describe a finite iterative process that starts with P, produces a schedule P u in its u-th iteration, u ≥ 1, and stops after T ≥ 1 iterations. We then show that if T = 1, Fig. 17 The transformation from P u−1 to P u then the schedule P 1 satisfies the conditions of the lemma. However, if T > 1, then we prove that there is a pair of jobs x and y that allows the iterative process to construct maximal schedules P 1 , ..., P T −1 each with alternating chain (d 1 , . . . , d l ), yet at the same time the pair prevents d l+1 from satisfying (C3) in P 1 , …, P T −1 . However, an exit after T > 1 iterations is only possible through a schedule P T such that the total completion time of P T is smaller than that of P or both schedules have the same total completion times but the abnormality point of P T is greater than i, which contradicts the maximality of P. Therefore the iterative process must exit after exactly one iteration producing the desired schedule P 1 -more than one iteration leads to a contradiction. In order to describe the iterative process formally, we introduce a key definition and related notation. We say that a schedule (P u , ξ u , e u ) with τ u = τ P u is d l+1 -preempted if there exists a pair of jobs x and y such that the following conditions are satisfied: (I1) P u is maximal, (d 1 , . . . , d l ) is an alternating chain in P u , i is the abnormality point of P u , and d l and d l+1 are the only two jobs executed in [C(P u , d l−1 ), C(P u , d l )], and C(P u , d l+1 ) > C(P u , d l ); (I2) Some job a u starts or resumes at C(P u , d l ); (I3) d l+1 covers each job in {a 1 , . . . , a u In the following we prove that all schedules P 1 , . . . , P T −1 are d l+1 -preempted when T > 1. Let initially u = 1, and the iterative process is as follows. (P 0 refers to P.) Step 1: Moving a u−1 from block τ u−1 (d l ) + 1 to block k u−1 .
If u = 1, then let P u = P and go to Step 2. If u > 1, then we construct P u by an extended ε-pushing of d l+1 in P u−1 and moving a piece of a u−1 of length ε from block Denote by e and ξ the events and the partition of P u , respectively. Let for brevity τ P u = τ . Figure 17 depicts the transition from P u−1 to P u for u > 1. Note that P u and P u−1 have the same total completion times.
If ε ∈ {α, β, γ , C(P u , d l ) − C(P u , d l )}, then the abnormality point of P u is greater than i and, having the required contradiction, we stop the iterative process with T = u.
For the two remaining values we have that the number of blocks in [C(P u , d l ), C(P u , d l+1 )] in P u is one less than the number of blocks in [C(P u−1 , d l ), C(P u−1 , d l+1 )] in P u−1 . (We give an appropriate argument at the end of the proof of the lemma.) Also, if ε = e u−1 k u−1 +1 − e u−1 k u−1 − ξ u−1 k u−1 (a u−1 ), then the total completion time of P u is smaller than the total completion time of P u−1 provided that (ξ u−1 k u−1 (a u−1 ) = 0 and ξ u−1 k u−1 −1 (d l+1 ) < e u−1 k u−1 − e u−1 k u−1 −1 ) because d l+1 completes in P u strictly prior to e τ u (d l+1 ) = C(P u , d l+1 )−ε. Then, we stop the iterative process with T = u. Otherwise, set a u := a u−1 and go to Step 2.
If ε = ξ u−1 τ u−1 (d l )+1 (a u−1 ), then there is a job a u that starts or resumes at C(P u , d l ). Go to Step 2.
Step 2: Making d l+1 cover a u .
Denote for brevity τ = τ P u and let e and ξ be the events and the partition of P u , respectively. If d l+1 covers a u in . . , min{τ (d l+1 ), τ (a u )}}, then set P u = P u and go to Step 3. Otherwise we obtain P u from P u as follows. Find t ∈ I u such that ξ t (a u ) > 0 and ξ t (d l+1 ) < e t+1 − e t . By Lemma 5, t < τ (a u ), and by (e τ (d l )+1 − e τ (d l ) )/2 − ξ τ (d l ) (a u ) .
If d l+1 does not cover a u in I u and ε > 0, then repeat Step 2 for P u . Thus, either in the resulting schedule P u , d l+1 covers a u in I u , in which case go to Step 3, or d l+1 does not cover a u in I u and ε = 0 (then ξ u τ u (d l ) (a u ) = ξ u τ u (d l ) (d l+1 ) or e u τ u (d l )+1 = r (a u )), in which case the abnormality point of P u is greater than i and, having the required contradiction, we stop the iterative process with T = u.
Step 3: Pushing a u out of [C(P u , d l−1 ), C(P u , d l )]. If a part of a u executes in [C(P u , d l−1 ), C(P u , d l )] in P u , then perform an ε -pushing of d l in P u as in Fig. 16a with x = a u , where ε = min α, β, γ , C(P u , d l ) − C(P u , d l ), ξ u τ u (d l ) (a u ) .
If ε = min {α, β, γ , C(P u , d l ) − C(P u , d l )}, then the abnormality point of the resulting schedule is greater than i and, having the required contradiction, we stop the iterative process with T = u. If (d 1 , . . . , d l+1 ) is an alternating chain in P u , then also stop with T = u. Otherwise, go to Step 4.
Step 4: Moving to the next iteration. Set u := u + 1 and return to Step 1.
We now briefly sketch the reminder of the proof. For the time being let us assume that the iteration process ends after T ≥ 1 iterations, and that ε > 0 in Step 1 for u > 1. We prove these two assumptions at the end of the proof. In the following P u , P u , and P u refer to the schedules obtained at the end of Steps 1, 2 and 3, respectively, u ≥ 1.
Let u = 1. Note that P 1 = P. Then either d l+1 executes without preemption in [C(P 1 , d l ), C(P 1 , d l+1 )] or not. In the former case, Step 3 ensures that d l+1 executes in P 1 without preemption in [C(P 1 , d l−1 ), C (P 1 , d l+1 )]. The latter implies that (C3) holds for P 1 and by Claim 4 below that P 1 is A-free, which proves the lemma. We then have T = 1. If d l+1 is preempted in [C(P 1 , d l ), C(P 1 , d l+1 )], then T > 1 and it suffices to show that in this case we get a contradiction. To that end we show that, if T > 1, then P 1 is d l+1 -preempted (see Claims 2, 3, and 5 below), and if P u−1 is d l+1 -preempted, then P u is d l+1 -preempted as well, u ∈ {2, . . . , T − 1} (see Claims 2, 3, and 6 below). This process of generating d l+1 -preempted schedules cannot continue ad infinitum since the process exits after T iterations. However, any exit schedule P T certifies that P is not maximal which gives the required contradiction.
Proof Note that, by construction, the total completion times and abnormality points of the schedules P, P 1 , . . . , P T −1 are the same. Thanks to Step 3 and the fact that u < T , d l and d l+1 are the only two jobs executed in [C(P u , d l−1 ), C(P u , d l )] for each u ∈ {1, . . . , T − 1}. Finally, by Lemma 14, we have C(P u , d l+1 ) > C(P u , d l ) for u = 1, and by (I5) for schedule P u−1 we have C(P u−1 , d l ) < min{r (x), r (y)} < C(P u−1 , d l+1 ) for u > 1. By construction, C(P u , d l ) < C(P u−1 , d l ) and j u < τ u (d l+1 ) such that J (ξ u j u ) = {x, y}. Thus, C(P u , d l ) < min{r (x), r (y)} < C(P u , d l+1 ). Therefore, P u satisfies (I1).
By Proposition 11, there is no idle time in block τ P (d l )+1 in P. Thus the choice of a 1 ensures that it starts or resumes at C(P 1 , d l ) for u = 1. For u > 1, the job a u always exists because there is no idle time in block τ u (d l ) + 1 in P u . This follows from the fact that otherwise, by construction, there would be idle time in [C(P u−1 , d l ), C(P u−1 , d l+1 )] in P u−1 , which, since (I3) and (I4) hold for P u−1 , implies that a u−1 can be completed earlier in P u−1 , which contradicts its optimality. Hence, P u satisfies (I2).
Finally, Steps 2 and 3 and u < T ensure that (I3) holds for P u .
Proof It suffices to argue that k u < τ u (a u ).
Denote for brevity k = k u . Suppose for a contradiction that k = τ u (a u ). By Lemma 3, ξ u k (a u ) = e u k+1 − e u k . By Claim 2, (I3) holds for P u . Thus, d l+1 covers a u in I u and, by Lemma 5, ξ u k (d l+1 ) = e u k+1 − e u k . Hence, there exists a ∈ J such that C(P u , a ) = e u k because e u k is an event in P u . If a = d l , then τ u (d l ) < k and ξ u k−1 (a u ) = 0 because, again, d l+1 covers a u in I u . Then, let j < k − 1 be such that ξ u j (a u ) > 0 and ξ u j (a u ) = 0 for each j ∈ { j +1, . . . , k −1}. By (28) such a j exists. By Lemma 7 and the fact that d l+1 covers a u in I u , ξ u j (a u ) = ξ u j (d l+1 ) = e u j+1 − e u j which implies ξ u j (a ) = 0. Lemma 9 applied to a = a u , a , j and j = k, leads to a contradiction.
It remains to consider the case when a = d l . We have that u > 1 because otherwise the jobs d l and a 1 form an A-configuration in P-a contradiction since P is A-free. We have C(P u−1 , a u−1 ) > C(P u−1 , d l+1 ) ≥ C(P u , d l+1 ) ≥ C(P u , a u ).
The first inequality follows from (I4) for P u−1 , which is d l+1 -preempted; the second inequality follows by construction of P u , while the last one holds by assumption that k = τ u (a u ). Moreover, the construction ensures that the inequality C(P u , d l+1 ) ≥ C(P u , a u ) implies C(P u−1 , d l+1 ) ≥ C(P u−1 , a u ).
Thus, by (30), we have C(P u−1 , a u−1 ) > C(P u−1 , a u ). Therefore, (31) and (I2), (I3) for P u−1 imply that a u and a u−1 interlace in P u−1 . Finally, by (I1) applied to P u−1 , P u−1 is optimal and hence we arrive at a contradiction with Lemma 5. Hence, (29) follows, and the proof of the lemma is completed.
Proof In view of Lemma 16, it suffices to prove that P 1 at the end of Step 2 is A-free in [C(P , d l ), ∞), if the step is not vacuous. Let τ (a 1 ) ≡ τ P 1 and k = min{τ (a 1 ), τ (d l+1 )} for convenience. Let e and ξ be the events and the partition of P 1 , respectively. We start with an observation concerning the construction of P 1 , namely, the sequence of events, that is the start and completion times of jobs, is the same in P = P 1 and P 1 . More precisely, By Claim 7, ε > 0 in Step 1 of the construction of P u for each u ∈ {2, . . . , T }. If ε = ξ u−1 τ u−1 (d l )+1 (a u−1 ) in Step 1, then the block τ u−1 (d l ) + 1 disappears. Otherwise, ε = e u−1 k u−1 +1 − e u−1 k u−1 − ξ u−1 k u−1 (a u−1 ) in Step 1. If ξ u−1 k u−1 (a u−1 ) > 0, then a u = a u−1 at the end of Step 1 and ξ u k u (a u ) = e u k u +1 − e u k u . Therefore, both Steps 2 and 3 are vacuous and thus P u = P u is d l+1 -preempted. However, ξ u k u (a u ) = e u k u +1 − e u k u contradicts Claim 7. Thus, we have ξ u−1 k u−1 (a u−1 ) = 0 in Step 1, and therefore the block k u−1 disappears.
Next, Step 2 does not change the number of blocks. Finally, Step 3, if not vacuous, may increase the number of blocks by at most one. Thus, we have C u = C u−1 − 1 and c u = c u−1 , if Step 3 is vacuous, and C u ≤ C u−1 and c u = c u−1 − 1, if Step 3 is not vacuous. Consequently C u + c u < C u−1 + c u−1 and T ≤ C 1 + c 1 ≤ 3n. Thus, the iterative process indeed stops with some schedule P T or P T . This, by Claim 5, completes the proof of the theorem.

Summary
In this paper we have provided some structural characterization of the preemptions in optimal schedules for the problem P2| pmtn, in-tree, r j , p j | C j . The advantages of our characterization are as follows: -It narrows down a search space of optimal solutions from an infinite one to a finite one. -The understanding of the possible structure of preemptions is a step towards determining the complexity of the problem P2| pmtn, in-tree, r j , p j | C j . On the one hand, the normality of an optimal schedule may lead us to a polynomial-time algorithm. On the other hand, the fact that a single job may need many (of the order of log n) preemptions as stated in Theorem 1 could be useful in proving NP-completeness, although the complexity of the problem P2| pmtn, in-tree, r j , p j | C j is left as an interesting and challenging open problem. -It significantly improves the lower bound on the resolution for the problem P2| pmtn, in-tree, r j , p j | C j .
Note that we rely on the in-trees precedence constraints between the jobs in our proof. This assumption is crucial when proving in Sect. 5 that a maximal A-free schedule exists. The generalization of our result to arbitrary precedence constraints or providing an example that an analogous statement as the one in Corollary 1 is false for more general precedence constraints is left as an open problem.