← back to Theory of Computation

Finite Automata

Maheshwari & Smid · Ch. 1 · Introduction to Theory of Computation

A deterministic finite automaton (DFA) is a 5-tuple (Q, Σ, δ, q0, F): finite states, an alphabet, a transition function, a start state, and accepting states. It reads a string one symbol at a time and either accepts or rejects. That is the simplest model of computation.

The five components

A DFA is defined by:

Example: strings ending in "01"

Over the alphabet {0, 1}, this DFA accepts exactly the strings that end with "01".

q0 q1 q2 q1 --> 0 q2 --> 1 1 0 q1 (curved below) --> 0 q0 (curved below) --> 1

Simulating a DFA

Scheme

Language recognition

The language of a DFA is the set of all strings it accepts. We write L(M) for the language recognized by machine M. A language is regular if some DFA recognizes it. Not all languages are regular: we will prove limits in Chapter 3.

Scheme

Notation reference

Symbol Meaning
QFinite set of states
ΣInput alphabet
δ(q, a)Transition function: state q reading symbol a
q0Start state
FSet of accepting (final) states
L(M)Language recognized by machine M
Neighbors