{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_assn02

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

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

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 defining 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 ). 2. Develop

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

View Full Document
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

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online