MSO Queries on Trees Enumerating Answers under Updates Using Forest - - PowerPoint PPT Presentation

mso queries on trees
SMART_READER_LITE
LIVE PREVIEW

MSO Queries on Trees Enumerating Answers under Updates Using Forest - - PowerPoint PPT Presentation

Introduction Monoids + HPD Forest Algebras Circuits MSO Queries on Trees Enumerating Answers under Updates Using Forest Algebras Matthias Niewerth 1 Introduction Monoids + HPD Forest Algebras Circuits Problem Description Query


slide-1
SLIDE 1

Introduction Monoids + HPD Forest Algebras Circuits

MSO Queries on Trees

Enumerating Answers under Updates Using Forest Algebras Matthias Niewerth

1

slide-2
SLIDE 2

Introduction Monoids + HPD Forest Algebras Circuits

Problem Description

Query Answering Given: MSO Query Ψ(x1, . . . , xk), tree t Answer: { (v1, . . . , vk) | t | = Ψ(v1, . . . , vk) }

2

slide-3
SLIDE 3

Introduction Monoids + HPD Forest Algebras Circuits

Problem Description

Query Answering Given: MSO Query Ψ(x1, . . . , xk), tree t Answer: { (v1, . . . , vk) | t | = Ψ(v1, . . . , vk) } Problem: up to |t|k answers

2

slide-4
SLIDE 4

Introduction Monoids + HPD Forest Algebras Circuits

Problem Description

Query Answering Given: MSO Query Ψ(x1, . . . , xk), tree t Answer: { (v1, . . . , vk) | t | = Ψ(v1, . . . , vk) } Problem: up to |t|k answers Approach: Enumeration

1

build index structure

2

enumerate with small delay

3

fast updates of index structure

2

slide-5
SLIDE 5

Introduction Monoids + HPD Forest Algebras Circuits

Problem Description

Query Answering Given: MSO Query Ψ(x1, . . . , xk), tree t Answer: { (v1, . . . , vk) | t | = Ψ(v1, . . . , vk) } Problem: up to |t|k answers Approach: Enumeration

1

build index structure

2

enumerate with small delay

3

fast updates of index structure

Updates:

change of a label insertion of a leaf deletion of a leaf

2

slide-6
SLIDE 6

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Reference Delay Update

3

slide-7
SLIDE 7

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Reference Delay Update Kazana and Segoufin Enumeration of Monadic Second-Order Queries on Trees TOCL 2013 Amarilli, Bourhis, Jachiet, Mengel A Circuit-Based Approach to Efficient Enumeration ICALP 2017

3

slide-8
SLIDE 8

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) Reference Delay Update Balmin, Papakonstantinou, Vianu Incremental validation of XML documents TODS 2004 Losemann and Martens MSO Queries on Trees: Enumerating Answers under Updates LICS 2014

3

slide-9
SLIDE 9

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) Goal O(1) O(log(n)) Reference Delay Update

3

slide-10
SLIDE 10

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) Goal O(1) O(log(n)) Krohn Rhodes Theorem Reference Delay Update

3

slide-11
SLIDE 11

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Krohn Rhodes Theorem Reference Delay Update Niewerth and Segoufin Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates PODS 2018

3

slide-12
SLIDE 12

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) Reference Delay Update Niewerth and Segoufin Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates PODS 2018

3

slide-13
SLIDE 13

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) Reference Delay Update Niewerth and Segoufin Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates PODS 2018

3

slide-14
SLIDE 14

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) Reference Delay Update

3

slide-15
SLIDE 15

Introduction Monoids + HPD Forest Algebras Circuits

Contents

Monoids and Heavy Path Decomposition

(M, d, ε)

Forest Algebras d = Enumeration using Circuits

4

slide-16
SLIDE 16

Introduction Monoids + HPD Forest Algebras Circuits

Contents

Monoids and Heavy Path Decomposition

(M, d, ε)

Forest Algebras d = Enumeration using Circuits

5

slide-17
SLIDE 17

Introduction Monoids + HPD Forest Algebras Circuits

Boolean Queries: Monoids over Strings [BPV04]

Query Translation MSO sentence Ψ → automaton A → transition monoid Transition monoid: (2Q2, ‘, idQ ) m1 ‘ m2 = { (q1, q3) | (q1, q2) ∈ m1, (q2, q3) ∈ m2 } a1 a2 a3 a4 a5 a6 a7 a8

