0% found this document useful (0 votes)
185 views

Lecture 17. Closure Properties of Recursive and R.E. Languages

The document discusses closure properties of recursive and recursively enumerable (r.e.) languages. It states that the class of recursive languages is closed under complementation, union, concatenation, Kleene star, and intersection. It also notes that the class of r.e. languages is closed under union, concatenation, Kleene star, and intersection, but not complementation. Proofs are provided that use Turing machines to show recursive languages are closed under union and concatenation.

Uploaded by

wenqiang0716
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)
185 views

Lecture 17. Closure Properties of Recursive and R.E. Languages

The document discusses closure properties of recursive and recursively enumerable (r.e.) languages. It states that the class of recursive languages is closed under complementation, union, concatenation, Kleene star, and intersection. It also notes that the class of r.e. languages is closed under union, concatenation, Kleene star, and intersection, but not complementation. Proofs are provided that use Turing machines to show recursive languages are closed under union and concatenation.

Uploaded by

wenqiang0716
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/ 4

Lecture 17. Closure properties of recursive and r.e.

languages

Theorem 1 The class of recursive languages is closed un-


der
1. complementation
2. union
3. concatenation
4. Kleene star (proof similar to (3))
5. intersection, (proof similar to (2))

Note: the set of context-free languages is not closed under com-


plementation, but the set of recursive languages is closed under
complementation.

1
If L1 and L2 are recursive, then L1 ∪ L2 is recursive.
Proof:
• Let L1 and L2 be two recursive languages.
• Then there exists two Turing machines M1 and M2 that
decides M1 and M2, respectively.
• Construct a new 2-tape Turing machine M that operates
as follows:
1. Copy the input string w from the first tape to the second
tape.
2. Simulate M1 on the first tape. If M1 halts at y, then
M halts at y. If M1 halts at n, proceed to step 3.
3. Simulate M2 on the second tape. If M2 halts at y, then
M halts at y. If M2 halts at n, then M also halts at n.
• Verify that M indeed decides L1 ∪ L2:
· If w ∈ L1 ∪ L2 ⇒ w ∈ L1 or w ∈ L2 ⇒ (M1 halts at y)
or (M2 halts at y) ⇒ M halts at y.
· If w ∈
/ L1 ∪ L2 ⇒ w ∈ / L1 and w ∈/ L2 ⇒ (M1 halts at
n) and (M2 halts at n) ⇒ M halts at n.

2
If L1 and L2 are recursive, then L1L2 is recursive.
Proof:
• Let L1 and L2 be two recursive languages.
• Then there exists two Turing machines M1 and M2 that
decides M1 and M2, respectively.
• Construct a nondeterministic 2-tape Turing machine which
operates as follows:
1. nondeterministically splits w into two strings x and y
such that w = xy, then copy y to the second tape
(leaving x on the first tape).
2. Simulate M1 on the first tape. If M1 halts at n, then
this computation of M rejects w. If M1 halts at y, then
M continues to simulate M2 on the second tape. If M2
halts at y, then M accepts w. If M2 halts at n, then
again this computation rejects w.
• Verify that M indeed decides L1L2:
· If w ∈ L1L2 ⇒ there exists x and y such that w = xy
where x ∈ L1 and y ∈ L2 ⇒ M can choose to split w = xy,
which will allow it to lead to M1 accepts x and M2 accepts
y, thus M accepts w in that computation, thus w ∈ L(M ).
· If w ∈
/ L1L2 ⇒ for all x and y such that w = xy either
x∈ / L1 or y ∈
/ L2 ⇒ for all x and y, either M1 rejects x or
M2 rejects y. Thus M rejects w, and w ∈ / L(M ).

3
Closure properties of r.e. languages

Theorem 2 The class of r.e. languages is closed under


1. union,
2. concatenation,
3. Kleene star,
4. intersection.

Proof: For concatenation and Kleene star, use nondeterminism


similarly as in the proof of recursive languages being closed
under concatenation.
For union and intersection, see Question Bank.

Note: The class of r.e. languages is not closed under comple-


mentation. (example later).

You might also like