Simulations of Weighted Tree Automata Zoltán Ésik 1 and Andreas Maletti 2 1 2

University of Szeged, Szeged, Hungary

Universitat Rovira i Virgili, Tarragona, Spain [email protected]

Winnipeg — August 12, 2010

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

1

Motivation

Simulation of weighted string automata Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005 & 2006) For all equivalent weighted string automata over . . . there exists a chain of simulations connecting them. a field the integers (more generally, an E UCLIDIAN domain) the natural numbers the B OOLEAN semiring (functional transducers) Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

2

Motivation

Simulation of weighted string automata Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005 & 2006) For all equivalent weighted string automata over . . . there exists a chain of simulations connecting them. a field the integers (more generally, an E UCLIDIAN domain) the natural numbers the B OOLEAN semiring (functional transducers) Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

2

Motivation

Minimization of weighted tree automata In fields [S EIDL 1990, B OZAPALIDIS 1991] A

B

equivalent

minimizes to

minimizes to C

automata collapsed by equivalence relation the canonical homomorphism is a simulation Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

3

Motivation

Minimization of weighted tree automata In fields [S EIDL 1990, B OZAPALIDIS 1991] A

B

equivalent

minimizes to

minimizes to C

automata collapsed by equivalence relation the canonical homomorphism is a simulation Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

3

Weighted Tree Automaton

Contents

1

Motivation

2

Weighted Tree Automaton

3

Simulation

4

Simulation vs. Equivalence

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

4

Weighted Tree Automaton

Semiring Definition A commutative semiring is an algebraic structure (K, +, ·, 0, 1) with commutative monoids (K, +, 0) and (K, ·, 1) a · (b + c) = (a · b) + (a · c) a·0=0 Example natural numbers tropical semiring (N ∪ {∞}, min, +, ∞, 0) B OOLEAN semiring ({0, 1}, max, min, 0, 1) any commutative ring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

5

Weighted Tree Automaton

Semiring Definition A commutative semiring is an algebraic structure (K, +, ·, 0, 1) with commutative monoids (K, +, 0) and (K, ·, 1) a · (b + c) = (a · b) + (a · c) a·0=0 Example natural numbers tropical semiring (N ∪ {∞}, min, +, ∞, 0) B OOLEAN semiring ({0, 1}, max, min, 0, 1) any commutative ring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

5

Weighted Tree Automaton

Weighted tree automaton Definition (B ERSTEL , R EUTENAUER 1982) A weighted tree automaton (wta) is a tuple A = (Q, Σ, K, I, R) with rules of the form σ c q → q1 . . . qk where q, q1 , . . . , qk ∈ Q are states c ∈ K is a weight (taken from a semiring) σ ∈ Σk is an input symbol

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

6

Weighted Tree Automaton

Run S NP

VP

JJ

NNS

VBP

ADVP

Colorless

ideas

sleep

RB furiously

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run Sq NP q 0

VP q1

JJ q 0

NNS q 00

VBP q10

ADVP q2

Colorless w

ideas w

sleep w

RB q2 furiously w

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run S .4 q NP .2 q0

VP .4 q1

JJ .3 q0

NNS .3 q 00

VBP .2 q10

ADVP .3 q2

Colorless .1 w

ideas .1 w

sleep .1 w

RB .2 q2 furiously .1 w

Definition The weight of a run is obtained by multiplying the weights in it.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run S .4 q NP .2 q0

VP .4 q1

JJ .3 q0

NNS .3 q 00

VBP .2 q10

ADVP .3 q2

Colorless .1 w

ideas .1 w

sleep .1 w

RB .2 q2 furiously .1 w

Weight of the run 0.4 · 0.2 · 0.3 · 0.1 · 0.3 · 0.1 · 0.4 · 0.2 · 0.1 · 0.3 · 0.2 · 0.1

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Semantics Definition The weight of an input tree t is X weight(t) = I(root(r )) · weight(r ) r run on t

Definition Two wta are equivalent if they assign the same weights to all trees.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

8

Weighted Tree Automaton

