exer2 - CMPT 405/705 Design and Analysis of Algorithms...

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: CMPT 405/705 Design and Analysis of Algorithms Exercises on Divide and Conquer. Due: Thursday, October 8th (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. You are interested in analyzing some hard-to-obtain data from two separate databases. Each database contains n numerical values so there are 2 n values total and you may assume that no two values are the same. You would like to determine the median of this set of 2 n values, which we will define here to be the n-th smallest value. However, the only way you can access these values is through queries to the databases. In a single query, you can specify a value k to one of the two databases, and the chosen database will return k-th smallest value that it contains. Since queries are expensive, you would like to compute the median using as few queries as possible....
View Full Document

Ask a homework question - tutors are online