t3sol - COT 5405, Test 3 SOLUTIONS 1. (10 points) Let T [i]...

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

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

Unformatted text preview: COT 5405, Test 3 SOLUTIONS 1. (10 points) Let T [i] be an optimal profit derived when last job terminates at time i. Then T [i] = maxj {pj + T [i − tj ]} for j such that dj ≤ i. Hence computation of every T [i] requires O(n) time, we need to do this up to O(n2 ) times, hence overall complexity is O(n3 ). 2. (10 points) Let N (i) be an optimal number of coins needed to solve coin-changing problem. Then N (i) = 1 + minj {N (i − Aj )}. Hence computation of every N (i) requires O(n) time. We need to compute C such values, hence overall time is O(nC ). 1 ...
View Full Document

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

Ask a homework question - tutors are online