Semantics Definition The weight of an input tree t is X weight(t) = I(root(r )) · weight(r ) r run on t

Definition Two wta are equivalent if they assign the same weights to all trees.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

8

Simulation

Matrix representation Definition matrix presentation of a wta (Q, Σ, I, R) Rk (σ)q1 ···qk ,q = c

⇐⇒

Simulations of Weighted Tree Automata

σ

c

q →

q1

...

qk

∈R

Z. Ésik and A. Maletti

·

9

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that Rk (σ) I X k,⊗

X J Sk (σ)

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Relation to simple simulations Definition A matrix X ∈ KQ×P is relational if X ∈ {0, 1}Q×P functional if X is relational and induces a mapping surjective, injective, . . . Definition (H ÖGBERG , ∼, M AY 2007) wta A forward simulates wta B if A simulates B with a functional transfer matrix. wta A backward simulates wta B if B simulates A with transfer matrix X such that X T is functional.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

11

Simulation

Relation to simple simulations Definition A matrix X ∈ KQ×P is relational if X ∈ {0, 1}Q×P functional if X is relational and induces a mapping surjective, injective, . . . Definition (H ÖGBERG , ∼, M AY 2007) wta A forward simulates wta B if A simulates B with a functional transfer matrix. wta A backward simulates wta B if B simulates A with transfer matrix X such that X T is functional.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

11

Simulation

Relation to simple simulations (cont’d) Definition (B ÉAL , L OMBARDY, S AKAROVITCH 2005) The semiring K is equisubtractive if for every a1 , a2 , b1 , b2 ∈ K with a1 + b1 = a2 + b2 there exist c1 , c2 , d1 , d2 ∈ K such that a1 = c1 + d1 and b1 = c2 + d2 a2 = c1 + c2 and b2 = d1 + d2

a1

a2

b1

b2

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

12

Simulation

Relation to simple simulations (cont’d) Definition (B ÉAL , L OMBARDY, S AKAROVITCH 2005) The semiring K is equisubtractive if for every a1 , a2 , b1 , b2 ∈ K with a1 + b1 = a2 + b2 there exist c1 , c2 , d1 , d2 ∈ K such that a1 = c1 + d1 and b1 = c2 + d2 a2 = c1 + c2 and b2 = d1 + d2

a1

b1

c1

a2

d1

c2

c2

d1

d2

Simulations of Weighted Tree Automata

b2

Z. Ésik and A. Maletti

·

12

Simulation

Relation to simple simulations (cont’d) Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005) Let K be equisubtractive and additively generated by units. Then wta A simulates wta B iff there exist wta A0 and B 0 such that A0 backward simulates A A0 simulates B 0 with an invertable diagonal transfer matrix B 0 forward simulates B A0

simulates

backward A

B0 forward

simulates

Simulations of Weighted Tree Automata

B

Z. Ésik and A. Maletti

·

13

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation vs. Equivalence

Proper semiring Definition The semiring K is proper if for all wta A and B A and B are equivalent iff there exists a finite chain of simulations that join A and B. Example B OOLEAN semiring [B LOOM , É SIK 1993, KOZEN 1994] any commutative field [S EIDL 1990, B OZAPALIDIS 1991]

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

15

Simulation vs. Equivalence

Proper semiring Definition The semiring K is proper if for all wta A and B A and B are equivalent iff there exists a finite chain of simulations that join A and B. Example B OOLEAN semiring [B LOOM , É SIK 1993, KOZEN 1994] any commutative field [S EIDL 1990, B OZAPALIDIS 1991]

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

15

Simulation vs. Equivalence

N OETHERIAN semiring Definition A commutative monoid (M, ⊕, 0) together with an action : K × M → M is a K-semimodule if (a + b) m = (a m) ⊕ (b m) a (m ⊕ n) = (a m) ⊕ (a n) (a · b) m = a (b m) 0 m = 0 and 1 m = m Definition The semiring K is N OETHERIAN if all subsemimodules of every finitely generated K-semimodule are again finitely generated.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

