Unformatted text preview: n ). 3. (greedy algorithm) Coin changing problem 161, page 402 in the textbook. 4. (stable marriage problem) Suppose 2 n people ( n men and n women) are either bad or good. Speciﬁcally, there are k good men and k good women. In the preference list, everyone would rather marry any good person than any bad person. Show that in a stable marriage, every good man is married to a good woman. 5. ( bonus problem ) Suppose you are given an array A with n entries with distinct values. Assume the values in the array is unimodel : For some index p between 1 and n , the values in the array entries increase up to position p and then decrease the remainder of the way until position n . Show how to ﬁnd the entry p by reading at most O (log n ) entries in A and then how to minimize the total number of readings. i...
View
Full Document
 Spring '09
 STAFF
 Algorithms, Dynamic Programming, Analysis of algorithms, Stable marriage problem, stable marriage

Click to edit the document details