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

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

View Full Document Right Arrow Icon
n CS 323/700 ± ± Lecture 6 o Design and Analysis of Algorithms Hoeteck Wee · hoeteck@cs.qc.cuny.edu http://algorithms.qwriting.org/
Background image of page 1

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

View Full DocumentRight Arrow Icon
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 Definition: 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 finish time first I here: earliest deadline first Hoeteck Wee CS 323/700 Feb 22, 2010 2 / 11
Background image of page 2
Minimizing lateness GREEDY ALGORITHM. earliest deadline first 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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/31/2010 for the course COMPUTER S 700 taught by Professor Joewhite during the Spring '10 term at Universidad San Martín de Porres.

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 Right Arrow Icon
Ask a homework question - tutors are online