Pushing for weighted tree automata Thomas Hanneforth Andreas - - PowerPoint PPT Presentation

pushing for weighted tree automata
SMART_READER_LITE
LIVE PREVIEW

Pushing for weighted tree automata Thomas Hanneforth Andreas - - PowerPoint PPT Presentation

Pushing for weighted tree automata Thomas Hanneforth Andreas Maletti Daniel Quernheim Institute for Natural Language Processing University of Stuttgart, Germany maletti@ims.uni-stuttgart.de Dresden, 2013 Hanneforth, Maletti, Quernheim


slide-1
SLIDE 1

Pushing for weighted tree automata

Thomas Hanneforth Andreas Maletti Daniel Quernheim

Institute for Natural Language Processing University of Stuttgart, Germany maletti@ims.uni-stuttgart.de

Dresden, 2013

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-2
SLIDE 2

Outline

Motivation Minimization Equivalence testing

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-3
SLIDE 3

Motivation

Toolkit

◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-4
SLIDE 4

Motivation

Toolkit

◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing

Notes

◮ mainly developed by THOMAS HANNEFORTH (U Potsdam) ◮ project name: TALib (tree automata library)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-5
SLIDE 5

Motivation

Toolkit

◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing

Notes

◮ mainly developed by THOMAS HANNEFORTH (U Potsdam) ◮ project name: TALib (tree automata library) ◮ fitting talib (Arabic, “student”), but plural is taliban

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-6
SLIDE 6

Motivation

Toolkit

◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing

Why those?

◮ difference between unweighted and weighted ◮ minimization essential for large automata ◮ equivalence testing important for sanity checks

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-7
SLIDE 7

Motivation — Minimization

Typical automata

◮ English BERKELEY parser grammar

153 MB (1,133 states and 4,267,277 transitions)

◮ English EGRET parser grammar

107 MB

◮ Chinese EGRET parser grammar

98 MB

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-8
SLIDE 8

Semirings

Definition (commutative semiring (S, +, ·, 0, 1))

◮ commutative monoids (S, +, 0) and (S, ·, 1) ◮ absorption s · 0 = 0

s ∈ S

◮ distributivity s1 · (s2 + s3) = (s1 · s2) + (s1 · s3)

s1, s2, s3 ∈ S

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-9
SLIDE 9

Semirings

Definition (commutative semiring (S, +, ·, 0, 1))

◮ commutative monoids (S, +, 0) and (S, ·, 1) ◮ absorption s · 0 = 0

s ∈ S

◮ distributivity s1 · (s2 + s3) = (s1 · s2) + (s1 · s3)

s1, s2, s3 ∈ S

Definition (commutative semifield (S, +, ·, 0, 1))

◮ commutative semiring (S, +, ·, 0, 1) ◮ for every s ∈ S \ {0} there exists s−1 ∈ S such that s · s−1 = 1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-10
SLIDE 10

Semirings

Definition (commutative semiring (S, +, ·, 0, 1))

◮ commutative monoids (S, +, 0) and (S, ·, 1) ◮ absorption s · 0 = 0

s ∈ S

◮ distributivity s1 · (s2 + s3) = (s1 · s2) + (s1 · s3)

s1, s2, s3 ∈ S

Definition (commutative semifield (S, +, ·, 0, 1))

◮ commutative semiring (S, +, ·, 0, 1) ◮ for every s ∈ S \ {0} there exists s−1 ∈ S such that s · s−1 = 1

Definition (commutative field (S, +, ·, 0, 1))

◮ commutative semifield (S, +, ·, 0, 1) ◮ for every s ∈ S there exists (−s) ∈ S such that s + (−s) = 0

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-11
SLIDE 11

Weighted tree automaton

Definition (wta)

Weighted tree automaton (Q, Σ, µ, F)

◮ Q finite set of states ◮ Σ ranked alphabet of input symbols ◮ µ = (µk)k∈N with µk : Σk → SQk×Q transition weight assignment ◮ F ⊆ Q final states

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-12
SLIDE 12

Weighted tree automaton

Definition (wta)

Weighted tree automaton (Q, Σ, µ, F)

