Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Data Structures and Algorithms
Year 3

Median Finding Algorithm for Joint Databases


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 chose 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.

By OTA:  Mike Mikailov, PhD

OTA Rating:  4.8/5

What's included:

  • Plain text response
  • Attachment(s):
    • MinimumFinding.pdf
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Significant inversions algorithm - You are given a sequence of n distinct numbers A1, ... , An. An inversion is a pair i < j such that Ai > Aj. Call a piar (i, j) a significant inversion if i < j and Ai > 2*Aj. Give an O(n*log(n)) algorithm to count the number of significant inversions in the input sequence.
Scheduling Activities - Your friend is working as a camp counselor at a camp. He needs to organize activities for the kids. One of his plans is the following marathon: each contestant must swim 20 laps of a pool, then bike 10 miles, and then run 3 miles. The plan is to send the contestants out in a staggered fashion via the following rule: the contestants must use the pool one at a time. In other ...
Minimum amount of Base Stations - Let's consider a long, quiet country road with houses scattered very sparsely along it. (Picture the road as a long line segment with an eastern endpoint and a western endpoint.) Further lets suppose that despite the country setting, the residents of all these houses are avid cell phone users. You want to place cell phone base stations at certain points along ...
Linear Fractional Transformation; Imaginary Axis Transformed - Find the linear fractional transformation that maps the points {see attachment}. Into what curve is the imaginary axis x = 0 transformed?
Oral History Data Organization - You are helping scientists analyze oral history data they have collected by interviewing members of a village. From these interviews they have learned about a set of n people (all are dead now) whom we will denote P1, P2, ... Pn. The have also collected facts about when these people lived relative to one another. Each fact has one of the following two forms: ...

Page generated in 0.0149 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples