Finite Automaton

3 min read Last updated Tue Jun 09 2026 19:59:41 GMT+0000 (Coordinated Universal Time)

Aka. FA. A machine with:

  • A finite number of states
  • Has one or more starting states
  • Transitions based on input symbols
  • Optionally has some accepting states

For each state and input symbol, exactly one transition exists.

A finite automaton is a 5-tuple M=(Q,Σ,q0,A,δ)M = (Q, \Sigma, q_0, A, \delta).

Where:

  • QQ is a finite set of states
  • Σ\Sigma is a finite input alphabet
  • q0Qq_0 \in Q is the start state
  • AQA \subseteq Q is the set of accepting states
  • δ:Q×ΣQ\delta : Q \times \Sigma → Q is the transition function

FA with Outputs

Traditionally FAs are concerned with accepting or rejecting strings. But they can also generate outputs from an output alphabet. Will be covered in Moore Machines and later.

Used when systems must generate outputs while processing input sequences. Common in digital circuits, controllers, and reactive systems.

Transition Function

Denoted by δ\delta. It maps a state and an input symbol to the next state.

Extended Transition Function

Denoted by δ\delta^*. Handles strings instead of each symbol. δ(q,x)\delta^*(q, x) is the state reached after reading string xx starting from state qq.

Acceptance by an FA

A string is accepted iff the machine ends in an accepting state after reading it.

The language accepted by MM is L(M)={xΣx  is accepted by  M}L(M) = \set{ x \in Σ^* | x\;\text{is accepted by}\;M }

Representations of FA

Transition Diagram

FA is represented as a directed graph with labelled edges.

  • Vertices are states
  • Labeled edges are transitions
  • Start state is marked
  • Accepting states are double-circled

Transition Table

Rows represent current states. Columns represent input symbols. Entries give next states.

Conversion with Regular Expressions

To a Regular Expression

  • Start by analyzing the FA’s structure.
  • Identify paths and loops to construct the RE.
  • This process can be complex for larger FAs.

From a Regular Expression

  • Identify repititive elements.
  • Identify components such as union, concatenation, and Kleene star.
  • Create states to represent these components and transitions based on the structure of the RE.

Kleene’s Theorem

A language LΣL \subseteq \Sigma^* is regular iff there exists a finite automaton that accepts LL.

Every FA has an equivalent regular expression. And vice versa.

Other Important Thoerems

Theorem 1

If a language has nn distinguishable strings, the FA must have at least nn states.

Theorem 2

Language of palindromes over any alphabet Σ\Sigma is not regular because a FA has fixed number of states and it’s not enough to check for palindromes.

Set Operations on FA

Suppose M1=(Q1,Σ,q1,A1,δ1)M_1 = (Q_1, \Sigma, q_1, A_1, \delta_1) and M2=(Q2,Σ,q2,A2,δ2)M_2=(Q_2, \Sigma, q_2, A_2, \delta_2) are FAs accepting languages L1L_1 and L2L_2 respectively.

Let:

M=(Q1×Q2,Σ,(q1,q2),A,δ)δ((p,q),a)=(δ1(p,a),δ2(q,a))\begin{aligned} M &=(Q_1 \times Q_2, \Sigma, (q_1, q_2), A, \delta) \\ \delta((p,q), a) &= (\delta_1(p, a), \delta_2(q, a)) \end{aligned}

Based on how AA1×A2A \subseteq A_1 \times A_2 is defined, MM can accept different languages: L1L2L_1 \cup L_2 or L1L2L_1 \cap L_2 or L1L2L_1 - L_2.

Was this helpful?