6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 10
Sample solution
Compact balanced parentheses.
1. Construct a graph G with a vertex for each block, and an edge between the the block contain
ing each parenthesis and the block contain
6.851: Advanced Data Structures
Spring 2010
Lecture 19 April 15, 2010
Prof. Erik Demaine
1
Overview
This lecture is an interlude on time travel in data structures. Well consider two kinds of time-travel (temporal) data structures, based on the two leading
6.851: Advanced Data Structures
Spring 2010
Lecture 18 April 14, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we introduced Euler tour trees [3], dynamic data structures that can perform link-cut tree operations in O(lg n) time. We then showed h
6.851: Advanced Data Structures
Spring 2010
Lecture 17 April 8, 2010
Prof. Erik Demaine
1
Overview
Last lecture we covered dynamic trees, also known as link-cut trees. Link-cut trees are able to represent a dynamic forest of rooted trees in O(log n) amort
6.897: Advanced Data Structures
Spring 2007
Lecture 16 Feb 21, 2007
Prof. Erik Demaine
1
Overview
In the last lecture we worked in a BST model. We discussed Wilber lower bounds for BSTs for a particular access sequence, and developed Tango trees which a
6.851: Advanced Data Structures
Spring 2010
Lecture 14 March 30, 2010
Prof. Andr Schulz e
1
Overview
In the last lecture we covered the Separator Decomposition, which rearranges any tree into a balanced tree, and the ART/leaf-trimming Decomposition, which
6.851: Advanced Data Structures
Spring 2010
Lecture 13 Thursday, March 18, 2010
Prof. Erik Demaine
1
Overview
This lecture covers two methods of decomposing trees into smaller subtrees: Separator Decompo sition and ART / leaf-trimming-decomposition. The
6.851: Advanced Data Structures
Spring 2010
Lecture 12 March 16, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we covered the round elimination technique and lower bounds on the static predecessor problem. In this lecture we cover the signature s
6.851: Advanced Data Structures
Spring 2010
Lecture 11 Mar 11, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we covered static fusion tree. A data structure storering n w-bit integers that supports predecessor and successor queries in O(logw n) t
6.851: Advanced Data Structures
Spring 2010
Lecture 10 March 8, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we covered van Emde Boas and y -fast trees, integer data structures which support insert, delete, predecessor, and successor operations
6.851: Advanced Data Structures
Spring 2010
Lecture 9 March 4, 2010
Dr. Andr Schulz e
1
Overview
Last lecture we dened the Least Common Ancestor (LCA) and Range Min Query (RMQ) problems. Recall that an LCA query asks for the deepest node in a given rooted
6.851: Advanced Data Structures
Spring 2010
Lecture 20 22 April, 2010
Prof. Erik Demaine
1
Memory Hierarchies and Models of Them
So far in class, we have worked with models of computation like the word RAM or cell probe models. These models account for co
6.851: Advanced Data Structures
Spring 2010
Lecture 21 27 April, 2010
Prof. Erik Demaine
1
From Last Lecture. . .
In the previous lecture, we discussed the External Memory and Cache Oblivious memory models. We additionally discussed some substantial resul
6.851: Advanced Data Structures
Spring 2010
Lecture 22 April 29
Prof. Erik Demaine
1
Overview
Up until now, we have mainly studied how to decrease the query time, and the preprocessing time of our data structures. In this lecture, we will focus on mainta
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 9
Sample solution
String matching. Construct a compressed sux trie over S = S1 $1 S2 $2 , and then trim below
$1 so that all leaves are either $1 or $2 . The construction takes O(|S1 | +
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 8
Sample solution
Signature compression. We will rst multiply the input word x by an integer m which will
arrange h1 , h2 , , hk into a lg2 n bit segment, then shift this segment to the
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 7
Sample solution
1. Construct a lookup table over the rst lg n bits in a word. Each entry in the table will point to
a vEB (built with perfect hashing) over the last w lg n bits of all
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 6
Sample solution
Concise van Emde Boas. We can shave o a factor of lg u bits of space through indirection.
Divide the universe into chunks of size lg u, corresponding to the last lg lg
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 5
Sample solution
Orthogonal line segment intersection. We can solve this problem using distribution sweeping
in the same manner as we solved batched orthogonal range searching in lectur
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 4
Sample solution
Cache-oblivious median nding. The standard median of medians algorithm is already a
cache-oblivious algorithm meeting the desired bounds, so all the remains is to prove
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 3
Sample solution
Geometric basics. To show that there is a binary search tree supporting any m searches on n
items in O(m log n) total time, we will show that given a set of m points wi
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 2
Sample solution
Range tree construction.
1. If we can construct a d 1-dimensional range tree in O(n lgd2 n) time, then we can easily
construct a d-dimensional range tree in O(n lgd1 n)
6.851 Advanced Data Structures (Spring12)
Prof. Erik Demaine
Problem 1
Sample solution
Creationist successor data structure. The data structure is a balanced BST, such as an AVL
tree or red black tree, augmented with the following elds augmented to each n
6.851: Advanced Data Structures
Spring 2010
Lecture 23 May 4, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we introduced the concept of implicit, succinct, and compact data structures, and gave examples for succinct binary tries, as well as show
6.851: Advanced Data Structures
Spring 2010
Lecture 8 March 2, 2010
Prof. Erik Demaine
1
Overview
In the last lecture we studied sux trees and sux arrays. These two data structures are useful for answering a variety of queries on strings such as string ma
6.851: Advanced Data Structures
Spring 2010
Lecture 7 February 26, 2010
Prof. Andre Schulz Scribe: Mark Chen
1
Overview
In this lecture, we consider the string matching problem - nding all places in a text where some query string occurs. From the perspect
6.851: Advanced Data Structures
Spring 2010
Lecture 6 February 23, 2010
Dr. Andr Schulz e
1
Overview
In the last lecture we introduced ray shooting, where we determine which is the rst ob ject in a set intersected by a given ray. We overviewed how to solv
6.851 Advanced Data Structures (Spring10)
Prof. Erik Demaine Dr. Andr Schulz e Problem 7 TA: Aleksandar Zlateski
Sample Solutions
Finding the most signicant 1 bit.
(a) We dene C0 = 0b , and (C1 ) = 10b1 Ax = x | (x + ~C1 ) & C1
Step-a(x) 1 Ax x + 01b1 2
6.851 Advanced Data Structures (Spring10)
Prof. Erik Demaine Dr. Andr Schulz e Problem 6 TA: Aleksandar Zlateski
Sample Solutions
Dynamizing static search structures.
(a) To perform a successor search we start from the root node, perform a search for a s
6.851 Advanced Data Structures (Spring10)
Prof. Erik Demaine Dr. Andr Schulz e TA: Aleksandar Zlateski
Problem 4
Due: Thursday, Mar. 4
Be sure to read the instructions on the assignments section of the class web page. Analysis partition trees. Prove that