MIT6_851S10_assn02

MIT6_851S10_assn02 - 2. Develop a data structure that can...

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

View Full Document Right Arrow Icon
6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 2 Due: Thursday, Feb. 18 Be sure to read the instructions on the assignments section of the class web page. Query time kd-trees. We consider a kd-tree that stores n points in the plane. Every node v of the kd-tree represents a region region ( v ) in the induced subdivision of the plane. 1. Show that the boundary of an (axis-parallel) query rectangle can intersect at most O ( n ) such regions. 2. Show that Ω( n ) is a lower bound for the maximal number of regions that intersect the boundary of an axis-parallel query rectangle by deFning a set of n points and a query rectangle appropriately. Segment stabbing. Let S be a set of disjoint line segments in the plane. 1. Develop a data structure that can report all s S that are hit by a vertical ray emanating from ( x,y ) towards , that is Above ( x , y ) := { s S | s ∩ { ( x , y ) | y y } = ∅} . Query times should be O (log n + k ).
Background image of page 1

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

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

Unformatted text preview: 2. Develop a data structure that can report all s S that are hit by a line segment with endpoints ( x,y 1 ) and ( x,y 2 ), that is Between ( x , y 1 , y 2 ) := { s S | s { ( x , y ) | y 1 y y 2 } = } Query times should be O (log 2 n + k ). Hint: Modify a segment tree. ( x,y ) ( x,y 1 ) ( x,y 2 ) Above ( x , y ) Between ( x , y 1 , y 2 ) igure 1: Illustration what the queries should report (thick lines). 1 MIT OpenCourseWare http://ocw.mit.edu 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms ....
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 / 2

MIT6_851S10_assn02 - 2. Develop a data structure that can...

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