◮ Q finite set of states ◮ Σ ranked alphabet of input symbols ◮ µ = (µk)k∈N with µk : Σk → SQk×Q transition weight assignment ◮ F ⊆ Q final states

Definition (dwta)

A wta (Q, Σ, µ, F) is deterministic if for all σ ∈ Σk, q, q′, q1, . . . , qk ∈ Q µk(σ)q1···qk,q = 0 = µk(σ)q1···qk,q′ implies q = q′

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-13
SLIDE 13

Deterministic weighted tree automaton

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-14
SLIDE 14

Weighted tree automaton

Definition

The semantics of a wta M = (Q, Σ, µ, F) is M : TΣ → S M(t) =

q∈F hµ(t)q

t ∈ TΣ with hµ : TΣ(Q) → SQ q, q′ ∈ Q, σ ∈ Σk, t1, . . . , tk ∈ TΣ(Q) hµ

  • q′

q =

  • 1

if q = q′

  • therwise

  • σ(t1, . . . , tk)
  • q =
  • q1,...,qk∈Q

µk(σ)q1···qk,q ·

k

  • i=1

hµ(ti)qi

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-15
SLIDE 15

Outline

Motivation Minimization Equivalence testing

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-16
SLIDE 16

Minimization

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) O(mn) / O(m log n) wta PSPACE-complete P / O(mn2)

Notes

◮ unweighted = weighted over ({0, 1}, max, min, 0, 1) ◮ m = size of the transition table ◮ n = number of states

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-17
SLIDE 17

Minimization

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) O(mn) / O(m log n) wta PSPACE-complete P / O(mn2)

Notes

◮ unweighted = weighted over ({0, 1}, max, min, 0, 1) ◮ m = size of the transition table ◮ n = number of states

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-18
SLIDE 18

Minimization

Let (S, +, ·, 0, 1) be a semifield

Definition (BORCHARDT 2003)

States q1, q2 ∈ Q in dwta (Q, Σ, µ, F) are equivalent (q1 ≡ q2) if there exists s ∈ S \ {0} such that

  • q∈F

hµ(c[q1])q = s ·

  • q∈F

hµ(c[q2])q c ∈ CΣ(Q)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-19
SLIDE 19

Minimization

Let (S, +, ·, 0, 1) be a semifield

Definition (BORCHARDT 2003)

States q1, q2 ∈ Q in dwta (Q, Σ, µ, F) are equivalent (q1 ≡ q2) if there exists s ∈ S \ {0} such that

  • q∈F

hµ(c[q1])q = s ·

  • q∈F

hµ(c[q2])q c ∈ CΣ(Q)

Notes

◮ q1 ≡ q2 if they behave equally in all contexts

(up to a constant invertable scaling factor)

◮ ≡ is a congruence ◮ finer than the classical (unweighted) state equivalence

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-20
SLIDE 20

Minimization

Theorem (M. 2009)

Dwta over semifields can be minimized in time O(mn)

Approach

  • 1. Compute sign of life for each state
  • 2. Compute equivalence pairwise with scaling factor
  • 3. Merge equivalent states

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-21
SLIDE 21

Minimization

Theorem (M. 2009)

Dwta over semifields can be minimized in time O(mn)

Approach

  • 1. Compute sign of life for each state
  • 2. Compute equivalence pairwise with scaling factor
  • 3. Merge equivalent states

Definition

◮ c ∈ CΣ(Q) is sign of life for q ∈ Q if q′∈F hµ(c[q])q′ = 0

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-22
SLIDE 22

Minimization

Theorem (M. 2009)

Dwta over semifields can be minimized in time O(mn)

Approach

  • 1. Compute sign of life for each state
  • 2. Compute equivalence pairwise with scaling factor
  • 3. Merge equivalent states

Definition

◮ c ∈ CΣ(Q) is sign of life for q ∈ Q if q′∈F hµ(c[q])q′ = 0 ◮ state that has a sign of life is live ◮ state without a sign of life is dead

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-23
SLIDE 23

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-24
SLIDE 24

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

= hµ

  • γ

γ σ α qb

  • q1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-25
SLIDE 25

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

= hµ

  • γ

γ σ α qb

  • q1

= hµ

  • γ

