{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern