This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 6.851: Advanced Data Structures Spring 2010 Lecture 5 — Feb 18 th , 2010 Prof. Erik Demaine and Dr. Andr´ e Schulz 1 Overview In the last lecture we started out by brieﬂy discussing range trees (a topic we started two lectures ago). In particular, we showed how to support dynamic insertions and deletions in range trees eﬃciently. After this, we discussed the vertical line stabbing problem — given a collection of intervals, support queries of the form “How many intervals intersect the line x = x ?”. We showed that both interval trees and segment trees could solve this problem eﬃciently. Segment trees are a bit more memory-eﬃcient, but interval trees are more ﬂexible for other applications. We used these data structures to solve the windowing problem — given a collection of line segments, report how many lie in a given axis-aligned rectangle. In solving the windowing problem, we had to introduce an additional data structure called a priority search tree . In this lecture we study kinetic data structures. These are data structures that contain information about objects in motion. They support the following three types of queries: (i) modify the motion path of an object; (ii) move forward to a specified point in time; (iii) return information about the state of the objects in the current time. We will go over kinetic sorting and kinetic heaps, and then state several results about kinetic data structures without proof. After covering kinetic data structures, we will discuss the ray shooting problem — given a simple (possibly non-convex) polygon, support queries asking for the first point of intersection of a ray with the polygon. We will show how to support O (log 2 ( n )) queries and outline an approach for achieving a query time of O (log( n )). 2 Kinetic Data Structures 2.1 Introduction A kinetic data structure is a data structure that stores moving data — that is, data that changes in some predictable way over time. Examples would be the locations of physical objects over time. We could also look at, for example, trajectories of objects in R 2 and think of the x-coordinate as “time.” Kinetic data structures are useful, for example, in computer graphics and video games, to determine the next point in time at which two objects intersect. Data. Each data point has a value that is a known function of time. For example, we could have aﬃne data ( x ( t ) = a + bt ). We could also have bounded-degree algebraic motion, or, more generally, pseudo-algebraic motion. Pseudo-algebraic means that all certificates of interest ﬂip between true or false O (1) times as the objects move. It turns out that pseudo-algebraic will be the condition that we generally need in order for our kinetic data structures to run eﬃciently....
View Full Document
- Spring '10
- Data Structures, Array data structure