AdamátorZápiskyHlášky

Finite Transducers

Lectures given by Prof. Jacques Sakarovitch.

Convention We will denote an alphabet with A, the free monoid (the set of words) over A by A* and the empty word by 1A*.
Definition A finite automaton on A is a directed graph with edges labelled by the letters from A. It is described by the 5-tuple 𝒜=A,Q,I,E,T, where Q is the set of states (vertices), IQ is the set of initial states, EQ×A×Q is the set of transitions and TQ is the set of final states. The accepted language is the set
L(𝒜){wA*|iI,tT:i𝒜wt}.
Note Let A*,B* be two free monoids. Then A*×B* is also a monoid, but not free (for example, given aA and bB, the elements (a,1A*) and (1B*,b) commute).
Definition A finite transducer on A is a directed graph with edges labelled by pairs from A*×B*. It is described by the 5-tuple 𝒯=A*×B*,Q,I,E,T, where Q is the set of states (vertices), IQ is the set of initial states, EQ×A*×B*×Q is the set of transitions and TQ is the set of final states. We define
|𝒯|{(u,v)|iI,tT:i𝒯(u,v)T}.
Definition A relation θ from A* to B* is defined by its graph θ^A*×B* and denoted by θ:A*B*, with
θ(u){vB*|(u,v)θ^}.
Its inverse is θ1:B*A* with the same graph and
θ1(v){uA*|(u,v)θ^}.
Definition additivity Let LA*. Then θ(L)uLθ(u).
Definition The complement of a relation θ is the relation θ such that θ^=θ^=(A*×B*)θ^.
Definition Let 𝒯 be a finite transducer. Then |𝒯| is its realised relation.
Note The domain and range of |𝒯| are regular languages and the relation |𝒯|1 is also realised by a transducer (with the labels swapped).
Note C(A×{1})({1}×B) is a generating set of the monoid A*×B*. So is D(A×{1})({1}×B)(A×B).
Definition A transducer is normalised if its labels are in C and subnormalised if its labels are in D.
Theorem Every transducer is equivalent to a normalised transducer.
Proof We replace the edge (u,v) with the sequence of edges (u1,1),,(u|u|,1),(1,v1),,(1,v|v|).
Definition An automaton over a monoid M is proper if no edge is labelled by 1M (spontaneous transition).
Theorem Every automaton is equivalent to a proper automaton.
Proof Shown in the main lecture. It uses the backward closure and the forward closure.
Definition Let KA* be a regular language. We define the relation zK:A*A*,
zK(u){{u}ifuK,otherwise.
Note Obviously this relation is accepted by a finite transducer.
Note We can extend the notion of a finite transducer to arbitrarily many free monoids.
Note We can also have right automata, which read from right to left. We can model a right automaton as the transpose of a left automaton. However, this does not preserve certain properties (such as determinism), so it is often useful to treat them as a separate concept.
Definition The composition of relations θ:A*B* and σ:B*C* is the relation σθ:A*C* defined as (σθ)(u)σ(θ(u)), or equivalently
σθ^{(u,w)A*×C*|vB*:(u,v)θ^(v,w)σ^}.
Definition The composition product of two subnormalised transducers 𝒯=A*×B*,Q,I,E,T,𝒮=B*×C*,R,J,F,U is the transducer 𝒯𝒮=A*×C*,Q×R,I×J,G,T×U with GG1G2G3,
G1{(p,r)(x,y)(q,s)|xA{1},yC{1},p,qQ,r,sR|bB:p(a,b)qEr(b,y)sF},
G2{(p,r)(a,1)(q,r)|aA,p,qQ,rR|p(a,1)qE},
G3{(p,r)(1,c)(p,s)|cC,pQ,r,sR|r(1,c)sE}.
Note The composition product might result in spontaneous transitions, which can be eliminated with backward closure.
Theorem Elgot–Megei The relation realised by the composition product of two transducers is the composition of their relations.
Note Let M be a monoid. Then 𝒫(M) with the operations , is a semiring.
Definition Let M be a monoid and PM. Then we define P0{1M},Pn+1PnP,P*n0Pn.
Lemma Let M be a monoid and PM. Then P*=P.
Definition A rational expression over a monoid M is an expression built inductively as:The subset denoted by a rational expression isA subset PM is rational if it is denoted by a rational expression. The set of all rational subsets is denoted RatM.
Note The name “rational” comes from the fact that X*=1+XX*, which could be rewritten as
X*(1X)=(1X)X*=1.
So although 1X does not actually mean anything, we can imagine it as being the multiplicative inverse of X*. This is analogous to the geometric series identity
11x=n=0xn.
Theorem A subset of a monoid M is rational if and only if it is accepted by a finite automaton over M.
Proof Analogous to the one for regular languages.
(⇒)
Operations on standard automata.
(⇐)
State elimination method.
Note Unlike regular languages, rational sets are not closed under intersection. For example, let
|𝒱1|{(𝖺n𝖻m,𝖼n)|n,m},
|𝒱2|{(𝖺n𝖻m,𝖼m)|n,m}.
Both of these can be recognised by a finite transducer, but their intersection is
|𝒱1||𝒱2|={(𝖺n𝖻n,𝖼n)|n},
which is clearly not rational.
Corollary Rational sets are not closed under complement.
Theorem The complement if the identity is a rational expression.
Corollary Any function θ is a rational expression.
Proof
θ^=Domθ×B*χB*θ^.
Theorem Rabin & Scott, 1959 Given R,SRatA*×B* with |A|,|B|2, it is undecidable whether RS=.
Theorem Fischer & Rosenberg, 1968 If |A|,|B|2, it is undecidable whether two transducers over A*×B* are equivalent.
Theorem Gibbons & Ryther, 1986 Given R,SRat{𝖺,𝖻}*×{𝖼}, it is decidable whether RS=.
Theorem Ibarra, 1978; Liskovik, 1979 It is undecidable whether two transducers over {𝖺,𝖻}*×{𝖼} are equivalent.
Problem Post correspondence problem Let B be a set with at least 2 elements and U={u1,,uk},V={v1,,vk}B*. Does there exist a sequence of indices i1,,ip such that ui1uip=vi1vip?
Theorem The Post correspondence problem is recursively undecidable.
Note Take the sets U,V from the Post correspondence problem and define morphisms τU,τV:[k]*B* as τU(i)ui,τV(i)vi. Then the Post correspondence problem can be reformulated as deciding whether w[k]*:τU(w)=τV(w), or equivalently, τ^Uτ^V.
Note Let A={𝖺,𝖻}. Define the injective morphism κ:[k]*A*,κ(i)𝖺i𝖻. Then
τUκ1^τVκ1^=τ^Uτ^V=.
This somehow implies that the equivalence of rational sets is undecidable.
Theorem Let RRatA*×B* with |A|,|B|2. Then it is undecidable whether R=A*×B*.
Proof
(τUκ1)^(τVκ1)^=A*×B*τ^Uτ^V=.
Note Let AB= and ZAB. Define the projections πA:Z*A*,πB:Z*B* the obvious way. Then for a given θ:A*B* we have
θRatA××B*KRatZ*:θ=πBZKπA1.
Definition Let 𝒜=Q,I,E,T,=R,J,F,U be two finite automata. A graph-morphism is a function φ:QR such thatWe denote φ:𝒜.
Theorem If φ:𝒜, then |𝒜|||.
Theorem The projection from 𝒜× to 𝒜 is a graph-morphism.
Theorem If φ:𝒜, then also φ:𝒜𝖳𝖳.
Definition A graph-morphism φ:𝒜 is conformal if every computation in is the image of a computation in 𝒜.
Definition Given an automaton 𝒜, denote by 𝒜n the normalised version of 𝒜 with two new subliminal states i,t. A graph-morphism φ:𝒜 can be naturally extended to a morphism φn:𝒜nn.
Definition The outgoing bouquet of a state p in an automaton 𝒜 is
Out𝒜(p){eE|e=(p,a,q)}.
The ingoing bouquet of a state q in an automaton 𝒜 is
In𝒜(q){eE|e=(p,a,q)}.
Definition A graph-morphism φ:𝒜 is locally outsurjective/outbijective if for all p𝒜n, the morphism φn:Out𝒜n(p)Outn(φ(p)) is surjective/bijective.
Definition Let 𝒜=Q,I,E,T,=R,J,F,U be two finite automata. A morphism from 𝒜 to is a graph-morphism φ:𝒜 which is surjective and locally outsurjective. If there exists a morphism from 𝒜 to , is a quotient of 𝒜.
Theorem If is a quotient of 𝒜, then |𝒜|=||.
Definition A graph-morphism φ:𝒜 is locally insurjective/inbijective if for all p𝒜n, the morphism φn:In𝒜n(p)Inn(φ(p)) is surjective/bijective.
Definition Let 𝒜=Q,I,E,T,=R,J,F,U be two finite automata. A comorphism from 𝒜 to is a graph-morphism φ:𝒜 which is surjective and locally insurjective. If there exists a comorphism from 𝒜 to , is a coquotient of 𝒜.
Definition Let 𝒜=Q,I,E,T,=R,J,F,U be two finite automata. A covering from 𝒜 to is a graph-morphism φ:𝒜 which is surjective and locally outbijective.
Definition Let 𝒜=Q,I,E,T,=R,J,F,U be two finite automata. A cocovering from 𝒜 to is a graph-morphism φ:𝒜 which is surjective and locally inbijective.
Definition An automaton 𝒜 is unambiguous if every accepted word has only one computation.
Theorem If φ:𝒜 is a morphism, then there exists a subautomaton 𝒞 of 𝒜 such that φ:𝒞 is a covering.
Definition A state q in a subnormalised transducer 𝒯 is stalled/tape-consistent if, if an ingoing transition is labeled in {1}×A (resp. A×{1}), then all outgoing transitions are labeled in {1}×A (resp. A×{1}).
Definition A subnormalised transducer is synchronous if every state is stalled. A relation θ:A*B* is synchronous if it is realised by a synchronous transducer. The set of synchronous relations is denoted SynA*×B*.
Note This corresponds to a Turing machine with two tapes where both tape heads only move forward and simultaneously.
Theorem The inverse of a synchronous relation is a synchronous relation.
Theorem The universal relation is synchronous.
Theorem SynA*×B* is an effective Boolean algebra.
Theorem A synchronous transducer can be determinised.
Definition A transducer 𝒯 is homogeneous if for every state p, either:
Theorem Every synchronous transducer has a homogeneous covering.
Definition A transducer 𝒯 is complete if:
Theorem Every homogenous synchronous transducer can be made complete.
Theorem It is recursively undecidable if a rational relation is synchronous.
Definition The matrix representation of an automaton 𝒜=Q,I,E,T is the morphism μ:A*𝔹Q×Q defined as
μ(a)p,q[paq].
We will also represent I as a row vector and T as a column vector. Then we can write 𝒜=I,μ,T.
Lemma For every wA* and p,q,
μ(w)=1p𝒜wq.
Corollary
L(𝒜)={w𝒜*|Iμ(w)T=1}.
Definition A language LA* is recognisable if there exists a finite monoid M, a morphism α:A*M and PM such that L=α1(P).
Theorem A language is recognisable if and only if it is accepted by a finite automaton.
Proof
(⇐)
Let 𝒜=I,μ,T be an automaton accepting L, represented as a matrix. Take
P{m𝔹Q×Q|ImT=1}.
Then L=μ1(P).
(⇒)
Let 𝒜M,{1M},E,P with transitions
E{mamα(a)|mM,aA}.
Note that this automaton is deterministic and for all w𝒜*,
1M𝒜wα(w).
Note This construction could in theory be used to determinise an automaton, but it’s even worse than the subset construction because it may produce up to 2|Q|2 states.
Note An automaton defined on a non-free monoid does not necessarily have a matrix representation because not every function defined on a generating set can be extended to a morphism.
Definition A finite real-time transducer is a tuple 𝒯=A*×B*,Q,I,E,T, where Q is a finite set, EQ×(A×𝒫(B*))×Q and I,T:Q𝒫(B*). Note that the subsets of B* may be infinite!
Theorem A relation θ:A*B* is rational if and only if it is realised by a finite real-time transducer.
Theorem Let E𝒫(A)Q×Q. Then the entries of E* belong to the rational closure of the entries of E.
Theorem If μ:A*(RatB*)Q×Q is a morphism, then μ(RatA*)(RatB*)Q×Q.