MIT6_851S10_lec04b - 6.851 Advanced Data Structures Spring...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6.851: Advanced Data Structures Spring 2010 Lecture 4 11 February, 2010 Dr. Andr e Schulz 1 Overview In the last lecture we discussed the orthogonal range query problem and solutions to it. In the orthogonal range query problem, we are given a set of points and a rectangular area, and are asked to report the points that lie in this area. We discussed three types of solutions: range trees, kd-trees (in the 2D case), and fractional cascading. In this lecture we briey discuss extending our orthogonal range query solutions to account for dynamic point sets. We then introduce the problem of vertical line stabbing queries, present two solutions, and review an application. 2 Orthogonal Range Queries and Dynamic Point Sets In our discussion of the orthogonal range query problem in lecture 3, we only considered static point sets. What costs are associated with modifying the point set as we do the queries? In other words, what if we modify our data structure to handle dynamic point sets? In The Design of Dynamic Data Structures, Mark H. Overmars discusses ideas and costs associated with turning a static data structure into a dynamic one.[1] The orthogonal range query problem entails decomposable searches. This means we can partition queries, q , on keys, x , into queries on subsets of x : ( x, q ) partitions into ( x 1 , q ) and ( x 2 , q ) where x 1 x 2 = x . In this case, insertions take O ( T n b log n ) amortized time (where T b is the data structure build time), and queries grow by a log n factor. Thus, for our dynamic 2D range-trees, queries will take O (log 2 n + k ) time and insertions will take O (log 2 n ) time. 3 Vertical Line Stabbing Queries In the vertical line stabbing queries problem, we are given, as input, n intervals: I = { [ a 1 , b 1 ] , [ a 2 , b 2 ] , . . . , [ a n , b n ] } , and a query q R . Our task is to report all intervals that contain q . 1 4 Interval-Tree The interval-tree uses the idea of divide-and-conquer. We divide the intervals into sets based on their relation to the median of the interval end-points. Some will lie completely to the left or right of the median, and others will intersect. We will recurse on the intervals that lie to the left or right....
View Full Document

This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.

Page1 / 6

MIT6_851S10_lec04b - 6.851 Advanced Data Structures Spring...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online