16

Simulation vs. Equivalence

N OETHERIAN semiring Definition A commutative monoid (M, ⊕, 0) together with an action : K × M → M is a K-semimodule if (a + b) m = (a m) ⊕ (b m) a (m ⊕ n) = (a m) ⊕ (a n) (a · b) m = a (b m) 0 m = 0 and 1 m = m Definition The semiring K is N OETHERIAN if all subsemimodules of every finitely generated K-semimodule are again finitely generated.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

16

Simulation vs. Equivalence

N OETHERIAN semiring (cont’d) Example All of the following are N OETHERIAN: fields finitely generated commutative rings finite semirings Non-example natural numbers tropical semiring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

17

Simulation vs. Equivalence

N OETHERIAN semiring (cont’d) Example All of the following are N OETHERIAN: fields finitely generated commutative rings finite semirings Non-example natural numbers tropical semiring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

17

Simulation vs. Equivalence

Main result Theorem (cf. B ÉAL , L OMBARDY, S AKAROVITCH 2006) Every N OETHERIAN semiring is proper. N is proper. Note (on theorem) There exists a single wta that simulates both wta. C simulates A

simulates

equivalent

Simulations of Weighted Tree Automata

B

Z. Ésik and A. Maletti

·

18

Simulation vs. Equivalence

Consequence Theorem Let K be proper and finitely and effectively presented. Then equivalence of wta is decidable. Proof. Inequality is semi-decidable. Using the main result, equivalence is semi-decidable. ⇒ run in parallel ⇒ equivalence decidable Corollary Let K be N OETHERIAN and finitely and effectively presented. Then equivalence of wta is decidable.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

19

Simulation vs. Equivalence

Consequence Theorem Let K be proper and finitely and effectively presented. Then equivalence of wta is decidable. Proof. Inequality is semi-decidable. Using the main result, equivalence is semi-decidable. ⇒ run in parallel ⇒ equivalence decidable Corollary Let K be N OETHERIAN and finitely and effectively presented. Then equivalence of wta is decidable.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

19

Simulation vs. Equivalence

Consequence (cont’d) Theorem The tropical semiring is not proper. Proof. Inequality is semi-decidable. If proper, then equivalence is semi-decidable. ⇒ Equivalence is decidable. But Equivalence is undecidable by [K ROB 1992].

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

20

Simulation vs. Equivalence

References (1/2) B ÉAL , L OMBARDY, S AKAROVITCH: On the equivalence of Z-automata. ICALP 2005 B ÉAL , L OMBARDY, S AKAROVITCH: Conjugacy and equivalence of weighted automata and functional transducers. CSR 2006 B ERSTEL , R EUTENAUER: Recognizable formal power series on trees. Theor. Comput. Sci. 18, 1982 B LOOM , É SIK: Iteration Theories: The Equational Logic of Iterative Processes. Springer, 1993 B OZAPALIDIS: Effective construction of the syntactic algebra of a recognizable series on trees. Acta Inform. 28, 1991 H ÖGBERG , M ALETTI , M AY: Bisimulation minimisation for weighted tree automata. DLT 2007

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

21

Simulation vs. Equivalence

References (2/2) KOZEN: A completeness theorem for K LEENE algebras and the algebra of regular events. Inform. Comput. 110, 1994 K ROB: The equality problem for rational series with multiplicities in the tropical semiring is undecidable. ICALP 1992 S EIDL: Deciding equivalence of finite tree automata. SIAM J. Comput. 19, 1990

Thank you for your attention!

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

22

University of Szeged, Szeged, Hungary

Universitat Rovira i Virgili, Tarragona, Spain [email protected]

Winnipeg — August 12, 2010

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

1

Motivation

Simulation of weighted string automata Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005 & 2006) For all equivalent weighted string automata over . . . there exists a chain of simulations connecting them. a field the integers (more generally, an E UCLIDIAN domain) the natural numbers the B OOLEAN semiring (functional transducers) Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

2

Motivation

