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

Undecidablity

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)
36 views

Undecidablity

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/ 9

Theory of Computation

UNDECIDABILITY & RECURSIVELY ENUMERABLE


LANGUAGES
Recursive and Recursively Enumerable Languages, Undecidability, Halting Problem, Post
Correspondence Problem, Rice‟s Theorem, Greaibach theorem, Linear Bounded Automata.

Recursive and Recursively enumerable languages

The language that is accepted by Turing Machine is called as Recursively enumerable language.
It is also called as Turing acceptable language.

 Recursive language :

A language L € ∑* is said to be Recursive language or Turing decidable if there is a Turing


machine T that accepts every word in L and rejects every word in L‟. In other words a language
is recursive if and only if there exists a algorithm for it.

Accept (T) = L

Reject (T) =L‟

Loop(T) =

Properties of Recursive languages:

 The complement of a recursive language is recursive.


 The union of two recursive language is recursive.
 Every Context Sensitive language is recursive.
 Recursively enumerable language :

A language L € ∑* is said to be Turing acceptable if there is a Turing machine T that accepts


every word in L and either rejects or loops for every word in language L‟.

Accept (T) = L

Reject (T)+ loop (T) =L‟

A language L is Recursively enumerable if there is a TM that accepts L, and recursive if there is


a TM that recognizes L. These languages are called as Turing acceptable and Turing
Decidable.

Recursive Language Recursively Enumerable Language

Prepared by :Rohini Patil Page 1


Theory of Computation

The language L is recursive The language L is Recursively Enumerable


Language
The language L is Turing Decidable. The language L is Turing acceptable

There exists an algorithm for it. No such algorithm exists.

Every Turing Decidable language is Turing Every Turing acceptable language need not be
acceptable Turing Decidable

We can make following observations for the languages

 Each Turing Decidable language is Turing Acceptable.


 Each Turing Acceptable language is need not to be Turing Decidable.
 There are some languages which are neither Turing Acceptable nor Turing Decidable

 Decidable and Undecidable:

A Problem whose language is recursive is said to be decidable otherwise it is undecidable.


Undecidable means there is no algorithm which takes the input and finds the answer as either
„yes „ or „no‟.

Undeciadability:

A class of problems is said to be decidable if there exists some definite algorithm which always
terminates with the correct answer. We can also say that the problem is decidable if there exists a
Turing machine which gives correct answer for every statement in the domain of the problem.
The class of problems for which there is no Turing Machine that gives correct answer for every
input instance said to be undecidable problems. These problems are also called as unsolvable
problems. Some examples of undecidable problems are:

1. Halting Problem

Prepared by :Rohini Patil Page 2


Theory of Computation

2. Post Correspondence problem


3. Diagonalization language

Any problem can be proved to be undecidable using the reduction method.

Halting Problem:

For a given configuration of a TM two cases aries:

1] The machine starting at this configuration will halt after a finite no of steps.

2] The machine starting at this configuration will never halt.

The halting problem states that:

Given Turing machine M with the input ‘dT’ will ever halt or not is called as Halting
problem.

In reality, there is no Turing machine which takes any other Turing machine as input and decides
whether it halts or not. Therefore the Halting problem is unsolvable.

Proof:

Assume that the Halting problem is proved using contradiction. Consider a Turing machine A,
which takes configuration of any other Turing machine T and the input as (t,dT). So, the Turing
machine A can determine whether the Turing machine T will ever halt or not for a given input.

For every input (t,dT) to „A‟ if the Turing machine T halts for input „t‟ ,‟A‟ reaches to “accept
halt” if the Turing machine T does not halts for input „t‟ ,‟A‟ reaches to “reject halt”. This
working of Turing machine A is shown in figure:

Now, we will construct another Turing machine B with both the input as dT. first copies input dT
to „A‟ with one modification .i.e. whenever „A‟ reach to an “accept halt” „B‟ Loops forever.
whenever „A‟ reach to an “reject halt” „B‟ Halts. It loops if „T’ halts for input t=dT while it
halts if „T’ does not halts for input t=dT

Prepared by :Rohini Patil Page 3


Theory of Computation

