6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 6 Sample Solutions Dynamizing static search structures. (a) To perform a successor search we start from the root node, perform a search for a successor and follow the link to it’s left until we reach a leaf node. The runtime recurrence is then: T ( n ) = S (Θ( n 1 /c )) + T (Θ( n 1-1 /c )) For fusion trees we have: T ( n ) = O (log ω n 1 /c ) + T (Θ( n 1-1 /c )) T ( n ) = O ( c-1 log ω n ) + O ( c-1 log ω n 1-1 /c + T (Θ( n (1-1 /c ) 2 ))) Hence T ( n ) = O ( ∞ X i =0 c-1 log ω n (1-1 /c ) i ) = O ( ∞ X i =0 c-1 (1-1 /c ) i log ω n ) T ( n ) = O ( c-1 c log ω n ) = O (log ω n ) (b) The space reccurence is: C ( n ) = Θ( n 1 /c )( C ( n (1-1 /c ) )+1). Since we have Θ( n 1 /c ) subtrees of size O ( n (1-1 /c ) ) plus Θ( n 1 /c ) for the space at the current level. We see that the reccurence solves to C ( n ) = O ( n ). (c) We will constrain the number of nodes in a subtree rooted at a node at depth
This is the end of the preview. Sign up
access the rest of the document.
This note was uploaded on 01/20/2012 for the course CS 6.849 taught by Professor Erikdemaine during the Fall '10 term at MIT.