δ: Q x Σ → Q
This plays precisely the same role as a prototype in C++. It tells you what the possible inputs are and what the possible outputs are.Now for the sake of writing out the 5-tuple representing a machine in as legible a form as possible, I provide a table defining the function δ rather than truly reducing it to a sequence of symbols. This gives us the following definition of M1: \[ M1 = \left( \underbrace{\{q_0,q_1,q_2\}}_{\text{states}}, \underbrace{\{a,b\}}_{\text{alphabet}}, \underbrace{ \begin{array}{c|cc} & a & b\\ \hline q_0 & q_2 & q_1\\ q_1 & q_2 & q_1\\ q_2 & q_1 & q_2 \end{array} }_{\text{transitions}}, \underbrace{q_0}_{\text{start state}}, \underbrace{\{q_0,q_2\}}_{\text{accepting states}} \right) \ \ \ \longleftarrow\text{ 5-tuple representing M1} \]
As we discussed, a table is a common way to describe a function with finite domain. If we really want to represent an automaton as a linear sequence of characters, we can always go back to the OG definition of function and describe $\delta$ as the set of input/output ordered pairs. In this case we would get $\{ ((q_0,a),q_2), ((q_0,b),q_1), ((q_1,a),q_2), ((q_1,b),q_1), ((q_2,a),q_1), ((q_2,b),q_2)\}$. With this we get a complete specification of M1 as a sequence of symbols: \[ (\ \underbrace{\{q_0,q_1,q_2\}}_{Q}, \underbrace{\{a,b\}}_{\Sigma}, \underbrace{\{ ((q_0,a),q_2), ((q_0,b),q_1), ((q_1,a),q_2), ((q_1,b),q_1), ((q_2,a),q_1), ((q_2,b),q_2)\}}_{\delta}, \underbrace{q_0}_{s}, \underbrace{\{q_0,q_2\}}_{W} \ ) \]
For communication between us humans, we will prefer to use a table to represent the transition function.Anything satisfying the requirements of this definition is a finite automaton. With a formal definition like this, we'll be able to give formal proofs (which will generally be algorithms) about properties of finite automata.
| ![]() | |||
| ![]() | |||
| ![]() |