• Aucun résultat trouvé

The equivalence of two classical list scheduling algorithms for dependent typed tasks with release dates, due dates and precedence delays

N/A
N/A
Protected

Academic year: 2021

Partager "The equivalence of two classical list scheduling algorithms for dependent typed tasks with release dates, due dates and precedence delays"

Copied!
14
0
0

Texte intégral

(1)

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�

(2)

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]

(3)

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

(4)

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

i

0 0 0 0 0 3 1 1 2

d

i

3 3 3 3 2 4 3 3 3

τ

i

C

1

C

1

C

1

C

2

C

2

C

2

C

3

C

3

C

3

1 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

i

0 1 2 1 0 3 1 2 3

t = 0

C

1

1 2 3

C

2

5 4 6

C

3

7 8 9

Fig. 2: A feasible schedule for the instance pictured by Figure 1.

(5)

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.

(6)

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

1

1 2 3

C

2

4 5 6

C

3

7 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.

(7)

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.

(8)

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.

(9)

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

i

while D is not consistent do

choose a task i ∈ T not consistent for D D

i

= Adjust(i, D)

if D

i

≤ r

i

then

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

(10)

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.

(11)

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∈Y

D

j

− ⌈

|Y|m

p

⌉;

end if end for end for end for end for

6.2 Implementation of LPP algorithm

The implementation initially developed in [13] concerns precedence graphs with delays and identical machines. An extension to typed tasks systems is developed in [4].

Algorithm 3 is an extended version of the Leung-Palem-Pnueli algorithm. Consistent release dates r are first evaluated and tasks are numbered such that r 1 ≥ r 2 ≥ · · · ≥ r n . This numbering insures the convergence of the algorithm. Each adjustement is evalu- ated using a double dichotomic search, leading to an algorithm of global complexity belonging to O(n 2 log(n)α(n) + ne); α(n) is here the functional inverse of the Acker- mann function. It is proved in [13] that, at the end of the algorithm, the computed due date vector is LPP-consistent.

Algorithm 3 Leung-Palem-Pnueli extended algorithm

Require: An instance of P Σ

k

|prec, ℓ

ij

, p

i

= 1, r

i

, d

i

|⋆

Ensure: Modified due dates D

Compute ∀i ∈ {1,· · · , n}, r

i

= max

j∈Pi

(r

i

, r

j

+ 1 + ℓ

+ji

) following a topological order of G;

Renumber tasks such as r

1

≥ r

2

≥ · · · ≥ r

n

;

Compute ∀i ∈ {1,· · · , n}, D

i

= min

j∈Si

(D

i

, D

j

− 1 − ℓ

+ij

) following an inverse topological order;

for i = 1 to n do D

i

= Adjust(i, D);

Compute ∀i ∈ {1, · · · , n}, D

i

= min

j∈Si

(D

i

, D

j

− 1 − ℓ

+ij

) following an inverse topological order;

end for

6.3 An experimental comparison of the performance for m identical processors

The time complexity of the two previous implementation of GJ and LPP algorithms

were compared for m indentical processors and no delays (i.e. ℓ ij = 0 for any precedence

arc (i, j)).

(12)

Fig. 4: Comparison of the execution time of LPP and GJ algorithms

Random instances were generated as follows. A fixed number of layer k < n, each of them with at least one task, allows to generate randomly acyclic precedence graphs. Release dates are them randomly fixed, and then updated by setting r i = max(r i , max j∈P

i

r j + 1). Deadlines are lastly determined by d j = r j + α, where α is a small random value.

Our main surprise was to notice that the deadlines fixed for most of the instances (about 90 percent) are consistent. We consider for our experiments only the remaining ones for which the deadlines are modified. Figure 4 reports the comparison between the execution times of the implementations of the LPP and the GJ algorithms. The performance of the LPP algorithm is clearly better and corresponds to the difference between the two theoretical worst-case complexities.

7 Theoretical outcomes of Theorem 1

The aim of this part is to exploit the equivalence between GJ and LPP algorithms.

We start by breafly recalling that a polynomial time algorithm for a decision problem with due dates can be considered to minimize the makespan or the maximum lateness.

Polynomial problem and approximation algorithms based on GJ or LPP algorithms are then listed.

7.1 Computation of a feasible schedule

As seen before, GJ and LPP algorithms are decreasing due dates following necessary conditions until a fixed point is reached. The second phase of the algorithm consists in building a schedule using a classical earliest due date first priority list algorithm.

Whereas several tasks can be executed by a same resource, the selected task is the one with a minimum due date.

Schedules build are solving a decision problem. It can be extended easily to minimize the makespan or the maximum lateness. Indeed, assume that the decision problem considered can be solved polynomially for any values of the initial due dates.

