# lec6 - CS 323/700 Lecture 6 Design and Analysis of...

This preview shows pages 1–5. Sign up to view the full content.

n CS 323/700 ± ± Lecture 6 o Design and Analysis of Algorithms Hoeteck Wee · [email protected] http://algorithms.qwriting.org/

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Scheduling to minimize lateness MINIMIZING LATENESS. I Setup: single resource processes one job at a time. I Input: set of jobs with processing time t j and deadline d j . I Deﬁnition: lateness j = max { 0 , f j - d j } , where f j = s j + t j I Goal: schedule all jobs to minimize maximum lateness L = max j GREEDY WORKS. I interval scheduling: earliest ﬁnish time ﬁrst I here: earliest deadline ﬁrst Hoeteck Wee CS 323/700 Feb 22, 2010 2 / 11
Minimizing lateness GREEDY ALGORITHM. earliest deadline ﬁrst sort jobs by deadline in increasing order time, s, f = 0, [], [] for j in range(1,n+1): # assign job j to the interval [time, time+t_j] s.append(time), f.append(time + t_j) time = t + t_j return s, f RUNNING TIME. O ( n log n ) Hoeteck Wee CS 323/700 Feb 22, 2010 3 / 11

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Minimizing lateness PROOF TECHNIQUE. exchange argument I gradually transform an optimal schedule into a “greedy schedule” I perform a series of exchanges that preserve optimality DEFINITION.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 11

lec6 - CS 323/700 Lecture 6 Design and Analysis of...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online