Lecture 20 CSE 331 Oct 14, 2016.

Slides:



Advertisements
Similar presentations
Lecture 20 CSE 331 Oct 10, HW 5 due today Place Q1, Q2 and Q3 in separate piles I will not accept HWs after 1:15pm.
Advertisements

Instructor Neelima Gupta Table of Contents Greedy Algorithms.
Lecture 21 CSE 331 Oct 20, Announcements Graded mid-term exams at the END of the lecture Sign up for blog posts/group scribe leader No more than.
Lecture 23 CSE 331 Oct 24, Temp letter grades assigned See the blog post for more details.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Lecture 36 CSE 331 Dec 2, Graded HW 8 END of the lecture.
Lecture 34 CSE 331 Nov 30, Graded HW 8 On Wednesday.
Lecture 25 CSE 331 Oct 29, HW 6 due today All questions in one pile I will not take any HW after 1:15pm.
Lecture 24 CSE 331 Oct 27, Online office hours tonight 9:00pm.
Lecture 20 CSE 331 Oct 21, Algorithm for Interval Scheduling R: set of requests Set A to be the empty set While R is not empty Choose i in R with.
Lecture 22 CSE 331 Oct 26, Blog posts Please sign up if you have not If I have a pick a blogger I will only pick ONE/lecture Will lose out on 5%
CSE 331: Review. Main Steps in Algorithm Design Problem Statement Algorithm Real world problem Problem Definition Precise mathematical def “Implementation”
Lecture 8 CSE 331. Main Steps in Algorithm Design Problem Statement Algorithm Problem Definition “Implementation” Analysis n! Correctness+Runtime Analysis.
Lecture 18 CSE 331 Oct 12, HW 5 due today Q1, Q2 and Q3 in different piles I will not take any HW after 1:15pm.
Lecture 18 CSE 331 Oct 6, Group/Algo registration deadline BOTH DUE WED by 11:59pm!
CSE 421 Algorithms Richard Anderson Lecture 8 Greedy Algorithms: Homework Scheduling and Optimal Caching.
Lecture 33 CSE 331 Nov 20, HW 8 due today Place Q1, Q2 and Q3 in separate piles I will not accept HWs after 1:15pm Submit your HWs to the side of.
Lecture 9 CSE 331 June 18, The “real” end of Semester blues MondayTuesdayWednesdayThursdayFriday Project 331 HW Exam study Party! Write up a term.
Lecture 32 CSE 331 Nov 16, 2016.
Lecture 31 CSE 331 Nov 14, 2016.
Lecture 16 CSE 331 Oct 5, 2016.
Lecture 17 CSE 331 Oct 3, 2014.
Lecture 31 CSE 331 Nov 13, 2017.
Lecture 34 CSE 331 Nov 26, 2012.
Lecture 22 CSE 331 Oct 22, 2010.
Lecture 34 CSE 331 Nov 26, 2012.
Lecture 21 CSE 331 Oct 21, 2016.
Richard Anderson Autumn 2015 Lecture 8 – Greedy Algorithms II
Lecture 21 CSE 331 Oct 20, 2017.
Lecture 36 CSE 331 Nov 30, 2016.
Lecture 35 CSE 331 Nov 27, 2017.
Lecture 34 CSE 331 Nov 20, 2017.
Lecture 17 CSE 331 Oct 7, 2016.
Lecture 35 CSE 331 Nov 28, 2016.
Lecture 19 CSE 331 Oct 12, 2016.
Greedy Algorithms: Homework Scheduling and Optimal Caching
Lecture 16 CSE 331 Oct 4, 2017.
Richard Anderson Lecture 6 Greedy Algorithms
Lecture 18 CSE 331 Oct 12, 2011.
Lecture 19 CSE 331 Oct 8, 2014.
Lecture 20 CSE 331 Oct 17, 2011.
Lecture 32 CSE 331 Nov 15, 2017.
Lecture 33 CSE 331 Nov 14, 2014.
Richard Anderson Autumn 2016 Lecture 7
Lecture 33 CSE 331 Nov 15, 2013.
Lecture 34 CSE 331 Nov 18, 2011.
Lecture 34 CSE 331 Nov 21, 2016.
Lecture 22 CSE 331 Oct 15, 2014.
Lecture 18 CSE 331 Oct 9, 2017.
Richard Anderson Lecture 7 Greedy Algorithms
CS 336/536: Computer Network Security Fall 2014 Nitesh Saxena
Homework Week of January 7th UNIT TEST TODAY! Monday Tuesday Wednesday
Richard Anderson Winter 2019 Lecture 8 – Greedy Algorithms II
Lecture 20 CSE 331 Oct 13, 2017.
Lecture 19 CSE 331 Oct 14, 2011.
Lecture 21 CSE 331 Oct 19, 2011.
Lecture 21 CSE 331 Oct 22, 2012.
Lecture 36 CSE 331 Nov 30, 2012.
Lecture 23 CSE 331 Oct 28, 2009.
CS 250, Discrete Structures, Fall 2014 Nitesh Saxena
Richard Anderson Autumn 2016 Lecture 8 – Greedy Algorithms II
Lecture 23 CSE 331 Oct 24, 2011.
Richard Anderson Winter 2019 Lecture 7
Week 2: Greedy Algorithms
Lecture 19 CSE 331 Oct 10, 2016.
Lecture 32 CSE 331 Nov 12, 2014.
Richard Anderson Autumn 2015 Lecture 7
Lecture 15 CSE 331 Oct 4, 2010.
Richard Anderson Autumn 2019 Lecture 7
Richard Anderson Autumn 2019 Lecture 8 – Greedy Algorithms II
Presentation transcript:

Lecture 20 CSE 331 Oct 14, 2016

Mid-term-I Monday In class 1:00pm-1:50pm sharp Eight True/False with justification Qs

Graded Quiz 1 On Autolab by tonight

Graded HW4 Hopefully by tonight

Last warning on sources

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

Two definitions for schedules Idle time Max “gap” between two consecutively scheduled tasks Idle time =0 Idle time =1 Inversion (i,j) is an inversion if i is scheduled before j but di > dj i j f=1 For every i in 1..n do Schedule job i from si=f to fi=f+ti f=f+ti i j 0 idle time and 0 inversions for greedy schedule

We will prove Any two schedules with 0 idle time and 0 inversions have the same max lateness

Proving greedy is optimal Any two schedules with 0 idle time and 0 inversions have the same max lateness Greedy schedule has 0 idle time and 0 inversions

To prove Any two schedules with 0 idle time and 0 inversions have the same max lateness Greedy schedule has 0 idle time and 0 inversions There is an optimal schedule with 0 idle time and 0 inversions

Optimal schedule with 0 idle time ≥ ≥ = = Lateness “Only” need to convert a 0 idle optimal ordering to one with 0 inversions (and 0 idle time)

Today’s agenda Prove any schedules with 0 idle time and 0 inversions have the same L “Exchange” argument to convert an optimal solution into a 0 inversion one