Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 18 CSE 331 Oct 6, 2014. Group/Algo registration deadline BOTH DUE WED by 11:59pm!

Similar presentations


Presentation on theme: "Lecture 18 CSE 331 Oct 6, 2014. Group/Algo registration deadline BOTH DUE WED by 11:59pm!"— Presentation transcript:

1 Lecture 18 CSE 331 Oct 6, 2014

2 Group/Algo registration deadline BOTH DUE WED by 11:59pm!

3 Quiz next Monday In class 1:00pm-1:10pm sharp Two True/False with justification Qs

4 More details on Piazza

5 On how to prep for the mid-term

6 Feedback

7 Questions?

8 Main Steps in Algorithm Design Problem Statement Algorithm Problem Definition “Implementation” Analysis n! Correctness+Runtime Analysis Data Structures

9 Where do graphs fit in? Problem Statement Algorithm Problem Definition “Implementation” Analysis Correctness+Runtime Analysis Data Structures A tool to define problems

10 Rest of the course Problem Statement Algorithm Problem Definition “Implementation” Analysis Correctness+Runtime Analysis Data Structures Three general techniques

11 Greedy algorithms Build the final solution piece by piece Being short sighted on each piece Never undo a decision Know when you see it

12 End of Semester blues MondayTuesdayWednesdayThursdayFriday Project 331 homework 331 HW Exam study Party! Write up a term paper Can only do one thing at any day: what is the maximum number of tasks that you can do?

13 Greedily solve your blues! MondayTuesdayWednesdayThursdayFriday Project 331 HW Exam study Party! Write up a term paper Arrange tasks in some order and iteratively pick non- overlapping tasks

14 Ordering is crucial MondayTuesdayWednesdayThursdayFriday Project 331 HW Exam study Party! Write up a term paper Order by starting time Algo =1

15 Another attempt MondayTuesdayWednesdayThursdayFriday Order by duration Algo =1 Ordering by least conflicts doesn’t work

16 The final algorithm MondayTuesdayWednesdayThursdayFriday Project 331 HW Exam study Party! Write up a term paper Order tasks by their END time

17 Questions?

18 Today’s agenda Prove the correctness of the algorithm

19 Formal Algorithm R: set of requests Set A to be the empty set While R is not empty Choose i in R with the earliest finish time Add i to A Remove all requests that conflict with i from R Return A


Download ppt "Lecture 18 CSE 331 Oct 6, 2014. Group/Algo registration deadline BOTH DUE WED by 11:59pm!"

Similar presentations


Ads by Google