lec26 - Bottom-Up Splay TreesAnalysis Actual and amortized...

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

View Full Document Right Arrow Icon
Bottom-Up Splay Trees–Analysis Actual and amortized complexity of join is O(1) . Amortized complexity of search, insert, delete, and split is O(log n) . Actual complexity of each splay tree operation is the same as that of the associated splay. Sufficient to show that the amortized complexity of the splay operation is O(log n) .
Background image of page 1

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

View Full DocumentRight Arrow Icon
Potential Function size(x) = #nodes in subtree whose root is x . rank(x) = floor(log 2 size(x)) . P(i) = Σ x is a tree node rank(x) . P(i) is potential after i ’th operation. size(x) and rank(x) are computed after i ’th operation. P(0) = 0 . When join and split operations are done, number of splay trees > 1 at times. P(i) is obtained by summing over all nodes in all trees.
Background image of page 2
Example size(x) is in red. 20 10 6 8 40 30 1 rank(x) is in blue. Potential = 5 . 2 3 1 2 6 0 1 1 0 1 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
rank(root) = floor(log 2 n) . When you insert, potential may increase by
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2010 for the course COT 5536 taught by Professor Sartajsahani during the Spring '10 term at University of Florida.

Page1 / 17

lec26 - Bottom-Up Splay TreesAnalysis Actual and amortized...

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

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