Finitely Recognizable Languages
Brzozowski's Fixed Point Theorem tells us that every language is accepted by some state of some automaton. In particular, the language \(L\) is accepted by the state \(L\) in the Brzozowski automaton \(\mathcal A_{Brz}\). One issue with this theorem is that it doesn't tell you how big that automaton might be. In fact, it could be infinite for all we know!
But here's the thing: our goal in this course is to find a mathematical model of computers as they exist IRL. Physical computers are finite: the memory is finite, so the number of programs they can run is finite. If you'll recall, states are programs in our models of computers, so physical computers are like automata but with finitely many states!
This brings us to the question: which languages can be accepted by a state in a finite automaton?
In this first part of the course, the Automata and Languages part, we are going to focus our attention on the finitely recognizable languages, their properties, and how to program them, in the following sense: if you want to show that a language is finitely recognizable, then you need to find a finite automaton with a state that recognizes the language. We have already done this for a ton of different languages.
We have seen all sorts of finitely recognizable languages so far, because we have seen all sorts of finite automata. But we have also seen different types of automata: automata with properties like determinism and totality. We can also ask the question, which languages are accepted by total/deterministic automata? After all, physical computers are total and deterministic (think about this for a second). Nondeterminism probably came as a surprise when we allowed for it in our model of computation! So far, we've just used partiality and nondeterminism as a convenient tool for drawing smaller automata than the total deterministic ones. The languages recognized by each of these types of automata form families of languages, and it would be worthwhile to know which is which.
A word is a string of input letters. A language is a set of words. A family of languages is a set of sets of words. If this is a bit much, the following exercise may help to put families of languages into perspective.
- \(\mathsf{Fam}_1 = \big\{~ \{\}, \{\varepsilon\}, \{a\} ~\big\}\)
- \(\mathsf{Fam}_3 = \big\{~ \{b(ab)^n \mid n \in \mathbb N\}, \{(ab)^n \mid n \in \mathbb N\}~\big\}\)
- A bit more challenging: \[\begin{aligned} \mathsf{Fam}_3 &= \big\{ \quad \{\varepsilon\}, \\ &\hspace{3em} \{(ab)^nc \mid n \in \mathbb N\} \cup \{a(ba)^nc \mid n \in \mathbb N\}, \\ &\hspace{3em} \{(ba)^nc \mid n \in \mathbb N\} \cup \{b(ab)^nc \mid n \in \mathbb N\} \quad\big\} \end{aligned} \]
Altogether, we can split the languages we care about into three families.
- \(L\) is finitely recognizable if there is a finite automaton \(\mathcal A = (Q, A, \delta, F)\) (i.e., \(Q\) is finite) and a state \(x \in Q\) such that \(L = \mathcal L(\mathcal A, x)\). The family of finitely recognizable languages is \[ \mathsf{Fin} = \big\{ L \subseteq A^* \mid \text{\(L\) is finitely recognizable} \big\} \]
- \(L\) is deterministic finitely recognizable if there is a deterministic finite automaton \(\mathcal A = (Q, A, \delta, F)\) and a state \(x \in Q\) such that \(L = \mathcal L(\mathcal A, x)\). The family of deterministic finitely recognizable languages is \[ \mathsf{DFin} = \big\{ L \subseteq A^* \mid \text{\(L\) is deterministic finitely recognizable} \big\} \]
- \(L\) is total deterministic finitely recognizable if there is a total deterministic finite automaton \(\mathcal A = (Q, A, \delta, F)\) and a state \(x \in Q\) such that \(L = \mathcal L(\mathcal A, x)\). The family of total deterministic finitely recognizable languages is \[ \mathsf{TDFin} = \big\{ L \subseteq A^* \mid \text{\(L\) is total deterministic finitely recognizable} \big\} \]
Something you should notice immediately: every total deterministic automaton is a deterministic automaton, and every deterministic automaton is an automaton. This means implies that \[ \mathsf{TDFin} \subseteq \mathsf{DFin} \subseteq \mathsf{Fin} \] right off the bat! But what about the reverse inclusions?
In the next lecture, we are going to see that in fact, all three families of languages are equal!
Reachability and Local Finiteness
The Brzozowski automaton was most definitely an infinite automaton. But something very special happened in the Unravelling a Language problem: the states reachable from that particular language were finite in number, and using that fact we were able to show that that language is finitely recognizable. We just had to draw the finite automaton consisting of the states reachable from \(L = \{\varepsilon, aa, ba, cab, c, acab\}\), of which there are finitely many. The states reachable from a given state in an automaton form a subautomaton generated by the state.
Above, the notation \(\bigcup_{w \in A^*} \delta(x, w)\) is shorthand for the set \[ \bigcup_{w \in A^*} \delta(x, w) = \{y \mid \text{there is a word \(w \in A^*\) such that \(y \in \delta(x, w)\)}\} \] There is a lot of notation going on in that definition, but the idea is pretty simple: \(\langle x\rangle_{\mathcal A}\) is the automaton that you get by deleting all of the states that are not reachable from \(x\) by some path (of length \(0\) or more).
The definition of \(\delta_x\) just says that it has all the same transitions as \(\delta\) but restricted to \(Q_x\). Note that \(\langle x \rangle_{\mathcal A}\) has the same alphabet as \(\mathcal A\).
- Is the Reverse Naturals automaton locally finite?
- What if we replace \(l\) with the the input letter \(s\) that adds one instead of subtracts: \(n \xrightarrow{s} n + 1\)? What does the state diagram look like now? Is it locally finite?
We are not going to prove the theorem below (Brzozowski is Minimal) in this course. The proof would be a detour through several other concepts like bisimilarity and quotient automata, which would take us too far off course. It would be more appropriate in a course just about automata theory, but we have got places to be! But in any case, it is helpful to keep in mind, because it can guide you through the process of determining whther a language is total deterministic finitely recognizable or not.
Given a language \(L\) and a state \(x \in Q\) in a minimal total deterministic automaton \(\mathcal A\) such that \(L = \mathcal L(\mathcal A, x)\), \(\langle x \rangle_{\mathcal A}\) is the smallest automaton with a state that accepts \(L\). This is where the following theorem comes from.
It turns out that \(L_{a=b}\) is not accepted by any state in any finite automaton. We don't quite have the tools to prove this yet, though. (We will see those later when we talk about the Pumping Lemma for finite automata.)
- \(Q_x = \{ y \in Q \mid \text{there is a path \(x \xrightarrow{a_1} x_1 \xrightarrow{a_2} \cdots \xrightarrow{a_n} y\) in \(\mathcal A\)} \}\)
- for any \(y,z \in Q_x\), \(y \xrightarrow{a} z\) in \(\mathcal A\) if and only if \(y \xrightarrow{a} z\) in \(\langle x \rangle_{\mathcal A}\)
- for any \(y \in Q_x\), \(y\in F\) if and only if \(y \in F_x\)