0% found this document useful (0 votes)
7 views2 pages

Regular Proofs

Uploaded by

Murtaza Tunio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Regular Proofs

Uploaded by

Murtaza Tunio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1 Closure Properties

Closure Properties

• Recall that we can carry out operations on one or more languages to obtain a new language

• Very useful in studying the properties of one language by relating it to other (better under-
stood) languages

• Most useful when the operations are sophisticated, yet are guaranteed to preserve interesting
properties of the language.

• Today: A variety of operations which preserve regularity

– i.e., the universe of regular languages is closed under these operations

Definition 1. Regular Languages are closed under an operation op on languages if

L1 , L2 , . . . Ln regular =⇒ L = op(L1 , L2 , . . . Ln ) is regular

1.1 Boolean Operators


Operations from Regular Expressions

Proposition 2. Regular Languages are closed under ∪, ◦ and ∗ .


Proof. (Summarizing previous arguments.)
• L1 , L2 regular =⇒ ∃ regexes R1 , R2 s.t. L1 = L(R1 ) and L2 = L(R2 ).

– =⇒ L1 ∪ L2 = L(R1 ∪ R2 ) =⇒ L1 ∪ L2 regular.
– =⇒ L1 ◦ L2 = L(R1 ◦ R2 ) =⇒ L1 ◦ L2 regular.
– =⇒ L∗1 = L(R1∗ ) =⇒ L∗1 regular.

Closure Under Complementation

Proposition 3. Regular Languages are closed under complementation, i.e., if L is regular then
L = Σ∗ \ L is also regular.
Proof. • If L is regular, then there is a DFA M = (Q, Σ, δ, q0 , F ) such that L = L(M ).

• Then, M = (Q, Σ, δ, q0 , Q \ F ) (i.e., switch accept and non-accept states) accepts L.

What happens if M (above) was an NFA?


Closure under ∩

1
Proposition 4. Regular Languages are closed under intersection, i.e., if L1 and L2 are regular
then L1 ∩ L2 is also regular.

Proof. Observe that L1 ∩ L2 = L1 ∪ L2 . Since regular languages are closed under union and
complementation, we have

• L1 and L2 are regular

• L1 ∪ L2 is regular

• Hence, L1 ∩ L2 = L1 ∪ L2 is regular.

Is there a direct proof for intersection (yielding a smaller DFA)?


Cross-Product Construction
Let M1 = (Q1 , Σ, δ1 , q1 , F1 ) and M2 = (Q2 , Σ, δ2 , q2 , F2 ) be DFAs recognizing L1 and L2 , respec-
tively.
Idea: Run M1 and M2 in parallel on the same input and accept if both M1 and M2 accept.
Consider M = (Q, Σ, δ, q0 , F ) defined as follows

• Q = Q1 × Q2

• q0 = hq1 , q2 i

• δ(hp1 , p2 i, a) = hδ1 (p1 , a), δ2 (p2 , a)i

• F = F1 × F2

M accepts L1 ∩ L2 (exercise)
What happens if M1 and M2 where NFAs? Still works! Set δ(hp1 , p2 i, a) = δ1 (p1 , a) × δ2 (p2 , a).
An Example

1
1
q00 0 0 q00 q01
1 1
0 0 × q01 q11 = 0 0 0 0
1 1
q10 q10 q11
1
1

You might also like