t3 - n State and prove time complexity of your algorithm 1...

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

View Full Document Right Arrow Icon
COT 5405, Test 3 Duration - 90 mins, 2 Problems (10 pts each) 1. (10 points) Supposethatyouhaveonemachineandasetof n jobs a 1 ,...,a n toprocess on that machine. Each job a j has a processing time t j and a proFt p j , and a deadline d j . The machine can process only one job at a time, and a job a j must run uninterruptedly for t j consecutive time units. If job a j is completed by its deadline d j , you receive a proFt p j , but if it is completed after its deadline, you receive a proFt of 0. Give an efficient algorithm to Fnd the schedule that obtains the maximum amount of proFt, assuming that all processing times are integers between 1 and
Background image of page 1

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

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

Unformatted text preview: n . State and prove time complexity of your algorithm. 1 2. (10 points) Let A = { A 1 , . . ., A n } be a set of distinct coin types, where A 1 < A 2 < . . . < A n . The coin-changing problem is deFned as follows. Given an integer C , Fnd the smallest number of coins from A , that add up to C , given that unlimited number of coins of each type is available. Design an efficientdynamicprogrammingalgorithmthatoninputs A and C , outputs the minimum number of coins needed to solve the coin-changing problem. State and prove time complexity of your algorithm. 2...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

t3 - n State and prove time complexity of your algorithm 1...

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