6

slide-18
SLIDE 18

Introduction Monoids + HPD Forest Algebras Circuits

Boolean Queries: Monoids over Strings [BPV04]

Query Translation MSO sentence Ψ → automaton A → transition monoid Transition monoid: (2Q2, ‘, idQ ) m1 ‘ m2 = { (q1, q3) | (q1, q2) ∈ m1, (q2, q3) ∈ m2 } ‘ ‘ ‘ a1 a2 ‘ a3 a4 ‘ ‘ a5 a6 ‘ a7 a8

6

slide-19
SLIDE 19

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-20
SLIDE 20

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-21
SLIDE 21

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-22
SLIDE 22

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-23
SLIDE 23

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-24
SLIDE 24

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-25
SLIDE 25

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

7

slide-26
SLIDE 26

Introduction Monoids + HPD Forest Algebras Circuits

Heavy Path Decomposition [BPV04,LM14]

. . . . . .

Results Update time for Boolean queries: O(log2(n)) [BPV04] Update time and delay for k-ary queries: O(log2(n)) [LM14]

7

slide-27
SLIDE 27

Introduction Monoids + HPD Forest Algebras Circuits

From Boolean to k-ary Queries

Boolean Query MSO sentence Ψ → automaton A The approach works for strings and trees.

8

slide-28
SLIDE 28

Introduction Monoids + HPD Forest Algebras Circuits

From Boolean to k-ary Queries

Boolean Query MSO sentence Ψ → automaton A k-ary Query MSO formula Ψ(x1, . . . , xk) → node selecting automaton (A, S) The approach works for strings and trees.

8

slide-29
SLIDE 29

Introduction Monoids + HPD Forest Algebras Circuits

From Boolean to k-ary Queries

Boolean Query MSO sentence Ψ → automaton A k-ary Query MSO formula Ψ(x1, . . . , xk) → node selecting automaton (A, S) Node Selecting Automaton A: finite automaton S ⊆ Qk: set of selecting tuples Answer: { (v1, . . . , vk) | ∃ run λ s.t. (λ(v1), . . . , λ(vk)) ∈ S } The approach works for strings and trees.

8

slide-30
SLIDE 30

Introduction Monoids + HPD Forest Algebras Circuits

k-ary Queries: Monoids over Strings [LM14]

Transition monoid: (2Q2, ‘, idQ ) ‘ ‘ ‘ a1 a2 ‘ a3 a4 ‘ ‘ a5 a6 ‘ a7 a8

9

slide-31
SLIDE 31

Introduction Monoids + HPD Forest Algebras Circuits

k-ary Queries: Monoids over Strings [LM14]

Transition monoid: (2Q2×S(S), ‘, idQ × {∅}) ‘ ‘ ‘ a1 a2 ‘ a3 a4 ‘ ‘ a5 a6 ‘ a7 a8 S(S) = {Q′ ⊆ Q | Q′ ⊆ s for some s ∈ S} m1 ‘ m2 = { ((q1, q3), Q′) | ((q1, q2), Q1) ∈ m1, ((q2, q3), Q2) ∈ m2, Q′ = Q1 ∪ Q2 } Capture enough information about states to allow enumeration.

9

slide-32
SLIDE 32

Introduction Monoids + HPD Forest Algebras Circuits

k-ary Queries: Monoids over Strings [LM14]

Transition monoid: (2Q2×S(S), ‘, idQ × {∅}) ‘ ‘ ‘ a1 a2 ‘ a3 a4 ‘ ‘ a5 a6 ‘ a7 a8 Algorithm

1 Top-Down:

search a position

2 Bottom-Up:

filter tuples S(S) = {Q′ ⊆ Q | Q′ ⊆ s for some s ∈ S} m1 ‘ m2 = { ((q1, q3), Q′) | ((q1, q2), Q1) ∈ m1, ((q2, q3), Q2) ∈ m2, Q′ = Q1 ∪ Q2 } Capture enough information about states to allow enumeration.

9

slide-33
SLIDE 33

Introduction Monoids + HPD Forest Algebras Circuits

Contents

Monoids and Heavy Path Decomposition

