This preview shows page 1. Sign up to view the full content.
Unformatted text preview: n ). 3. (greedy algorithm) Coin changing problem 16-1, page 402 in the textbook. 4. (stable marriage problem) Suppose 2 n people ( n men and n women) are either bad or good. Specically, 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
This note was uploaded on 10/21/2011 for the course COT 6401 taught by Professor Staff during the Spring '09 term at FAU.
- Spring '09