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

  Finding most effective it projects

What will you recommend they do in order to find the most effective IT projects?

  Why this move to pcs bring new architecture

I can understand about the shift from old big mainframes to PCs that are becoming more and more powerful. But why not just link these PCs to the big mainframes and keep the similar architecture we used before i.e. a mainframe architecture? (Just h..

  Project management tasks

Explain how the systems analyst may help along with the project management tasks. Also, explain how a new employee can contribute to the tasks.

  Difference between re-engineering and process redesign

What is the procedure of creating design specifications and what are differences between design testing and functional testing.

  Determine technology which has changed cafe,coffee shop

Determine technology which has changed cafe,coffee shop? Think things such as marketing, food preparation, inventory ordering or re-ordering, customer tracking, and more.

  Find out for a well-known company

Review the code of ethics that you find for a well-known company. Based on research, analyze it to determine whether or not the company is complying with it.

  Windows live id and skydrive account

Suppose there are 1 million books within your campus library. Approximate (to the nearest order of magnitude) how several bytes of the data there are in case all these books were stored online and accessible across the computer network.

  Create a program that displays all of numbers in the file

Create a program that displays all of numbers in the file

  How to produce a data model segment

Some mechanics are specialized in engine (EN) maintenance. Some mechanics are specialized in the airframe (AF) maintenance. Some mechanics are specialized in avionics (AV) maintenance.

  What will do to get deadline to receive a passing grade

What will do to get deadline to receive a passing grade? You have to complete and submit course project previous to the deadline to receive a passing grade for this course.

  Writing c code to determine the balance

Write down a program in C++ which determines the balance because of each month on a non-interest loan. Ask user for the loan amount and how much s/he will pay each month.

  Variables reduce unnecessary comparision in a bubble sort

when merging 2 files, what condition terminates the main loop of the program.What type of variables can be used to reduce unnecessary comparision in a bubble sort.

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