(M, d, ε)

Forest Algebras d = Enumeration using Circuits

10

slide-34
SLIDE 34

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

11

slide-35
SLIDE 35

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton

11

slide-36
SLIDE 36

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton

11

slide-37
SLIDE 37

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid

11

slide-38
SLIDE 38

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree

11

slide-39
SLIDE 39

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD

11

slide-40
SLIDE 40

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD Index Structure

11

slide-41
SLIDE 41

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD Index Structure Node Selecting Stepwise Tree Automaton

11

slide-42
SLIDE 42

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD Index Structure Node Selecting Stepwise Tree Automaton Extended Transition Algebra

11

slide-43
SLIDE 43

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD Index Structure Node Selecting Stepwise Tree Automaton Extended Transition Algebra Tree

11

slide-44
SLIDE 44

Introduction Monoids + HPD Forest Algebras Circuits

Structure of Algorithm

Node Selecting Stepwise Tree Automaton Node Selecting String Automaton Extended Transition Monoid Tree Strings HPD Index Structure Node Selecting Stepwise Tree Automaton Extended Transition Algebra Tree Index Structure

11

slide-45
SLIDE 45

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Examples

a b c d ‘ b d = a b c d b d concatenation

12

slide-46
SLIDE 46

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Examples

a b c d ‘ b d = a b c d b d concatenation a b

  • e

d c f d = a b c f d e context application

12

slide-47
SLIDE 47

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Examples

a b c d ‘ b d = a b c d b d concatenation a b

  • e

d c f d = a b c f d e context application a b

  • e

d c f

  • =

a b c f

  • e

context application

12

slide-48
SLIDE 48

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

Free Forest Algebra H all forests V all contexts ‘ concatenation d context application

13

slide-49
SLIDE 49

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

Free Forest Algebra H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-50
SLIDE 50

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-51
SLIDE 51

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-52
SLIDE 52

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-53
SLIDE 53

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-54
SLIDE 54

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-55
SLIDE 55

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula a = a

  • Free Forest Algebra

H all forests V all contexts ‘ concatenation d context application Atomic Formulas ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-56
SLIDE 56

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula a = a

  • Atomic Formulas

ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-57
SLIDE 57

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula d d a ‘ b e ‘ c d alternative formula a = a

  • Atomic Formulas

ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-58
SLIDE 58

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula d d a ‘ b e ‘ c d alternative formula a = a

  • Atomic Formulas

ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-59
SLIDE 59

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula d d a ‘ b e ‘ c d alternative formula a = a

  • Atomic Formulas

ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts

13

slide-60
SLIDE 60

Introduction Monoids + HPD Forest Algebras Circuits

Forest Algebras in a Nutshell

Free Forest Algebra

a b c d e tree d a ‘ d b ‘ c d e formula d d a ‘ b e ‘ c d alternative formula a = a

  • Atomic Formulas

ε empty forest

  • empty context

a, b, . . . atomic forests a, b, . . . atomic contexts The leaves of the formula correspond to the nodes of the tree.

13

slide-61
SLIDE 61

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t

14

slide-62
SLIDE 62

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t How to decompose a tree?

14

slide-63
SLIDE 63

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t f c How to decompose a tree?

1 t = c d f

d c c1 c2 f1 c4 f2 c3 f

14

slide-64
SLIDE 64

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t f c How to decompose a tree?

1 t = c d f

d c c1 c2 f1 c4 f2 c3 f

14

slide-65
SLIDE 65

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t f c2 c1 How to decompose a tree?

1 t = c d f 2 c = c1 d c2

d d c1 c2 f1 c4 f2 c3 f

14

slide-66
SLIDE 66

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t f f1 c1 c3 How to decompose a tree?

1 t = c d f 2 c = c1 d c2 3 c2 = f1 ‘ c3

d d c1 ‘ f1 c4 f2 c3 f

14

slide-67
SLIDE 67

Introduction Monoids + HPD Forest Algebras Circuits

How to Decompose a Tree (to a log-depth Formula)

t f c1 c3 f2 c4 How to decompose a tree?

1 t = c d f 2 c = c1 d c2 3 c2 = f1 ‘ c3 4 f1 = c4 d f2

d d c1 ‘ d c4 f2 c3 f

14

slide-68
SLIDE 68

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

‘ ‘ 1 2 3

15

slide-69
SLIDE 69

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

‘ ‘ 1 2 3 ‘ 1 ‘ 2 3

15

slide-70
SLIDE 70

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

‘ ‘ 1 2 3 ‘ 1 ‘ 2 3

15

slide-71
SLIDE 71

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3

15

slide-72
SLIDE 72

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3 ‘ ‘ 1 ‘ 2 3 4 ‘ ‘ 1 2 ‘ 3 4 ‘ 1 ‘ ‘ 2 3 4

15

slide-73
SLIDE 73

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3 d d 1 d 2 3 4 d d 1 2 d 3 4 d 1 d d 2 3 4

15

slide-74
SLIDE 74

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3

15

slide-75
SLIDE 75

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3 ‘ d 1 3 2 d ‘ 1 2 3

1 is a context

2 is a forest

15

slide-76
SLIDE 76

Introduction Monoids + HPD Forest Algebras Circuits

Rebalancing Forest Algebra Formulas

d d 1 2 3 d 1 d 2 3 ‘ d 1 3 2 d ‘ 1 2 3

1 is a context

2 is a forest ‘ 1 d 2 3

1 is a forest

2 is a context

15

slide-77
SLIDE 77

Introduction Monoids + HPD Forest Algebras Circuits

Result

Theorem Enumertion of MSO formulas on trees can be done in time: Preprocessing O( |Q|6 · |S| · 2k · n ) Delay O( |Q|6 · |S| · 2k · k · log(n) ) Updates O( |Q|6 · |S| · 2k · log(n) ) n size of tree |Q| number of states |S| number of accepting tuples k arity of the query

16

slide-78
SLIDE 78

Introduction Monoids + HPD Forest Algebras Circuits

Contents

Monoids and Heavy Path Decomposition

(M, d, ε)

Forest Algebras d = Enumeration using Circuits

17

slide-79
SLIDE 79

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) Reference Delay Update

18

slide-80
SLIDE 80

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) [ABM18] O(1) O(log(n))

  • nly relabel

Reference Delay Update Amarilli, Bourhis, Mengel Enumeration on Trees under Relabelings ICDT 2018

18

slide-81
SLIDE 81

Introduction Monoids + HPD Forest Algebras Circuits

Enumeration using Circuits [ABM18]

∪ ⊠ B:1 ∪ ⊠ ¬ B:2 x:2 ⊠ ¬ B:3 x:3 ⊠ ¬ B:1 ∪ ⊠ B:2 x:2 ⊠ B:3 x:3

19

slide-82
SLIDE 82

Introduction Monoids + HPD Forest Algebras Circuits

Enumeration using Circuits [ABM18]

∪ ⊠ B:1 ∪ ⊠ ¬ B:2 x:2 ⊠ ¬ B:3 x:3 ⊠ ¬ B:1 ∪ ⊠ B:2 x:2 ⊠ B:3 x:3 Problem: depth(circuit) ∈ Ω(depth(tree))

19

slide-83
SLIDE 83

Introduction Monoids + HPD Forest Algebras Circuits

Enumeration using Circuits [ABM18]

∪ ⊠ B:1 ∪ ⊠ ¬ B:2 x:2 ⊠ ¬ B:3 x:3 ⊠ ¬ B:1 ∪ ⊠ B:2 x:2 ⊠ B:3 x:3 Problem: depth(circuit) ∈ Ω(depth(tree)) Solution: tree decomposition of input tree

19

slide-84
SLIDE 84

Introduction Monoids + HPD Forest Algebras Circuits

Enumeration using Circuits [ABM18]

∪ ⊠ B:1 ∪ ⊠ ¬ B:2 x:2 ⊠ ¬ B:3 x:3 ⊠ ¬ B:1 ∪ ⊠ B:2 x:2 ⊠ B:3 x:3 Problem: depth(circuit) ∈ Ω(depth(tree)) Solution: tree decomposition of input tree Better Solution: use forest algebra formulas

19

slide-85
SLIDE 85

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) [ABM18] O(1) O(log(n))

  • nly relabel

Reference Delay Update Amarilli, Bourhis, Mengel Enumeration on Trees under Relabelings ICDT 2018

20

