Lecture 21 CSE 331 Oct 19, 2011
Technical Interviews (Sean) - Thursday October 27th - 6:30 – 9:00 PM - Faculty comments - Free Stuff!!! - Sign-Ups
Online office hrs tonight 10:00pm
Scheduling to minimize lateness n jobs: ith job (ti,di) At most one job at any time start time: s Schedule the n jobs: ith job gets interval [s(i),f(i)=s(i)+ti) Not the sum Algo picks s(i) GOAL: Minimize MAXIMUM lateness Lateness of job i, li = max(0,f(i)-di)
The Greedy Algorithm f=s For every i in 1..n do (Assume jobs sorted by deadline: d1≤ d2≤ ….. ≤ dn) f=s For every i in 1..n do Schedule job i from s(i)=f to f(i)=f+ti f=f+ti
Solving end of Semester blues Term paper Exam study Party! 331 HW Max lateness = 2 Project 2 Party! Exam study 331 HW Term paper Project Monday Tuesday Wednesday Thursday Friday
Today’s agenda Prove that the greedy schedule output minimizes the maximum lateness
Two definitions for schedules Idle time Max “gap” between two consecutively scheduled tasks Idle time =1 Idle time =0 i j Inversion (i,j) is an inversion if i is scheduled before j but di > dj i j f=s For every i in 1..n do Schedule job i from s(i)=f to f(i)=f+ti f=f+ti i j What is the idle time and max # inversion for greedy schedule?