succinct dynamic cardinal trees with constant time operations for small alphabet pooya davoodi...
TRANSCRIPT
Succinct Dynamic Cardinal Trees with Constant Time Operations
for Small Alphabet
Pooya Davoodi Aarhus University
May 24, 2011
S. Srinivasa RaoSeoul National University
Outline
Succinct Tree Representations
-ary Cardinal Tree Representations
Models for Updates
Our Contribution
2
Succinct Data Structures
Goal:– Represent data in close to optimal space
(optimal: information-theoretic lower bound)– Support operations efficiently
Example: succinct representation of trees
3
Compress but also preserve accessibility and functionality
Motivation for Succinct Trees
Directories (Unix, all the rest) Search trees (B-trees, binary search trees,
digital trees, or tries) Graph structures (doing a tree based search) Search indexes for text (including DNA)– Suffix trees
XML documents …
4
Memory Model
Word RAM model with word size bits(is the problem size)
Supporting– read/write – addition, subtraction, multiplication, division– left/right shifts – AND, OR, XOR, NOT
operations on words in time
Ordinal Trees
Rooted ordered trees (on nodes) Navigational operations:– parent(x) = a– first child(x) = b– next sibling(x) = c– -th child
Other useful operations:– degree(x) = 2– subtree-size(x) = 4
6
x
a
b
c
Ordinal Tree Representations
Jacobson (FOCS’89), Munro and Raman (FOCS’97), Benoit et al. (Algorithmica’05), Geary et al. (SODA’04), Farzan et al. (ICALP’09), Sadakane and Navarro (SODA’10), and various other papers
Results– All these representations use bits– They support extended set of navigational
operations and queries in time
7
-ary Cardinal Trees
A generalization of binary trees () Each node has at most children Each edge is labeled from Navigational operations:– label-child(): returns the child that has the edge
labeled by – child-label(): returns the label of the edge leading to
the -th child– Plus the ordinal tree navigational operations
Applications: suffix trees, Lempel-Ziv tries8
Lower Bound for -ary Trees
The number of -ary trees on nodes:
Information-theoretic lower bound:
9
bits
Previous Results
Benoit et al. (Algorithmica’05)– The navigational operations and queries are
supported in time– Using bits
Farzan et al. (ICALP’09)– Improved the space to
bits
10
Dynamic Cardinal Trees
Data structures support the update operations:– Inserting a leaf– Deleting a leaf
11
“Data optimization is much easier when we can sit back and do it off-line.” Jocobson, 1989
Hardness of Arbitrary Updates
If leaf insertions/deletions are allowed at arbitrary positions, then– subtree-size and -th child have a lower bound of
amortized time The lower bounds are derived by reduction
from the subset-rank problem and list-representation problemFarzan and Munro (ICALP’09)
12
Traversal Model
A traversal starts and ends at the root Queries and updates are performed at the
current node of the traversal
13
Previous Results
Arroyuelo (CPM’08):– In the traversal model
– Navigational operations are supported in time – The operations label-child and leaf
insertions/deletions are supported in time– Space is bits
14
amortized
Our Result
In the traversal model When The navigational operations and queries are
supported in time Leaf insertions/deletions are supported in
amortized time Space is bits
This solves an open problem in Arroyuelo (CPM’08)
15
Data Structure
We decompose trees into micro treesof size:
Representation of each micro tree:– Ordinal tree– Dictionary for sequence of labels– Preorder-number of frontiers– subtree-size of child micro trees– Pointers to neighbors
Overall space: bits We do not use any global data structure 16
Main Contribution
Our main contribution:– Supporting queries and updates in time within
micro trees of size
– The representation of Arroyuelo (CPM’08) requires time for queries and updates
17
Open Problems
Improving the best result for general – In traversal model– Improve O for the time of navigational operations– Improve O for the update time
18
Thank You