CS442, Spring 2006, HW #3 Answers 1. a. volume_of_junk(t) = c x 10^t b. # photos(t) = c x 10^t The fact that the "exponentially" in the sentence could also mean "much more" is also a valid answer c. returns(t) = c x 10^t d. not a correct use of the term "exponentially" 2. i. O(n x lgn) - each verse is approximately like the verse before, but there's counting in the song ii. O(n^2 x lgn) - each verse increases with a constant amount of syllables and there is counting in the song iii. O(n) - number of syllables per verse approximately the same 3. Answers depend on the example each one of you took. 4. i. Insertion Sort does 6 comparisons ii. Merge Sort does 5 comparisons 5. i. for [1 2 3 4 5 6 7 8], Merge Sort does 12 comparisons ii. for [1 5 3 7 2 6 4 8], Merge Sort does 17 comparisons