Top Banner
Wolfgang Mulzer Institut für Informatik Data Structures on Event Graphs Bernard Chazelle Wolfgang Mulzer FU Berlin Princeton University
22

Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

Jan 01, 2016

Download

Documents

Myrtle Gray
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

Wolfgang MulzerInstitut für Informatik

Data Structures on Event Graphs

Bernard Chazelle Wolfgang MulzerFU BerlinPrinceton University

Page 2: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

2Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

It‘s the data

Data can be

huge

Rethink classical algorithms from a data-oriented perspective.

corrupted

low-entropy expensive

Page 3: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

3Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

It‘s the data

Data can be

huge

We study a model that represents temporal locality of the data.

corrupted

low-entropy expensive

Page 4: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

4Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

A concrete problem – successor search

Given: An ordered universe U of n elements

x1 x2 x3 x4 x5 x6 x7 x8 x9 x10

Goal: maintain a subset S of U supporting successor queries

Operations: Insert(xi)

Delete(xi)Successor(xi)

Also known as Union-Split-Find Problem.

Page 5: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

5Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

A concrete problem – successor search

Given: An ordered universe U of n elements

x1 x2 x3 x4 x5 x6 x7 x8 x9 x10

Can be solved in O(log log n) time on a pointer machine.

[van Emde Boas, Kaas, Zijlstra 77]

This is optimal.

[Mehlhorn, Näher, Alt 88], [Pătraşcu, Thorup 06]

Page 6: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

6Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Event graphs

Given: An ordered universe U of n elementsand

a labeled, connected, undirected graph G

Ix0

Ix7 Dx9

Dx2

Sx7

Ix9

Sx2

Ix5

G is labeled with operations Ixi, Dxi, Sxi

G is known in advance

G can be preprocessed

Adversary walks on G to perform ops

Similar to Markov chains

Page 7: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

7Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Event graphs

G is labeled with operations Ixi, Dxi, Sxi

G is known in advance

G can be preprocessed

Adversary walks on G to perform ops

x1 x2 x3 x4 x5 x6 x7 x8 x9 x10

Ix0

Ix7

Dx2

Sx7

Ix9

Sx2

Ix5

Dx9

Page 8: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

8Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Decorated graphs

The walk of the adversary induces a walk on a much bigger graph.

Decorated Graph dec(G): directed graph with vertex set V(G) Pow(U). Represents current node of G + current set S.

Ix0

Ix7

Dx2

Sx7

Ix9

Sx2

Ix5

Dx9

(Dx2, )

(Sx2, )

(Ix9, {x9})

(Ix5, {x5, x9})

Page 9: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

9Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Decorated graphs

The walk of the adversary induces a walk on a much bigger graph.

Decorated Graph dec(G): directed graph with vertex set V(G) Pow(U). Represents current node of G + current set S.

If dec(G) is available, we can perform all operations in constant time.

But: The size of dec(G) is exponential.

Page 10: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

10Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Decorated graphs

The walk of the adversary induces a walk on a much bigger graph.

Decorated Graph dec(G): directed graph with vertex set V(G) Pow(U). Represents current node of G + current set S.Questions: - What can we say about the structure of dec(G)?

- What can we deduce about dec(G), given G?

- In which cases can dec(G) be compressed efficiently?

Page 11: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

11Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

The structure of decorated graphs

dec(G) contains a unique strongly connected component that has no exit and is reachable from every other node.

This component is called the unique sink.

C1

C4C3

C2

Page 12: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

12Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

The structure of decorated graphs

Theorem: Given a node vV(G) and a set SU, we can decide in time O(|V(G)|+|E(G)|) whether (v,S) lies in the unique sink.

Proof idea: We show that for every node in the unique sink there exists a unique certificate in G (a certifying walk).

A modified graph search in G can be used to find a certifying walk for (v,S), if it exists.

Page 13: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

13Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Can the decorated graph be compressed?

Consider the case that G is a path.

Theorem: If G is a path, the successor problem can be solved in O(1) time per operation with O(n1+) space on a word RAM, where n=|V|.

Ix0Ix7 Dx2Sx7Ix9Sx2

Ix5Dx9

Page 14: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

14Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Can the decorated graph be compressed?

Theorem: If G is a path, the successor problem can be solved in O(1) time per operation with O(n1+) space on a word RAM, where n=|V|.

Ix0Ix7 Dx2Sx7Ix9Sx2

Ix5Dx9

Page 15: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

15Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Can the decorated graph be compressed?

Theorem: If G is a path, the successor problem can be solved in O(1) time per operation with O(n1+) space on a word RAM, where n=|V|.

Ix0Ix7 Dx2Sx7Ix9Sx2

Ix5Dx9

Proof: Maintain S in a doubly linked list. Each node in G has a pointer to its predecessor or successor in S. Use this pointer to answer the queries. Need only maintain those pointers that will be relevant next. Use lookup-table.

Page 16: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

16Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Example

Dx3Dx1 Dx2Sx5 Sx8Ix7 Dx9Ix2

x1 x3 x5 x7 x10

… …

Page 17: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

17Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Reducing the space requirement

A naïve implementation uses two lookup-tables per node to update the pointers → O(n2) space usage.

Can be improved to O(n1+) space.

Approach: Use spatial decomposition and bootstrapping to compress the lookup-tables (cf. [Crochemore et al, 2008])

Page 18: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

18Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

What about randomization?

We assumed an adversary.

But: What if the walk on the path is random?

Theorem: If the requests are generated by a random walk on a path, the successor problem can be solved in O(1) expected time per operation with O(n) space on a word RAM, where n=|V|.

Page 19: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

19Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

What about randomization?

Theorem: If the requests are generated by a random walk on a path, the successor problem can be solved in O(1) expected time per operation with O(n) space on a word RAM, where n=|V|.

Proof (sketch): Subdivide the path into segments of n nodes.The random walk requires (n) steps to leave a segment.Build the quadratic data structure once the walk enters the next segment.Use overlapping segments and deamortization techniques to make it work.

Page 20: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

20Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

What about more complicated graphs?What if G is a tree, a grid, or something more complicated?

The path approach does not work any more

Ix0

Ix7

Sx7

Sx2 Dx2 Ix9Sx2 Dx9

Ix0Ix7

Dx2

Sx7

Ix9Sx2

Ix5Dx9 Ix7

We conjecture that in this case the O(log log n) bound from van Emde Boas trees is optimal (but we do not know).

Page 21: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

21Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Conclusion and open problems

A new way to model request sequences to a data structure.

Can be applied to any data structuring problem.

More algorithmic questions on decorated graphs, e.g., can we estimate the size of the unique sink efficiently?

Can we prove lower bounds for the successor problem on general event graphs?

Page 22: Wolfgang Mulzer Institut f ür Informatik Data Structures on Event Graphs Bernard ChazelleWolfgang Mulzer FU Berlin Princeton University.

22Bernard Chazelle and Wolfgang Mulzer – Data Structures on Event Graphs

Thank you!