Mealy machine

from Wikipedia, the free encyclopedia

A Mealy automaton is a deterministic finite automaton whose output depends on its state and (in contrast to a Moore automaton ) on its input. This clearly means that each edge in the state diagram is assigned an output value. The name goes back to George H. Mealy , who advocated the use of this expression.

Formal definition

A Mealy automaton can be defined as 6 tuples :

  1. is a finite set of states ( ). Instead is also often used.
  2. is the input alphabet, .
  3. is the output alphabet .
  4. is the transition function.
  5. is the output function.
    Occasionally a more compact notation is chosen and both functions are combined into a state transition function .
  6. is the start state. Instead is often or used. This starting state is marked with a double border or a double arrow.

example

The automaton described by the following state diagram outputs its input with a delay, i. H. for an input x 0 x 1 ... x n, it generates the output 0 x 0 x 1 ... x n-1 . The edge labeling 0/1 means that if a zero is entered, a one is output in addition to the change in status. S denotes the respective state.

A Mealy machine with the start state S0

Connection with Moore machine

Mealy and Moore machines can be converted into one another. For example, if you want to convert a Mealy machine into a Moore machine, you can proceed in the following three steps:

Step 1: write output to the nodes

For each edge, the output is transferred to the state on which the edge ends. Usually there are different output values ​​in one state node.

The automat from the example with output in the node Step 2: Split the nodes and move incoming edges

The states are multiplied so that only one output value is assigned to each state; then you reassign incoming edges to the new states according to the output values. The automaton with additional states

Step 3: multiply outgoing edges

Finally you have to copy all outgoing edges of the original states and append them to the states from step 2. The machine with copied edges

The output of the Moore automaton so constructed is equivalent to that of the original Mealy automaton. The finished Moore machine

See also

literature

  • GH Mealy: A Method for Synthesizing Sequential Circuits , Bell System Tech. J. 34 , pp. 1045-1079, September 1955.
  • Fricke, Digitaltechnik, Chapter 8 "Synchronous Switchgear" up to and including 8.4. ISBN 978-3-8348-1783-9
  • Reichardt, Textbook Digital Technology, Chapter 12 "Design of synchronous state machines". ISBN 978-3-11-047800-6