Simulation of weighted string automata Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005 & 2006) For all equivalent weighted string automata over . . . there exists a chain of simulations connecting them. a field the integers (more generally, an E UCLIDIAN domain) the natural numbers the B OOLEAN semiring (functional transducers) Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

2

Motivation

Minimization of weighted tree automata In fields [S EIDL 1990, B OZAPALIDIS 1991] A

B

equivalent

minimizes to

minimizes to C

automata collapsed by equivalence relation the canonical homomorphism is a simulation Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

3

Motivation

Minimization of weighted tree automata In fields [S EIDL 1990, B OZAPALIDIS 1991] A

B

equivalent

minimizes to

minimizes to C

automata collapsed by equivalence relation the canonical homomorphism is a simulation Consequence Equivalence = Chain of Simulations

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

3

Weighted Tree Automaton

Contents

1

Motivation

2

Weighted Tree Automaton

3

Simulation

4

Simulation vs. Equivalence

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

4

Weighted Tree Automaton

Semiring Definition A commutative semiring is an algebraic structure (K, +, ·, 0, 1) with commutative monoids (K, +, 0) and (K, ·, 1) a · (b + c) = (a · b) + (a · c) a·0=0 Example natural numbers tropical semiring (N ∪ {∞}, min, +, ∞, 0) B OOLEAN semiring ({0, 1}, max, min, 0, 1) any commutative ring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

5

Weighted Tree Automaton

Semiring Definition A commutative semiring is an algebraic structure (K, +, ·, 0, 1) with commutative monoids (K, +, 0) and (K, ·, 1) a · (b + c) = (a · b) + (a · c) a·0=0 Example natural numbers tropical semiring (N ∪ {∞}, min, +, ∞, 0) B OOLEAN semiring ({0, 1}, max, min, 0, 1) any commutative ring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

5

Weighted Tree Automaton

Weighted tree automaton Definition (B ERSTEL , R EUTENAUER 1982) A weighted tree automaton (wta) is a tuple A = (Q, Σ, K, I, R) with rules of the form σ c q → q1 . . . qk where q, q1 , . . . , qk ∈ Q are states c ∈ K is a weight (taken from a semiring) σ ∈ Σk is an input symbol

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

6

Weighted Tree Automaton

Run S NP

VP

JJ

NNS

VBP

ADVP

Colorless

ideas

sleep

RB furiously

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run Sq NP q 0

VP q1

JJ q 0

NNS q 00

VBP q10

ADVP q2

Colorless w

ideas w

sleep w

RB q2 furiously w

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run S .4 q NP .2 q0

VP .4 q1

JJ .3 q0

NNS .3 q 00

VBP .2 q10

ADVP .3 q2

Colorless .1 w

ideas .1 w

sleep .1 w

RB .2 q2 furiously .1 w

Definition The weight of a run is obtained by multiplying the weights in it.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Run S .4 q NP .2 q0

VP .4 q1

JJ .3 q0

NNS .3 q 00

VBP .2 q10

ADVP .3 q2

Colorless .1 w

ideas .1 w

sleep .1 w

RB .2 q2 furiously .1 w

Weight of the run 0.4 · 0.2 · 0.3 · 0.1 · 0.3 · 0.1 · 0.4 · 0.2 · 0.1 · 0.3 · 0.2 · 0.1

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

7

Weighted Tree Automaton

Semantics Definition The weight of an input tree t is X weight(t) = I(root(r )) · weight(r ) r run on t

Definition Two wta are equivalent if they assign the same weights to all trees.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

8

Weighted Tree Automaton

Semantics Definition The weight of an input tree t is X weight(t) = I(root(r )) · weight(r ) r run on t

Definition Two wta are equivalent if they assign the same weights to all trees.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

8

Simulation

Matrix representation Definition matrix presentation of a wta (Q, Σ, I, R) Rk (σ)q1 ···qk ,q = c

⇐⇒

Simulations of Weighted Tree Automata

σ

c

q →

q1

...

qk

∈R

Z. Ésik and A. Maletti

·

9

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that I = XJ I(q) =

