Question: I have this question Advanced Algorithm Divide and Conquer from the book Algorithm Design by John Kleinberg and Eva Tardos 1 . You are interested
I have this question Advanced Algorithm Divide and Conquer from the book Algorithm Design by John Kleinberg and Eva Tardos You are interested in analyzing some hardtoobtain data from two separate databases. Each database contains n numerical valuesso there are pi values totaland you may assume that no two values are the same. You'd like to determine the median of this set of n values, which we will define here to be the ntext 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 the ktext 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 operatornamemost Olog n queries.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
