next up previous contents index
Next: Moore machines Up: Nets with circles and Previous: Nets with circles and   Contents   Index


Mealy machines

Mealy machines (Hopcroft and Ullman (1979, 42), Salomaa (1973, 31)) are finite-state machines that act as transducers or translators, taking a string on an input alphabet and producing a string of equal length on an output alphabet. Formally, a Mealy machine is a six-tuple

\begin{displaymath}
M=(Q,\Sigma,\Gamma,\delta,\lambda,q_I)
\end{displaymath} (3.2)

where

As an example, let $M=(Q,\Sigma,\Gamma,\delta,\lambda,q_I)$ such that:

$Q=\{q_1,q_2\}$, $q_I=q_1$.
$\Sigma=\{{\tt0}, {\tt 1}\}$
$\Gamma=\{{\tt E}, {\tt O}\}$
$\delta(q_1,0)=q_1$, $\delta(q_1,1)=q_2$
$\delta(q_2,0)=q_2$, $\delta(q_2,1)=q_1$
$\lambda(q_1,0)={\tt E}$, $\lambda(q_1,1)={\tt O}$
$\lambda(q_2,0)={\tt O}$, $\lambda(q_2,1)={\tt E}$
This machine, which may also be represented as in figure 2.2, outputs an E if the number of 1s read so far is even and an O if it is odd; for example, the translation of 11100101 is OEOOOEEO.

Figure 2.2: A Mealy machine that outputs an E if the number of 1s read so far is even and an O if it is odd. Transition labels are $\sigma /\gamma $ where $\sigma \in \Sigma $ is the input and $\gamma \in \Gamma $ is the output.
\includegraphics[scale=0.8]{fig0110}


next up previous contents index
Next: Moore machines Up: Nets with circles and Previous: Nets with circles and   Contents   Index
Debian User 2002-01-21