Math 2.0

Computer science Definition

Mealy machine

Builds on Finite-state machineAlphabetString

Definition

A Mealy machine is a tuple M=(Q,Σ,Γ,δ,λ,q0)M = (Q, \Sigma, \Gamma, \delta, \lambda, q_0) where:

  1. (Q,Σ,δ,q0)(Q, \Sigma, \delta, q_0) is a finite-state machine, with finite set of states QQ, input alphabet Σ\Sigma, transition function δ ⁣:Q×Σ→Q\delta \colon Q \times \Sigma \to Q and initial state q0q_0;
  2. Γ\Gamma is an alphabet, the output alphabet;
  3. λ ⁣:Q×Σ→Γ\lambda \colon Q \times \Sigma \to \Gamma is the output function.

On an input string a1a2⋯ana_1 a_2 \cdots a_n with ai∈Σa_i \in \Sigma, let qi=δ(qi−1,ai)q_i = \delta(q_{i-1}, a_i) for 1≤i≤n1 \le i \le n. The output of MM is the string λ(q0,a1) λ(q1,a2)⋯λ(qn−1,an)∈Γ∗\lambda(q_0, a_1)\, \lambda(q_1, a_2) \cdots \lambda(q_{n-1}, a_n) \in \Gamma^*.

Remarks

Example: let Σ=Γ={0,1}\Sigma = \Gamma = \set{0, 1} and Q={s,0,1}Q = \set{s, 0, 1} with q0=sq_0 = s. Put δ(q,a)=a\delta(q, a) = a for all qq and aa, λ(s,a)=0\lambda(s, a) = 0, and λ(q,a)=1\lambda(q, a) = 1 if q=aq = a and 00 otherwise, for q∈{0,1}q \in \set{0, 1}. The state after reading a nonempty word is its last bit, so on 00100010 the output is 01000100: a 11 marks each bit equal to the bit before it. Non-example: consider a machine that writes 11 exactly when the number of 11's read so far is a perfect square. It is not a Mealy machine, because no finite set of states can store the information it needs. The output word always has the same length as the input word.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Alphabet concept
  2. Finite-state machine concept
  3. String concept
  4. Mealy machine definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Mealy_machine
About this page
TagCCNRC91FJ2
URIm2://CCNRC91FJ2
Kinddefinition
WritingW0 stub
MSC68Q45
DefinesMealy machine
UsesFinite-state machine, Alphabet, String
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.