1 / 21

Lecture 16

Lecture 16. CSE 331 Oct 4, 2017. Mini Project Pitch due TODAY. Some of the chosen algorithm are now up!. Form your group on Autolab BEFORE submitting your pitch. Do not forget to add URL to your references. Quiz 1 on Monday. Directed Acyclic Graph (DAG). No directed cycles.

sharlae
Télécharger la présentation

Lecture 16

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 16 CSE 331 Oct 4, 2017

  2. Mini Project Pitch due TODAY Some of the chosen algorithm are now up! Form your group on Autolab BEFORE submitting your pitch Do not forget to add URL to your references

  3. Quiz 1 on Monday

  4. Directed Acyclic Graph (DAG) No directed cycles Precedence relationships are consistent

  5. Topological Sorting of a DAG Order the vertices so that all edges go “forward” Topological sorting  DAG

  6. TopOrd(G=(V,E)) • If |V| = {u}, return u • Let w be a node with no incoming edges • Let G’ be G\{w} • Return w; TopOrd(G’)

  7. Run of TopOrd algorithm

  8. Todays’ agenda Prove Lemma 3 Run time analysis of TopOrd Greedy algorithms

  9. Mid-term material Everything we have covered so far (essentially Chaps 1-3 except Sec 1.2) See piazza post on how to prepare for the mid-terms

  10. Questions?

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

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

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

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

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

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

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

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

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

  20. Questions?

  21. Rest of today’s agenda Prove the correctness of the algorithm

More Related