subject

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 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 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 the k th smallest value it contains. Since queries are expensive, youâd like to compute the median using as few queries as possible. Give an algorithm that finds the median value using at most O(log n) queries. Give a sketch of the algorithm with an explanation and show the running time complexity O(log n) by building a recurrence relation. We can consider the two data sets (or databases) virtually sorted through queries for finding the kth smallest data item, so letâs denote the kth smallest data item of each database as A[k] and B[k] where A and B denote the two databases of size n each. Hint: the size of each data set (or database) can be reduced to half at each recursion.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
You know the right answer?
You are interested in analyzing some hard-to-obtain data from two separate databases. Each database...
Questions
question
Mathematics, 04.05.2021 06:20
question
Arts, 04.05.2021 06:20
Questions on the website: 13722361