Precedence constrained parallel-machine scheduling of position-dependent jobs

We consider parallel-machine job scheduling problems with precedence constraints. Job processing times are variable and depend on positions of jobs in a schedule. The objective is to minimize the maximum completion time or the total weighted completion time. We specify certain conditions under which the problem can be solved by scheduling algorithms applied earlier for fixed job processing times.


Introduction
In many scheduling problems one cannot assume that job processing times are fixed. This may be caused by different factors that have influence on parameters related to the job processing. There are a few main forms of variable job processing times considered in literature. For example, the time needed to process a job may depend on the starting time of this job or its position in a schedule. The first case, called time-dependent scheduling, constitutes a great part of research focused on scheduling with variable job processing times. A good review of this domain is presented in the book by Gawiejnowicz [1]. The case of position-dependent scheduling, considered in this paper, has been surveyed by Biskup [2] and Agnetis et al. [3]. There are two limitations of the majority of papers on scheduling problems with variable processing times. First, results presented there are mainly related to scheduling on one machine (see, e.g., Wang et al. [4], Huang and Wang [5], Debczynski and Gawiejnowicz [6], Debczynski [7], Wang and Wang [8,9]) or on parallel machines, but with empty precedence constraints among jobs (see, e.g., Mosheiov and Sidney [10], Mosheiov [11], Huang and Wang [12]). The second limitation is that most of the results related to scheduling problems with variable job processing times concern particular cases, not general ones. Recent examples of general results of this kind, concerning so-called isomorphic scheduling problems, are presented in the paper by Gawiejnowicz and Kononov [13].
In this paper, we consider a group of parallel-machine problems of non-preemptive scheduling of precedence constrained jobs with variable processing times that depend on their positions in a schedule. Based on some transformations between schedules with fixed job processing times and schedules with position-dependent job processing times, we show how to solve some of considered problems in polynomial time.
Remaining sections of the paper are organized as follows. In Sect. 2, we present some definitions and results related to a few new classes of schedules and transformations between them. In Sect. 3, we prove our main results based on properties of mentioned transformations. In Sect. 4, we consider a special case of the parallelmachine scheduling problem with position-dependent jobs and show that it is polynomially-solvable. In Sect. 5, we give conclusions and indicate the directions of further research.

Preliminaries
The problems analysed in this paper can be formulated as follows. We are given a number of parallel identical machines and n non-preemptable jobs with some precedence constraints. The processing time of each job is variable and depends on the position r of the job in a schedule. This dependency is described by a positive and non-increasing function φ of argument r . In other words, the processing time of the j-th job in position r is equal to p j,r = φ(r ), where 1 ≤ r, j ≤ n. The aim is to find a schedule with minimal maximum completion time or minimal total weighted completion time. Using the commonly known scheduling notation (for a brief description see Gawiejnowicz [1]), we will denote these problems as P|prec, One of special cases of these problems, when φ(r ) = 1, is the P|prec, p j,r = 1| f problem of scheduling jobs with unit processing times. Therefore, a natural question is whether some known algorithms for the latter problem can be applied to its counterpart with job processing times described by the φ function. We give an answer to this question applying a transformation of schedules with fixed job processing times into schedules with position-dependent job processing times, and specify certain conditions under which the P|prec, p j,r = φ(r )| f problem can be solved by appropriately modified algorithms for unit job processing times.
Let T be a non-preemptive schedule of n jobs and let J i ∈ {J 1 , J 2 , . . . , J n }. The starting time and the completion time of job J i will be denoted by S i (T ) and C i (T ), respectively. The value of the objective function of T will be denoted by If it does not lead to misunderstanding, the argument determining the schedule will be omitted.
Let φ : N + → Q + be any discrete function satisfying the condition φ(r ) > 0 for every r ∈ N + , where N + = N\{0}. Moreover, let be a function defined as Notice that (0) = 0 and that the function is a bijection between its domain and image.
A schedule of n jobs will be called a natural schedule if it satisfies the following two conditions: The immediate observation is that for any natural schedule T we have C max (T ) ∈ N and C i (T ) ∈ N. A natural schedule of jobs with unit processing times will be called a simple schedule. Notice that in a simple schedule we have C i = S i + 1 for every i ∈ {1, 2, . . . , n}.
A schedule of n jobs will be called a φ-natural schedule if it satisfies (1) and (3) for every i ∈ {1, 2, . . . , n} there exists some k ∈ N such that S i = (k) and C i = (l) for some natural l > k.
If every job started in a given φ-natural schedule at time (k) is completed at time (k + 1), then the schedule will be called a φ-simple schedule. Notice that every simple schedule is a natural schedule, and every φ-simple schedule is a φ-natural schedule. Moreover, if φ(r ) = 1, then every φ-natural schedule is a natural schedule. Similarly, every φ-simple schedule is a simple schedule.
A schedule will be called a continuous schedule, if every machine starts the execution of jobs at the moment 0 and none of the machines is idle before finishing all the jobs assigned to this machine.
Let T be a schedule. A pair (t 1 , t 2 ) will be called a time slot (t 1 , t 2 ), if the following statement is true for every machine: if the machine executes at least one job in the (t 1 , t 2 ) interval of T , then there is exactly one job executed by this machine in a given interval, its processing starts at the moment t 1 and it completes at the moment t 2 . Therefore, any simple schedule T can be divided into time slots Notice that in the second case the time slots corresponding to j are of the length of φ( j + 1). Now, we will define a bijective transformation between the set of natural schedules and the set of φ-natural schedules. Let T be a natural schedule of n jobs. We construct a new schedule T such that Notice that the T schedule is a φ-natural schedule and that the transformation defined by (4) and (5) does not change the order of jobs executed on any machine. We will denote this transformation by φ , i.e. T = φ (T ).

