MIT6_851S10_lec03 - 6.851 Advanced Data Structures Spring...

Info iconThis preview shows pages 1–2. 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 3 — February 9, 2010 Dr. Andr´ e Schulz 1 Overview In the last lecture we continued to study binary search trees from the geometry perspective of arboreally satisfied sets. We gave lower bounds for the runtime of a BST — two of them were Wilbur’s lower bounds [Wil89], and the last was “signed greedy.” We also looked at a type of BST called a Tango tree and showed that it was O (lg lg n ) competitive with an optimal dynamic tree. In this lecture we consider the problem of orthogonal range queries, focusing mostly on R 2 but also indicating how to extend the results to higher dimensions. An orthogonal range query is the following problem: given a set S of points in R d , and an axis-aligned box B , what are all elements of S that lie in B ? The goal is to implement a data structure with reasonably efficient preprocessing on the set S that can answer all such queries efficiently. A natural application is to database queries (e.g. how many people lie in a given age range and income range?). Since the output of a query could be very large, we will measure the efficiency of our data structures in terms of both n , the number of points in S , and k , the size of the output of a given query. We start by introducing range trees, which in the two-dimensional case use O ( n lg n ) space and pre- processing time and have a query time of O (lg 2 n + k ). (In d dimensions, they use O ( n lg d − 1 n ) storage and pre-processing and have a query time of O (lg d n + k ).) We then describe kd-trees for the 2-dimensional case, which are more storage-efficient ( O ( n ) space), but have a bad worst-case query time O ( √ n ). We also introduce the idea of fractional cascading, a trick that reduces the query time for range trees from O (lg d n + k ) to O (lg d − 1 n + k ). Finally, we indicate how to deal with the case of points with duplicated coordinates (the rest of the exposition assumes that all points have distinct coordinates). A good reference for the material in this lecture is the book Computational Geometry: Algorithms and Applications by deBerg et al. [dBea08]. We begin by describing the problem of orthogonal range queries in detail. We will then look at various data structures for answering orthogonal range queries efficiently. 2 Orthogonal Range Queries The first problem we will approach is orthogonal range searching . Suppose we are given a set of points. For the moment we will assume that these points are in R 2 , but in general we can allow our space to be any dimension. Now draw a rectangle with sides parallel to the coordinate axes (since this is orthogonal range searching, we require a rectangle, although in principle we could allow other shapes). How can we report all of the points that are inside of the rectangle?...
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 / 8

MIT6_851S10_lec03 - 6.851 Advanced Data Structures Spring...

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

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