• Tidak ada hasil yang ditemukan

The Total Tardiness - Dynamic Programming

Dalam dokumen Scheduling (Halaman 65-68)

Single Machine Models (Deterministic)

Algorithm 3.3.1 Minimizing Number of Tardy Jobs) Step 1

3.4 The Total Tardiness - Dynamic Programming

The objective

Tj is one that is important in practice as well. Minimizing the number of tardy jobs,

Uj, in practice cannot be the only objective to measure how due dates are being met. Some jobs may have to wait for an unacceptably long time if the number of late jobs is minimized. If instead the sum of the tardinesses is minimized it is less likely that the wait of any given job will be unacceptably long.

3.4 The Total Tardiness - Dynamic Programming 51 The model 1||

Tj has received an enormous amount of attention in the literature. For many years its computational complexity remained open, until its NP-hardness was established in 1990. As 1||

Tj is NP-hard in the ordi- nary sense it allows for a pseudo-polynomial time algorithm based on dynamic programming (see Appendix D). The algorithm is based on two preliminary results.

Lemma 3.4.1. If pj pk and dj dk, then there exists an optimal sequence in which jobj is scheduled before job k.

Proof. The proof of this result is left as an exercise.

This type of result is useful when an algorithmhas to be developed for a problemthat is NP-hard. Such a result, often referred to as a Dominance Result or Elimination Criterion, often allows one to disregard a fairly large number of sequences. Such a dominance result may also be thought of as a set of precedence constraints on the jobs. The more precedence constraints created through such dominance results, the easier the problem becomes.

In the following lemma the sensitivity of an optimal sequence to the due dates is considered. Two probleminstances are considered, both of which haven jobs with processing timesp1, . . . , pn. The first instance has due dates d1, . . . , dn. Let Ck be the latest possible completion time of job k in any op- timal sequence, say S, for this instance. The second instance has due dates d1, . . . , dk1,max(dk, Ck), dk+1, . . . , dn. Let S denote the optimal sequence with respect to this second set of due dates and Cj the completion of job j under this second sequence.

Lemma 3.4.2. Any sequence that is optimal for the second instance is also optimal for the first instance.

Proof. LetV(S) denote the total tardiness under an arbitrary sequenceS with respect to the first set of due dates and letV(S) denote the total tardiness under sequenceS with respect to the second set of due dates. Now

V(S) =V(S) +Ak

and

V(S) =V(S) +Bk,

where, if Ck dk the two sets of due dates are the same and the sequence that is optimal for the second set is therefore also optimal for the first set. If Ck ≥dk, then

Ak =Ck −dk

and

Bk = m ax(0,min(Ck, Ck)−dk)

It is clear thatAk ≥Bk. As S is optimal for the second instance V(S) V(S). ThereforeV(S)≥V(S) which completes the proof.

In the remainder of this section it is assumed for purposes of exposition that (without loss of generality) all processing times are different, if neces- sary after an infinitesimal perturbation. Assume that d1 ≤ · · · ≤ dn and pk = m ax(p1, . . . , pn). That is, the job with the kth smallest due date has the longest processing time. From Lemma 3.4.1 it follows that there exists an optimal sequence in which jobs{1, . . . , k−1}all appear, in some order, before jobk. Of the remainingn−kjobs, i.e., jobs {k+ 1, . . . , n}, some may appear before jobkand some may appear after jobk. The subsequent lemma focuses on thesen−kjobs.

Lemma 3.4.3. There exists an integerδ, 0≤δ ≤n−k, such that there is an optimal sequenceS in which jobk is preceded by all jobsj withj≤k+δ and followed by all jobsj withj > k+δ.

Proof. Let Ck denote the latest possible completion time of job k in any se- quence that is optimal with respect to the given due datesd1, . . . , dn. LetSbe a sequence that is optimal with respect to the due datesd1, . . . , dk1,max(Ck, dk), dk+1, . . . , dn and that satisfies the condition stated in Lemma 3.4.1. Let Ck denote the completion time of jobkunder this sequence. By Lemma 3.4.2 se- quenceS is also optimal with respect to the original due dates. This implies that Ck max(Ck, dk). One can assume that jobk is not preceded in S by a job with a due date later than max(Ck, dk) (if this would have been the case this job would be on time and repositioning this job by inserting it immedi- ately after jobk would not increase the objective function). Also, jobk has to be preceded by all jobs with a due date earlier than max(Ck, dk) (otherwise Lemma 3.4.1 would be violated). Soδ can be chosen to be the largest integer such thatdk+δ max(Ck, dk). This completes the proof.

In the dynamic programming algorithm a subroutine is required that gener- ates an optimal schedule for the set of jobs 1, . . . , lstarting with the processing of this set at timet. Let k be the job with the longest processing time among theseljobs. From Lemma 3.4.3 it follows that for someδ(0≤δ≤l−k) there exists an optimal sequence starting att which may be regarded as a concate- nation of three subsets of jobs, namely

(i) jobs 1,2, . . . , k−1, k+ 1, . . . , k+δin some order, followed by (ii) job k, followed by

(iii) jobs k+δ+ 1, k+δ+ 2, . . . , lin some order.

The completion time of jobk,Ck(δ), is given by Ck(δ) =

jk+δ

pj.

It is clear that for the entire sequence to be optimal the first and third sub- sets must be optimally sequenced within themselves. This suggests a dynamic programming procedure that determines an optimal sequence for a larger set of

3.4 The Total Tardiness - Dynamic Programming 53 jobs after having determined optimal sequences for proper subsets of the larger set. The subsetsJ used in this recursive procedure are of a very special type.

A subset consists of all the jobs in a set{j, j+ 1, . . . , l−1, l} with processing times smaller than the processing time pk of job k. Such a subset is denoted byJ(j, l, k). LetV(J(j, l, k), t) denote the total tardiness of this subset under an optimal sequence, assuming that this subset starts at timet. The dynamic programming procedure can now be stated as follows.

Algorithm 3.4.4 (Minimizing Total Tardiness)

Dalam dokumen Scheduling (Halaman 65-68)