slide-86
SLIDE 86

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) [ABM18] O(1) O(log(n))

  • nly relabel

Future O(1) O(log(n)) Reference Delay Update

20

slide-87
SLIDE 87

Introduction Monoids + HPD Forest Algebras Circuits

Related Work

Simons Factorization Forests [KS13] O(1) Set valued Circuits [ABJM17] O(1) Heavy Path Decomposition [BPV04,LM14] O(log2(n)) O(log2(n)) [NS17] O(1) O(log(n))

  • nly strings

Forest Algebras This Paper O(log(n)) O(log(n)) Krohn Rhodes Theorem Krohn Rhodes Theorem for Trees? Follow-Up? O(1) O(log(n)) [ABM18] O(1) O(log(n))

  • nly relabel

Future O(1) O(log(n))

Thank You!

Reference Delay Update

20

slide-88
SLIDE 88

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-89
SLIDE 89

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-90
SLIDE 90

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q1

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-91
SLIDE 91

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q1 q1

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-92
SLIDE 92

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q1

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-93
SLIDE 93

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q1

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-94
SLIDE 94

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-95
SLIDE 95

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-96
SLIDE 96

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-97
SLIDE 97

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-98
SLIDE 98

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-99
SLIDE 99

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-100
SLIDE 100

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q4 q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-101
SLIDE 101

Introduction Monoids + HPD Forest Algebras Circuits

Node Selecting Stepwise Tree Automaton (Example)

q0 a q1 b q2 q3 a q4 S = {(q4, q0)} q1, q3 q1, q3, q4 q0, q2 q1, q3 q1, q3 q2 q1, q3 a b b b a b

q4 q0 q1 q2 q1 q2

Output all pairs of a-nodes that are connected by a path of b-nodes.

21

slide-102
SLIDE 102

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

‘HH =

q1 q2 q2 q3 q1 q3

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) f1 ‘HH f2 = { (q1, q3) | (q1, q2) ∈ f1 and (q2, q3) ∈ f2 } forest ˆ = string of trees horizontal monoid ˆ = transition monoid of a string automaton

22

slide-103
SLIDE 103

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

dVH =

q1 q2 q3 q4 q1 q2 q3 q4

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) c dVH f = { (q1, q2) | ((q1, q2), (q3, q4)) ∈ c and (q3, q4) ∈ f } forest ˆ = string of trees horizontal monoid ˆ = transition monoid of a string automaton

22

slide-104
SLIDE 104

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

dVV =

q1 q2 q3 q4 q1 q2 q3 q4 q5 q6 q5 q6

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) c1 dVV c2 = { ((q1, q2), (q5, q6)) | ((q1, q2), (q3, q4)) ∈ c1 and ((q3, q4), (q5, q6)) ∈ c2 } forest ˆ = string of trees horizontal monoid ˆ = transition monoid of a string automaton

22

slide-105
SLIDE 105

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

‘VH =

q1 q2 q2 q3 q1 q3 q4 q5 q4 q5

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) f ‘HV c = { ((q1, q3), (q4, q5)) | (q1, q2) ∈ f and ((q2, q3), (q4, q5)) ∈ c } forest ˆ = string of trees horizontal monoid ˆ = transition monoid of a string automaton

22

slide-106
SLIDE 106

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

‘HV =

q1 q2 q2 q3 q1 q3 q4 q5 q4 q5

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) c ‘VH f = { ((q1, q3), (q4, q5)) | ((q1, q2), (q4, q5)) ∈ c and (q2, q3) ∈ f } forest ˆ = string of trees horizontal monoid ˆ = transition monoid of a string automaton

22

slide-107
SLIDE 107

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

‘HV =

q1 q2 q2 q3 q1 q3 q4 q5 q4 q5

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2)

22

slide-108
SLIDE 108

Introduction Monoids + HPD Forest Algebras Circuits

Transition Algebra

‘HV =

q1 q2 q2 q3 q1 q3 q4 q5 q4 q5

Transition Algebra horizontal monoid: (2Q2, ‘HH, idQ) vertical monoid: (2(Q2)2, dVV , idQ2) Extended Transition Algebra horizontal monoid: (2Q2×S(S), ‘HH, idQ ×{∅}) vertical monoid: (2(Q2)2×S(S), dVV , idQ2 ×{∅})

22