{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_lec10

# MIT6_851S10_lec10 - 6.851 Advanced Data Structures Spring...

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

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 nodes—these 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 0 through b r 1 . 1

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

View Full Document
2.2 Sketches To get the sketch of a word x , we delete all the bits except the interesting bits. Order is preserved: for our keys x i , we have x i < x j if and only if sketch ( x i ) < sketch ( x j ).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern