exer1 - CMPT 307 Data Structures and Algorithms Exercises...

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

View Full Document Right Arrow Icon
CMPT 307 — Data Structures and Algorithms Exercises on Heaps and Stable Matchings. Due: Thursday, Septem- ber 24th (at the beginning of the class) Reminder: the work you submit must be your own. Any collaboration and consulting outside resourses must be explicitely mentioned on your submission. 1. Describe a Θ( n log n ) time algorithm that, given a set S of n integers and another integer x , determines whether or not there exist two elements in S whose sum is exactly x . 2. Suppose that in the MergeSort algorithm the input sequence split into k subsequences ( k > 2, but fixed). Determine the running time of such algorithm. Does it have any advantages comparing to the standard MergeSort? (You may wish to look into Chapter 4 of CLR.) 3. We explore the issue of truthfulness in the Stable Matching problem and specifically in the Gale-Shapley algorithm. The basic question is: Can a man or a woman end up better off lying about his or her preferences? More concretely, we suppose each participant has a true
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online