You are interested in analyzing some hard-to-obtain data


You are interested in analyzing some hard-to-obtain data from two separate databases. Each database contains n numerical values - so there are 2n values in all - and you can assume that no two values are the same. You'd like to determine the median of this set of 2n values, which we will define here as 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 databases, and the chosen database will return the k-th smallest value that it contains. Since queries are expensive, you would like to compute the median using as few queries as possible. Give an algorithm that finds the median value using at most O(lg n) queries.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: You are interested in analyzing some hard-to-obtain data
Reference No:- TGS0139578

Expected delivery within 24 Hours