Property 1
The following two properties arise immediately from the definitions given above.
is a corresponding φ-simple schedule and k is any natural number such that 0 ≤ k < C max (T ), then the sets of jobs executed in the (k, k + 1) time slot of the T schedule and in the ( (k), (k + 1)) time slot of the φ (T ) schedule are equal.
Consider now a φ-natural schedule of n jobs and denote it by T . We can construct a natural schedule T applying the following rules: The values s i and c i exist and are natural numbers, because the function is a bijection and T is a φ-natural schedule. Then, the schedule T is a natural schedule. We will denote the transformation defined by (6) and (7) Notice that for any positive function φ the φ transformation defined as above is a bijection between the set of natural schedules and the set of φ-natural schedules. Moreover, Properties 1(a) and 2 imply that the φ transformation limited to the sets of simple schedules and φ-simple schedules is a bijection as well.

Results
In this section we will prove our main results. We start with two auxiliary lemmas.

Lemma 1
Let there be given a number of identical parallel machines able to execute each of available jobs. If algorithm A generates a continuous simple schedule T for job processing times in the form of p j,r = 1, then algorithm A generates also a continuous φ-simple schedule T = φ (T ) for job processing times in the form of p j,r = φ(r ).
Proof Assume that, in the case when p j,r = 1, schedule T generated by algorithm A is a continuous simple schedule. Then, by Property 1(a), schedule T = φ (T ) is a continuous φ-simple schedule. Because, by Property 1(b), the φ transformation does not change the order of the jobs, T schedule is feasible and can be generated by scaling individual time slots of the T schedule. Finally, by definition of a continuous φ-simple schedule, the processing time of the r -th job on each machine is equal to φ(r ).
If φ is a positive and non-increasing discrete function, then Proof Let us notice that if (x 1 , x 2 , . . . , x k ) = (1, 2, . . . , k), . It remains to show that the reversed inequality is true. Let (x 1 , x 2 , . . . , x k ) be any series from X k . It is easy to see that Because the φ function is positive, non-increasing and is the sum of k non-negative elements, which proves that Based on Lemmas 1 and 2, we will now prove our main two results, specifying the conditions under which some known scheduling algorithms for unit job processing times may be adapted for corresponding problems with job processing times depending on positions of the jobs in a schedule.
The first of the results concerns the C max objective function.

