You are on page 1of 15

Undecidability

1
Objectives:

 To understand the concept of Undecidability

 To analyze the properties of recursive languages

 To analyze the properties of recursively enumerable


languages

2
Decidability vs. Undecidability
 There are two types of TMs (based on halting):
Recursive
TMs that always halt, no matter accepting or non-accepting
 DECIDABLE PROBLEMS

Recursively enumerable
TMs that are guaranteed to halt only on acceptance. If
non-accepting, it may or may not halt (i.e., could loop
forever).

 Undecidability:
 Undecidable problems are those that are not recursive

3
Recursive, RE, Undecidable languages
No TMs exist
TMs that always halt
LBA
Non-RE Languages TMs that may or
(all other languages for which may not halt
no TMs can be built)

Enumerable (RE)
Recursively
Regular Context-

sensitive
Context

Recursive
(DFA)
free
(PDA)

“Undecidable” problems
“Decidable” problems
4
Recursive Languages &
Recursively Enumerable (RE)
languages
 Any TM for a Recursive language is going to
look like this:
“accept”
w
M
“reject”

 Any TM for a Recursively Enumerable (RE)


language is going to look like this:
“accept”
w
M

5
Closure Properties

6
Recursive Languages are closed
under complementation
 If L is Recursive, L is also Recursive

M
“accept” “accept”
w
w M
“reject” “reject”

7
Are Recursively Enumerable
Languages closed under
complementation? (NO)
 If L is RE, L need not be RE

M
“accept” “accept” ?
w
w M
“reject”
?

8
Recursive Langs are closed
under Union
 Let Mu = TM for L1 U L2
 Mu construction: Mu
accept
1. Make 2-tapes and copy M1 reject
input w on both tapes OR
2. Simulate M1 on tape 1 w accept
M2
3. Simulate M2 on tape 2 reject

4. If either M1 or M2
accepts, then Mu
accepts
5. Otherwise, Mu rejects.

9
Recursive Langs are closed
under Intersection
 Let Mn = TM for L1  L2
 Mn construction: Mn
accept
M1
1. Make 2-tapes and reject
copy input w on both AND
AND
tapes w accept
2. Simulate M1 on tape 1 M2 reject
3. Simulate M2 on tape 2
4. If M1 AND M2 accepts,
then Mn accepts
5. Otherwise, Mn rejects.

10
Recursive Language
 Theorem: If both L and its
complement are RE, then L is
recursive
 Proof: M
1. Make 2-tapes and copy input L
Accept
M1
w on both tapes w
Accept

2. Simulate M1 on tape 1
M2
3. Simulate M2 on tape 2 Accept Reject
L
4. If w is in L, M1 will accept.
Hence M accepts & halts
5. If w is not in L, then M2 will
accept. Then M halts without
accepting.
6. Thus, for all inputs, M halts.
Hence M is recursive.

11
Other Closure Property
Results
 Recursive languages are also closed under:
 Concatenation
 Kleene closure (star operator)
 Homomorphism, and inverse homomorphism
 RE languages are closed under:
 Union, intersection, concatenation, Kleene closure

 RE languages are not closed under:


 complementation

12
The Halting Problem

Non-RE Languages

Enumerable (RE)
x

Recursively
Regular Context-

sensitive
Context

Recursive
(DFA)
free
(PDA)

13
The Diagonalization Language

Example of a language that is


not recursive enumerable

(i.e, no TMs exist)


14
The Diagonalization language

The Halting Problem

Non-RE Languages

Enumerable (RE)
Recursively
Regular Context-

sensitive
Context

Recursive
(DFA)
free
(PDA)

15

You might also like