Now we will construct another Turing machine B Such that T=B with input. Then we get „B’
halts for input t=dB if and only if „B’ does not halts for input t=dB and loops forever if and
only if „B’ halts for input t=dB This is the contradiction. Hence we can conclude that machine
A does not exists. Thus, the Halting problem is unsolvable.

Post Correspondence Problem:

The Post Correspondence Problem can be stated as,

Given two lists A and B:

A = x1, x2, x3…, xk

B = y1, y2, y3…, yk

of non empty strings over an alphabet ∑ .

The problem is to determine if there is a sequence of one or more integers i1, i2, …, im such that:

xi1xi2…xim = yi1yi2…yim

where(xi,yi) is called a corresponding pair.

Example 1: Find the solution for the following instances of PCP.

x = {b, babbb, ba} y = {bbb, ba, a} have a solution?

Prepared by :Rohini Patil Page 4


Theory of Computation

Solution:

We have to find such sequence using which if we list out the elements of A and B then it will
generate same strings.

1] Consider the sequence (2, 1, 1)

x2 x1 x1= y2 y1 y1

bbbbbba = bbbbbbba

2] Consider the sequence (2, 1, 1, 3)

x2 x1 x1 x3 = y2 y1 y1 y3

babbbbbba = babbbbbba

Thus, x2 x1 x1 x3 = y2 y1 y1 y3

Thus the PCP has the solution and sequence is (2, 1, 1, 3)

Example 2: Does the PCP with two lists

A = {10, 011, 101} B = {101, 11, 011} have a solution? Justify your answer.

Solution:

1] Consider the sequence (1, 3, 1)

A1 A3 A1 = B1 B3 B1

1010110 = 101011

2] Consider the sequence (1,1,3)

A1 A1 A3 = B1 B1 B3

1010101 = 1010011

As there are two strings that start from 10 in „A‟

Therefore the choice of index 1 becomes (1,1)

A->1010
B->101101

The choice of index 3 becomes (1,3)

A->10101

Prepared by :Rohini Patil Page 5


Theory of Computation

B->101011

Still the strings are not identical. After this step we have only one choice of the sequences to
select , (3,3). But still produce dissimilar strings. Thus this PCP instance has no solution.

Example 3:Determine the solution for the following instance of the PCP

A = {01, 110010, 1, 11}

B = {0,0, 1111,01}

Solution:

1]Consider the sequence (1, 3, 2, 4, 4, 3)

A1 A3 A2 A4 A4 A3 = B1 B3 B2 B4 B4 B3

01111001011111 = 01111001011111

Thus, A1 A3 A2 A4 A4 A3 = B1 B3 B2 B4 B4 B3

Thus the PCP has the solution and sequence is (1, 3, 2, 4, 4, 3)

Example 4:Does the PCP with two lists

A = {100,0,1} B = {1,100,00} have a solution?

Solution:

1] Consider the sequence (1,3,1,1,3,2,2)

A1 A3 A1 A1 A3 A2 A2 = B1 B3 B1 B1 B3 B2 B2

1001100100100= 1001100100100

Thus, A1 A3 A1 A1 A3 A2 A2 = B1 B3 B1 B1 B3 B2 B2

Thus the PCP has the solution and sequence is,(1,3,1,1,3,2,2)

Rice’s Theorem:

There are several other problems which are undecidable. We can use the reduction technique to
show the problem is undecidable. Such problems include State entry problem whether given
Turing Machine M enter in a particular state or not.

For a Turing machine M, L(M) is nonempty?

For a Turing machine M, L(M) is finite?

Prepared by :Rohini Patil Page 6


Theory of Computation

For a Turing machine M, L(M) is regular?

For a Turing machine M, L(M) is recursive?

Rice‟s theorem is generalization of all above problems.

Theorem: Every non-trivial property of recursively enumerable languages is undecidable.

Proof: The property which is true for some recursively enumerable languages and which is
false for other recursively enumerable languages is called as non-trivial property.

Let x be a nontrivial property that is not possessed by all recursively enumerable languages. This
problem can be reduced by consisting pair of (M,w) such that L possesses x iff w € L(M).We
take a UTM U that takes pair of (M,w) its output is yes iff x is possessed by L.

As L is recursively enumerable language, there must be a TM that accepts x€L. Now we design
machine M‟ to decide x as shown below.