Theorem 1 Let φ be a positive and non-increasing discrete function and let I be an arbitrary instance of the P|prec, p j,r = 1|C max problem. If algorithm A generates an optimal schedule for I and it is a continuous simple schedule, then algorithm
A generates also an optimal continuous φ-simple schedule for the corresponding instance of the P|prec, p j,r = φ(r )|C max problem.
Proof Let T be a schedule generated by algorithm A for the case of unit job processing times. As we assumed, T is a continuous simple schedule. Denote its length by k. From the definition of a continuous simple schedule we conclude that there exists a series of k jobs executed continuously one after another on one of the machines, starting at the moment 0. Moreover, there is no feasible schedule shorter than k, because T is an optimal schedule with respect to the C max objective function. As we proved in Lemma 1, the T = φ (T ) schedule is a continuous φ-simple schedule corresponding to the case when p j,r = φ(r ). The φ transformation does not change the order of the jobs, so the T schedule is feasible as well. Hence, to prove that T is optimal with respect to the C max objective function when p j,r = φ(r ), it is sufficient to show that it is impossible to execute k position-dependent jobs one after another in time shorter than (k).
Consider a series (J i 1 , J i 2 , . . . , J i k ) of jobs executed one after another in the T schedule. These jobs do not need to be executed on the same machine. Assume that there exists an index j ∈ {1, 2, . . . , k} such that the j-th job in the series is assigned to a machine on a position further than j. It means that there exists a series of k + 1 jobs executed one after another in the T schedule. This implies, in turn, that C max (T ), where T = −1 φ (T ), is larger than k. A contradiction. From the above we can conclude that every job of the considered series is assigned to a machine on a position less or equal to its position in the series. By Lemma 2 we conclude that if the discrete φ function is positive and non-increasing, the sum of processing times of jobs J i 1 , J i 2 , . . . , J i k executed one after another cannot be lower than (k). Now, we will show that a similar result holds also for the w i C i objective function.

Theorem 2 Let φ be a positive and non-increasing discrete function and let I be an arbitrary instance of the P|prec, p j,r = 1| w i C i problem. If algorithm A generates an optimal schedule for I and it is a continuous simple schedule, then algorithm A generates also an optimal continuous φ-simple schedule for the corresponding instance of the P|prec, p j,r = φ(r )| w i C i problem.
Proof Let T be a schedule generated by algorithm A for the case of unit processing times. As it was assumed, T is a continuous simple schedule optimal with respect to the w i C i objective function. As we proved in Lemma 1, the T = φ (T ) schedule is a continuous φ-simple schedule corresponding to the case when p j,r = φ(r ). The φ transformation does not change the order of jobs, so the T schedule is feasible. Assume that T is not optimal with respect to the w i C i objective function. This means that at least one of two cases holds, Case 1 or Case 2.
In Case 1, we can swap, not violating precedence constraints, two jobs in T in such a way that the value of w i C i (T ) will be lower than previously. Because job completion times are the values of increasing function and the φ transformation does not change the order of jobs, this means that swapping the same jobs in T schedule would improve the value of w i C i (T ) objective function. This leads to a contradiction, since schedule T is optimal.
In Case 2, there exists a job that can be completed earlier. By assumption, T is a continuous simple schedule optimal with respect to w i C i . This means that starting from the first time slot, where at least one machine is idle, none of the jobs can be executed in any earlier time slot, and hence, completed earlier. It remains to show that if the completion time of job J i in T is equal to C i (T ), then it is impossible to complete this job in T earlier than at the moment (C i (T )). Applying the reasoning similar to the one from the proof of Theorem 1 and based on Lemma 2, we conclude that the statement of Theorem 2 is true.
As an immediate consequence of Theorem 2, we obtain the following result. Corollary 1 Let φ be a positive and non-increasing discrete function and let I be an arbitrary instance of the P|prec, p j,r = 1| C i problem. If algorithm A generates an optimal schedule for I and it is a continuous simple schedule, then algorithm A generates also an optimal continuous φ-simple schedule for the corresponding instance of the P|prec, p j,r = φ(r )| C i problem.
We complete this section by a general remark. Notice that since the P|prec, p j = 1|C max and P|prec, p j = 1| w i C i problems are NP-hard, there are no polynomial algorithms solving these problems unless P = NP. For that reason we have to consider some special cases for which such polynomial algorithms can be constructed. Theorems 1-2 and Corollary 1 can be applied to single instances and hence they can be used to analyse these cases. If we can calculate the value of the φ function in polynomial time and algorithm A specified in these theorems generates an optimal schedule for unit job processing times in polynomial time, then the algorithm A generates also in polynomial time an optimal schedule for job processing times given by the φ function.

