Compositions of Tree Series Transformations

Similar documents
Compositions of Bottom-Up Tree Series Transformations

Compositions of Bottom-Up Tree Series Transformations

Hierarchies of Tree Series TransducersRevisited 1

The Power of Tree Series Transducers

Hasse Diagrams for Classes of Deterministic Bottom-Up Tree-to-Tree-Series Transformations

Pure and O-Substitution

RELATING TREE SERIES TRANSDUCERS AND WEIGHTED TREE AUTOMATA

Incomparability Results for Classes of Polynomial Tree Series Transformations

Minimization of Weighted Automata

October 23, concept of bottom-up tree series transducer and top-down tree series transducer, respectively,

Introduction to Kleene Algebras

Statistical Machine Translation of Natural Languages

Kleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque

A Weak Bisimulation for Weighted Automata

Weighted Tree-Walking Automata

MANFRED DROSTE AND WERNER KUICH

Applications of Tree Automata Theory Lecture VI: Back to Machine Translation

Weighted Specifications over Nested Words

M. Droste and P. Gastin. Weighted automata and weighted logics

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings.

Path Queries under Distortions: Answering and Containment

Composition Closure of ε-free Linear Extended Top-down Tree Transducers

Max-plus automata and Tropical identities

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Weighted Monadic Datalog Tree Transducers

Advanced Automata Theory 10 Transducers and Rational Relations

Preservation of Recognizability for Weighted Linear Extended Top-Down Tree Transducers

Bisimulation Minimisation for Weighted Tree Automata

Weighted automata and weighted logics

Weighted tree automata and weighted logics

Applications of Tree Automata Theory Lecture V: Theory of Tree Transducers

Bisimulation Minimisation of Weighted Tree Automata

Theory of Computation (I) Yijia Chen Fudan University

Logical Characterization of Weighted Pebble Walking Automata

Solving weakly linear inequalities for matrices over max-plus semiring and applications to automata theory

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

COM364 Automata Theory Lecture Note 2 - Nondeterminism

EFFICIENT ALGORITHMS FOR TESTING THE TWINS PROPERTY

Obtaining the syntactic monoid via duality

Introduction to Finite Automaton

An Overview of Residuated Kleene Algebras and Lattices Peter Jipsen Chapman University, California. 2. Background: Semirings and Kleene algebras

How to train your multi bottom-up tree transducer

Learning Deterministically Recognizable Tree Series

Turing Machines and Time Complexity

Laboratoire Spécification & Vérification. Weighted Specifications over Nested Words. Benedikt Bollig, Paul Gastin, and Benjamin Monmege

Compositions of Top-down Tree Transducers with ε-rules

Kleene Algebras and Algebraic Path Problems

Finite-State Transducers

Weighted Finite-State Transducer Algorithms An Overview

Extended transition function of a DFA

Lecture 7: Introduction to syntax-based MT

Generic ǫ-removal and Input ǫ-normalization Algorithms for Weighted Transducers

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

An algebraic characterization of unary two-way transducers

Statistical Machine Translation of Natural Languages

A Logical Characterization for Weighted Event-Recording Automata

Characterizing CTL-like logics on finite trees

GENERATING SETS AND DECOMPOSITIONS FOR IDEMPOTENT TREE LANGUAGES

P Finite Automata and Regular Languages over Countably Infinite Alphabets

From Monadic Second-Order Definable String Transformations to Transducers

The Complexity of Computing the Behaviour of Lattice Automata on Infinite Trees

Finite State Machines 2

SYNTACTIC SEMIGROUP PROBLEM FOR THE SEMIGROUP REDUCTS OF AFFINE NEAR-SEMIRINGS OVER BRANDT SEMIGROUPS

Ogden s Lemma. and Formal Languages. Automata Theory CS 573. The proof is similar but more fussy. than the proof of the PL4CFL.

Music as a Formal Language

Nondeterministic Finite Automata

Decision Problems of Tree Transducers with Origin

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

Solutions to Assignment 3

Complex Variables. Chapter 1. Complex Numbers Section 1.2. Basic Algebraic Properties Proofs of Theorems. December 16, 2016

Lecture 9: Decoding. Andreas Maletti. Stuttgart January 20, Statistical Machine Translation. SMT VIII A. Maletti 1

Strong Deterministic Fuzzy Automata

Myhill-Nerode Theorem for Recognizable Tree Series Revisited?

On Fixed Point Equations over Commutative Semirings

Using Multiplicity Automata to Identify Transducer Relations from Membership and Equivalence Queries

Decision Problems of Tree Transducers with Origin

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

Acceptance of!-languages by Communicating Deterministic Turing Machines

Axioms of Kleene Algebra

A Kleene Theorem for Forest Languages

Introduction to Finite-State Automata

Isomorphism of regular trees and words

Representing Arithmetic Constraints with Finite Automata: An Overview

Finite-state machines (FSMs)

Weighted Logics for Nested Words and Algebraic Formal Power Series

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Homing and Synchronizing Sequences

The Final Deterministic Automaton on Streams

Characterizing Families of Tree Languages by Syntactic Monoids. Szeged 2006

Complexity of Regular Functions

Kleene modules and linear languages

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Pebble weighted automata and transitive closure logics

Automata and Languages

A Disambiguation Algorithm for Weighted Automata

Computability and Complexity

Subdirectly irreducible commutative idempotent semirings

Transcription:

Compositions of Tree Series Transformations Andreas Maletti a Technische Universität Dresden Fakultät Informatik D 01062 Dresden, Germany maletti@tcs.inf.tu-dresden.de December 03, 2004 1. Motivation 2. Semirings, Tree Series, and Tree Series Substitution 3. Distributivity, Associativity, and Linearity 4. Tree Series Transducers and Composition Results a Financially supported by the German Research Foundation (DFG, GK 334) 1 December 03, 2004

Motivation Tree series transducers are a straightforward generalization of (i) tree transducers, which are applied in syntax-directed semantics, functional programming, and XML querying, (ii) weighted automata, which are applied in (tree) pattern matching, image compression and speech-to-text processing. Applications: can be used for code selection [Borchardt 04] potential uses in connection with tree banks Motivation 2 December 03, 2004

Generalization Hierarchy tree series transducer τ : T Σ A T weighted tree automaton L A T Σ weighted transducer τ : Σ A tree transducer τ : T Σ B T weighted automaton L A Σ tree automaton L B T Σ generalized sequential machine τ : Σ B string automaton L B Σ Motivation 3 December 03, 2004

Trees Σ ranked alphabet, Σ k Σ symbols of rank k, X = { x i i N + } T Σ (X) set of Σ-trees indexed by X, T Σ = T Σ ( ), t T Σ (X) is linear (resp., nondeleting) in Y X, if every y Y occurs at most (resp., at least) once in t, t[t 1,..., t k ] denotes the tree substitution of t i for x i in t Semirings, Tree Series, and Tree Series Substitution 4 December 03, 2004

Semirings A semiring is an algebraic structure A = (A,, ) (A, ) is a commutative monoid with neutral element 0, (A, ) is a monoid with neutral element 1, 0 is absorbing wrt., and distributes over. Examples: semiring of non-negative integers N = (N { }, +, ) Boolean semiring B = ({0, 1},, ) tropical semiring T = (N { }, min, +) any ring, field, etc. Semirings, Tree Series, and Tree Series Substitution 5 December 03, 2004

Properties of Semirings We say that A is commutative, if is commutative, idempotent, if a a = a, complete, if there is an operation I : AI A such that 1. i I a i = a i1 a in, if I = {i 1,..., i n }, and 2. i I a i = j J i I j a i, if I = j J I j is a partition of I, and 3. i I (a a i) = a i I a i and i I (a i a) = ( i I a i) a, completely idempotent, if it is complete with i I a = a for every non-empty I. Semiring Commutative Idempotent Complete Completely Idempotent N YES no YES no B YES YES YES YES T YES YES YES YES Semirings, Tree Series, and Tree Series Substitution 6 December 03, 2004

Tree Series A = (A,, ) semiring, Σ ranked alphabet Mappings ϕ : T Σ (X) A are also called tree series the set of all tree series is A T Σ (X), the coefficient of t T Σ (X) in ϕ, i.e., ϕ(t), is denoted by (ϕ, t), the sum is defined pointwise (ϕ 1 ϕ 2, t) = (ϕ 1, t) (ϕ 2, t), the support of ϕ is supp(ϕ) = { t T Σ (X) (ϕ, t) 0 }, ϕ is linear (resp., nondeleting in Y X), if supp(ϕ) is a set of trees, which are linear (resp., nondeleting in Y), the series ϕ with supp(ϕ) = is denoted by 0. Example: ϕ = 1 α + 1 β + 3 σ(α, α) +... + 3 σ(β, β) + 5 σ(α, σ(α, α)) +... Semirings, Tree Series, and Tree Series Substitution 7 December 03, 2004

Tree Series Substitution A = (A,, ) complete semiring, ϕ, ψ 1,..., ψ k A T Σ (X) Pure substitution of (ψ 1,..., ψ k ) into ϕ: ϕ (ψ 1,..., ψ k ) = (ϕ, t) (ψ 1, t 1 ) (ψ k, t k ) t[t 1,..., t k ] t supp(ϕ), ( i [k]): t i supp(ψ i ) o-substitution of (ψ 1,..., ψ k ) into ϕ: ϕ (ψ o 1,..., ψ k ) = t supp(ϕ), ( i [k]): t i supp(ψ i ) (ϕ, t) (ψ 1, t 1 ) t x 1 (ψk, t k ) t x k t[t1,..., t k ] Example: 5 σ(x 1, x 1 ) (2 α) = 10 σ(α, α) and 5 σ(x 1, x 1 ) o (2 α) = 20 σ(α, α) Semirings, Tree Series, and Tree Series Substitution 8 December 03, 2004

Distributivity ( ) ϕ i i I m ( i 1 I 1 ψ 1i1,..., i k I k ψ kik ) = ϕ i i I, ( j [k]): i j I j m (ψ 1i1,..., ψ kik ) Substitution Sufficient condition for distributivity pure substitution always o-substitution ϕ i linear, A completely idempotent OI-substitution ϕ i linear and nondeleting [Kuich 99] Distributivity, Associativity, and Linearity 9 December 03, 2004

( ϕ (ψ m 1,..., ψ k ) ) m Associativity m m (τ 1,..., τ n ) = ϕ (ψ 1 (τ 1,..., τ n ),..., ψ k (τ 1,..., τ n )) m Substitution Sufficient condition for associativity pure substitution A completely idempotent, conforming partition ( I j ) j [k] of [n], τ i boolean τ i singletons with idempotent coefficients special associativity law o-substitution ϕ, ψ 1,..., ψ k linear, A zero-divisor free and completely idempotent ϕ linear, A zero-divisor free, τ i singletons OI-substitution ϕ i linear and nondeleting [Kuich 99] Special associativity law: partition ( I j ) j J of I with var(ψ j ) X Ij for every j J ( ) ϕ ( ψj ) j J ( τi ) i I = ϕ ( ) ψ j ( τ i ) i Ij j J Distributivity, Associativity, and Linearity 10 December 03, 2004

Linearity (a ϕ) m (a 1 ψ 1,..., a k ψ k ) = a a 1 a k ϕ m (ψ 1,..., ψ k ) Substitution Sufficient condition for distributivity pure substitution always o-substitution a i {0, 1} or special linearity law OI-substitution ϕ i linear and nondeleting [Kuich 99] Special linearity law: tree t T Σ (X k ) (a t) o (a 1 ψ 1,..., a k ψ k ) = a a t 1 1 a t k k ( ) o t (ψ 1,..., ψ k ) Distributivity, Associativity, and Linearity 11 December 03, 2004

Tree Series Transducers Definition: A (bottom-up) tree series transducer (tst) is a system M = (Q, Σ,, A, F, µ) Q is a non-empty set of states, Σ and are input and output ranked alphabets, A = (A,, ) is a complete semiring, F A T (X 1 ) Q is a vector of final outputs, µ = ( µ k ) k N with µ k : Σ k A T (X k ) Q Qk. If Q is finite and µ k (σ) q, q is polynomial, then M is called finite. Tree Series Transducers and Composition Results 12 December 03, 2004

Semantics of Tree Series Transducers m {ε, o}, q Q, t T Σ, ϕ A T Σ Definition: The mapping h m µ : T Σ A T Q is defined as h m m µ (σ(t 1,..., t k )) q = µ k (σ) q,(q1,...,q k ) (h m µ (t 1 ) q1,..., h m µ (t k ) qk ) q 1,...,q k Q and h m µ (ϕ) q = t T Σ (ϕ, t) h m µ (t) q. the m-tree-to-tree-series transformation M m : T Σ A T computed by M is ( M m, t) = q Q F m q (h m µ (t) q ) and the m-tree-series-to-tree-series transformation M m : A T Σ A T computed by M is ( M m, ϕ) = t T Σ (ϕ, t) ( M m, t). Tree Series Transducers and Composition Results 13 December 03, 2004

Extension (Q, Σ,, A, F, µ) tree series transducer, m {ε, o}, q Q k, q Q, ϕ A T Σ (X k ) Definition: We define hµ,m q : T Σ (X k ) A T (X k ) Q hµ,m(x q 1 x i, if q = q i i ) q = 0, otherwise hµ,m(σ(t q m 1,..., t k )) q = µ k (σ) q,p1...p k (hµ,m(t q 1 ) p1,..., hµ,m(t q k ) pk ) p 1,...,p k Q We define hµ,m q : A T Σ (X k ) A T (X k ) Q by hµ,m(ϕ) q q = (ϕ, t) hµ,m(t) q q t T Σ (X I ) Tree Series Transducers and Composition Results 14 December 03, 2004

Composition Construction M 1 = (Q 1, Σ,, A, F 1, µ 1 ) and M 2 = (Q 2,, Γ, A, F 2, µ 2 ) tree series transducer Definition: The m-product of M 1 and M 2, denoted by M 1 m M 2, is the tree series transducer M = (Q 1 Q 2, Σ, Γ, A, F, µ) F pq = i Q 2 (F 2 ) i m h q µ 2,m((F 1 ) p ) i µ k (σ) pq,(p1 q 1,...,p k q k ) = h q 1...q k µ 2,m ((µ 1 ) k (σ) p,p1...p k ) q. Tree Series Transducers and Composition Results 15 December 03, 2004

Main Theorem A commutative and complete semiring, M 1 and M 2 tree series transducer Theorem: M 1 m M 2 m = M 1 m M 2 m, if m = ε and M 1 linear, or m = ε and M 2 boolean and deterministic, or m = ε and M 2 is deterministic and A is multiplicatively idempotent, or m = o and M 1 is linear, M 2 is nondeleting and linear, and A is completely idempotent. Tree Series Transducers and Composition Results 16 December 03, 2004

Main Corollary Corollary: l-bot ts-ts (A) BOT ts-ts (A) = BOT ts-ts (A). BOT ts-ts (A) db-bot ts-ts (A) = BOT ts-ts (A), BOT ts-ts (A) d-bot ts-ts (A) = BOT ts-ts (A), provided that A is multiplicatively idempotent, l-bot o ts-ts(a) nl-bot o ts-ts(a) = l-bot o ts-ts(a), provided that A is completely idempotent. Tree Series Transducers and Composition Results 17 December 03, 2004

References [Borchardt 04] B. Borchardt: Code Selection by Tree Series Transducers. CIAA 04, Kingston, Canada, 2004. to appear [Engelfriet et al 02] J. Engelfriet, Z. Fülöp, and H. Vogler: Bottom-up and Topdown Tree Series Transformations. Journal of Automata, Languages, and Combinatorics 7:11 70, 2002 [Fülöp et al 03] Z. Fülöp and H. Vogler: Tree Series Transformations that Respect Copying. Theory of Computing Systems 36:247 293, 2003 [Kuich 99] W. Kuich: Tree Transducers and Formal Tree Series. Acta Cybernetica 14:135 149, 1999 Tree Series Transducers and Composition Results 18 December 03, 2004