succinct dynamic cardinal trees with constant time operations for small alphabet pooya davoodi...

19
Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National University

Upload: roy-haynes

Post on 04-Jan-2016

218 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

Succinct Dynamic Cardinal Trees with Constant Time Operations

for Small Alphabet

Pooya Davoodi Aarhus University

May 24, 2011

S. Srinivasa RaoSeoul National University

Page 2: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

Outline

Succinct Tree Representations

-ary Cardinal Tree Representations

Models for Updates

Our Contribution

2

Page 3: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 4: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 5: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 6: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 7: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 8: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

-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

Page 9: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

Lower Bound for -ary Trees

The number of -ary trees on nodes:

Information-theoretic lower bound:

9

bits

Page 10: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 11: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 12: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 13: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

Traversal Model

A traversal starts and ends at the root Queries and updates are performed at the

current node of the traversal

13

Page 14: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 15: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 16: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 17: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 18: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

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

Page 19: Succinct Dynamic Cardinal Trees with Constant Time Operations for Small Alphabet Pooya Davoodi Aarhus University May 24, 2011 S. Srinivasa Rao Seoul National

Thank You