CSE331 Lecture 18

# CSE331 Lecture 18 - Lecture 18 CSE 331 Mid-term related...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 18 CSE 331 Oct 12, 2011 Mid-term related stuff Solutions will not be handed out Jesse will discuss them in his recitations We will write solution sketches on your graded mid terms Questions? Main Steps in Algorithm Design Problem Statement Problem Definition Algorithm n! “Implementation” Analysis Data Structures Correctness+Runtime Analysis Where do graphs fit in? Problem Statement A tool to define problems Problem Definition Algorithm “Implementation” Analysis Data Structures Correctness+Runtime Analysis Rest of the course Problem Statement Problem Definition Three general techniques Algorithm “Implementation” Analysis Data Structures Correctness+Runtime Analysis Greedy algorithms Build the final solution piece by piece Being short sighted on each piece Never undo a decision Know when you see it 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 homework 331 331 HW Project Monday Tuesday Wednesday Thursday Friday 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 Ordering is crucial Order by starting time Write up a term paper Party! Exam study Algo =1 331 HW Project Monday Tuesday Wednesday Thursday Friday Another attempt Order by duration Ordering by least conflicts doesn’t work Algo =1 Monday Tuesday Wednesday Thursday Friday 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 Questions? Today’s agenda Prove the correctness of the algorithm 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 ...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern