weighted tree automata ii a kleene theorem for wta over m
play

Weighted Tree Automata II. A Kleene theorem for wta over M-monoids - PowerPoint PPT Presentation

1 Weighted Tree Automata II. A Kleene theorem for wta over M-monoids Zolt an F ul op University of Szeged Department of Foundations of Computer Science fulop@inf.u-szeged.hu November 10, 2009 2 Contents Multioperator


  1. 1 Weighted Tree Automata II. – A Kleene theorem for wta over M-monoids Zolt´ an F¨ ul¨ op University of Szeged Department of Foundations of Computer Science fulop@inf.u-szeged.hu November 10, 2009

  2. 2 Contents • Multioperator monoids (M-monoids) • Uniform tree valuations • Wta over M-monoids, recognizable uniform tree valuations • Rational operations, rational uniform tree valuations • Kleene theorem for recognizable uniform tree valuations • Kleene theorem for (non commutative) semirings • Kleene theorem for commutative semirings is a corollary • References

  3. 3 Multioperator monoid A multioperator monoid (for short: M-monoid) ( A, ⊕ , 0 , Ω) consists of - a commutative monoid ( A, ⊕ , 0) and - an Ω -algebra ( A, Ω) - with id A ∈ Ω (1) and 0 m ∈ Ω ( m ) for m ≥ 0 . A is distributive if n n M M ω A ( b 1 , . . . , b i − 1 , a j , b i +1 , . . . , b m ) = ω A ( b 1 , . . . , b i − 1 , a j , b i +1 , . . . , b m ) j =1 j =1 holds for every m, n ≥ 0 , ω ∈ Ω ( m ) , b 1 , . . . , b m ∈ A , 1 ≤ i ≤ m , and a 1 , . . . , a n ∈ A . In particular, ω A ( . . . , 0 , . . . , ) = 0 .

  4. 4 Operations on Ops( A ) Ops( A ) ( Ops k ( A ) ) is the set of operations ( k -ary operations) on A . Let ( A, ⊕ , 0 , Ω) be an M-monoid and k ≥ 0 . • Let ω 1 , ω 2 ∈ Ops k ( A ) . The sum of ω 1 and ω 2 is the k -ary operation a ∈ A k , by ( ω 1 ⊕ ω 2 )( � ω 1 ⊕ ω 2 that is defined, for every � a ) ⊕ ω 2 ( � a ) = ω 1 ( � a ) . • Let ω ∈ Ops k ( A ) and ω j ∈ Ops l j ( A ) with l j ≥ 0 for every 1 ≤ j ≤ k . The composition of ω with ( ω 1 , . . . , ω k ) is the ( l 1 + · · · + l k ) -ary operation ω ( ω 1 , . . . , ω k ) that is defined by ` ´ ω ( ω 1 , . . . , ω k ) ( � a k ) = ω ( ω 1 ( � a 1 ) , . . . , ω k ( � a k )) a 1 , . . . , � a j ∈ A l j with 1 ≤ j ≤ k . for every � (Ops k ( A ) , ⊕ , 0 k ) is a commutative monoid for every k ≥ 0 , for k = 0 is isomorphic to the monoid ( A, ⊕ , 0 ) . Sum is left- and right- distributive, and composition is associative.

  5. 5 Uniform tree valuations | t | Z is the number of occurrences of variables of Z in t Uvals(Σ , Z, A ) is the class of mappings S : T Σ ( Z ) → Ops( A ) such that the arity of ( S, t ) is | t | Z . Such mappings are called uniform tree valuations over Σ , Z and A . • Hence Uvals(Σ , ∅ , A ) = A � � T Σ � � . 0 , t ) = 0 | t | Z for every t ∈ T Σ ( Z ) . • ( e • The sum of S 1 , S 2 ∈ Uvals(Σ , Z, A ) is the uniform tree valuation S 1 ⊕ u S 2 defined by ( S 1 ⊕ u S 2 , t ) = ( S 1 , t ) ⊕ ( S 2 , t ) for every t ∈ T Σ ( Z ) . • (Uvals(Σ , Z, A ) , ⊕ u , e 0 ) is a commutative monoid; for Z = ∅ it is nothing � , ⊕ , e but ( A � � T Σ � 0 ) . • For S ∈ Uvals(Σ , Z, A ) we write S = L u t ∈ T Σ ( Z ) ( S, t ) .t .

  6. 6 Weighted tree automata (wta) over M-monoids Syntax A system M = ( Q, Σ , Z, A, F, µ, ν ) (over Σ , Z and A ) - Q, Σ , Z as before, - ( A, ⊕ , 0 , Ω) is an M-monoid, - F : Q → Ω (1) is the root weight, - µ = ( µ m | m ≥ 0) is the family of transition mappings with µ m : Q m × Σ ( m ) × Q → Ω ( m ) , - ν : Z × Q → Ω (1) , the variable assignment. Such a wta recognizes a uniform tree valuation , i.e., a mapping S M : T Σ ( Z ) → Ops( A ) in Uvals(Σ , Z, A ) . In case Z = ∅ it recognizes a tree series in A � � T Σ � � .

  7. 7 Wta over M-monoids Semantics M = ( Q, Σ , Z, A, F, µ, ν ) a wta over the M-monoid A and t ∈ T Σ ( Z ) - a run of M on t is a mapping r : pos( t ) → Q - the set of runs of M on t is R M ( t ) - for w ∈ pos( t ) , the weight wt( t, r, w ) of w in t under r • if t ( w ) = z for some z ∈ Z , then wt( t, r, w ) = ν ( z, r ( w )) • otherwise (if t ( w ) = σ for some σ ∈ Σ ( k ) , k ≥ 0 ) wt( t, r, w ) = µ k ( r ( w 1) , . . . , r ( wk ) , t ( w ) , r ( w ))(wt( t, r, w 1) , . . . , wt( t, r, wk )) • the weight of r is wt( t, r ) = wt( t, r, ε ) . The uniform tree valuation S M : T Σ ( Z ) → A recognized by M is defined by M S M ( t ) = F ( r ( ε ))(wt( t, r )) . r ∈ R M ( t )

  8. 8 An example of a wta over M-monoids The tree series height : T Σ → N can be recognized by M = ( Q, Σ , A, F, µ ) , where • Q = { q } , • A = ( N , − , − , Ω) with { 1 + max { n 1 , . . . , n k } | k ≥ 0 } ⊆ Ω , • F ( q ) = id N , and • µ 0 ( α, q ) = 0 and for every k ≥ 1 and σ ∈ Σ ( k ) , let µ k ( q . . . q, σ, q ) = 1 + max { n 1 , . . . , n k } . Then S M = height .

  9. 9 Rational operations on Uvals(Σ , Z, A ) 1. The sum ⊕ u : ( S 1 ⊕ u S 2 , t ) = ( S 1 , t ) ⊕ ( S 2 , t ) . 2. The top-concatenation : for k ≥ 0 , σ ∈ Σ ( k ) , ω ∈ Ω ( k ) , and S 1 , . . . , S k ∈ Uvals(Σ , Z, A ) , we define M u top σ,ω ( S 1 , . . . , S k ) = ω (( S 1 , t 1 ) , . . . , ( S k , t k )) .σ ( t 1 , . . . , t k ) . t 1 ,...,t k ∈ T Σ ( Z ) 3. The z -concatenation : for every z ∈ Z and S, S ′ ∈ Uvals(Σ , Z, A ) , we define “ ” M u S · z S ′ = ( S, s ) ◦ s,z (( S ′ , t 1 ) , . . . , ( S ′ , t l )) .s [ z ← ( t 1 , . . . , t l )] . s ∈ T Σ ( Z ) , l = | s | z t 1 ,...,t l ∈ T Σ ( Z )

  10. 10 Rational operations on Uvals(Σ , Z, A ) 4. The z - K LEENE -star : for every z ∈ Z and S ∈ Uvals(Σ , Z, A ) we define: (i) S 0 z = e 0 ; and z ) ⊕ u id A .z . (ii) S n +1 = ( S · z S n z Then, the z -K LEENE star S ∗ z of S is defined as follows: If S is z -proper, i.e., ( S, z ) = 0 , then ( S ∗ z , t ) = ( S height( t )+1 , t ) z for every t ∈ T Σ ( Z ) , otherwise S ∗ z = e 0 .

  11. 11 Rational expressions (over Σ , Z and A ) RatExp(Σ , Z, A ) (over Σ , Z , and A ) is the smallest set R satisfying Conditions (i)–(v). For every ratexp η ∈ RatExp(Σ , Z, A ) we define its semantics [ [ η ] ] ∈ Uvals(Σ , Z, A ) simultaneously. (i) For every z ∈ Z and ω ∈ Ω (1) we have ω.z ∈ R and [ [ ω.z ] ] = ω.z . (ii) For every k ≥ 0 , σ ∈ Σ ( k ) , ω ∈ Ω ( k ) , and rational expressions η 1 , . . . , η k ∈ R we have top σ,ω ( η 1 , . . . , η k ) ∈ R and [ [top σ,ω ( η 1 , . . . , η k )] ] = top σ,ω ([ [ η 1 ] ] , . . . , [ [ η k ] ]) . ] ⊕ u [ (iii) For every η 1 , η 2 ∈ R we have η 1 + η 2 ∈ R and [ [ η 1 + η 2 ] ] = [ [ η 1 ] [ η 2 ] ] . (iv) For every η 1 , η 2 ∈ R and z ∈ Z we have η 1 · z η 2 ∈ R and [ [ η 1 · z η 2 ] ] = [ [ η 1 ] ] · z [ [ η 2 ] ] . (v) For every η ∈ R and z ∈ Z we have η ∗ [ η ∗ ] ∗ z ∈ R and [ z ] ] = [ [ η ] z .

  12. 12 Rational tree valuations (over Σ , Z and A ) We call S ∈ Uvals(Σ , Z, A ) rational , if there exists a rational expression η ∈ RatExp(Σ , Z, A ) such that [ [ η ] ] = S . Rat(Σ , Z, A ) is the class of rational uniform tree valuations over Σ , Z and A . Then Rat(Σ , Z, A ) is the smallest class of uniform tree valuations which contains the uniform tree valuation ω.z for every z ∈ Z and ω ∈ Ω (1) and is closed under the rational operations.

  13. 13 Kleene theorem for wta over M-monoids a) Recognizable ⇒ rational: Theorem. If A is distributive, then for every wta M = ( Q, Σ , Z, A, F, µ, ν ) there exists a rational expression η ∈ RatExp(Σ , Z ∪ Q, A ) such that ] | T Σ ( Z ) . S M = [ [ η ] Hence we have Rec(Σ , Z, A ) ⊆ Rat(Σ , fin , A ) | T Σ ( Z ) , where [ Rat(Σ , fin , A ) = Rat(Σ , Z, A ) . Z finite set

  14. 14 Kleene theorem for wta over M-monoids The M-monoid ( A, ⊕ , 0 , Ω) is • sum closed , if ω 1 ⊕ ω 2 ∈ Ω ( k ) for every k ≥ 0 and ω 1 , ω 2 ∈ Ω ( k ) . • (1 , ⋆ ) -composition closed , if ω ( ω ′ ) ∈ Ω ( k ) for every k ≥ 0 , ω ∈ Ω (1) , and ω ′ ∈ Ω ( k ) . • ( ⋆, 1) -composition closed , if ω ( ω 1 , . . . , ω k ) ∈ Ω ( k ) for every k ≥ 0 , ω ∈ Ω ( k ) , and ω 1 , . . . , ω k ∈ Ω (1) . b) Rational ⇒ recognizable: Theorem. Let A be a distributive, (1 , ⋆ ) -composition closed and sum closed. Then Rec(Σ , Z, A ) contains the uniform tree valuation ω.z for every z ∈ Z and ω ∈ Ω (1) , and it is closed under the rational operations. Hence, Rat(Σ , Z, A ) ⊆ Rec(Σ , Z, A ) .

  15. 15 Kleene theorem for wta over M-monoids In case Z = ∅ : Theorem. For every (1 , ⋆ ) -composition closed and sum closed DM-monoid A , we have Rec(Σ , ∅ , A ) = Rat(Σ , fin , A ) | T Σ . Proof. We have Rec(Σ , ∅ , A ) ⊆ Rat(Σ , fin , A ) | T Σ ⊆ Rec(Σ , fin , A ) | T Σ ⊆ Rec(Σ , ∅ , A ) where the last inclusion can be seen as follows. Let S ∈ Rec(Σ , fin , A ) | T Σ . Thus, there exist a wta M = ( Q, Σ , Z, A, F, µ, ν ) such that S = S M | T Σ . It is easy to see that for the wta N = ( Q, Σ , ∅ , A, F, µ, ∅ ) we have that S N = S M | T Σ . Thus S ∈ Rec(Σ , ∅ , A ) .

  16. 16 Wta over (arbitrary) semirings M = ( Q, Σ , Z, K, F, δ, ν ) a wta, K is a semiring, t ∈ T Σ ( Z ) - a run of M on t is a mapping r : pos( t ) → Q - the set of runs of M on t is R M ( t ) - for w ∈ pos( t ) , the weight wt( t, r, w ) of w in t under r • if t ( w ) = z for some z ∈ Z , then wt( t, r, w ) = ν ( z, r ( w )) • otherwise (if t ( w ) = σ for some σ ∈ Σ ( k ) , k ≥ 0 ) wt( t, r, w ) = δ k ( r ( w 1) , . . . , r ( wk ) , t ( w ) , r ( w )) • the weight of r is wt( t, r ) = Q w ∈ pos ( t ) wt( t, r, w ) , where the order of the product is the postorder tree walk. The tree series S M : T Σ ( Z ) → K recognized by M is X S M ( t ) = wt( t, r ) · F ( r ( ε )) . r ∈ R M ( t ) The class of recognizable tree series by such wta: Rec sr (Σ , Z, K ) .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend