2. Syllabus
UNIT - V
Types of Turing machine: Turing machines and halting.
Undecidability: Undecidability, A Language that is Not
Recursively Enumerable, An Undecidable Problem That is
RE, Undecidable Problems about Turing Machines, Recursive
languages, Properties of recursive languages, Post's
Correspondence Problem, Modified Post Correspondence
problem, Other Undecidable Problems, Counter machines.
3. Undecidability
• Undecidable problems have no algorithm, regardless
of whether or not they are accepted by a TM that fails
to halt on some inputs.
• Undecidability: undecidable languages that cannot
be decided by any Turing Machine
4. A Simple Undecidable Problem
• We say this instance of PCP has a solution, if there is a
sequence of integers, i1, i2, …, im, that, when interpreted
as indexes for strings in the A and B lists, yields the same
string, that is, wi1wi2…wim = xi1xi2…xim.
• We say the sequence is a solution to this instance of PCP.
5. A Language that is Not Recursively
Enumerable
An example of a language which is not recursively
enumerable is the language L of all descriptions of
Turing machines which don't halt on the empty input.
6. Recursively Enumerable languages
Recursively Enumerable languages: If any Turing Machine can be designed to
accept all string of the given language, then the language is called recursively
enumerable language.
Recursively enumerable languages are the formal languages that can be decide-able, ( fully or
partially). According to the Chomsky hierarchy of formal languages, we can see the recursively
enumerable languages as a type 0 languages. some examples of recursively enumerable languages
are;
1. Recursive languages
2. Regular language is
3. Context sensitive languages
4. Context-free languages
7. Properties of Recursively enumerable
languages:
Concatenation: If L1 and If L2 are two recursive languages, their concatenation
L1.L2 will also be recursive.
L1= {anbncn|n>=0}
L2= {dmemfm|m>=0}
L3= L1.L2
= {anbncndm emfm|m>=0 and n>=0} is also recursive.
L1 says n no. of a’s followed by n no. of b’s followed by n no. of c’s. L2 says m
no. of d’s followed by m no. of e’s followed by m no. of f’s. Their concatenation
first matches no. of a’s, b’s and c’s and then matches no. of d’s, e’s and f’s. So it
can be decided by TM
Kleene Closure: If L1is recursive, its kleene closure L1* will also be
recursive. For Example:
L1= {anbncn|n>=0}
L1*= { anbncn||n>=0}* is also recursive.
8. Union of RE languages
Let’s revise union of sets;
Set 1={a, b, c}
Set 2={b, c, d}
Set 1 Union Set 2 = {a, b, c, d}
Now let’s understand the same concept in Turing Machine;
Suppose a system has 2 Turing Machines, TM1, and TM2.
• If TM1 halts then all the system halts.
• If TM1 crash then system checks that TM2 is ready to halt or not? If TM2 halts then
system halts because this is union and the union means that
◦ If TM1 halts then system halts
◦ If TM1 does not halt, and TM2 halts then system halts
◦ If TM1 and TM2 or TMn halts then system halts
9. The intersection of RE language
Set 1={a, b, c}
Set 2={b, c, d}
Set 1 Intersection Set 2 = {b, c}
Now let’s understand the same concept in Turing Machine;
Suppose a system has 2 Turing Machines, TM1, and TM2.
• If TM1 crash then all the system crash.
• If TM1 halts then system checks that TM2 is ready to halt or not? After this, If TM2
halts then system halts because this is intersection and the intersection means that
◦ If TM1 crash then system crash
◦ If TM1 halts then check TM2 or TMn, and if TM2 is also halted, the system halts.
◦ If TM1 and TM2 or TMn crash then the system crash
10. The complement of RE languages
Suppose a system has 2 Turing Machines, TM1, and TM2.
• If TM1 crash then all the system crash.
• If TM1 halts then system check TM2 or TMn. If TM1 halts and TM2 also
halts then system crash.
• If TM1 halts then system check TM2 or TMn. If TM1 halts and TM2 crash
then system halts.
11. Post’s Correspondence Problems
(PCP)
Post’s Correspondence Problems (PCP): An instance of
PCP consists of two lists of strings over some alphabets
• The two lists are of equal length, denoted as A and B.
• The instance is denoted as (A, B).
• We write them as A = w1, w2, …, wk B = x1, x2, …, xk
for some integer k.
• For each i, the pair (wi, xi) is said a corresponding
pair.
12. PCP Instances
• PCP Instances :An instance of PCP is a list of pairs of
nonempty strings over some alphabet Σ Say (w1, x1), (w2,
x2), …, (wn, xn).
• The answer to this instance of PCP is “yes” if and only if
there exists a nonempty sequence of indices i1,…,ik, such
that wi1…win = xi1…xin.
15. Modified Post Correspondence
Problem (MPCP)
Definition: First pair in the A and B lists must be the first pair
in the solution, i.e., the problem is to determine if there is a
sequence of zero or more integers i1, i2, …, im such that:
w1wi1 wi2 …wim = x1xi1 xi2 …xim
17. Counter Machine
A Counter Machine M = (K, Σ, ∆, s, F)
K is a set of states
Σ is the input alphabet
s ∈ K is the start state
F ⊂ K are Final states
∆ ⊆ ((K × (Σ ∪ ǫ) × {zero,¬zero}) × (K × {−1, 0, +1})) Accept if
you reach the end of the string, end in an accept state, and have an
empty counter.
18. Contd..
• Give a Non-Deterministic Finite Automata a counter
• Increment the counter
• Decrement the counter
• Check to see if the counter is zero