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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:00, emmaraeschool
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
image
Computers and Technology, 23.06.2019 21:40, jeovontamarley
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
image
Computers and Technology, 23.06.2019 23:30, yasarhan2
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
image
Computers and Technology, 24.06.2019 16:50, Ameilasmickle15
How many types of string types does python support?
Answers: 1
You know the right answer?
You are interested in analyzing some hard-to-obtain data from two separate databases. Each database...

Questions in other subjects: