Answered You can hire a professional tutor to get the answer.

QUESTION

You are interested in analyzing some hard-to-obtain data from two separate databases.

.You are interested in analyzing some hard-to-obtain data from two separate databases. Each database contains n numerical values--so there are2n values total--and you may assume that no two values are the same.You’d like to determine the median of this set of 2n values, which we willdefine here to be the nth smallest value.However, the only way you can access these values is through queriesto the databases. Ina single query, you can specify a value k to one of thetwo databases, and the chosen database will return the/(m smallest valuethat it contains. Since queries are expensive, you would like to computethe median using as few queries as possible.Give an algorithm that finds the median value using at most O(log n)queries.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question