UTM U takes pair s(M,w) and checks if w € L(M).It O/P is “yes” then machine M L accepts the
string x & O/P of machine M‟ is “yes”. Thus possessing the trivial property reduces the problem
of Lu. Since Lu is not recursive therefore possession of x by L is also not decidable.

Greibach Theorem:

Greibach's theorem states that certain properties of formal language classes are undecidable. It is
used to prove that problems related to CFG are undecidable.

Theorem:

Greibach's theorem is independent of a particular approach to describe a formal language. It just


considers a set C of formal languages over an alphabet Σ∪{#} such that

 Each language in C has a finite description,


 Each regular language over Σ∪{#} is in C,
 Given descriptions of languages L1, L2 ∈ C and of a regular language R ∈ C, a description of
the products L1R and RL1, and of the union L1∪L2 can be effectively computed, and

Prepared by :Rohini Patil Page 7


Theory of Computation

 It is undecidable for any member language L ∈ C with L ⊆ Σ* whether L = Σ*.


Let P be any nontrivial subset of C that contains all regular sets over Σ∪{#} and is closed under
quotient by each single symbol in Σ∪{#}. Then the question whether L ∈ P for a given
description of a language L ∈ C is undecidable.
Proof:
Let M ⊆ Σ*, such that M ∈ C, but M ∉ P. For any L ∈ C with L ⊆ Σ*, define φ(L) = (M#Σ*) ∪
(Σ*#L). From a description of L, a description of φ(L) can be effectively computed.
Then L = Σ* if and only if φ(L) ∈ P:

 If L = Σ*, then φ(L) = Σ*#Σ* is a regular language, and hence in P.


 Else, some w ∈ Σ* \ L exists, and the quotient φ(L)/(#w) equals M. Therefore, by repeated
application of the quotient-closure property, φ(L) ∈ P would imply M = φ(L)/(#w) ∈ P,
contradicting the definition of M.
Hence, if membership in P would be decidable for φ(L) from its description, so would be L‟s
equality to Σ* from its description, which contradicts the definition of C.

Linear Bounded Automaton (LBA):

A linear bounded automaton is a non deterministic TM which has a single tape whose length is not
infinite but bounded by a linear function of length of the input string. The set of strings accepted by
non deterministic LBA is the set of string generated by the context sensitive grammar excluding null
string.
A linear bounded automaton (LBA) is a restricted form of Turing machine, with following
restrictions
 The input tape includes two special symbols as left end marker (<) and right end marker
(>) to indicate the end on both of the sides.
 The head is not allowed to move beyond the end marker.
 The head is not allowed to change these end marker.
LBA Model consists of:

1. Input tape

2. Working tape

LBA can be denoted by, M = (Q, ∑, Γ, δ, q0, F,<,>)

Where < and > are the symbol of ∑.

Prepared by :Rohini Patil Page 8


Theory of Computation

May-2014(CBGS)
1 Write short note on Rice‟s theorem 05
2 Write short note on Recursive and Recursively Enumerable languages. 05
Dec-2014(CBGS)
1 Compare Recursive and Recursively Enumerable languages 05
May-2014
1 Write short note on Halting Problem 05
2 Write short note on Rice‟s theorem 05
Dec-2014
1 Write short note on Halting Problem 05
2 Write short note on Post correspondence problem 05
May-13
1 Define the term undecidability 02
2 Write short note on Rice‟s theorem 05
3 Write short note on Recursive and Recursively Enumerable languages. 05
DEC-13
1 Write short note on Recursive and Recursively Enumerable languages 05
2 Write short note on Post correspondence problem 05
May-12
1 Write short note on Post correspondence problem 05
DEC-12
1 Write short note on Rice‟s theorem 05
May-11
1 Write short note on Post correspondence problem 05
2 Write short note on Greibach theorem 05
DEC-11
1 Write short note on Post correspondence problem 05
2 Write short note on Halting Problem 05
May-10
1 Define Post correspondence problem & Refer Example1 10
DEC-10
1 Write short note on Post correspondence problem 05
2 Write short note on Recursive and Recursively Enumerable languages. 05

Prepared by :Rohini Patil Page 9

You might also like