Does O-Substitution Preserve Recognizability?

Does O-Substitution Preserve Recognizability?
Andreas Maletti
Technische Universität Dresden
Fakultät Informatik
August 22, 2006
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
1 / 27
1
Motivation
2
The Basics
3
Recognizable Tree Series
4
Preservation of Recognizability
5
Tree Series Transducers
6
Conclusion
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
2 / 27
Phrase Structure
S
NP
Andreas Maletti (TU Dresden)
VP
PRP
VB
She
pulled
PUNCT
.
NP
DET
NN
the
trigger
Preservation of Recognizability
August 22, 2006
3 / 27
Grammar Rules
NP
0.87
0.09
S
S
VP
PUNCT
.
AUX
NP
...
PUNCT
?
0.19
0.34
NP
NP
PRP
VP
DET
...
NN
0.33
PRP
...
She
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
4 / 27
Plugging Blocks
S
NP
VP
DET
NN
VB
The
trigger
pulled
PUNCT
NP
.
DET
NN
the
trigger
Probability: 0.87 · 0.342 · . . .
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
5 / 27
1
Motivation
2
The Basics
3
Recognizable Tree Series
4
Preservation of Recognizability
5
Tree Series Transducers
6
Conclusion
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
6 / 27
Semiring
Denition
(A, +, ·, 0, 1) semiring, if
(A, +, 0) commutative monoid
(A, ·, 1) monoid
· distributes (both sided) over +
0 is absorbing for · (a · 0 = 0 = 0 · a)
Example
Natural numbers (N, +, ·, 0, 1)
Probabilities ([0, 1], max, ·, 0, 1)
Subsets (P(A), ∪, ∩, ∅, A)
any ring and eld
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
7 / 27
Tree Series
Denition
(A, +, ·, 0, 1) semiring, Σ ranked alphabet, X set
Tree series is mapping ψ : TΣ (X ) → A
AhhTΣ (X )ii Set of tree series
supp(ψ) = {t ∈ TΣ (X ) | (ψ, t ) 6= 0}
Conventions
e
0 is tree series that maps every tree to 0
ψ(t ) written as (ψ, t )
P
ψ written as t ∈supp(ψ) (ψ, t ) t
[Example: ψ = 5 α + 10 σ(α, α)]
(ψ + ϕ, t ) = (ψ, t ) + (ϕ, t )
(a · ψ, t ) = a · (ψ, t )
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
8 / 27
O-Substitution
Denition (Fülöp, Vogler 03)
ψ, ψ1 , . . . , ψk ∈ AhhTΣ (X )ii
o
X
ψ ← (ψ1 , . . . , ψk ) =
, ,...,tk ∈TΣ (X ),
(ψi ,ti )6=0
t t1
(ψ, t ) ·
k
Y
(ψi , ti )|t | t [t1 , . . . , tk ]
x
i
i
=1
Example
Natural numbers (N, +, ·, 0, 1) and
ψ = 2 σ(x1 , x1 ) + 3 σ(α, x1 ) + 4 σ(x1 , α) and ψ 0 = 3 α
Then
o
ψ ← (ψ 0 ) = (2 · 32 ) σ(α, α) + (3 · 3) σ(α, α) + (4 · 3) σ(α, α)
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
9 / 27
Illustration
Semiring ([0, 1], max, ·, 0, 1)
ψ = max{0.87 S(x1 , x2 , PUNCT(.)) , 0.09 S(x3 , x1 , x2 , PUNCT(.)) , . . . }
ψ1 = max{0.0627 NP(PRP(she)) , 0.012 NP(DET(the), NN(trigger)) , . . . }
ψ2 = . . .
ψ3 = . . .
0.09
0.87
ψ=
S
S
x1
x2
ψ1 =
Andreas Maletti (TU Dresden)
PUNCT
.
x3
x1
x2
...
PUNCT
?
0.0627
0.012
NP
NP
PRP
DET
NN
she
the
trigger
Preservation of Recognizability
...
August 22, 2006
10 / 27
Illustration (cont'd)
o
ψ ← (ψ1 , ψ2 , ψ3 ) =
0.87 · 0.0627 · 0.420 · . . .
0.09 · 0.0627 · 0.42 · . . .
S
S
NP
VP
PRP
VB
She
pulled
PUNCT
AUX
NP
.
Does
PRP
VB
she
pulled
NP
DET
NN
the
trigger
Andreas Maletti (TU Dresden)
VP
Preservation of Recognizability
PUNCT
NP
?
DET
NN
the
trigger
August 22, 2006
...
11 / 27
Nondeletion and Linearity
Denition
ψ ∈ AhhTΣ (X )ii and V ⊆ X
ψ nondeleting in V , if every v ∈ V occurs in every t ∈ supp(ψ)
ψ linear in V , if every v ∈ V occurs at most once in every t ∈ supp(ψ)
Example
0.09
0.87
ψ=
S
S
x1
x2
PUNCT
.
x3
x1
x2
...
PUNCT
?
Linear in {x1 , x2 , x3 } but not nondeleting in {x1 , x2 , x3 }.
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
12 / 27
Weighted Tree Automaton
Denition
(Q , Σ, A, I , µ) weighted tree automaton (wta), if
Q nite set (of states)
Σ ranked alphabet (of input symbols)
A = (A, +, ·, 0, 1) semiring
I ⊆ Q (set of initial states)
µ = (µk )k ∈N with
µk : Σ(k ) → AQ ×Q
k
Intuition
(q , σ, a, q1 , . . . , qk ) ∈ δk
Andreas Maletti (TU Dresden)
⇐⇒
µk (σ)q,q1 ,...,q = a
Preservation of Recognizability
k
August 22, 2006
13 / 27
Weighted Tree Automaton
Example
δ/1
1
x1 /0
(1, α, 0, ε), (2, α, 0, ε)
(1, δ, 1, 12), (1, δ, 1, 21),
(2, δ, 0, 22)
Andreas Maletti (TU Dresden)
2
α/0
(1, x1 , 0, ε), (2, x1 , 0, ε)
δ/0
δ/1
x1 /0
α/0
0
µ0 (x1 ) =
0
0
µ0 (α) =
0
−∞
1
1
−∞
µ2 (δ) =
−∞ −∞ −∞
0
Preservation of Recognizability
August 22, 2006
14 / 27
Semantics of WTA
Denition
M = (Q , Σ, A, I , µ) wta over A = (A, +, ·, 0, 1)
hµ : TΣ → AQ
hµ (σ(t1 , . . . , tk ))q =
X
µk (σ)q,q1 ,...,q · hµ (t1 )q1 · . . . · hµ (tk )q
k
q1
k
,...,qk ∈Q
kM k ∈ AhhTΣ ii
X
kM k, t =
hµ (t )q
q
∈I
Denition
ψ ∈ AhhTΣ ii recognized by M , if kM k = ψ
Arec hhTΣ ii set of all recognizable tree series
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
15 / 27
1
Motivation
2
The Basics
3
Recognizable Tree Series
4
Preservation of Recognizability
5
Tree Series Transducers
6
Conclusion
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
16 / 27
The Main Problem
Question
Given ψ, ψ1 , . . . , ψk ∈ Arec hhTΣ (X )ii
Is
o
ψ ← (ψ1 , . . . , ψk ) ∈ Arec hhTΣ (X )ii
or not?
Partial Solution
Given ψ, ψ1 , . . . , ψk ∈ Brec hhTΣ (X )ii with ψ linear in Xk
(B = ({0, 1}, ∨, ∧, 0, 1) boolean semiring)
o
ψ ← (ψ1 , . . . , ψk ) ∈ Brec hhTΣ (X )ii
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
17 / 27
The Main Problem (cont'd)
Partial Solution [Kuich 99]
Given ψ, ψ1 , . . . , ψk ∈ Arec hhTΣ (X )ii with ψ nondeleting and linear in Xk
(A commutative and continuous)
o
ψ ← (ψ1 , . . . , ψk ) ∈ Arec hhTΣ (X )ii
Contribution
Given ψ, ψ1 , . . . , ψk ∈ Arec hhTΣ (X )ii with ψ linear in Xk
and A commutative, idempotent, and continuous
o
ψ ← (ψ1 , . . . , ψk ) ∈ Arec hhTΣ (X )ii
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
18 / 27
Proof Sketch
Lemma (Kuich 99)
Arec hhTΣ (X )ii is closed under relabeling.
Proof Sketch of Main Theorem
o
How to construct a wta recognizing ψ ← (ψ1 , . . . , ψk )?
1
Make alphabets of ψ, ψ1 , . . . , ψk pairwise disjoint
(the substitution is explicit because decomposition is given)
2
Perform standard concatenation
3
Relabel the result
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
19 / 27
Proof Sketch (cont'd)
Relabeling example:
σ
σ2
α2
γ
γ2
γ1
α2
γ1
α1
ψ : σ(x2 , γ(x1 ))
ψ1 : γ(γ(α))
ψ2 : σ(α, γ(α))
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
20 / 27
Proof Sketch (cont'd)
Input wta:
δ/1
1
x1 /0
Andreas Maletti (TU Dresden)
α/0
δ/0
2
δ/1
x1 /0
Preservation of Recognizability
α/0
August 22, 2006
21 / 27
Proof Sketch (cont'd)
Concatenation of wta:
δ/1
δ/0
0
α/0
1
2
α/0
δ/1
δ/1
3
α/0
Andreas Maletti (TU Dresden)
δ/1
α/0
δ/1
δ/1
4
α/0
δ/0
α/0
Preservation of Recognizability
August 22, 2006
22 / 27
1
Motivation
2
The Basics
3
Recognizable Tree Series
4
Preservation of Recognizability
5
Tree Series Transducers
6
Conclusion
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
23 / 27
Tree Series Transducer [Engelfriet et al 02]
Denition
(Q , Σ, ∆, A, F , R ) is bottom-up tree series transducer, if
Q nite set (of states)
Σ and ∆ ranked alphabets (of input and output symbols)
A = (A, +, ·, 0, 1) semiring
F ⊆ Q (set of nal states)
R nite set of rules of the form
σ(q1 (x1 ), . . . , qk (xk )) → q (t )
a
where t ∈ T∆ (Xk )
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
24 / 27
Application to tree series transducers
Theorem
M = (Q , Σ, ∆, A, F , R ) linear bottom-up tree series transducer
A commutative, continuous, and idempotent
For every t ∈ TΣ
Andreas Maletti (TU Dresden)
kM k(t ) ∈ Arec hhT∆ ii
Preservation of Recognizability
August 22, 2006
25 / 27
Conclusion
Summary
O-Substitution preserves recognizability in idempotent semirings
Output series of linear tree series transducers is pointwise recognizable
Open Problems
What about OI-Substitution?
Is the image of a recognizable series under linear
tree-series-transducer-transformations recognizable?
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
26 / 27
References
Joost Engelfriet, Zoltán Fülöp, and Heiko Vogler.
Bottom-up and top-down tree series transformations.
J. Autom. Lang. Combin., 7(1):1170, 2002.
Werner Kuich.
Full abstract families of tree series I.
In Jewels Are Forever, pages 145156. Springer, 1999.
Werner Kuich.
Tree transducers and formal tree series.
Acta Cybernet., 14(1):135149, 1999.
Andreas Maletti (TU Dresden)
Preservation of Recognizability
August 22, 2006
27 / 27