γ σ q1 qb

  • q1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-26
SLIDE 26

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

= hµ

  • γ

γ σ α qb

  • q1

= hµ

  • γ

γ σ q1 qb

  • q1

= 4 · hµ

  • γ

γ q2

  • q1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-27
SLIDE 27

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

= hµ

  • γ

γ σ α qb

  • q1

= hµ

  • γ

γ σ q1 qb

  • q1

= 4 · hµ

  • γ

γ q2

  • q1

= 8 · hµ γ qf

  • q1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-28
SLIDE 28

Sign of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1 hµ

  • γ

γ σ α β

  • q1

= hµ

  • γ

γ σ α qb

  • q1

= hµ

  • γ

γ σ q1 qb

  • q1

= 4 · hµ

  • γ

γ q2

  • q1

= 8 · hµ γ qf

  • q1

= 16

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-29
SLIDE 29

Minimization

Our approach

Compute the classical unweighted equivalence

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-30
SLIDE 30

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-31
SLIDE 31

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class Normalize transition weights according to signs of life (“pushing”)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-32
SLIDE 32

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class Normalize transition weights according to signs of life (“pushing”) Join transition labels and weights

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-33
SLIDE 33

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class Normalize transition weights according to signs of life (“pushing”) Join transition labels and weights Minimize the obtained unweighted dwta

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-34
SLIDE 34

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class Normalize transition weights according to signs of life (“pushing”) Join transition labels and weights Minimize the obtained unweighted dwta Expand the labels again

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-35
SLIDE 35

Minimization

Our approach

Compute the classical unweighted equivalence Choose one sign of life for every equivalence class Normalize transition weights according to signs of life (“pushing”) Join transition labels and weights Minimize the obtained unweighted dwta Expand the labels again ⇒ the resulting dwta is minimal

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-36
SLIDE 36

Signs of life

Computation

  • 1. Compute (unweighted) MYHILL-NERODE equivalence ∼

=

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-37
SLIDE 37

Signs of life

Computation

  • 1. Compute (unweighted) MYHILL-NERODE equivalence ∼

=

  • 2. Compute sol: (Q/∼

=) → CΣ(Q) such that sol([q]) is a sign of life for q live q ∈ Q

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-38
SLIDE 38

Signs of life

Computation

  • 1. Compute (unweighted) MYHILL-NERODE equivalence ∼

=

  • 2. Compute sol: (Q/∼

=) → CΣ(Q) such that sol([q]) is a sign of life for q live q ∈ Q

  • 3. Compute λ: Q → (S \ {0}) such that

◮ λ(q) =

q′∈F hµ(c[q])q′ with c = sol([q])

live q ∈ Q

◮ λ(q) = 1

dead q ∈ Q

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-39
SLIDE 39

Signs of life

Computation

  • 1. Compute (unweighted) MYHILL-NERODE equivalence ∼

=

  • 2. Compute sol: (Q/∼

=) → CΣ(Q) such that sol([q]) is a sign of life for q live q ∈ Q

  • 3. Compute λ: Q → (S \ {0}) such that

◮ λ(q) =

q′∈F hµ(c[q])q′ with c = sol([q])

live q ∈ Q

◮ λ(q) = 1

dead q ∈ Q

Complexity: O(m log n)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-40
SLIDE 40

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Start with the equivalence ∼

= = {{q1, qf }, {q2, qb}}

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-41
SLIDE 41

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Start with the equivalence ∼

= = {{q1, qf }, {q2, qb}}

◮ q1 and qf are trivially live with sol({q1, qf }) = ◮ λ(q1) = λ(qf ) = 1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-42
SLIDE 42

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Consider all transitions leading to q1 or qf

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-43
SLIDE 43

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Consider all transitions leading to q1 or qf ◮ Pick γ(qb) because qb unexplored

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-44
SLIDE 44

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Consider all transitions leading to q1 or qf ◮ Pick γ(qb) because qb unexplored ◮ Set sol({qb, q2}) = γ()

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-45
SLIDE 45

Signs of life

qf qb q2 q1 γ : 8 γ : 4 σ : 4 γ : 2 σ : 1 γ : 2 σ : 1 σ : 4 β : 1 α : 1

◮ Consider all transitions leading to q1 or qf ◮ Pick γ(qb) because qb unexplored ◮ Set sol({qb, q2}) = γ() ◮ Set λ(qb) = λ(qf ) · 8 = 8 and λ(q2) = λ(qf ) · 2 = 2

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-46
SLIDE 46

Pushing

Definition

Given λ: Q → (S \ {0}) such that λ(q) = 1 for all q ∈ F pushλ(M) = (Q, Σ, µ′, F) µ′

k(σ)q1···qk,q = k

  • i=1

λ(qi)−1 · µk(σ)q1···qk,q · λ(q)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-47
SLIDE 47

Pushing

Definition

Given λ: Q → (S \ {0}) such that λ(q) = 1 for all q ∈ F pushλ(M) = (Q, Σ, µ′, F) µ′

k(σ)q1···qk,q = k

  • i=1

λ(qi)−1 · µk(σ)q1···qk,q · λ(q)

Notes

◮ Transitions to q ∈ Q charge additional weight λ(q)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-48
SLIDE 48

Pushing

Definition

Given λ: Q → (S \ {0}) such that λ(q) = 1 for all q ∈ F pushλ(M) = (Q, Σ, µ′, F) µ′

k(σ)q1···qk,q = k

  • i=1

λ(qi)−1 · µk(σ)q1···qk,q · λ(q)

Notes

◮ Transitions to q ∈ Q charge additional weight λ(q) ◮ Transitions leaving qi compensate by charging the weight λ(qi)−1

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-49
SLIDE 49

Pushing

Definition

Given λ: Q → (S \ {0}) such that λ(q) = 1 for all q ∈ F pushλ(M) = (Q, Σ, µ′, F) µ′

k(σ)q1···qk,q = k

  • i=1

λ(qi)−1 · µk(σ)q1···qk,q · λ(q)

Theorem

pushλ(M) and M are equivalent

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-50
SLIDE 50

Pushing

qf qb q2 q1 γ : ✁ 8 1 γ : 4 σ : ✁ 4 1 γ : ✁ 2 1 σ : 1 γ : 2 σ : 1 σ : ✁ 4 1 β : ✁ 1 8 α : 1

◮ λ(q1) = λ(qf ) = 1 ◮ λ(q2) = 2 ◮ λ(qb) = 8

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-51
SLIDE 51

Pushing

qf qb q2 q1 γ : ✁ 8 1 γ : 4 σ : ✁ 4 1 γ : ✁ 2 1 σ : 1 γ : 2 σ : 1 σ : ✁ 4 1 β : ✁ 1 8 α : 1

Theorem

Given suitable λ: Q → (S \ {0}) and pushλ(M) = (Q, Σ, µ′, F) µ′

k(σ)q1···qk,q = µ′ k(σ)q′

1···q′ k,q′

σ ∈ Σk, qi ≡ q′

i, and q ≡ q′

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-52
SLIDE 52

Minimization

qf qb q2 q1 (γ, 1) (γ, 4) (σ, 1) (γ, 1) (σ, 1) (γ, 2) (σ, 1) (σ, 1) (β, 8) (α, 1)

  • 1. Make weight part of the label

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-53
SLIDE 53

Minimization

qf qb q2 q1 (γ, 1) (γ, 4) (σ, 1) (γ, 1) (σ, 1) (γ, 2) (σ, 1) (σ, 1) (β, 8) (α, 1)

  • 1. Make weight part of the label
  • 2. minimize as (unweighted) dwta

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-54
SLIDE 54

Minimization

qf qb q2 q1 (γ, 1) (γ, 4) (σ, 1) (γ, 1) (σ, 1) (γ, 2) (σ, 1) (σ, 1) (β, 8) (α, 1)

  • 1. Make weight part of the label
  • 2. minimize as (unweighted) dwta

◮ qb and q2 equivalent (will be merged) Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-55
SLIDE 55

Minimization

qf qb q2 q1 (γ, 1) (γ, 4) (σ, 1) (γ, 1) (σ, 1) (γ, 2) (σ, 1) (σ, 1) (β, 8) (α, 1)

  • 1. Make weight part of the label
  • 2. minimize as (unweighted) dwta

