Why choose database will return the k-th smallest value

Assignment Help Computer Engineering
Reference no: EM1327916

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 nth 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 choose database will return the k-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 fins the median value using at most O(logn) queries.

Reference no: EM1327916

Questions Cloud

Algorithm for computing a topological ordering of a dag : But assume that we're given an arbitrary graph that may or may not be a DAG. Extend the topological ordering algorithm so that given an input directed graph G it outputs one of two thing.
Regarding the employee safety : Should employers be responsible for employee safety while employees are working from home or working off site of the company building?
Drucker-s discussion of generic vs. exceptional issues : Using Drucker's discussion of generic vs. exceptional issues, how would you categorize/analyze the Katrina disaster.
Implement an enterprise resource planning system : Would implementing an enterprise resource planning system help streamline operations and achieve efficiencies between operating departments? What major concerns need to be addressed
Why choose database will return the k-th smallest value : as queries are expensive you would like to compute the median using as few queries as possible. Give an algorithm that fins the median value using at most O(logn) queries.
Prepare a forecast for five week moving average : Prepare a forecast for week 11 by using a five -week moving average.
Explain what policies and measures could health care use : Explain What policies and measures could health care administrators use to ensure security of the system and applications and privacy of patients' information and records
Evaluating future value of money : Pedro Gonzalez will spent $5,000 at the beginning of each year for next 9 years. The interest rate is 8 percent. What is the future value.
Why all projects include risk in their project planning : Managing Risk in Project Management and Why should all projects include risk in their project planning? What are some of the drawbacks if risks are not considered?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Relationship between mis and information technology

What is the relationship between management information systems and information technology (IT).

  Securing the personal data

Because of the information systems are capable of storing and compiling the large amount of the data, several people worry that, and their private data will end up in the wrong hands.

  Factors for building a server room

Explain the factors you must consider for each of the following given topics: Walls and doors, Access control

  Organizational structure in large public sector organization

However, is it possible that in many countries, taller organizational structures are preferred as they allow more checks and balances to be put in place, to inhibit public-sector corruption and other undesirable practices.

  Private base class function declared public in derived class

Private base class function declared public in derived class

  Investigating a social engineering attack

Investigate a social engineering attack describing what has made this attack more successful and the information which was observed from this attack is sure to involve how could this attack be avoided.

  How to prepare a two to three page memorandum

make a two to three page memorandum (350 words per page, from you to me) describing what office automation and group collaboration software is used in your organization.

  Write c program ''myls'' that functions like unix command ''ls''

Write C program 'myls' that functions like unix command 'ls'.

  Write down a program that has a function named presentvalue

Write down a program that has a function named presentValue

  What changes have to be made to accept $ and cents

What changes have to be made to accept $ and cents

  Writing program for rectangle

Write down a program that asks for the length L and the width W of a rectangle, then compute the perimeter and area of the rectangle. Perimeter = (length + width) * 2

  Suggestions for ensuring an adequate change control

What are two suggestions for ensuring the adequate change control on projects that involve outside contracts.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd