Lemma. Completeness of the subset construction [00OE]
- February 9, 2024
- Jon Sterling
Let M be an NFA\varepsilon ; then \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}\subseteq \mathcal {L}{\mathopen {}\left (\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}\right )\mathclose {}}.
Proof.
- February 9, 2024
- Jon Sterling
We must show that any string u\in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}} lies in \mathcal {L}{\mathopen {}\left (\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}\right )\mathclose {}}.
Case. Empty string
- February 9, 2024
- Jon Sterling
If u=\epsilon , then we have assumed that s_{M}\xRightarrow {\epsilon }q such that q\in F_{M}; therefore, by definition, we have q\in s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}. Thus we have q\in s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\cap F_{M} and so it follows by definition that s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\in F_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}.
Case. Non-empty string
- February 9, 2024
- Jon Sterling
Suppose that u=a_1\cdots a_n, and so we have transitions s_{M}\xRightarrow {a_1}q_1\xRightarrow {\cdots } q_{n-1}\xRightarrow {a_n}q_n with q_n\in F_{M}.
We inductively define a sequence of states S_i in \mathcal {P}{\mathopen {}\left (M\right )\mathclose {}} as follows:
\begin {aligned} S_0 &= s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\\ S_{k+1} &= \delta _{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}{\mathopen {}\left (S_k,a_{k+1}\right )\mathclose {}} \end {aligned}Define q_0=s_{M}. Then for all 0\leq i \leq n, we observe that we have q_i\in S_i.
Subproof.
- February 9, 2024
- Jon Sterling
We proceed by induction on i. For i=0, we need s_{M}\in s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}; but this holds by definition. Next, assuming q_i\in S_i we must show that q_{i+1}\in S_{i+1} = \delta _{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}{\mathopen {}\left (S_i,a_{i+1}\right )\mathclose {}}. Unfolding definitions, this follows from the transition q_i\xRightarrow {a_{i+1}} q_{i+1} that we have assumed, as our inductive hypothesis ensures q_i\in S_i.
It follows from the above that we have transitions S_0=s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\xrightarrow {a_1}S_1\xrightarrow {\cdots }S_{n-1}\xrightarrow {a_n}S_n. Because we have shown q_n\in S_n and we have assumed q_n\in F_{M}, we have S_n\in F_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}. Thus it follows that \mathcal {P}{\mathopen {}\left (M\right )\mathclose {}} accepts u.