04_GreedyAlgorithms_3

# 04_GreedyAlgorithms_3 - CSC 30155 Tuesday Dr Daniel Hughes...

This preview shows pages 1–13. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: CSC 30155 Tuesday 14/09/10 Dr. Daniel Hughes [email protected] Today ` s Lecture l Questions on Greedy Algorithms (30 mins) l A Divide and Conquer Algorithm (20 mins) l Introduction to Dynamic Programming (20 mins) l Memoization Exercise (15 mins) l Feedback on Module 1 Today ` s Lecture l Questions on Greedy Algorithms (30 mins) l A Divide and Conquer Algorithm (20 mins) l Introduction to Dynamic Programming (20 mins) l Memoization Exercise (15 mins) l Feedback on Module 1 (5 mins) Supporting Reading for This Week l Optional: l Cormen et al., Introduction to Algorithms , Second Edition. MIT Press, 2001, Chapter 16: Greedy Algorithms ( full chapter ). l Kleinberg et al., Algorithm Design , Prentice Hall, 2006, Chapter 4: Greedy Algorithms ( full chapter ). Heads-up … l I sometimes think that pure algorithms work can get a little too theoretical , which makes it dull for those of you who like programming … l … so today we are going to get practical and do some group programming using some of the approaches we have learned. l Please raise your hand if you have a laptop with you that has the JDK installed. CSC 30155 Greedy Algorithm Questions Dr. Daniel Hughes [email protected] Question 1 (10 minutes) l Without using your notes , you should complete sections 1(a) and 1(c) of the 2008 University of Liverpool exam question. l I will choose one person to write their answer to each section on the white-board. l Note: you should be able to do this from memory by the end of the semester. Question 2 (20 minutes) l Without using your notes , you should complete sections 1(b) , 1(c) and 1(d) of the 2007 University of Liverpool exam question. l I will call on people to show their answers on the board as we complete each section of this exercise. Recall our check-list: þ Be able to classify computational problems by type. þ Explain the characteristics and properties of a greedy algorithm. þ Describe the unsorted greedy algorithm for activity selection. þ Prove the correctness of the greedy choice property and optimal recursive substructure property for this algorithm. þ Demonstrate the greedy algorithm for activity selection through simulation. þ Show that the performance of the greedy algorithm may be improved by sorting the activity set. Any Questions? CSC 30155 Weighted Activity Selection using Divide and Conquer Dr. Daniel Hughes [email protected] The Weighted Activity Selection Problem l This is another optimization problem that extends the Activity Selection Problem that we discussed earlier. l The rules on selecting compatible activities remain the same as before. l In this problem however, each activity also has an associated weight and the goal is not to schedule as many activities as possible, but instead to schedule the maximum combined weight. The Weighted Activity Selection Problem l This is a common problem … l For example: l Imagine you are the owner of meeting room and considering a set of potential bookings, each with...
View Full Document

{[ snackBarMessage ]}

### Page1 / 44

04_GreedyAlgorithms_3 - CSC 30155 Tuesday Dr Daniel Hughes...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online