6.decidability Final
6.decidability Final
6.decidability Final
Decidable/Undecidable problems
B.Tech IV Semester
Nisha Vasudeva
Assistant Professor
Department of Computer Science Engineering & Information Technology
Arya College of Engineering & I.T.
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
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
sensitive
Context-
Context
Regular
Recursive
(DFA)
free
(PDA)
/@,R
0/,L
/,L 1/,L Hang when
/,L
input = 02n
/,L 1/,R
r1 p1 q1
Hang when input
@/,R
@/,R
,
0/,R
0/0,L = 0n 1 … 0n+m
/
1/1,L
0/0,R If the input x is in L,
r2 p4 p2 1/1,R q2
T halts with output 1.
If the input x is not in L,
/1,L
/0,L
/,L
,L
T hangs.
0 /
1/,L
/,L p3 h Hang when input
h
= 0n+m …0n
Arya College of Engg. & I.T 6
Recursively enumerable languages
• A language L is recursively enumerable if
there is a Turing machine T accepting L.
• A language L is Turing-acceptable if there is a
Turing machine T accepting L.
• Example:
{0n10n|n0} is a recursively-enumerable
language.
Then,L is recursive.
Arya College of Engg. & I.T 10
Recursive Languages are closed
under complementation
– If L is Recursive, L is also Recursive
M
“accept” “accept”
w M
w “reject” “reject”
M
“accept” “accept”?
w M
w “reject”
?