{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw2su09 - COT 5405 Summer 2009 HW2 1(15 points Consider the...

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

COT 5405 Summer 2009 HW2 1. (15 points) Consider the problem of making change for n cents using the fewest number of coins. Assume that each coin’s value is an integer. (a) Describe a greedy algorithm to make change consisting of quarters, dimes, nickels, and pennies. Prove that your algorithm yields an optimal solution. (b) Give a set of coin denominations for which the greedy algorithm does not yield an optimal solution. Also give a value of n for which greedy is not the optimal solution. Your set should include a penny so that there is a solution for every value of n . 2. (10 points) Give an efficient algorithm for the following problem: we are given n intervals on a circle. We want to select a maximal number of disjoint intervals. 3. (15 points) You are the manager in a firm where the length of working time and the start time of work is different for different employees. For example, person X works everyday from 8 to 11 AM, person Y from 9 AM to 1 PM, person Z from 2 to 10 PM etc. You task is to create a workforce

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.

{[ 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