Machines with Output

Learn about Mealy machines and their applications.

Mealy machines

The following finite automaton echoes all its input except for the text of dollar-delimited comments. The generic term for such an output-producing machine is finite-state transducer, borrowing the name from electronics (a transducer converts energy from one form to another). Our transducers convert input text to output text. The machine in the figure below emits output as it moves from one state to another, using a slash on transitions to separate the input from the output. A transducer like this is also called a Mealy machineNamed after George H. Mealy who introduced them to describe sequential circuits. Another type of machine, named after Edward F. Moore, emits output when a state is entered instead of during a transition. Both types of machines solve the same set of problems; one may be preferable over the other in different situations. We’ll only use Mealy machines..

Get hands-on with 1400+ tech skills courses.