state-output machine

Definition

A state-output machine can be thought of as state machine with an output feature: when a word is fed into the machine as input, the machine goes through a series of internal “states” where certain translations take place, and finally a set of words are produced as outputs.

M is complete if |λ⁢(s,a)|≥1 and |δ⁢(s,a)|≥1; otherwise, it is incomplete;

•

M is sequential if |λ⁢(s,a)|≤1 and |δ⁢(s,a)|≤1.

Both δ and λ can be extended so its first component takes on a set T of states:

δ⁢(T,a):=⋃{δ⁢(t,a)∣t∈T}andλ⁢(T,a):=⋃{λ⁢(t,a)∣t∈T}.

Note that δ⁢(∅,a)=λ⁢(∅,a)=∅ for any input symbol a∈Σ.

Words as Input

The transition and the output functions of a state-output machine M are defined to work only over individual symbols in Σ as inputs. However, finite strings of symbols over Σ, or words, are usually fed to the M, instead of individual symbols. Therefore, we would like modify δ and λ in order to handle finite strings as well.

Extending δ.

When a machine M receives an input word u, it reads u one symbol at a time, starting from the left, until the last symbol is read. After reading each symbol, the machine goes into a next state, dictated by the transition functionδ. If M is at state s upon receiving u, we define a next state as a state that M enters after reading the last symbol of u.

Based on the above discussion, we are ready to extend δ so it takes on words over Σ. This is done inductively:

There are in general two ways to view output(s) for a given input word:

(a)

The first, more common, approach, is to view outputs as being produced after the last symbol of the input word is processed:

*

λ′⁢(s,ϵ):=∅, and

*

λ′⁢(s,u⁢a):=λ⁢(δ′⁢(s,u),a), where u is a word over Σ.

If λ does not depend on input symbols, say λ⁢(s,a)=β⁢(s) for all (s,a)∈S×Σ, the above definition may be modified so that non-empty output(s) may be produced by the empty input word ϵ:

*

λ′⁢(s,u):=β⁢(δ′⁢(s,u)), where u is any word over Σ.

It is easy to see that λ⁢(s,ϵ)=β⁢(s). Note that this is not a true extension of the original output function, because the new output function now depends on inputs.

(b)

Alternatively, outputs may be produced each time a transition occurs. In other words, outputs are words over Δ. Thus, outputs are inductively as follows:

*

λ′⁢(s,ϵ):={ϵ}, where ϵ is the empty word, and

*

λ′⁢(s,u⁢a):=λ′⁢(s,u)⁢λ⁢(δ′⁢(s,u),a), where a∈Σ and u∈Σ*.

When there is no confusion, we may continue to denote λ and δ as the extensions of the original next-state and output functions.

Given M, define an input configuration as a pair (s,u) for some s∈S and u∈Σ*, and an output configuration as a pair (t,v) for some t∈S and v∈Δ*. The set of output configurations for a given input configuration (s,u) is given by δ⁢(s,u)×λ⁢(s,u).

Generator and Acceptor

One may treat a state-output machine M=(S,Σ,Δ,δ,λ) as either a languagegenerator or a language acceptor. The idea is that a set of states and a set of words need to be specified as initial conditions, so that words can either be generated or accepted from these initial conditions. The way this works is as follows:

M as a generator.

Fix a non-empty set I⊆S of starting states, and a non-empty set G⊆Σ*. The triple (M,I,G) is called a generator. A string b∈Δ* is generated by(M,I,G) if b∈λ⁢(s,a) for some (s,a)∈I×G. The set of all strings generated by (M,I,G) is also denoted by L⁢(M,I,G).

A typical example of a generator is a Post system: a state machine where the output alphabet is the input alphabet, and the set of states and the state function is suppressed (S may be taken as a singleton).

M as an acceptor.

Dually, fix a non-empty set F⊆S called the final states, and a non-empty set A⊆Δ*. The triple (M,F,A) is called an acceptor. A string a∈Σ* is said to be accepted by (M,F,A) if δ⁢(s,a)∈F and λ⁢(s,a)∈A for some state s∈S. The set of all strings accepted by (M,F,A) is denoted by L⁢(M,F,A).

A typical example of an acceptor is an automaton: a state machine where the output alphabet and the output function are not essential (Δ* may be taken as a singleton).

Remark. Observe that the functions δ and λ can be combined to form a single function τ:S×Σ→P⁢(S)×P⁢(Δ) such that τ=(δ,λ). One can generalize this so that τ is a function from S×Σ to P⁢(S×Δ), or more generally, to P⁢(S×Δ*). The resulting construct is commonly known as a generalized sequential machine.