1 / 20

Lecture 18

Lecture 18. CSE 331 Oct 12, 2012. HW 5 due today. Q1, Q2 and Q3 in different piles. I will not take any HW after 1:15pm. Other HW related stuff. Graded HW4 starting Monday. Solutions to HW 5 at the end of the lecture. On Thursday, Oct 18. hours-a-thon. Unclaimed HWs and solutions.

mya
Download Presentation

Lecture 18

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 18 CSE 331 Oct 12, 2012

  2. HW 5 due today Q1, Q2 and Q3 in different piles I will not take any HW after 1:15pm

  3. Other HW related stuff Graded HW4 starting Monday Solutions to HW 5 at the end of the lecture

  4. On Thursday, Oct 18 hours-a-thon Unclaimed HWs and solutions Zihe: 3:00-5:00 (Davis 302) Jiun-Jie: 5:00-6:00 (Davis 302)

  5. Review Session on Oct 19 Zihe’s recitation section from 9-9:50am in 114 Hoch

  6. Mid term Next Friday in class at 1pm Unfortunately I won’t be there Jiun-Jie with my student Jesse & another PhD student Dung will proctor the exam

  7. On Mon and Wed Jesse will present the lectures If time permits, he will go over the sample mid term on Wed

  8. HW 5 due today Q1, Q2 and Q3 in different piles I will not take any HW after 1:15pm

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

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

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

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

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

  14. Greedily solve your blues! Arrange tasks in some order and iteratively pick non-overlapping tasks Write up a term paper Party! Exam study 331 HW Project Monday Tuesday Wednesday Thursday Friday

  15. Ordering is crucial Order by starting time Write up a term paper Algo =1 Party! Exam study 331 HW Project Monday Tuesday Wednesday Thursday Friday

  16. Another attempt Order by duration Ordering by least conflicts doesn’t work Algo =1 Monday Tuesday Wednesday Thursday Friday

  17. The final algorithm Order tasks by their END time Write up a term paper Party! Exam study 331 HW Project Monday Tuesday Wednesday Thursday Friday

  18. Questions?

  19. Today’s agenda Prove the correctness of the algorithm

  20. 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

More Related