234-Tree Analysis
• Time for insert or get is proportional to tree’s height
• Let N be the number of nodes, n be the number of items, and h
be the height
• Define h so that a tree consisting of a single node is height 0
• It’s easy to see 1+2+4+…+2h £ N £ 1+4+16+…+4h
• It’s also easy to see N £ n £ 3N
• Using the above, we have n ³ 1+2+4+…+2h = 2h+1-1
• Rewriting, we have h £ log(n+1) - 1 or h = O(log n)
• Thus, Dictionary operations on 234-trees take time O(log n) in
the worst case
CS409 - Spring 2000
10