A polynomial case
In this section, we will show one of applications of our results. Namely, we will show how to use Theorem 1 in a proof that one of special cases of parallel-machine problems considered in Sect. 3 is polynomially-solvable.
Recall that for the P|in-tree, p j = 1|C max problem of parallel-machine scheduling of unit-time jobs with precedence constraints in the form of in-tree, Hu [14] proposed a polynomial algorithm and proved its optimality. The main idea of the algorithm is as follows: At the moment, when any of the machines becomes idle, assign to it a nonexecuted job furthest away from the tree-root and which predecessors have been all finished. Now, we want to show how to solve the counterpart of the P|in-tree, p j = 1|C max problem with position-dependent job processing times in the form of p j,r = φ(r ).
We will start by a property of schedules generated by Hu's algorithm. We assume that if there is more than one machine available, Hu's algorithm allocates jobs to the machine with the lowest index. Notice also that for any instance of the P|in-tree, p j = 1|C max problem, the schedule generated by Hu's algorithm is a simple schedule. Therefore, we may use the time slots defined in Sect. 2.
Property 3 For any instance of the P|in-tree, p j = 1|C max , the number of jobs allocated to the machines in individual time slots of a schedule generated by the Hu's algorithm is non-increasing.
Proof This property is a natural consequence of the observation that the precedence constraints are given by an in-tree. That means that every job has at most one immediate successor. In other words, if in the (k, k + 1) time slot, where k ∈ N, there are q jobs ready to execute, then in (k +1, k +2) time slot there are at most q such jobs. Applying mathematical induction with respect to k, the property follows.
We assumed that in the case when there is more than one machine available, jobs will be assigned to the machine with the lowest index. This leads to the conclusion that a schedule generated by Hu's algorithm is a continuous simple schedule for any instance of the P|in-tree, p j = 1|C max problem. This conclusion together with Theorem 1 lead to the following result.

Theorem 3
If φ is a positive and non-increasing discrete function of r , then Hu's algorithm solves the P|in-tree, p j,r = φ(r )|C max problem.
The natural question is whether Theorem 3 can be extended to more general cases. In fact, it is easy to show that neither Theorem 1 nor Hu's algorithm work in the case where there is at least one job with processing time described by another function than remaining jobs. Consider the following example.
We are given the set of jobs {J 1 , J 2 , . . . , J 9 } with job precedence constraints represented by the digraph presented in Fig. 1. Let φ 1 denote the function describing the processing times of jobs J 1 to J 8 , while φ 2 denotes the function describing the processing time of job J 9 . The first four values of φ 1 and φ 2 functions are equal to Fig. 1 The digraph of precedence constraints for the example considered in Sect. 4 Table 1 The first four values of φ 1 and φ 2 functions for the example considered in Sect. 4

Fig. 2
The schedule generated by Hu's algorithm for the example considered in Sect. 4

Fig. 3
The optimal schedule for the example considered in Sect. 4 those presented in Table 1. Then the schedule generated by Hu's algorithm, presented in Fig. 2, is not optimal, while an optimal schedule is in the form given in Fig. 3.
Since similar examples can be constructed for w i C i and C i objective functions, assumptions of Theorems 1-2 cannot be made weaker.

Conclusions
We considered a few parallel-machine scheduling problems with non-empty precedence constraints and position-dependent job processing times. We defined a new class of continuous simple schedules, and proved that if algorithm A generates a continuous simple schedule optimal with respect to the C max or w i C i objective function in the case of unit job processing times, then it also generates an optimal schedule in the case when the processing time of each job is described by a positive and non-increasing function φ depending on a position of the job in a sequence. As one of possible applications of the results we showed that Hu's algorithm solves the P|in-tree, p j,r = φ(r )|C max problem. Finally, we showed by an example that it is difficult to extend the latter result to the case when at least one job has a different processing time function.
Theorems 1-2 may be used to solve some problems of scheduling identical or very similar jobs in the environment susceptible to the process of learning. Moreover, our results can be a base for further research on the problem of adapting known algorithms for more general cases. For example, the future analysis may concern the question whether we can use some other transformations to solve different problems with variable and position-dependent processing times.