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

Info iconThis 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 eFcient 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 ±rm where the length of working time and the start time of work is di²erent for di²erent employees. ³or 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
Background image of page 1

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

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

This note was uploaded on 01/15/2012 for the course COT 5405 taught by Professor Ungor during the Fall '08 term at University of Florida.

Page1 / 2

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online