Download presentation
Presentation is loading. Please wait.
1
Lecture 21 CSE 331 Oct 19, 2011
2
Technical Interviews (Sean)
- Thursday October 27th - 6:30 – 9:00 PM - Faculty comments - Free Stuff!!! - Sign-Ups
3
Online office hrs tonight 10:00pm
4
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)
5
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
6
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
7
Today’s agenda Prove that the greedy schedule output
minimizes the maximum lateness
8
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?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.