Definition (deterministic finite automaton, regular language)
A deterministic finite automaton (DFA) is a tuple $D = (Q, Σ, δ, q_0, F)$ where
-
$Q$ is a non-empty finite set (of states);
-
$Σ$ is a non-empty finite set (the alphabet);
-
$δ: Q\times Σ\to Q$ (the transition function);
-
$q_0 \in Q$ (the start state); and
-
$F\subseteq Q$ a subset (of accepting states).
Extend $δ$ to $\hat δ: Q\times{}$$Σ^\ast$${}\to Q$ by $$ \begin{align*} \hat δ(q, ε) = q, \qquad \hat δ(q, wa) = δ(\hat δ(q, w), a). \end{align*} $$
For every word $w=a_0 a_1 \ldots a_n\in \mathbb{W}$, the state sequence of the computation is $$ \begin{alignat}{1} q_0 & &&= \hat δ(q_0, ε), \\ q_1 &= δ(q_0, a_0) &&= \hat δ(q_0, a_0), \\ q_2 &= δ(q_1, a_1) &&= \hat δ(q_0, a_0 a_1), \\ \vdots \\ q_{n+1} &= δ(q_n, a_n) &&= \hat δ(q_0, a_0 a_1 \ldots a_n) = \hat δ(q_0, w). \end{alignat} $$
The language of $D$ is $$ \begin{align*} \mathcal{L}(D) = \sb{w\in Σ^\ast}{\hat δ(q_0, w) \in F}. \end{align*} $$
A language $L\subseteq Σ^\ast$ is regular if it is accepted by a DFA.
We can represent a DFA using a transition diagram
or a transition table
![]()
or a transition table