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 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
You are interested in analyzing some hard-to-obtain data from two separate databases. Each database...
Questions
question
Mathematics, 01.07.2020 15:01