lec22 - 6.851: Advanced Data Structures Spring 2010 Lecture...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 6.851: Advanced Data Structures Spring 2010 Lecture 22 April 29 Prof. Erik Demaine Scribe: Aaron Bernstein, revised by: Morteza Zadimoghaddam 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 maintaining the data as compactly as possible. Our goal will be to get as close the information theoretic optimum as possible. We will refer to this optimum as OPT. Note that most linear space data structures we have seen are still far from the information theoretic optimum because they typically use O(n) words of space, whereas OPT usually uses O(n) bits. This strict space limitation makes it really hard to have dynamic data structures, so most space-efficient data structures are static. Here are some possible goals we can strive for: Implicit Data Structures Space = information-theoretic-OPT + O(1). The O(1) is there so that we can round up if OPT is fractional. Most implicit data structures just store some permation of the data: that is all we can really do. As some simple examples, we can refer to Heap which is a Implicit Dynamic Data Structure, and Sorted array which is static example of these data structures. Succinct Data Structures Space = OPT + o(OPT). In other words, the leading constant is 1. This is the most common type of space-efficient Data Structures. Compact Data Structures Space = O(OPT). Note that some linear space data structures are not actually compact because they use O(w OPT) bits. For example, suffix tree has O ( n ) words space, but its information theoretic lower bound is n bits. On the other hand, BST can be seen as a Compact Data Structure. 1.1 mini-survey Implicit Dynamic Seach Tree In 2003, Franceschini and Grossi [1] developed an implicty dynamic search tree which supports insert, delete, and predecessor in O(log(n)) time worst case. Succinct Dictionary use lg ( u n ) + O ( lg ( u n ) lg lg lg u ) bits [2] or lg ( u n ) + O ( n (lg lg n ) 2 lg n ) bits [6] , and support O (1) membership queries; u is the size of the universe from which the n elements are drawn. Succinct Binary Tries The number of possible binary tries with n nodes is the n th Catalan number, C n = ( u n ) / ( n + 1) 4 n . Thus, OPT log(4 n ) = 2 n . We note that this can be derived from a recursion formula based on the sizes of the left and right subtrees of the root. In this lecture, we will show how to use 2 n + o ( n ) bits of space. We will be able to find the 1 left child, the right child, and the parent in O(1) time. We will also give some intuition for how to answer subtree-size queries in O(1) time. Subtree size is important because it allows us to keep track of the rank of the node we are at....
View Full Document

Page1 / 7

lec22 - 6.851: Advanced Data Structures Spring 2010 Lecture...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online