◮ qb and q2 equivalent (will be merged) ◮ q1 and qf not equivalent Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-56
SLIDE 56

Minimal dwta

qf qb q2 q1 (γ, 4) (γ, 1) (σ, 1) (γ, 2) (σ, 1) (β, 8) (α, 1)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-57
SLIDE 57

Minimization

Theorem

We can minimize dwta in time O(m log n)

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) O(m log n) wta PSPACE-complete P / O(mn2)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-58
SLIDE 58

Outline

Motivation Minimization Equivalence testing

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-59
SLIDE 59

Equivalence testing — Motivation

Determinization sanity checking

  • 1. Sum (union) construction of dwta M1 and M2 yields wta M
  • 2. Determinization yields dwta M′
  • 3. Check equivalence between M′ and the result M′′
  • f the union product construction for M1 and M2

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-60
SLIDE 60

Equivalence testing — Motivation

Determinization sanity checking

  • 1. Sum (union) construction of dwta M1 and M2 yields wta M
  • 2. Determinization yields dwta M′
  • 3. Check equivalence between M′ and the result M′′
  • f the union product construction for M1 and M2

Minimization sanity checking

  • 1. Minimize dwta M to obtain M′
  • 2. Check equivalence between M and M′

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-61
SLIDE 61

Equivalence testing — Motivation

Determinization sanity checking

  • 1. Sum (union) construction of dwta M1 and M2 yields wta M
  • 2. Determinization yields dwta M′
  • 3. Check equivalence between M′ and the result M′′
  • f the union product construction for M1 and M2

Minimization sanity checking

  • 1. Minimize dwta M to obtain M′
  • 2. Check equivalence between M and M′

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-62
SLIDE 62

Equivalence testing

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) / O(m log∗ n) O(m1m2) / O(m log n) wta EXPTIME-complete P / O(mn2)

Notes

◮ m = max(m1, m2) ◮ n = max(n1, n2)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-63
SLIDE 63

Equivalence testing

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) / O(m log∗ n) O(m1m2) / O(m log n) wta EXPTIME-complete P / O(mn2)

Notes

◮ m = max(m1, m2) ◮ n = max(n1, n2)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-64
SLIDE 64

Equivalence testing

Definition

Dwta M and M′ are push-isomorphic if there exists λ: Q → (S \ {0}) with λ(q) = 1 for all q ∈ F such that M′ is isomorphic to pushλ(M)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-65
SLIDE 65

Equivalence testing

Definition

Dwta M and M′ are push-isomorphic if there exists λ: Q → (S \ {0}) with λ(q) = 1 for all q ∈ F such that M′ is isomorphic to pushλ(M)

Theorem

All equivalent minimal dwta are push-isomorphic

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-66
SLIDE 66

Equivalence testing

Definition

Dwta M and M′ are push-isomorphic if there exists λ: Q → (S \ {0}) with λ(q) = 1 for all q ∈ F such that M′ is isomorphic to pushλ(M)

Theorem

All equivalent minimal dwta are push-isomorphic

Approach

◮ Minimize both M1 and M2

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-67
SLIDE 67

Equivalence testing

Definition

Dwta M and M′ are push-isomorphic if there exists λ: Q → (S \ {0}) with λ(q) = 1 for all q ∈ F such that M′ is isomorphic to pushλ(M)

Theorem

All equivalent minimal dwta are push-isomorphic

Approach

◮ Minimize both M1 and M2 ◮ Check push-isomorphism (isomorphism after special pushing)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-68
SLIDE 68

Equivalence testing

Theorem

We can test equivalence for dwta in time O(m log n)

State-of-the-art (tree / string)

unweighted weighted (field) dwta O(m log n) / O(m log∗ n) O(m log n) wta EXPTIME-complete P / O(mn2)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

slide-69
SLIDE 69

Summary

Minimization (tree / string)

unweighted weighted (field) dwta O(m log n) O(m log n) wta PSPACE-complete P / O(mn2)

Equivalence testing (tree / string)

unweighted weighted (field) dwta O(m log n) / O(m log∗ n) O(m log n) wta EXPTIME-complete P / O(mn2)

Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013