1 / 25

Succinct Ordinal Trees Based on Tree Covering

Succinct Ordinal Trees Based on Tree Covering. Meng He , J. Ian Munro, University of Waterloo S. Srinivasa Rao, IT University of Copenhagen. Background: Succinct Data Structures. The problem Modern applications often process huge amounts of data Examples

Download Presentation

Succinct Ordinal Trees Based on Tree Covering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Succinct Ordinal Trees Based on Tree Covering Meng He, J. Ian Munro, University of Waterloo S. Srinivasa Rao, IT University of Copenhagen

  2. Background: Succinct Data Structures • The problem • Modern applications often process huge amounts of data • Examples • Web search engines: Google, Altavista, etc. • Bioinformatics application • XML databases • Spatial databases • …

  3. The Solution: Succinct Data Structures • What are succinct data structures • Representing data structures using preferably information-theoretic minimum space • Supporting efficient navigational operations • History of Succinct Data Structures • Jacobson 1989

  4. Trees • The number of different ordinal trees of n nodes: ()/(n+1) ≈ 4n/(πn)3/2 • Information-theoretic minimum: 2n-O(lgn) bits • Explicit, pointer-based representation: Θ(n lgn) bits 2n n

  5. Succinct Ordinal Trees • Level order unary degree sequence (LOUDS): Jacobson 1989 • Balanced parentheses (BP): Munro & Raman 1997 • Depth first unary degree sequence (DFUDS): Benoit et al. 1999 • Tree covering (TC): Geary et al. 2004

  6. Preorder and DFUDS order 1 3 2 8 4 5 6 3 4 7 9 10 11 7 8 5 6

  7. Navigational Operations Considered • Parent • Child • Level_ancestor • Depth • Subtree_size • LCA • …all in O(1) time with 2n+o(n) bits on the word RAM

  8. Motivations and Objectives • Three main representations: BP, DFUDS, TC • The fact: different representation supports different operations on trees • Example: height, node_rankDFUDS, node_rankpost • New problem: a representation supporting all the navigational operations

  9. Motivations and Objectives (Continued) • The assumption: there may be new operations supported by one of these representations • New problem: one representation that can compute an arbitrary word of all the other representations

  10. The Tree Covering Algorithm by Geary et al. • The idea • Cover the tree with a set of mini-trees • Cover each mini-tree with a set of micro-trees • Compute the set of mini-trees (micro-trees) in a bottom-up, greedy fashion • Properties • Any two mini-trees (micro-trees) can only share their root • Size of a mini-tree (micro-tree): M~3M-4 (M’ ~3M’-4) • Parameters: M = lg4n, M’ = lgn / 24

  11. The Tree Covering Algorithm: An Example M = 8, M’ = 3

  12. Operations supported on TC by Geary et al. • The old TC (Geary et al. 2004) • child • child_rank • depth • level_anc • nbdesc • degree • node_rankPRE, node_selectPRE • node_rankPOST, node_selectPOST

  13. New Definitions and Properties: Preorder Changers • Tier-1 preorder changers: • Number of Tier-1 preorder changers: at most twice the number of mini-trees • Tier-2 preorder changers are similar

  14. DFUDS Order Changers • Tier-1 DFUDS order changers: • Number of Tier-1 DFUDS order changers: at most four times the number of mini-trees • Tier-2 DFUDS order changers are similar

  15. τ*-name of a Node • Preorder numbers: node x • τ-names: τ(x)=<τ1(x),τ2(x),τ3(x)> • τ*-names: τ*(x)=<τ1(x),τ2(x),τ3*(x)> Node 29 τ(29)=<3, 1, 5> τ*(29)=<3,1,4>

  16. Supporting node_selectDFUDS • From the DFUDS number to the τ*-name • From the τ*-name to the τ-name • Table lookup • From the τ-name to the preorder number • Geary et al. 2004

  17. Computing τ1(x) Nodes (DFUDS #) … 1 2 3 4 5 6 7 8 9 10 τ1’s stored … 1 2 1 2 τ1(x)=2 Example: x=8th node in DFUDS

  18. Computing τ1(x) (Continued) • Dictionary • Universe: n • size: O(n / lg4 n) • Space cost: o(n) bits (Raman et al, 2002) • τ1’s stored • Number of elements stored: O(n / lg4 n) • Each element: O(lg n) bits • Space cost: o(n) bits

  19. Computing τ2(x) and τ3*(x) Nodes … 1 2 3 4 5 6 7 8 9 10 τ2 … 1 1 1 2 1 3 1 2 τ3* … 1 1 2 1 2 1 3 2 τ2(x)=1 τ3*(x)=4

  20. Computing τ2(x) and τ3*(x) (Continued) • Dictionary • Universe: n • size: O(n / lg n) • Space cost: o(n) bits (Raman et al, 2002) • τ2’s and τ3*’s stored • Number of elements stored: O(n / lg n) • Each element: O(lglg n) bits • Space cost: o(n) bits

  21. Other Operations Supported • height • LCA • distance • leaf_rank and leaf_select • leftmost_leaf and rightmost_leaf • leaf_size • node_rankDFUDS • level_leftmost and level_rightmost • level_succ and level_pred

  22. Data Abstraction: Computing a subsequence of BP and DFUDS • The problem: store the tree using TC, and support the computation of a word of its BP or DFUDS sequence • Results: • Time: compute a word (Θ(lgn) bits) of the BP or DFUDS sequence in O(f(n)) time • Space: n/f(n) additional bits

  23. Conclusions • A succinct representation of ordinal trees using 2n+o(n) bits that support all the navigational operations • Our representation also supports level-order traversal, a useful ordering previously supported only with a very limited set of operations • Our encoding schemes supports BP and DFUDS as abstract data types

  24. Open Problems • Support new operations that are not supported by BP, DFUDS or TC • Constant-time computation of a word of BP or DFUDS using o(n) additional bits (or is this possible at all?)

  25. Thank you!

More Related