MIT6_851S10_lec10 - 6.851: Advanced Data Structures Spring...

Info iconThis preview shows pages 1–2. 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 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 in log( w ) time. These data structures are based on the Word RAM model, where we can manipulate a constant number of w-bit words in constant time. In this lecture we covered fusion trees, as described by Fredman and Willard [1]. A fusion tree is a static data structure storing n w-bit integers which supports predecessor and successor queries in O (log w n ) time per query and O ( n ) space. There is also a dynamic version of fusion trees which get O ( log w ( n ) + log ( log ( n ))) for updates, as described by Andersson and Thorup [2], but we did not cover this. Depending on whether n is small or large compared to w , we can use fusion trees or log n van Emde Boas trees, and our query time will be O (min log w , log w ). This minimum will never be greater than O ( log n ), giving us a better than logarithmic bound which only depends on n . 2 Fusion Trees A fusion tree is a B-tree with a branching factor of w 1 / 5 . The depth of such a tree is log w 1 / 5 ( n ) = log( n ) / log( w 1 / 5 ) = 5 log( n ) / log( w ). In order to actually achieve O (log( n ) / log( w )) time for queries, we must deal with each node we encounter in constant time. However, there are w 1 / 5 keys, each w bits long, in each node: in constant time, we can only do a constant number of operations on a constant number of w-bit words. To solve this problem, we will only compare the interesting bits of the keys. 2.1 Interesting bits Consider what a trie containing the keys would look like. This trie would have height w , the length of the keys, and would have k = O ( w 1 / 5 ) leaves (since the keys are distinct). Interesting bits are bits which correspond to levels in this trie with branching nodesthese are the bits we will look at in order to distinguish keys. Since our trie has k leaves, it has k 1 branching nodes, and at most k 1 interesting bits (since multiple branching nodes might be on the same level). We will call the indices of the interesting bits b through b r 1 ....
View Full Document

This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.

Page1 / 5

MIT6_851S10_lec10 - 6.851: Advanced Data Structures Spring...

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

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