X

Xq,p · J(p)

p∈P

Rk (σ)X = X k ,⊗ Sk (σ) X Rk (σ)q1 ···qk ,q · Xq,p = q∈Q

X

Xq1 ,p1 · . . . · Xqk ,pk · Sk (σ)p1 ···pk ,p

p1 ···pk ∈P k

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Main definition Definition (B LOOM , É SIK 1993) A wta (Q, Σ, I, R) simulates a wta (P, Σ, J, S) if there exists a matrix X ∈ KQ×P such that Rk (σ) I X k,⊗

X J Sk (σ)

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

10

Simulation

Relation to simple simulations Definition A matrix X ∈ KQ×P is relational if X ∈ {0, 1}Q×P functional if X is relational and induces a mapping surjective, injective, . . . Definition (H ÖGBERG , ∼, M AY 2007) wta A forward simulates wta B if A simulates B with a functional transfer matrix. wta A backward simulates wta B if B simulates A with transfer matrix X such that X T is functional.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

11

Simulation

Relation to simple simulations Definition A matrix X ∈ KQ×P is relational if X ∈ {0, 1}Q×P functional if X is relational and induces a mapping surjective, injective, . . . Definition (H ÖGBERG , ∼, M AY 2007) wta A forward simulates wta B if A simulates B with a functional transfer matrix. wta A backward simulates wta B if B simulates A with transfer matrix X such that X T is functional.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

11

Simulation

Relation to simple simulations (cont’d) Definition (B ÉAL , L OMBARDY, S AKAROVITCH 2005) The semiring K is equisubtractive if for every a1 , a2 , b1 , b2 ∈ K with a1 + b1 = a2 + b2 there exist c1 , c2 , d1 , d2 ∈ K such that a1 = c1 + d1 and b1 = c2 + d2 a2 = c1 + c2 and b2 = d1 + d2

a1

a2

b1

b2

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

12

Simulation

Relation to simple simulations (cont’d) Definition (B ÉAL , L OMBARDY, S AKAROVITCH 2005) The semiring K is equisubtractive if for every a1 , a2 , b1 , b2 ∈ K with a1 + b1 = a2 + b2 there exist c1 , c2 , d1 , d2 ∈ K such that a1 = c1 + d1 and b1 = c2 + d2 a2 = c1 + c2 and b2 = d1 + d2

a1

b1

c1

a2

d1

c2

c2

d1

d2

Simulations of Weighted Tree Automata

b2

Z. Ésik and A. Maletti

·

12

Simulation

Relation to simple simulations (cont’d) Theorem (B ÉAL , L OMBARDY, S AKAROVITCH 2005) Let K be equisubtractive and additively generated by units. Then wta A simulates wta B iff there exist wta A0 and B 0 such that A0 backward simulates A A0 simulates B 0 with an invertable diagonal transfer matrix B 0 forward simulates B A0

simulates

backward A

B0 forward

simulates

Simulations of Weighted Tree Automata

B

Z. Ésik and A. Maletti

·

13

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation

Main question Theorem (B LOOM , É SIK 1993) Simulation is a pre-order that refines equivalence.

Question Does the symmetric, transitive closure of simulation coincide with equivalence? In other words Are all equivalent wta joined by a finite chain of simulations?

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

14

Simulation vs. Equivalence

Proper semiring Definition The semiring K is proper if for all wta A and B A and B are equivalent iff there exists a finite chain of simulations that join A and B. Example B OOLEAN semiring [B LOOM , É SIK 1993, KOZEN 1994] any commutative field [S EIDL 1990, B OZAPALIDIS 1991]

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

15

Simulation vs. Equivalence

Proper semiring Definition The semiring K is proper if for all wta A and B A and B are equivalent iff there exists a finite chain of simulations that join A and B. Example B OOLEAN semiring [B LOOM , É SIK 1993, KOZEN 1994] any commutative field [S EIDL 1990, B OZAPALIDIS 1991]

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

15

Simulation vs. Equivalence