1. By setting d i = C for any task i ∈ T , LPP or GJ fixed point algorithms can

either compute consistent due dates, or a contradiction is found. This process can

be used with a dichotomic binary search to minimize C leading to consistent due

(13)

dates. Whereas a minimum value C is fixed, a list schedule using the corresponding consistent due dates builds a feasible schedule minimizing the makespan.

2. A similar scheme can be used to minimize the lateness. The idea is to minimize ∆ by a dichotomic search such that a set of consistent due dates can be computed from due dates d i + ∆, ∀i ∈ T . As before, a second step consists in building a feasible schedule using a list schedule algorithm for which priority of tasks decreases proportionaly to their (consistent) due date.

7.2 Polynomial time algorithms based on LPP consistency

LPP algorithm was considered to get polynomial time algorithms for several classes of instances, solving most of the polynomially solvable m machines problems with precedence constraints. Table 1 summarizes the maximal polynomial problems solved by the LPP algorithm. By Theorem 1, these results also holds for GJ algorithm.

An outtree (resp. intree) is an acyclic precedence graph where each task has no more than one immediate predecessor (resp. successor). An interval order graph is an acyclic precedence graph G = (T , E) such that there exists a mapping f from T to intervals on the real line with the following property: (i, j) ∈ E if and only if ∀x ∈ f (i) and ∀y ∈ f (j), x < y. An interval order graph is monotone if for every pair of arcs (i, j) and (i, j ) from E, ℓ ij ≤ ℓ ij

if P j ⊆ P j

.

Problem Ref.

1|prec, ℓ

ij

∈ {0, 1}, r

i

, p

i

= 1|L

max

[13]

1|prec, ℓ

ij

∈ {0, 1}, p

i

≥ 1|C

max

[13]

2|prec, ℓ

ij

∈ {−1, 0}, r

i

, p

i

= 1|L

max

[13]

P |intree, ℓ

ij

= ℓ, p

i

= 1|L

max

[13]

P |outtree, ℓ

ij

= ℓ, r

i

, p

i

= 1|C

max

[13]

P Σ

k

|int.order, monotone ℓ

ij

, r

i

, p

i

= 1|L

max

[4]

Table 1: Maximal polynomial problems solved by LPP and GJ algorithms.

7.3 Approximation algorithms based on GJ consistency

GJ consistency can be exploited to obtain approximation algorithms for minimizing the maximum lateness, using the scheme described previously. Theorem 3 was proved by Hanen and Zinder [8] using GJ algorithm and is true for the two optimization algorithms by Theorem 1.

Theorem 3 An upper-bound of the maximum lateness L max of the solution obtained using a LPP or GJ consistency-based algorithm for the problem P |prec, p i = 1, r i , d i | L max

is

L max ≤ (2 − 2

u(m) )L max (σ ) + (1 − 2

u(m) )d max − (1 − 2 u(m) )

where σ is an optimum schedule, d max = max i∈T d i and u(m) = m if m is even, m+1 if m is odd.

In the same way, Theorem 4 was proved by Benabid and Hanen [1] using initially GJ algorithm and is thus also valid for LPP algorithm:

Theorem 4 An upper-bound of the maximum lateness L max of the solution obtained using a LPP or GJ consistency-based algorithm for the problem P Σ k |prec, ℓ ij = ℓ, p i = 1, r i , d i | L max is

L max ≤ (k + 1 − α(m x )

ℓ + 1 )L max (σ ) + (k − α(m x )

ℓ + 1 )d max − α(m x )

ℓ + 1

(14)

where σ is an optimum schedule, d max = max i∈T d i , m x = max r∈{ 1,···,k} m r and α(m x ) =

2

m

x

if m x is even

2

m

x

+1 otherwise.

8 Conclusion and further approach

We proved in this paper that GJ and LPP algorithms are equivalent for the general decision problem P Σ k |prec, ℓ ij , p i = 1, r i , d i |⋆. This result allows us to unify prior results of the literature. Several polynomial subcases proved using LPP algorithm are thus also polynomially solved using GJ algorithm. Approximation results proved using GJ algorithms are valid for LPPs one. As the complexity of LPP is slightly better, it should be prefered if an implementation is needed.

This equivalence should be further investigated for variants of the initial problem as communication delays or preemptive tasks. We also hope that a careful investigation of the two algorithms may lead to a more efficient algorithm taking the best of both.

One can also think that the due date modification algorithm could be used reversely to modify release times on the reverse graph, and iterate until a fixed point is reached. The question is then to evaluate if a better worst case performance ratio may be achieved for approximation algorithms.

References

1. Benabid, A., Hanen, C.: Performance of garey johnson algorithm for pipelined type tasks systems.

International Transactions on Operational Research 17(6), 797–808 (2010)

