Succinct Ordinal Trees Based on Tree Covering - PowerPoint PPT Presentation

About This Presentation
Title:

Succinct Ordinal Trees Based on Tree Covering

Description:

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

Number of Views:101
Avg rating:3.0/5.0
Slides: 26
Provided by: Meng80
Category:

less

Transcript and Presenter's Notes

Title: Succinct Ordinal Trees Based on Tree Covering


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
    ( )/(n1) 4n/(pn)3/2
  • Information-theoretic minimum 2n-O(lg n) bits
  • Explicit, pointer-based representation T(n lg n)
    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
7
4
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 2no(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) M3M-4 (M
    3M-4)
  • Parameters M lg4 n, M lg n / 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
t-name of a Node
  • Preorder numbers node x
  • t-names t(x)ltt1(x),t2(x),t3(x)gt
  • t-names t(x)ltt1(x),t2(x),t3(x)gt

Node 29
t(29)lt3,
1,
5gt
t(29)lt3,1,4gt
16
Supporting node_selectDFUDS
  • From the DFUDS number to the t-name
  • From the t-name to the t-name
  • Table lookup
  • From the t-name to the preorder number
  • Geary et al. 2004

17
Computing t1(x)
Nodes (DFUDS )

1
2
3
4
5
6
7
8
9
10
t1s stored

1
2
1
2
t1(x)2
Example x8th node in DFUDS
18
Computing t1(x) (Continued)
  • Dictionary
  • Universe n
  • size O(n / lg4 n)
  • Space cost o(n) bits (Raman et al, 2002)
  • t1s stored
  • Number of elements stored O(n / lg4 n)
  • Each element O(lg n) bits
  • Space cost o(n) bits

19
Computing t2(x) and t3(x)

Nodes
1
2
3
4
5
6
7
8
9
10
t2

1
1
1
2
1
3
1
2
t3

1
1
2
1
2
1
3
2
t2(x)1
t3(x)4
20
Computing t2(x) and t3(x) (Continued)
  • Dictionary
  • Universe n
  • size O(n / lg n)
  • Space cost o(n) bits (Raman et al, 2002)
  • t2s and t3s 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 (T(lg n) 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
    2no(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!
Write a Comment
User Comments (0)
About PowerShow.com