/
Range Median Data Structure Range Median Data Structure

Range Median Data Structure - PowerPoint Presentation

trish-goza
trish-goza . @trish-goza
Follow
421 views
Uploaded On 2017-07-20

Range Median Data Structure - PPT Presentation

Batched Range Median Extensions Maintain a set of n points in the plane In the static case the point set is fixed and in the dynamic case points can be inserted and deleted The objective is to use small space and support efficient range median queries ID: 571598

median log queries range log median range queries data batched set point time points query select rank years beer

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Range Median Data Structure" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Range Median Data Structure

Batched Range MedianExtensionsMaintain a set of n points in the plane.In the static case the point set is fixed, and in the dynamic case points can be inserted and deleted. The objective is to use small space and support efficient range median queries.Median(i,j) Find the point with median y-value in [i,j] x [-∞,∞].Given a set of n points and a set of k range median queries, return the answer to the k queries.A batched range median query consisting of three queries: [i1,j1],[i2,j2],[i3,j3]. Each query and its answer is shown with a distinct color.Select(i,j,s) Find the point with s’th smallest y-value in [i,j] x [-∞,∞].Select(i,j,4)Rank(i,j,e) Return the number of points within [i,j] x [-∞,e].Rank(i,j,e)=6Predecessor(i,j,e) Find point with maximum y-value in [i,j] x [-∞,e].Predecessor(i,j,e)Application: Maintaining HistogramApplication: Analyzing Web Data ResultsA range median data structure presents a way of storing a histogram such that interesting queries can be answered efficiently. Source:. Danmarks Statistik (dst.dk)In this histogram you can compare your beer consumption with that of the general public over any period of years. You could determine the median beer consumption in your college years and compare with the beer consumption in the college years of for instance your kids.A point set can be made from logs of clicks on internet ads. Records contain the time of the click and the price paid by the advertiser. Each advertiser runs several ad campaigns spread over different intervals of time, and wish to compare the price to the general ad market during the campaign. A typical comparison is with the medium price for clicks during the time intervals. This computation corresponds to the batched range median problem.* Bounds also hold for Select/Rank/PredecessorReferences[1] Gerth S. Brodal and Allan G. Jørgensen. Range Median – Data Structures and Batched Queries. 2009.

Range Median – Data Structures and Batched Queries

MADALGO – Center for Massive Data Algorithmics, a Center of the Danish National Research

Foundation

Allan Jørgensen

Aarhus University

i

j

j

1

j

2

j

3

i

1

i

2

i

3

i

j

e

i

j

e

i

j

Median*

Space

Query

Updates

Static

O(

n

)

O(log

n

/ log

log

n

)

-

Dynamic

O(

n

log

n

/ log

log

n

)

O((log

n

/ log

log

n

)

2

)

O((log

n

/ log

log

n

)

2

)

Space

Time

Batched

Range Median

O(

n

)

O(

n

log

k

+

k

log

n

/ log

log

k

)