Download presentation
Presentation is loading. Please wait.
1
Lecture 24 CSE 331 Oct 27, 2010
2
Online office hours tonight 9:00pm
3
Graded HW 5 END of the lecture
4
Scheduling to minimize lateness n jobs: ith job (t i,d i ) Schedule the n jobs: ith job gets interval [s(i),f(i)=s(i)+t i ) At most one job at any time Algo picks s(i) GOAL: Minimize MAXIMUM lateness Lateness of job i, l i = max(0,f(i)-d i ) Not the sum start time: s
5
The Greedy Algorithm (Assume jobs sorted by deadline: d 1 ≤ d 2 ≤ ….. ≤ d n ) f=s For every i in 1..n do Schedule job i from s(i)=f to f(i)=f+t i f=f+t i
6
Solving end of Semester blues MondayTuesdayWednesdayThursdayFriday Project 331 HW Exam study Party! Term paper Party! Exam study 331 HW Project Term paper 0000 2 Max lateness = 2
7
Today’s agenda Prove that the greedy schedule output minimizes the maximum lateness
8
Two definitions for schedules f=s For every i in 1..n do Schedule job i from s(i)=f to f(i)=f+t i f=f+t i Idle time Inversion Max “gap” between two consecutively scheduled tasks i i j j Idle time =1Idle time =0 (i,j) is an inversion if i is scheduled before j but d i > d j i i j j i i j j What is the idle time and max # inversion for greedy schedule?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.