{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw4 - CSCI 4041 Algorithms and Data Structures(Fall09...

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

CSCI 4041: Algorithms and Data Structures (Fall’09) Homework 4, Due 11/24/09 Answer all of the following questions, and always explain your answer. Good Luck! 1. (50 points) Consider the activity selection problem with a set S = { a 1 , . . . , a n } of n proposed activi- ties that wish to use a resource, e.g., different courses planning to use a classroom. Each activity has a known start time s i and a finish time f i where s i f i . Activities a i and a j are compatible if the intervals [ s i , f i ) and [ s j , f j ) do not overlap. The activity selection problem is to find a maximum-size set of mutually compatible events. (a) (25 points) Assuming the activities have been sorted based on the finish times, give a bottom-up dynamic-programming algorithm for solving the activity-selection problem using the recurrence on c [ i, j ] , the number of activities in a maximum-size subset of mutually compatible activities in S i,j . What is the complexity of the dynamic programming algorithm?
This is the end of the preview. Sign up to access the rest of the 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