HAL Id: hal-01472060
https://hal.sorbonne-universite.fr/hal-01472060
Submitted on 20 Feb 2017
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
The equivalence of two classical list scheduling
algorithms for dependent typed tasks with release dates, due dates and precedence delays
Aurélien Carlier, Claire Hanen, Alix Munier-Kordon
To cite this version:
Aurélien Carlier, Claire Hanen, Alix Munier-Kordon. The equivalence of two classical list scheduling
algorithms for dependent typed tasks with release dates, due dates and precedence delays. Journal of
Scheduling, Springer Verlag, 2017, pp.1-9. �10.1007/s10951-016-0507-8�. �hal-01472060�
Noname manuscript No.
(will be inserted by the editor)
Equivalence of two classical list scheduling algorithms for dependent typed tasks with release dates, due dates and precedence delays
Aur´ elien Carlier · Claire Hanen · Alix Munier Kordon
Received: date / Accepted: date
Abstract We consider a finite set of unit time execution tasks with release dates, due dates and precedence delays. The machines are partitionned into k classes. Each task requires one machine from a fixed class to be executed. The problem is the existence of a feasible schedule.
This general problem is known to be N P-complete; many studies were devoted to the determination of polynomial time algorithms for some special subcasses, most of them based on a particular list schedule. The Garey-Johnson and Leung-Palem-Pnueli algorithms (respectively GJ and LPP in short) are both improving the due dates to build a priority list. They are modifiying them using necessary conditions until a fix point is reached. The present paper shows that these two algorithms are different implementations of a same generic one. The main consequence is that all the results valid for GJ algorithm, are also for LPP and vice versa.
Keywords list scheduling algorithms · polynomial sub-problems · approximation algorithms
1 Introduction
Scheduling problems with release and due dates have been considered for a long time, either in their decision version (is there a schedule meeting all the constraints ?) or in their optimization version, by minimizing the maximum lateness L max . Most of the decision problems are N P-complete once precedence and resource constraints are considered [6,12,15]. However, some particular instances have led to polynomial al- gorithms. Garey and Johnson [5] solved polynomially P 2|prec, p i = 1, r i , d i |L max and its preemptive version P 2|prec, pmtn, r i , d i |L max by using a particular list scheduling algorithm. This algorithm was extended to get approximation algorithms for the L max
criteria with various hypothesis: parallel processors [8], preemptive jobs [7], commu- nication delays [7], typed tasks systems, and unitary resource constraints scheduling problems [1].
A.Carlier
Sorbonne Universit´ es, UPMC Univ Paris 06, CNRS, LIP6 UMR 7606, 4 place Jussieu 75005 Paris E-mail: [email protected]
C.Hanen
Sorbonne Universit´ es, UPMC Univ Paris 06, CNRS, LIP6 UMR 7606, 4 place Jussieu 75005 Paris and Univerist´ e Paris-Lumi` eres, Universit´ e Paris Ouest Nanterre La D´ efense, 92000 Nanterre E-mail:
[email protected] A.Munier Kordon
Sorbonne Universit´ es, UPMC Univ Paris 06, CNRS, LIP6 UMR 7606, 4 place Jussieu 75005 Paris
E-mail: [email protected]
A similar class of scheduling problems was also studied in the context of parallel computing. Processing times are here unitary (i.e., p i = 1 for each task i) since each task corresponds to a basic instruction. Precedence delays, corresponding to a minimum duration between the executions of two dependent tasks, are introduced to model data transfers between them. Minimizing the makespan or the maximum lateness is N P- complete even for one machine [2,9,14]. Leung et al. [13] developped a new list schedul- ing algorithm that solves polynomially several sub-problems including most of them for which a polynomial algorithm was already known. For an interval order precedence graph with monotone delays, the decision problem P |int. order, monotone ℓ ij , p i = 1, r i , d i |⋆ is solved polynomially using the LPP algorithm [13]. This algorithm was extended to handle monotone interval orders with typed tasks systems [4] or commu- nications delays and dedicated procesors [11].
Garey and Johnson (in short GJ) and Leung, Palem and Pnueli (in short LPP) algorithms rely both on an iterative process that modifies the due dates until either a fixed point is reached (due dates are then said to be consistent), or a contradiction is observed. These modified due dates are then used as priorities to build a feasible schedule using a list scheduling algorithm. The main differences between these two algorithms are the definition of the fix point, or equivalently the definition of a set of consistent modified due dates, and the modification step of due dates. The aim of our study is to prove that GJ and LPP algorithms are two implementations of a generic modified due date algorithm for the general typed task decision problem P Σ k , |prec, ℓ ij , p i = 1, r i , d i |⋆; they thus converge to the same unique fixed point. LPP algorithm has a better worst case complexity and thus must be preferred to compute efficiently modified due dates. From a theoretical point a view, our main conclusion is that all the results proved for GJ algorithm are true for LPP, and vice versa.
The computation of the fix point is polynomial for both GJ and LPP algorithms.
However, the list priority algotithm based on the due dates obtained does not neces- sarily provide an optimal solution. Thus, there is no contradiction with as example the NP-hardness result from Yu et al. [16] for F 2|ℓ ij , p i = 1, |C max .
The paper is organized as follows: Section 2 introduces the problem and notations.
Extended GJ and LPP consistencies are introduced in Section 3. Section 4 is devoted to the proof of the equivalence between LPP and GJ consistency. A generic definition of the due date modification algorithm is then presented in Section 5. It is also proved the convergence to a unique fixed point, if it exists. The consequence is that LPP and GJ algorithms are converging to the same modified due dates. The implementation of LPP and GJ algorithms and their complexity are briefly recalled in Section 6, followed by an experimental comparison of their performances for m identical machines and a usual precedence graph. A list of polynomial sub-problems and approximation results valid for both algorithms is established in Section 7. Section 8 is our conclusion.
2 Problem definition and notations
Let T = {1, · · · , n} a set of tasks with unit processing times p i = 1, release time r i
and due dates d i for i ∈ T .
Precedence relations are given by a directed acyclic graph noted G = (T , E). Each arc e = (i, j) ∈ E is valued by a non negative integer ℓ ij ; this value models a minimum delay between the end of i and the beginning of j. If t i , i ∈ T denotes the starting time of task i, the relation expressed by any arc e = (i, j) ∈ E is t i + p i + ℓ ij ≤ t j . We assume without loss of generality that release times are consistent with respect to precedence delays, i.e. if (i, j) ∈ E then r i + 1 + ℓ ij ≤ r j . All the values considered in this paper in relation to time are integers.
Machines (or processors) are partitionned into k classes {C 1 , · · · , C k }, each of them
containing m p identical processors for p ∈ {1, · · · , k}. Each task i requires one processor
from a fixed class τ i ∈ {C 1 , · · · , C k } and is then called typed task. Typed tasks systems
include both identical processors (only one class of processor) and dedicated processors (only one processor per class).
The main problem consists in computing a starting times vector t = (t 1 , · · · , t n ) of tasks such that release and due dates vectors r = (r 1 , · · · , r n ) and d = (d 1 , · · · , d n ), precedence delays and resource constraints are met. It is refered to P Σ k |prec, ℓ ij , p i = 1, r i , d i |⋆ using standard notations. The minimization of the maximum lateness, defined as L max = max i∈T (t i + 1 −d i ) is also discussed; this last optimization problem is noted as P Σ k |prec, ℓ ij , p i = 1, r i | L max .
We denote i → j if there is a path from i to j in G with i 6= j. We also set S i = {j ∈ T , i → j} and P i = {j ∈ T , j → i} for respectively the successors and the predecessors of i. For any task i ∈ T , Indep(i) is the set of task from T with no precedence relation with i, thus neither i → j nor j → i. For any task i ∈ T , let T i = Indep(i) ∪ S i . We set that ∀i ∈ T , i 6∈ Indep(i) and i 6∈ T i .
For convenience, we denote by ℓ + ij the transitive latency between all pairs of tasks (i, j) ∈ T 2 with j ∈ S i . Formally, for any path ν = i 1 , · · · , i p of G from i 1 to i p with p > 1, we set ℓ(ν) = P p−1
α=1 (ℓ i
αi
α+1+ 1) − 1. ℓ + ij is then the maximum value ℓ(ν ) of any path of G from i to j. These values may be easily computed in time-complexity Θ(n 3 ) using a simple modification of the Floyd-Warshall algorithm [3].
Consider the instance of our decision problem pictured by Figure 1 for 3 dedicated processors, i.e. m 1 = m 2 = m 3 = 1. Figure 2 presents a feasible solution.
i 1 2 3 4 5 6 7 8 9
r
i0 0 0 0 0 3 1 1 2
d
i3 3 3 3 2 4 3 3 3
τ
iC
1C
1C
1C
2C
2C
2C
3C
3C
31 2 3 4
5
6
7
8
9 2
0 0 1
Fig. 1: Release-dates, due dates, type of tasks and precedence graph with delays.
i 1 2 3 4 5 6 7 8 9
t
i0 1 2 1 0 3 1 2 3
t = 0
C
11 2 3
C
25 4 6
C
37 8 9
Fig. 2: A feasible schedule for the instance pictured by Figure 1.
3 GJ and LPP consistencies
GJ and LPP algorithms modify due dates until a fixed point D ≤ d is reached, expressing in both cases necessary conditions for the existence of a feasible schedule that can be computed polynomially. This section aims at presenting these two consistency conditions extended to typed-tasks systems and precedence delays.
3.1 GJ consistency
GJ consistency was introduced in [5] for solving polynomially the decision problem 2|prec, r i , d i , p i = 1|⋆. It was extended to typed-tasks systems in [1]. A wider extension is presented here to integrate precedence delays.
The main idea is expressed necessary conditions on ressource for testing if a fixed due dates vector D = (D 1 , · · · , D n ) ≤ d is feasible or not. Let i be a fixed task from T . Assuming that i is completed at time D i , release date for any task j from T i is adjusted following :
r ′ j =
r j if j ∈ Indep(i)
max(r j , D i + ℓ + ij ) if j ∈ S i .
For any class of processors C p , p ∈ {1, · · · , k} and any tuple (α, β) of integers such that α < β and D i ≤ β, let S p (i, α, β) be the set of tasks from T i that must be executed during the interval [α, β] if i is completed at time D i . More formally,
S p (i, α, β) = {j ∈ T i | τ j = C p , α ≤ r ′ j and D j ≤ β}.
The total number of slots available for scheduling tasks from S p (i, α, β) may depends on the availability of the resource needed for i. Two cases must be considered:
– If α < D i and τ i = C p , then D i − 1 belongs to [α, β]. Task i is thus executed during the interval [α, β] on a machine of type p (since it is executed at time D i − 1), and the number of remaining idle slots equals m p (β −α)−1. S p (i, α, β) is said consistent if |S p (i, α, β)| < m p (β − α);
– Otherwise, α ≥ D i or τ i 6= C p . Thus i is not executed in the interval [α, β] on a machine of type p. S p (i, α, β) is then said consistent if |S p (i, α, β)| ≤ m p (β − α).
For any task i ∈ T , the due dates vector D is GJ-consistent for i if ∀p ∈ {1, · · · , k},
∀(α, β) ∈ N 2 such as α < β and D i ≤ β , the set S p (i, α, β) is consistent. Due dates vector D is said to be GJ-consistent if it is GJ-consistent for any task i ∈ T . A non- consistent set is said to be critical.
Consider for example the instance pictured by Figure 1 and set D = d, i = 5, α = 2 and β = 4. Observe that T 5 = T − {5} and that r ′ = (0, 0, 0, 0, −, 4, 2, 2, 3). We get S 1 (5, 2, 4) = ∅, S 2 (5, 2, 4) = {6} and S 3 (5, 2, 4) = {7, 8, 9}.
Observe that |S 1 (5, 2, 4)| = 0 ≤ 2 and |S 2 (5, 2, 4)| = 1 ≤ 2. These two sets are thus consistent. Now, we get that |S 3 (5, 2, 4)| = 3 > 2. If task 5 is performed at time D 5 − 1 = 1, all tasks from S 3 (5, 2, 4) have to be performed in the time slot [2, 4]
by processor C 3 to satisfy precedence constraints and deadlines, which is impossible.
S 3 (5, 2, 4) is thus a critical set, and the due dates vector D is not GJ-consistent.
3.2 LPP consistency
LPP consistency [13] was initially given for solving P |prec, ℓ ij , r i , d i , p i = 1|⋆. It
is based on a polynomial algorithm checking necessary conditions for the feasibility
of a due dates vector D. This algorithm for computing feasible due dates vectors has
already been extended by [4] to include typed tasks.
Let i ∈ T . Consider release and due dates vectors r and D and a value t ∈ {r i + 1, · · · , D i }. Then, Existence i (t, r, D) defined as follows is a necessary condi- tion for the existence of a feasible schedule such that i ends at time t:
Existence i (t, r, D): is there a schedule of tasks from T i ∪ {i} considered as inde- pendent meeting resource constraints, release dates r ′ and due dates D ′ defined as follows:
1. r ′ i = t − 1 and D ′ i = t;
2. ∀j ∈ Indep(i), r ′ j = r j and D j ′ = D j ; 3. ∀j ∈ S i , r ′ j = max(r j , t + ℓ + ij ) and D j ′ = D j .
The tasks considered here are unitary (i.e. p j = 1, ∀j ∈ T i ). So, Existence i (t, r, D) can be solved using the Jackson priority list algorithm [10] (i.e. an earliest deadline first priority list scheduling) until either a task miss its deadline or all tasks are scheduled, in a time-complexity Θ(n log n).
Let the due dates vector D = (D 1 , · · · , D n ), a fixed task i ∈ T and t ≤ D i the maximum integer value such that Existence i (t, r, D) is true. The due dates vector D is LPP-consistent for task i if t = D i . It is said to be LPP-consistent if it is LPP-consistent for all tasks i ∈ T .
Consider the decision problem Existence 5 (D 5 , r, D) with D = d for the example pictured by Figure 1. Release and due dates vectors are respectively r ′ = (0, 0, 0, 0, 1, 4, 2, 2, 3) and D ′ = D. The schedule obtained using Jackson’s algorithm is pictured by Figure 3.
Tasks 6, 8 and 9 are not meeting their due date, thus the answer to Existence 5 (D 5 , r, D) is negative and D is not LPP-consistent for task 5.
t = 0
C
11 2 3
C
24 5 6
C
37 8 9
Fig. 3: The Jackson’s schedule for the instance Existence 5 (D 5 , r, D).
Lemma 1 Assume that D is LPP-consistent. For any couple (i, j) ∈ T 2 with j ∈ S i , the inequality D i < D j holds.
Proof Suppose by contradiction that j ∈ S i and D i ≥ D j . Since D is LPP-consistent, the answer to Existence i (D i , r, D) is positive. Thus, r j ′ = max(r j , D i + ℓ + ij ) ≥ D i ≥ D j = D ′ j i.e. r ′ j ≥ D ′ j , a contradiction.
4 Equivalence between GJ and LPP consistencies
As pointed before, GJ and LPP consistencies were defined separately using different
approaches. This section aims to prove that they are in fact equivalent for our general
problem. Lemmas 2 and 3 are considered to show by contraposition in Lemma 4 that
any LPP-consistent due dates vector D is GJ-consistent. The inverse is deduced in
Lemma 7 from Lemmas 5 and 6. Theorem 1 is then a simple outcome.
Lemma 2 Let D = (D 1 , · · · , D n ) be a due dates vector. For any p ∈ {1, · · · , k}, for any task i ∈ T and any tuple (α, β) ∈ N 2 such as α < β and D i ≤ β, if j ∈ S p (i, α, β), then j is scheduled in [α, β] for any solution of the decision problem Existence i (D i , r, D).
Proof Since j ∈ S p (i, α, β), we have α ≤ r j ′ and D j ≤ β . Thus, j must be scheduled during [α, β] for any solution of the decision problem Existence i (D i , r, D).
Lemma 3 simply derives from Lemma 2.
Lemma 3 Let i ∈ T and a due date vector D. If D is not GJ-consistent for i, then D is not LPP-consistent for i.
Proof Assume that D is not GJ-consistent for a fixed task i ∈ T . Then, there exists p ∈ {1, · · · , k}, and two integers α, β such as α < β, D i ≤ β and the set S p (i, α, β) is critical. Two cases must be considered following the definition of GJ consistency:
1. Assume first that α < D i and τ i = C p . Since S p (i, α, β) is critical, |S p (i, α, β)| ≥ m p (β − α). Now, i must be scheduled at D i − 1 by Existence i (D i , r, D) and i does not belong to S p (i, α, β). Moreover, by Lemma 2, every task j ∈ S p (i, α, β) must be scheduled by Existence i (D i , r, D) in the interval [α, β]. Thus, there are at least m p (β − α) + 1 tasks to be scheduled by Existence i (D i , r, D) in the time interval [α, β] by the m p processors of type C p , which is impossible.
2. Now, if α ≥ D i or τ i 6= C p , we get that |S p (i, α, β)| > m p (β −α). By Lemma 2, tasks from S p (i, α, β) have to be scheduled by Existence i (D i , r, D) in the interval [α, β].
As those tasks have to be schedule by a processor of type C p , Existence i (D i , r, D) is also false.
In both cases, D is not LPP-consistent for i, which proves the lemma.
For the example given by Figure 1, the set S 3 (5, 2, 4) = {7, 8, 9} is critical and thus D is not GJ-consistent. The corresponding scheduling problem Existence 5 (D 5 , r, D) pictured by Figure 3 does not meet due dates and D is not LPP-consistent.
Lemma 4 If D is a LPP-consistent due dates vector, then D is GJ-consistent.
Proof If D is not GJ-consistent, then there exists i ∈ T such that D is not GJ-consistent for i. By Lemma 3, D is not LPP-consistent for i, which proves the lemma.
In the following, we show that the reverse of Lemma 4 is true. Lemma 5 is a simple technical property of Jackson algorithm widely used to get next lemmas.
Lemma 5 Let I be an unfeasible instance of P Σ k |r i , p i = 1, d i |⋆ with ∀i ∈ T , r i < d i . Let also σ = {t 1 , · · · , t n } be a schedule obtained using Jackson algorithm (i.e. a priority list algorithm using earliest deadline first). If j is a task of minimum starting time t j
such that d j ≤ t j , then d j = t j .
Proof Any task u performed at t j − 1 meets its deadline, thus t j = t u + 1 ≤ d u . Now, r j < d j , thus j was ready at time t j − 1, so by the priority list algorithm, d u ≤ d j . We get thus t j = t u + 1 ≤ d u ≤ d j ≤ t j , and then t j = d j .
Lemma 6 shows that a critical set may be associated to any execution of Existence which answer is negative.
Lemma 6 Let i be a task from T such that for any task ℓ ∈ T i , r ℓ < D ℓ and Existence i (D i , r, D) is false. Then, there exist p ∈ {1, · · · , k}, a task u ∈ T i ∪ {i}
and a tuple of integers (α, β) with α < β and D u ≤ β such that S p (u, α, β) is a critical
set.
Proof Consider a task i ∈ T such that for any task ℓ ∈ T i , r ℓ < D ℓ and Existence i (D i , r, D) is false. Let us denote by r j ′ and D ′ j , for j ∈ T i ∪ {i} respectively release and due dates computed locally by this function. Note that ∀j ∈ T i ∪ {i}, D ′ j = D j . Let σ = {t j , j ∈ T i ∪ {i}} be the schedule obtained by using Jackson algorithm.
Let us consider the first task j ∈ T i ∪ {i} missing its due date (D j ≤ t j ). Let p ∈ {1, · · · , k} be such that τ j = C p . By Lemma 5, t j = D j .
Let α ≤ t j be the rightmost date for which either there exists an idle processor of type p at time α − 1 (situation 1) or there exists a task v with τ v = C p and D v > D j
performed in this interval (situation 2). If no such event occurs, then set α = 0.
Let us set now β = t j = D j and denote by X the set of tasks k with τ k = C p
performed in the interval [α, β], to which we add j. Formally, this set can be define as X = {k ∈ T i ∪ {i} | τ k = C p and α ≤ t k ≤ β − 1} ∪ {j}.
Notice that any task ℓ of X fulfills α ≤ r ℓ ′ , where r ′ is the release dates vector computed by Existence i (D i , r, D), and D ℓ ≤ D j = β. If α = 0, the inequality r ′ ℓ ≥ 0 is trivial. Else, in both situations (1 and 2), α ≤ r ℓ ′ otherwise ℓ would have been scheduled at time α − 1 (either on the idle processor in situation 1 or instead of task v in situation 2). Furthermore, every tasks of X − {j} are considered before j in the Jackson’s schedule, meaning that D ℓ ≤ D j = β. And finally, we observe that X contains exactly m p (β − α) + 1 tasks.
Now, two main cases are considered:
Case 1: Assume that, ∀ℓ ∈ X , α ≤ r ℓ and let u ∈ X be a task with t u = α. Since u ∈ X , we have D u ≤ D j . Note that any task ℓ ∈ X − {u} satisfies α ≤ r ℓ ′ and D ℓ ≤ β. Thus, X −{u} ⊆ S p (u, α, β) and therefore that |X −{u}| = m p (β −α) with α ≤ r u < D u . We deduce that S p (u, α, β) is critical, so that D is not GJ-consistent for u.
Case 2: Assume now that there exists at least one task ℓ ∈ X such that r ℓ < α. As ℓ ∈ X , we deduce that r ℓ < α ≤ r ′ ℓ and thus ℓ ∈ S i or ℓ = i.
We also observe that r i < α and D i ≤ β . Indeed:
– if ℓ ∈ S i , then r i < r ℓ < α since release dates are consistent with precedence constraints. Furthermore, since ℓ ∈ X must be completed at the latest time β (i.e. D ℓ ≤ β) thus by Lemma 1 task i must complete at the latest time D ℓ −1 < β (i.e. D i < β);
– if ℓ = i, then r i = r ℓ < α and since ℓ ∈ X , then D ℓ = D i ≤ β.
We prove in the following that S p (i, α, β) is critical by considering two cases de- pending on task i:
Case 2.1: Assume that τ i = C p and α < D i . Since α ≤ D i − 1 = r ′ i and D i ≤ β, then i is scheduled between times α and β. Furthermore, since τ i = C p , then i ∈ X .
Now we show that X − {i} ⊆ S p (i, α, β). Let ℓ be a task picked in X − {i}. By definition of X , we have τ ℓ = C p , α ≤ r ′ ℓ and D ℓ ≤ β. Thus, ℓ ∈ S p (i, α, β).
Now, |X − {i}| = m p (β − α). Since X − {i} ⊆ S p (i, α, β), then m p (β − α) ≤
|S p (i, α, β)| with α < D i and thus S p (i, α, β) is critical.
Case 2.2: We suppose now that τ i 6= C p or D i ≤ α. If τ i 6= C p , then i 6∈ X . Otherwise D i ≤ α; since r ′ i = D i − 1, then i is not scheduled between times α and β and thus i 6∈ X .
Now we show that X ⊆ S p (i, α, β). Let ℓ be a task picked in X . By definition of X , we have τ ℓ = C p , α ≤ r ℓ ′ and D ℓ ≤ β . Thus, ℓ ∈ S p (i, α, β).
Now, |X | = m p (β −α)+ 1 > m p (β − α). Since X ⊆ S p (i, α, β), then m p (β −α) <
|S p (i, α, β)| and thus S p (i, α, β) is critical.
Consiter for example the Jackson’s schedule pictured by Figure 3 which violates
some due dates. We get i = 5, and the first task missing its due date is j = 8. Thus
p = 3, α = 2 and β = 3. As r 7 = 1 < α, it illustrates Case 2. Now, τ i = τ 5 = C 2 , thus
we get Case 2.2 and |S 3 (5, 2, 3)| = |{7, 8, 9}| = 3 > 1 and thus is critical.
Lemma 7 If D is a GJ-consistent due dates vector, then D is LPP-consistent.
Proof If D is not LPP-consistent, then there exists i ∈ T such that Existence i (D i , r, D) is false. By Lemma 6, we deduce that there exists a critical set associated with D and thus D is not GJ consistent.
Theorem 1 is thus a simple outcome of lemmas 4 and 7.
Theorem 1 Consider an instance of the problem P Σ k |prec, ℓ ij , r i , d i , p i = 1|⋆ and let D = (D 1 , · · · , D n ) be a vector of due dates such that D i ≤ d i , ∀i ∈ T . D is GJ- consistent if and only if D is LPP-consistent.
5 A generic fixed point algorithm for the due dates modifications
GJ and LPP consistencies are naturally leading to a simple algorithm, starting from initial due dates, and iteratively decreases them until either a contradiction is found, or the modified due dates are consistent. In this latter case, any feasible schedule meets these due dates.
This simple generic algorithm is formulated by Algorithm 1. For any task i ∈ T which is not consistent for D (in the sense of LPP or GJ consistency), the function Adjust computes an integer value ∆ < D i such that, for any value δ ∈ {∆ + 1, · · · , D i }, the vector D defined as
∀j ∈ T , D j =
δ if i = j D j otherwise
is not consistent for i. Note that the vector D = D is not consistent for i, thus the adjustement always returns a value strictly lower than D i insuring the convergence of the algorithm.
Algorithm 1 A generic modified due dates algorithm
Require: An instance of P Σ
k|prec, ℓ
ij, p
i= 1, r
i, d
i|⋆
Ensure: Modified feasible due dates D
⋆or a contradiction.
∀i ∈ T , set D
i= d
iwhile D is not consistent do
choose a task i ∈ T not consistent for D D
i= Adjust(i, D)
if D
i≤ r
ithen
exit with a contradition end if
end while
Notice that GJ (resp. LPP) algorithm is a particular implementation of algorithm 1, (see the next section for details), using GJ (resp. LPP) consistency in the loop test, and defining a particular version of the adjustement function. By Theorem 1, LPP and GJ consistencies are strictly equivalent. Next Lemma is a simple fundamental property for insuring the unicity of the convergence for both algorithms.
Lemma 8 Let i ∈ T . Let also D and D ′ be two due dates vectors with D i = D ′ i and
∀j ∈ T − {i}, D j ≤ D j ′ . If D ′ is not GJ-consistent (resp. LPP-consistent) for i, neither is D.
Proof We show the lemma separately for both consistencies:
– Suppose that D ′ is not GJ-consistent for i, then there exists p ∈ {1, · · · , k} and
a couple (α, β) ∈ N 2 with α < β and such that the set S p ′ (i, α, β) associated with
the due dates vector D ′ is critical. We denote by S p (i, α, β) the corresponding set associated to D.
Now, as D i ′ = D i , modified release dates r j ′ are identical for both sets S p (i, α, β) and S ′ p (i, α, β). Moreover, as D j ≤ D ′ j for any task j ∈ T − {i}, S p ′ (i, α, β) ⊆ S p (i, α, β).
S p (i, α, β) is thus critical, the lemma.
– Suppose that D ′ is not LPP-consistent for i, then Existence i (D ′ i , r, D ′ ) is false.
As D ′ i = D i , modified release dates r ′ j are identical for Existence i (D ′ i , r, D ′ ) and Existence i (D i , r, D). As D j ≤ D j ′ for any task j ∈ T − {i}, Existence i (D i , r, D) is also false, the result.
Theorem 2 insures that the algorithm converges to a unique fixed point if it exists.
Theorem 2 For any instance of the decision problem P Σ k |prec, ℓ ij , p i = 1, r i , d i |⋆, all possible executions of the generic algorithm for a fixed consistency (GJ or LPP) end with the same result: either a contradiction is found or the algorithm computes a unique consistent due dates vector D ⋆ with ∀i ∈ T , D ⋆ i ≤ d i .
Proof Suppose by contradiction that two distinct executions of the algorithm for a fixed consistency (GJ or LPP) do not end with the same result. Two cases may occur:
Case a: There are two distinct consistent due dates vectors denoted by D ⋆1 and D ⋆2 . Assume without loss of generality that there exists a task i ∈ T for which D i ⋆1 <
D ⋆2 i .
Case b: An execution ends with a contradiction whereas the second one ends with a consistent due dates vector. In this case, we assume without loss of generality that the first execution of the generic algorithm induces a contradiction. Similarly to Case a, we denote by D ⋆2 the set of consistent due dates produced by the second execution of the generic algorithm.
Along the iterative process for both executions, as they start with the same due dates d i ≥ D ⋆2 i , there was an iteration of the first execution before which the variable D i became less than D ⋆2 i . We consider the first such iteration in the first execution of the generic algorithm. Let D b be the due date vector just before this iteration, and D e the due date vector computed at this iteration.
Clearly, D e i < D ⋆2 i ≤ D c i , and ∀j ∈ T − {i}, D b j = D e j ≥ D ⋆2 j . Now, let us define the due date vector D ′ as
∀j ∈ T , D j ′ =
D i ⋆2 if i = j D b j otherwise.
D b is not consistent for i by hypothesis, and D e i < D ⋆2 i . Thus, by definition of the adjustement function, D ′ is not consistent for i. As D ′ i = D i ⋆2 and ∀j ∈ T − {i}, D ′ j ≥ D ⋆2 j , D ⋆2 is not consistent for i by Lemma 8, a contradiction.
Corollary 1 LPP and GJ algorithms do end with the same result.
Proof By Theorem 1, a due date vector is LPP-consistent if and only if it is GJ- consistent. Moreover, by Lemma 3, at each step of the GJ algorithm, the task i chosen is also not LPP-consistent for D. The consequence is that an execution of the GJ algorithm can be seen as a special case of LPP algorithm. By Theorem 2, they are all ending in the same way, the corollary.
6 Implementation of LPP and GJ algorithms
This section aims at recalling the implementation details of the GJ and LPP al-
gorithm and their worst-case complexity. An experimental comparison of their perfor-
mance is also provided for identical processors.
6.1 Implementation of GJ algorithm
The implementation developed in [5] concerns a usual precedence graph (without delays) and 2 identical processors. Algorithm 2 is an extended version of Garey-Johnson algorithm to a typed tasks system with precedence delays. The global loop for testing the consistency of a due date vector of the Algorithm 1 is replaced by 4 nested loops to enumerate all possible critical sets. Its time complexity clearly belongs to O(n 3 × k).
Algorithm 2 Garey-Johnson extended algorithm
Require: An instance of P Σ
k|prec, ℓ
ij, p
i= 1, r
i, d
i|⋆
Ensure: Modified due dates D
⋆∀i ∈ T , set D
i= d
i; for β = n to 1 do
for any task i ∈ T with D
i≤ β do for α = 0 to D
i− 1 do
for any p ∈ {1,· · · , k} do set Y = S
p(i, α, β);
if Y is critical then
set D
i= max
j∈YD
j− ⌈
|Y|mp