Lecture 23

8
Lecture 23 CSE 331 Oct 28, 2009

description

Lecture 23. CSE 331 Oct 28, 2009. Feedback forms. Please pick one up. You will have last 5 minutes in the class to fill it in. Warning. I am running behind on my topics schedule. I wanted to show some of the cooler stuff. Will not always do COMPLETE proofs. More work for YOU. - PowerPoint PPT Presentation

Transcript of Lecture 23

Page 1: Lecture 23

Lecture 23

CSE 331Oct 28, 2009

Page 2: Lecture 23

Feedback forms

Please pick one up

You will have last 5 minutes in the class to fill it in

Page 3: Lecture 23

Warning

I am running behind on my topics schedule

I wanted to show some of the cooler stuff

Will not always do COMPLETE proofs

More work for YOU

Page 4: Lecture 23

Last lecture

Convert optimal schedule O to Ô such that Ô has no inversions

(a) Exists an inversion (i,j) such that i is scheduled right before j (di > dj)

(b) O’ has one less inversion than O

(c) Max lateness(O’) ≤ Max lateness(O)

(a.5) Swap i and j to get O’Repeat O(n2) times

Repeat O(n2) times

Exercise: Prove by induction.

No consecutive inversion No inversions

Exercise: Prove by induction.

No consecutive inversion No inversions

Page 5: Lecture 23
Page 6: Lecture 23

Same latenessSame latenessSame lateness

Max lateness(O’) ≤ Max lateness(O)

ii jjO

iijjO’

di > dj

Lateness of j in O’ ≤ Lateness of j in O Lateness of j in O’ ≤ Lateness of j in O

Lateness of i in O’ ≤ Lateness of j in O Lateness of i in O’ ≤ Lateness of j in O

Lateness of i in O’ =

t1 t3

t2

t3 - di < t3 - dj = Lateness of j in O

Page 7: Lecture 23

Rest of today

Shortest Path Problem

http://xkcd.com/85/

Page 8: Lecture 23

Reading AssignmentSec 2.5of [KT]