x ∈ L(Mc) = < defn of L(Mc) > δ*(q0,x) ∈ Q−F = < s ∈ Q−F ≡ s ∉ F > δ*(q0,x) ∉ F = < defn of L(M) > x ∉ L(M) = < z ∉ T ≡ z ∈ Tc > x ∈ Lc |
Section 3.1: REG is closed under complement. That is, if L ⊆ Σ* is a regular language, then so is its complement Lc = Σ* − L.
The construction is simple. Let L = L(M), where M = (Q, Σ, δ q0, F). Then Lc = L(Mc), where Mc = (Q, Σ, δ, q0, Q−F). Notice that M and Mc agree in their state set, transition function, and initial state. The only difference between them is that each state's status in M (accepting vs. nonaccepting) is the opposite of its status in Mc.
To prove that L(Mc) = Lc it suffices to show that, for an arbitrary string x ∈ Σ*, x being a member of L(Mc) is equivalent to x being a member of Lc. Such a proof appears to the right.
Section 3.2: REG is closed under intersection. That is, if L1, L2 ⊆ Σ* are regular languages, then so is their intersection L1 ∩ L2. To show this, we can use the Cartesian Product construction.
The construction is as follows: For i = 1,2, let Li = L(Mi), where Mi = (Qi, Σ, δi, qi,0, Fi).
Construct the new DFA M like this: M = (Q1×Q2, Σ, δ, [q1,0,q2,0], F1×F2), where, for every p ∈ Q1, r ∈ Q2, and a ∈ Σ: δ([p,r],a) = [δ1(p,a),δ2(r,a)].
What this construction gives us is this relationship between the three DFAs at issue:
Lemma 1: For all p,q ∈ Q1 and r,s ∈ Q2 and every string x ∈ Σ*:
[p,r] ⟶x [q,s] (in M) if and only if p ⟶x q (in M1) and r ⟶x s (in M2).
Using the extended transition functions, this is the same as saying
δ*([p,r], x) = [q,s] (in M) if and only if δ*1(p, x) = q (in M1) and δ*2(r, x) = s (in M2).
How one can prove this is addressed below. For the moment, assume that it is true. Then we can argue persuasively that L(M) = L(M1) ∩ L(M2) like this:
x ∈ L(M1) ∩ L(M2) = < defn of L(Mi), i=1,2 > δ1*(q1,0,x) ∈ F1 and δ2*(q2,0,x) ∈ F2 = < a ∈ T ≡ there exists b ∈ T such that a = b > there exist s ∈ F1 and t ∈ F2 such that δ1*(q1,0,x) = s and δ2*(q2,0,x) = t = < Lemma 1 > there exist s ∈ F1 and t ∈ F2 such that δ*([q1,0,q2,0], x) = [s,t] = < a ∈ S and b ∈ T ≡ [a,b] ∈ S×T > δ*([q1,0,q2,0], x) ∈ F1×F2 = < defn of L(M) > x ∈ L(M) |
... to be continued