optimal finger search trees in the pointer machine
play

Optimal Finger Search Trees in the Pointer Machine Gerth Stlting - PowerPoint PPT Presentation

Optimal Finger Search Trees in the Pointer Machine Gerth Stlting Brodal BRICS University of Aarhus George Lagogiannis Christos Makris Athanasios Tsakalidis Kostas Tsichlas University of Patras Dagstuhl seminar on Data Structures,


  1. Optimal Finger Search Trees in the Pointer Machine Gerth Stølting Brodal BRICS University of Aarhus George Lagogiannis Christos Makris Athanasios Tsakalidis Kostas Tsichlas University of Patras Dagstuhl seminar on “Data Structures”, March 1, 2002

  2. Finger Search Trees d = 8 Insert ( p 1 , 3) Delete ( p 2 ) � �� � ❄ 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ ✻ ✻ ✻ p 1 p 2 p 3 Search ( p 3 , 36) Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 1

  3. Finger Search Trees d = 8 Insert ( p 1 , 3) Delete ( p 2 ) � �� � ❄ 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ ✻ ✻ ✻ p 1 p 2 p 3 Search ( p 3 , 36) Insert, Delete O (1) Search O (log d ) 4 3 Search ( p, 24)  2    1 h ❄    1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ p Ω(2 h ) Huddleston, Mehlhorn ’82 Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 1

  4. Finger Search Trees d = 8 Insert ( p 1 , 3) Delete ( p 2 ) � �� � ❄ 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ ✻ ✻ ✻ p 1 p 2 p 3 Search ( p 3 , 36) Insert, Delete O (1) Amortized Search O (log d ) 4 3 Search ( p, 24)  2    1 h ❄    1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ p Ω(2 h ) Huddleston, Mehlhorn ’82 Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 1

  5. History Insert Delete Search AVL-trees, (2,3)-trees a) log n log n Red-black-trees, (2,4)-trees a) 1 b) log n Levcopoulos, Overmars ’88 a) 1 log n Guibas et al. ’77, Tsakalidis ’85 a) 1 c) log d log ∗ n Harel, Lucker ’79 a) log d Huddleston, Mehlhorn ’82 a) 1 b) log d log ∗ n Brodal ’98 a) 1 log d This talk a) 1 log d Dietz, Raman ’94 d) 1 log d � log d Andersson, Thorup ’00 e) 1 log log d c) O (1) movable fingers a) Pointer machine b) Amortized d) Comparison RAM e) Word RAM Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 2

  6. This Talk Insert O (1) O (1) Delete O (log d ) Search Worst-case Pointer machine • Level dependent degrees (Andersson ’96) • Components (Brodal ’96) • Multi-split and multi-join • Incremental (pre)processing Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 3

  7. Level Dependent Degrees 3 2 1 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 • Level i nodes (except root) have degree [ a i : a i 3 ] • Each node represented by Levcopoulos, Overmars ’88 Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 4

  8. Level Dependent Degrees 3 Search ( p, 24) 2 h 1 ❄ 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ �� h � p Ω i =1 a i • Level i nodes (except root) have degree [ a i : a i 3 ] • Each node represented by Levcopoulos, Overmars ’88 i =1 log a i ) = O (log d ) if a h +1 = a O (1) � h +1 • Search O ( h Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 4

  9. Components ✠ rebalance 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ p • Mechanisme to identify where to rebalance • Components = partition of internal nodes into subtrees Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 5

  10. Components ✠ rebalance 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ p • Mechanisme to identify where to rebalance • Components = partition of internal nodes into subtrees r ✛ link ( v ) break ( r ) link ( v ) ✲ ✲ v Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 5

  11. Components ✠ rebalance 1 2 4 8 10 13 16 17 19 22 23 25 26 29 31 32 35 37 39 ✻ p • Mechanisme to identify where to rebalance • Components = partition of internal nodes into subtrees • component records with root pointers (nil if singleton) r ✛ link ( v ) break ( r ) link ( v ) ✲ ✲ v Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 5

  12. Updates Insert ( p, e ) Delete ( p ) r = component root r = component root create-leaf ( p, e ) remove-leaf ( p ) break ( r ) break ( r ) rebalance ( r ) rebalance ( r ) r r ? break ( r ) rebalance ( r ) p Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 6

  13. rebalance ( r ) degree ( r ) > 3 a i 2 • link ( r ) • split r into at most a i nodes of degree [ a i 2 : 3 a i 2 ] multi-split ( r ) r . . . . . . degree ( r ) < a i 2 • ∀ v ∈ G : break ( v ) , G total degree [ a i 2 : 3 a i 2 ] • fusion r with all nodes in G • link ( r ) r multi-fusion ( r ) fusion group G Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 7

  14. Proof of Degree [ a i : a i 3 ] Assumption : Nodes at level i − 1 have degree [ a i − 1 : a i − 13 ] ≤ a i 3 • split at level i − 1 generates ≤ a i − 1 nodes • degree at level i ≤ 3 a i 2 · a i − 12 ≤ a i 3 . . . . . . . . . � �� � � �� � � �� � � �� � � �� � ≤ 3 a i 2 · a i − 12 ≤ 3 a i 2 ≤ 3 a i 2 ≤ 3 a i 2 · a i − 1 ≤ 3 a i 2 ≥ a i • fusion at level i − 1 fusions ≤ 3 a i − 1 nodes • degree at level i ≥ a i 2 / (3 a i − 1 ) 2 = a i a i = 9 · a i − 12 Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 8

  15. Incremental Processing old/new node group new/old node block . . . . . . . . . . . . . . . . . . . . . . . . . . . Internal representation of a node • Blocks (pairs of) • Nodes (pairs of) • Splitting groups • Fusion groups (pairs of) • Fusion/splitting group records Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 9

  16. Conclusion and Open Problems Insert O (1) O (1) Delete O (log d ) Search Worst-case Pointer machine • Simpler construction ? • Direct binary tree solution ? • ( a, b ) -trees with worst-case update time ? • Components usefull for deamortization of other structures ? Gerth Stølting Brodal Optimal Finger Search Trees in The Pointer Machine 10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend