Lemma. The pumping lemma for DFAs [018M]
- February 16, 2025
- Jon Sterling
Let M be a deterministic finite automaton. Then the cardinality \mathord {\#}{Q_{M}} of the set of states of M satisfies the pumping property with respect to \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}.
Proof.
- February 16, 2025
- Jon Sterling
Let \ell =\mathord {\#}{Q_{M}} for short. To show that \ell satisfies the pumping property with respect to \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}, we fix a string w\in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}} with {\mathopen {}\left \lvert w\right \rvert \mathclose {}}\geq \ell which we must deconcatenate into some pumping bracket {\mathopen {}\left (u_1,v,u_2\right )\mathclose {}} in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}} such that {\mathopen {}\left \lvert u_1v\right \rvert \mathclose {}}\leq \ell .
Letting n={\mathopen {}\left \lvert w\right \rvert \mathclose {}}, we know that w=a_1\ldots a_n and that we have a transition path of the following form in M:
s_{M}=q_0\mathrel {\xrightarrow {a_1}} q_1\mathrel {\xrightarrow {a_2}} q_2\cdots \mathrel {\xrightarrow {a_n}}q_n\in F_{M}We focus on just the first \ell transitions in the path above, which pass through \ell +1 states:
s_{M}= \overbrace { \underbrace { q_0\mathrel {\xrightarrow {a_1}} q_1\mathrel {\xrightarrow {a_2}} q_2\cdots \mathrel {\xrightarrow {a_\ell }}q_\ell }_{\text {$\scriptstyle \ell $ transitions through $\scriptstyle \ell +1$ states}} \cdots \mathrel {\xrightarrow {a_n}}q_n }^{\text {$\scriptstyle n$ transitions through $\scriptstyle n+1$ states}} \in F_{M}Because there are no more than \ell states total in M, we know for sure that in the depicted prefix, there must be at least one state visited twice—or, in other words, we must have some 0\leq i<j\leq \ell such that q_i=q_j. We can therefore decompose the entire transition sequence as w=u_1 v u_2 where u_1 = a_1\ldots a_i, v=a_{i+1}\ldots a_j, and u_1 = a_{j+1}\ldots a_n as depicted below:
s_{M}=q_0\mathrel {\vphantom {\xrightarrow {u_1}}\smash {\xrightarrow {u_1}}^*} q_i \mathrel {\vphantom {\xrightarrow {v}}\smash {\xrightarrow {v}}^*} q_j\mathrel {\vphantom {\xrightarrow {u_2}}\smash {\xrightarrow {u_2}}^*} q_n \in F_{M}We know that {\mathopen {}\left \lvert u_1 v\right \rvert \mathclose {}}\leq \ell because i<j\leq \ell . It remains to check that we can repeat the central component v any number of times (including zero), i.e. that for all n:\mathbb {N} we have u_1vu_2\in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}. But this is immediate because q_i=q_j, and so the transition path q_j\mathrel {\vphantom {\xrightarrow {u_2}}\smash {\xrightarrow {u_2}}^*} q_n can occur after any number of round-trips consuming v each time.