6.851: Advanced Data Structures
Spring 2010
Lecture 5 — Feb 18
th
, 2010
Prof. Erik Demaine and Dr. Andr´
e Schulz Scribe: David Stein and Jacob Steinhardt
1
Overview
In the last lecture we started out by briefy discussing range trees (a topic we started two lectures
ago). In particular, we showed how to support dynamic insertions and deletions in range trees
eFciently. A±ter this, we discussed the
vertical line stabbing problem
— given a collection o±
intervals, support queries o± the ±orm “How many intervals intersect the line
x
=
x
0
?”. We showed
that both interval trees and segment trees could solve this problem eFciently. Segment trees are a
bit more memoryeFcient, but interval trees are more fexible ±or other applications. We used these
data structures to solve the
windowing problem
— given a collection o± line segments, report how
many lie in a given axisaligned 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 in±ormation
about objects in motion. They support the ±ollowing three types o± queries: (i) modi±y the motion
path o± an object; (ii) move ±orward to a speci²ed point in time; (iii) return in±ormation about the
state o± 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 proo±.
A±ter covering kinetic data structures, we will discuss the ray shooting problem — given a simple
(possibly nonconvex) polygon, support queries asking ±or the ²rst point o± intersection o± a ray
with the polygon. We will show how to support
O
(log
2
(
n
)) queries and outline an approach ±or
achieving a query time o±
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 o± physical objects over time.
We could also look at, ±or example, trajectories o± objects in
R
2
and think o± the
x
coordinate as
“time.”
Kinetic data structures are use±ul, ±or 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 ±unction o± time. ³or example, we could have
aFne data (
x
(
t
) =
a
+
bt
). We could also have boundeddegree algebraic motion, or, more generally,
pseudoalgebraic motion.
Pseudoalgebraic
means that all certi²cates o± interest fip between true
or ±alse
O
(1) times as the objects move. It turns out that pseudoalgebraic will be the condition
that we generally need in order ±or our kinetic data structures to run eFciently.
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.
 Fall '10
 ErikDemaine
 Polygons, Data Structures

Click to edit the document details