2. Brucker, P., Knust, S.: Complexity results for single-machine problems with positive finish- start time-lags. Computing 63(4), 299–316 (1999). DOI 10.1007/s006070050036. URL http://dx.doi.org/10.1007/s006070050036

3. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2 edn. The MIT Press (2001)

4. Dupont de Dinechin, B.: Scheduling monotone interval orders on typed task systems. In: PLANSIG 2007, 26th Worshop of the UK Planning and Scheduling Special Interest Group, pp. 25–31 (2007) 5. Garey, M.R., Johnson, D.S.: Two-processor scheduling with start-time and deadlines. SIAM

Journal on Computing 6, 416–426 (1977)

6. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP- Completeness. Studienreihe Informatik. W.H. Freeman and Company, San Francisco (1979) 7. Hanen, C., Zinder, Y.: The worst case analysis of garey-johnson algorithm for preemptive m pro-

cessors. In: Multidisciplinary International Conference on Scheduling: Theory and Applications, vol. 2, pp. 453–470 (2005)

8. Hanen, C., Zinder, Y.: The worst-case analysis of the garey-johnson algorithm. Journal of Schedul- ing 12(4), 389–400 (2009)

9. Hennessy, J.L., Gross, T.: Postpass code optimization of pipeline constraints. ACM Trans. Program. Lang. Syst. 5(3), 422–448 (1983). DOI 10.1145/2166.357217. URL http://doi.acm.org/10.1145/2166.357217

10. Horn, W.: Some simple scheduling algorithms. Naval Research Logistics Quarterly 21, 177–185 (1974)

11. Kordon, A.M., Kacem, F., Dupont de Dinechin, B., Finta, L.: Scheduling an interval ordered precedence graph with communication delays and a limited number of processors. RAIRO - Operations Research 47, 73–87 (2013). DOI 10.1051/ro/2013028. URL http://www.rairo- ro.org/action/article

S

0399055913000280

12. Lenstra, J., Kan, A.R., Brucker, P.: Complexity of machine scheduling problems. In: B.K.

P.L. Hammer E.L. Johnson, G. Nemhauser (eds.) Studies in Integer Programming, Annals of Dis- crete Mathematics, vol. 1, pp. 343 – 362. Elsevier (1977). DOI http://dx.doi.org/10.1016/S0167- 5060(08)70743-X. URL http://www.sciencedirect.com/science/article/pii/S016750600870743X 13. Leung, A., Palem, K.V., Pnueli, A.: Scheduling time-constrained instructions on

pipelined processors. ACM Trans. Program. Lang. Syst. 23, 73–103 (2001). DOI http://doi.acm.org/10.1145/383721.383733. URL http://doi.acm.org/10.1145/383721.383733 14. Palem, K.V., Simons, B.B.: Scheduling time-critical instructions on risc machines. ACM

Trans. Program. Lang. Syst. 15(4), 632–658 (1993). DOI 10.1145/155183.155190. URL http://doi.acm.org/10.1145/155183.155190

15. Ullman, J.D.: Np-complete scheduling problems. J. Comput. Syst. Sci. 10(3), 384–393 (1975).

DOI 10.1016/S0022-0000(75)80008-0. URL http://dx.doi.org/10.1016/S0022-0000(75)80008-0 16. Yu, W., Hoogeveen, H., Lenstra, J.K.: Minimizing makespan in a two-machine flow shop with

delays and unit-time operations is np-hard. Journal of Scheduling 7(5), 333–348 (2004)

Références

Documents relatifs

Diese Anforderungen sind in der Regel derart komplex, dass sie im Rahmen der Ausbildung allein kaum bewältigt werden können, sondern einer allgemeinen fachsprachlichen

Corollary 2.5 provides a polynomial algorithm to transform S such that it contains at most one task that is not scheduled during its minimum processing time in polynomial time (no

This algorithm was extended to get approximation algorithms for the L max criteria with various hypothe- sis: parallel processors (Hanen and Zinder 2009), preemptive jobs (Hanen

Dominance rules for the parallel machine total weighted tardiness scheduling problem with release dates.. Antoine Jouglet,

Note that if the W SP T sequence of jobs belonging to NR (S) (taking the original earliest starting times) leads to a non-idling schedule starting at time eet F (S), then LB WSPT (S)

The extended version of the LPP algorithm solves polynomially the determination of a feasible schedule for a unit execution time typed tasks sys- tem with arbitrary release dates

We propose an approximate IIT algorithm named ELS/IIT (earli- est latest start/ inserted idle time) and branch and bound algorithm, which produces a feasible IIT(inserted idle

In this paper we address the Multi Trip Vehicle Routing Problem with Time Windows and Release Dates (MTVRPTWR).. It is noteworthy that the problem is deterministic even if