N OETHERIAN semiring Definition A commutative monoid (M, ⊕, 0) together with an action : K × M → M is a K-semimodule if (a + b) m = (a m) ⊕ (b m) a (m ⊕ n) = (a m) ⊕ (a n) (a · b) m = a (b m) 0 m = 0 and 1 m = m Definition The semiring K is N OETHERIAN if all subsemimodules of every finitely generated K-semimodule are again finitely generated.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

16

Simulation vs. Equivalence

N OETHERIAN semiring Definition A commutative monoid (M, ⊕, 0) together with an action : K × M → M is a K-semimodule if (a + b) m = (a m) ⊕ (b m) a (m ⊕ n) = (a m) ⊕ (a n) (a · b) m = a (b m) 0 m = 0 and 1 m = m Definition The semiring K is N OETHERIAN if all subsemimodules of every finitely generated K-semimodule are again finitely generated.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

16

Simulation vs. Equivalence

N OETHERIAN semiring (cont’d) Example All of the following are N OETHERIAN: fields finitely generated commutative rings finite semirings Non-example natural numbers tropical semiring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

17

Simulation vs. Equivalence

N OETHERIAN semiring (cont’d) Example All of the following are N OETHERIAN: fields finitely generated commutative rings finite semirings Non-example natural numbers tropical semiring

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

17

Simulation vs. Equivalence

Main result Theorem (cf. B ÉAL , L OMBARDY, S AKAROVITCH 2006) Every N OETHERIAN semiring is proper. N is proper. Note (on theorem) There exists a single wta that simulates both wta. C simulates A

simulates

equivalent

Simulations of Weighted Tree Automata

B

Z. Ésik and A. Maletti

·

18

Simulation vs. Equivalence

Consequence Theorem Let K be proper and finitely and effectively presented. Then equivalence of wta is decidable. Proof. Inequality is semi-decidable. Using the main result, equivalence is semi-decidable. ⇒ run in parallel ⇒ equivalence decidable Corollary Let K be N OETHERIAN and finitely and effectively presented. Then equivalence of wta is decidable.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

19

Simulation vs. Equivalence

Consequence Theorem Let K be proper and finitely and effectively presented. Then equivalence of wta is decidable. Proof. Inequality is semi-decidable. Using the main result, equivalence is semi-decidable. ⇒ run in parallel ⇒ equivalence decidable Corollary Let K be N OETHERIAN and finitely and effectively presented. Then equivalence of wta is decidable.

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

19

Simulation vs. Equivalence

Consequence (cont’d) Theorem The tropical semiring is not proper. Proof. Inequality is semi-decidable. If proper, then equivalence is semi-decidable. ⇒ Equivalence is decidable. But Equivalence is undecidable by [K ROB 1992].

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

20

Simulation vs. Equivalence

References (1/2) B ÉAL , L OMBARDY, S AKAROVITCH: On the equivalence of Z-automata. ICALP 2005 B ÉAL , L OMBARDY, S AKAROVITCH: Conjugacy and equivalence of weighted automata and functional transducers. CSR 2006 B ERSTEL , R EUTENAUER: Recognizable formal power series on trees. Theor. Comput. Sci. 18, 1982 B LOOM , É SIK: Iteration Theories: The Equational Logic of Iterative Processes. Springer, 1993 B OZAPALIDIS: Effective construction of the syntactic algebra of a recognizable series on trees. Acta Inform. 28, 1991 H ÖGBERG , M ALETTI , M AY: Bisimulation minimisation for weighted tree automata. DLT 2007

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

21

Simulation vs. Equivalence

References (2/2) KOZEN: A completeness theorem for K LEENE algebras and the algebra of regular events. Inform. Comput. 110, 1994 K ROB: The equality problem for rational series with multiplicities in the tropical semiring is undecidable. ICALP 1992 S EIDL: Deciding equivalence of finite tree automata. SIAM J. Comput. 19, 1990

Thank you for your attention!

Simulations of Weighted Tree Automata

Z. Ésik and A. Maletti

·

22