Lecture 4 Scheduling 1 Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max structure of a schedule 0 Q 1100 11 00 11 000 111 0 0 1 1 00 11 00 11 00 110 10 1 00 11 000 111 b c 00 11 00 11 0 00 1 11 r(q) C c...... S b Q interference job b: last scheduled job from Q with q b < q c Lemma: For the objective value L max (EDD) of an EDD schedule we have: (Proofs were asked as exercise) 1. L max (EDD) L max < q c 2. L max (EDD) L max < p b Theorem: EDD is 2-approximation algorithm for 1 r j,d j < 0 L max
Lecture 4 Scheduling 2 Single machine models: Maximum Lateness -13- Approximation ratio for EDD for problem 1 r j,d j < 0 L max Remarks: EDD is also a 2-approximation for 1 prec,r j,d j < 0 L max (uses modified release and due dates) by an iteration technique the approximation factor can be reduced to 3/2
Lecture 4 Scheduling 3 Single machine models: Maximum Lateness -14- Enumerative methods for problem 1 r j L max we again will use head-body-tail notation Simple branch and bound method: branch on level i of the search tree by selecting a job to be scheduled on position i if in a node of the search tree on level i the set of already scheduled jobs is denoted by S and the finishing time of the jobs from S by t, for position i we only have to consider jobs k with r k < min j / S (max{t,r j} + p j ) lower bound: solve for remaining jobs 1 r j,pmtn L max search strategy: depth first search + selecting next job via lower bound
Lecture 4 Scheduling 4 Single machine models: Maximum Lateness -15- Advanced b&b-methods for problem 1 r j L max node of search tree = restricted instance restrictions = set of precedence constraints branching = adding precedence constraints between certain pairs of jobs after adding precedence constraints, modify release and due dates apply EDD to instance given in a node critical sequence has no interference job: EDD solves instance optimal backtrack critical sequence has an interference job: branch
Lecture 4 Scheduling 5 Single machine models: Maximum Lateness -16- Advanced b&b-methods for problem 1 r j L max (cont.) branching, given set Q, critical job c, interference job b, and set Q of jobs from Q following b 0 00 11 000 00 11 000 00 11 000 111 111 111 Q C c 00 11 000 1 00 11 00 10 00 11 00 11 11 11 0 1... b c... r(q) S b Q L max = S b + p b + p(q ) + q(q ) < r(q ) + p b + p(q ) + q(q ) if b is scheduled between jobs of Q the value is at least r(q ) + p b + p(q ) + q(q ); i.e. worse than the current schedule
Lecture 4 Scheduling 6 Single machine models: Maximum Lateness -16- Advanced b&b-methods for problem 1 r j L max (cont.) branching, given set Q, critical job c, interference job b, and set Q of jobs from Q following b 0 00 11 000 00 11 000 00 11 000 111 111 111 Q C c 00 11 000 1 00 11 00 10 00 11 00 11 11 11 0 1... b c... r(q) S b Q L max = S b + p b + p(q ) + q(q ) < r(q ) + p b + p(q ) + q(q ) if b is scheduled between jobs of Q the value is at least r(q ) + p b + p(q ) + q(q ); i.e. worse than the current schedule branch by adding either b Q or Q b
Lecture 4 Scheduling 7 Single machine models: Maximum Lateness -17- Advanced b&b-methods for problem 1 r j L max (cont.) lower bounds in a node: maximum of lower bound of parent node r(q ) + p(q ) + q(q ) r(q {b}) + p(q {b}) + q(q {b}) using the modified release and due dates upper bound UB: best value of the EDD schedules discard a node if lower bound UB search strategy: select node with minimum lower bound
Lecture 4 Scheduling 8 Single machine models: Maximum Lateness -18- Advanced b&b-methods for problem 1 r j L max (cont.) speed up possibility: let k / Q {b} with r(q ) + p k + p(q ) + q(q ) UB if r(q ) + p(q ) + p k + q k UB then add k Q if r k + p k + p(q ) + q(q ) UB then add Q k
Lecture 4 Scheduling 9 Single machine models: Number of Tardy Jobs -1- Problem 1 U j : Structure of an optimal schedule: set S 1 of jobs meeting their due dates set S 2 of jobs being late jobs of S 1 are scheduled before jobs from S 2 jobs from S 1 are scheduled in EDD order jobs from S 2 are scheduled in an arbitrary order Result: a partition of the set of jobs into sets S 1 and S 2 is sufficient to describe a solution
Lecture 4 Scheduling 10 Single machine models: Number of Tardy Jobs -2- Algorithm for 1 U j (Moore-Hodgson) 1. enumerate jobs such that d 1... d n ; 2. S 1 := ; t := 0; 3. FOR j:=1 TO n DO 4. S 1 := S 1 {j}; t := t + p j ; 5. IF t > d j THEN 6. Find job k with largest p k value in S 1 ; 7. S 1 := S 1 \ {k}; t := t p k ; 8. END 9. END
Lecture 4 Scheduling 11 Single machine models: Number of Tardy Jobs -3- Remarks on Moore-Hodgson Principle: schedule jobs in order of increasing due dates and always when a job gets late, remove the job with largest processing time; all removed jobs are late complexity: O(n log(n)) Example: n = 5; p = (7, 8, 4, 6, 6); d = (9, 17, 18, 19, 21)
Lecture 4 Scheduling 12 Single machine models: Number of Tardy Jobs -3- Remarks on Moore-Hodgson Principle: schedule jobs in order of increasing due dates and always when a job gets late, remove the job with largest processing time; all removed jobs are late complexity: O(n log(n)) Example: n = 5; p = (7, 8, 4, 6, 6); d = (9, 17, 18, 19, 21) 1 2 3 0 5 10 15 20 d 3
Lecture 4 Scheduling 13 Single machine models: Number of Tardy Jobs -3- Remarks on Moore-Hodgson Principle: schedule jobs in order of increasing due dates and always when a job gets late, remove the job with largest processing time; all removed jobs are late complexity: O(n log(n)) Example: n = 5; p = (7, 8, 4, 6, 6); d = (9, 17, 18, 19, 21) 1 3 4 5 0 5 10 15 20 d 5
Lecture 4 Scheduling 14 Single machine models: Number of Tardy Jobs -3- Remarks on Moore-Hodgson Principle: schedule jobs in order of increasing due dates and always when a job gets late, remove the job with largest processing time; all removed jobs are late complexity: O(n log(n)) Example: n = 5; p = (7, 8, 4, 6, 6); d = (9, 17, 18, 19, 21) 3 4 5 0 5 10 15 20 Moore-Hodgson computes an optimal solution Proof on the board
Lecture 4 Scheduling 15 Single machine models: Weighted Number of Tardy Jobs -1- Problem 1 w j U j problem 1 w j U j is NP-hard even if all due dates are the same; i.e. 1 d j = d w j U j is NP-hard Proof on the board (reduction from PARTITION) priority based heuristic (WSPT-rule): schedule jobs in increasing p j /w j order
Lecture 4 Scheduling 16 Single machine models: Weighted Number of Tardy Jobs -1- Problem 1 w j U j problem 1 w j U j is NP-hard even if all due dates are the same; i.e. 1 d j = d w j U j is NP-hard Proof on the board (reduction from PARTITION) priority based heuristic (WSPT-rule): schedule jobs in increasing p j /w j order WSPT may perform arbitrary bad for 1 w j U j :
Lecture 4 Scheduling 17 Single machine models: Weighted Number of Tardy Jobs -1- Problem 1 w j U j problem 1 w j U j is NP-hard even if all due dates are the same; i.e. 1 d j = d w j U j is NP-hard Proof on the board (reduction from PARTITION) priority based heuristic (WSPT-rule): schedule jobs in increasing p j /w j order WSPT may perform arbitrary bad for 1 w j U j : n = 3;p = (1, 1,M); w = (1+ǫ, 1,M ǫ);d = (1+M, 1+M, 1+M) wj U j (WSPT)/ w j U j (opt) = (M ǫ)/(1 + ǫ)
Lecture 4 Scheduling 18 Single machine models: Weighted Number of Tardy Jobs -2- Dynamic Programming for 1 w j U j assume d 1... d n as for 1 U j a solution is given by a partition of the set of jobs into sets S 1 and S 2 and jobs in S 1 are in EDD order Definition: F j (t) := minimum criterion value for scheduling the first j jobs such that the processing time of the on-time jobs is at most t F n (T) with T = n j=1 p j is optimal value for problem 1 w j U j Initial conditions: F j (t) = { for t < 0; j = 1,...,n 0 for t 0; j = 0 (1)
Lecture 4 Scheduling 19 Single machine models: Weighted Number of Tardy Jobs -3- Dynamic Programming for 1 w j U j (cont.) if 0 t d j and j is late in the schedule corresponding to F j (t), we have F j (t) = F j 1 (t) + w j if 0 t d j and j is on time in the schedule corresponding to F j (t), we have F j (t) = F j 1 (t p j )
Lecture 4 Scheduling 20 Single machine models: Weighted Number of Tardy Jobs -3- Dynamic Programming for 1 w j U j (cont.) if 0 t d j and j is late in the schedule corresponding to F j (t), we have F j (t) = F j 1 (t) + w j if 0 t d j and j is on time in the schedule corresponding to F j (t), we have F j (t) = F j 1 (t p j ) summarizing, we get for j = 1,...,n: { min{f F j (t) = j 1 (t p j ),F j 1 (t) + w j } for 0 t d j F j (d j ) for d j < t T (2)
Lecture 4 Scheduling 21 Single machine models: Weighted Number of Tardy Jobs -4- DP-algorithm for 1 w j U j 1. initialize F j (t) according to (1) 2. FOR j := 1 TO n DO 3. FOR t := 0 TO T DO 4. update F j (t) according to (2) 5. w j U j (OPT) = F n (d n )
Lecture 4 Scheduling 22 Single machine models: Weighted Number of Tardy Jobs -4- DP-algorithm for 1 w j U j 1. initialize F j (t) according to (1) 2. FOR j := 1 TO n DO 3. FOR t := 0 TO T DO 4. update F j (t) according to (2) 5. w j U j (OPT) = F n (d n ) complexity is O(n n j=1 p j ) thus, algorithm is pseudopolynomial