SlideShare a Scribd company logo
2
Most read
4
Most read
Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384]
MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 1
Un-decidability
 Recursive Languages
 A language L over the alphabet is called recursive if it is
accepted by some Turing Machine, M that accepts every word
in L and reject every word in (i.e. not belonging to L)
i.e. Accept (M) =L
Reject (M) =
Loop (M) = (No output)
 Example
TM accepting L over that starts with “a” and reject for in all cases. So L is recursive.
 For recursive languages we can define algorithm.
 The union of two recursive languages is recursive language.
 The complements of recursive language is recursive
 Recursively Enumerable Languages
 A language L over the alphabet is called recursive
enumerable languages if it is accepted by some Turing
Machine, M that accepts every word in L and either rejects
or loops for every word in
i.e. Accept (M) =L
Reject (M)+ Loop (M) = (No output)
 Example
A TM accepting language and reject or loops all words not in L. So L is recursive
enumerable.
 The universal language is recursively enumerable. [Universal Language: this language
consists of strings that are interpreted as TM followed by an Input for that TM. The string is in
if the TM accepts that input.]
 But diagonalisation language is not recursively enumerable. [Diagonalisation Language: this
language is the set of strings of 0’s and 1’s that when interpreted as a TM, are in the language of
that TM]
 For recursive enumerable languages we cannot define algorithm.
 The union of two recursive enumerable languages is recursive enumerable language.

Accept
Reject
L
L’

AcceptL
L’
Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384]
MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 2
 Difference between Recursive and Recursive Enumerable languages
 There is a profound difference between recursive and recursively enumerable language.
 If there is a regular language, we always have a FA to accept it.
 Now if the string w is given, and we want to know whether w belongs to this languages, w will
run it on the FA, and within n number of steps, where , as each state will
consume one character, we will get the answer YES if w belongs to L, otherwise NO. This is
called effective decision procedure.
 With TM accepting the language which is recursively enumerable and if w is executed on TM, we
are having a harder time. If then the machine will halt, otherwise we will have to wait,
perhaps for a very long time.
 In the worst case if w is in loop set for this machine, we shall never get a answer.
 A recursive language has the advantage that we shall at least some day get the answer, even
though we may not know how long it will take.
 An interesting observation is that, not all TM’s that accept a recursive language have no loop set.
 A language is recursive if at least one TM accepts it and rejects its complement. Some TM’s
which accept the same language but loops on some inputs.
 Undesirability and Un-solvability
 A problem whose language is recursive is said to be decidable otherwise it is un-decidable (RE
languages).
 If the problem is un-decidable then there is no algorithm which take the input and find the answer
either YES or NO.
 The problem “Whether a TM will halt for the given input word” is un-decidable problem
 If there is a TM which, when applied to any problem in the class, always eventually terminates
with the correct (YES/NO) answer, we call the problem solvable.
 If there is a TM which, when applied to any problem in the class, always eventually terminates
with the correct answer when the answer is YES and may or may not terminate when the correct
answer is NO, we call the problem semi-solvable or partially solvable.
 If there is no TM which, when applied to a problem in the class, eventually with the correct
answer YES, we call the problem un-solvable.
 Rice’s Theorem
 Every non-trivial property of the RE (Recursive Enumerable) languages is un-decidable.
Proof
 Let P be any nontrivial property of the RE languages. That means at least one language has a
property and the at least one language does not.
Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384]
MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 3
 Initially we will assume an empty language is not having the property P
 Since P is non-trivial, there should be some language L having property P i.e. And
therefore there exists a coded TM accepting language L let this TM is
 Now to prove construct a Universal Turing Machine that simulate TM, M and
 The design of be given in figure, if M does not accept w, and if M
accept w.
M
M L
M’Accept
AcceptAccept
Start
x
w
 Let reduce a universal language to and is un-decidable, so is also un-decidable (by
reduction theorem).
 The Turing machine can be produced on reduction. For the reduction algorithm the pair (M,
w) can be given input.
 is a two tape TM.
 One tape is used to simulate M on input w. then input is used for designing the transitions
of
 Second tape is used to simulate on input x. again the pair is used for designing the
transitions of
 The TM, is constructed to do the following things-
1. Simulate M on input w. note that w is not the input to ; rather writes M and w onto one
of its tapes and simulate the Universal Turing Machine on this pair.
2. If M does not accept w, then does nothing else. never accepts its own input, x so
. Since we assume is not in property P, that means the code for is not in
3. If M accepts w, then begins simulating on its own input x. Thus, will accept
exactly the language L. since L is in P, the code for is in P.
 Since constructing from M and w can be carried out by an algorithm. Since this algorithm
turns (M, w) into an that is in if and only if (M, w) is in , this reduction of to ,
and hence proves that the property P is un-decidable.
 Now another possibility when is in P.
 If so, consider the complements property of P i.e. , the set of RE languages that do not have
property P.
Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384]
MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 4
 By the foregoing, is un-decidable. However, since every TM accepts an RE language, , the
set of (codes for) Turing machines that do not accept a languages in P is the same as , the set
of TM’s that accepts a language in .
 Suppose were decidable, then so would be is decidable. since the complement of a
recursive language is recursive.
 Post Correspondence Problem
 Post’s correspondence Problem (PCP) was first introduced by Emil Post in 1946. Later, the
problem was found to have many applications in the theory of formal languages.
 PCP is uses to check un-decidability of strings, (another way to check by Turing machine)
 PCP define as
 “the post’s correspondence problem consists of two lists of strings that are of equal length over
the input .
The two lists are and then there exists a non empty set
of integers such that ”
 Another way we can say “The PCP is to determine whether or not there exist ,
where , such that
 To solve the PCP, we try to find all combinations of to find the , then we say
that PCP has a solution.
 PCP is un-decidable.
Example:
Does the PCP with two lists and have a solution?
Answer:
We have to find out such a sequence that strings formed by x and y are identical.
Such sequences are 2, 1, 1, and 3.
Hence from x and y list equal
2 1 1 3 2 1 1 3
= (combined and see)
Which forms thus PCP has a solution.
........................................................................................................................................................
Theorem: It is Un-decidable a CFG is ambiguous.
Proof:

More Related Content

PPTX
Unit v
PDF
Unit ii
PPT
5 decidability theory of computation
PDF
Unit i
PDF
Formal Languages and Automata Theory unit 4
PPTX
Chomsky classification of Language
PDF
Formal Languages and Automata Theory unit 5
PPT
Undecidability1
Unit v
Unit ii
5 decidability theory of computation
Unit i
Formal Languages and Automata Theory unit 4
Chomsky classification of Language
Formal Languages and Automata Theory unit 5
Undecidability1

What's hot (20)

PDF
Chomsky hierarchy
PPTX
P np & np completeness
PDF
Applied Calculus: An Introduction to Derivatives
PPT
FInite Automata
PDF
Automata
DOCX
PDF
Isolation Lemma for Directed Reachability and NL vs. L
PPTX
Closure properties
PPT
Lecture 7: Definite Clause Grammars
PPT
PPTX
Context Free Grammar
PDF
PARSING ARABIC VERB PHRASES USING PREGROUP GRAMMARS
PPTX
Formal language
PPTX
NLP_KASHK:POS Tagging
PPTX
2.1 & 2.2 grammar introduction – types of grammar
PPTX
Ai lecture 13(unit03)
PDF
Ai lecture 13(unit03)
PDF
13 propositional calculus
PDF
NFA to DFA
PPT
Logic agent
Chomsky hierarchy
P np & np completeness
Applied Calculus: An Introduction to Derivatives
FInite Automata
Automata
Isolation Lemma for Directed Reachability and NL vs. L
Closure properties
Lecture 7: Definite Clause Grammars
Context Free Grammar
PARSING ARABIC VERB PHRASES USING PREGROUP GRAMMARS
Formal language
NLP_KASHK:POS Tagging
2.1 & 2.2 grammar introduction – types of grammar
Ai lecture 13(unit03)
Ai lecture 13(unit03)
13 propositional calculus
NFA to DFA
Logic agent
Ad

Similar to Theory of Computer Science - Post Correspondence Problem (20)

PPT
Ch11.ppt
PPT
Ch11.ppt
PDF
QB104545.pdf
PPTX
hghghghhghghgggggggggggggggggggggggggggggggggg
PPTX
chapter 2.pptx
PPTX
Statistical machine translation
DOCX
Busy week • Lab 9 due Thursday at 5 pm L = { M,s s.docx
DOCX
Busy week • Lab 9 due Thursday at 5 pm L = { M,s s.docx
PPTX
FOrmalLanguage and Automata -undecidability.pptx
PPTX
THEORYOFAUTOMATATHEORYOFAUTOMATATHEORYOFAUTOMATA.pptx
PDF
lect_23.pdf
PPT
1. Introduction to __Automata Theory.ppt
PPTX
Winter 10 Lecture 2 ATM Undecidability - Formal Proof.pptx
PDF
practice-final-soln.pdf
PPTX
re_1743661768147 (2).pptx recursively enumerable languages
PDF
Presentation (5).pdf
PPTX
Natural Language Processing
PPTX
Types of Language in Theory of Computation
PPTX
Winter 11 Lecture Reducibility.pptx
Ch11.ppt
Ch11.ppt
QB104545.pdf
hghghghhghghgggggggggggggggggggggggggggggggggg
chapter 2.pptx
Statistical machine translation
Busy week • Lab 9 due Thursday at 5 pm L = { M,s s.docx
Busy week • Lab 9 due Thursday at 5 pm L = { M,s s.docx
FOrmalLanguage and Automata -undecidability.pptx
THEORYOFAUTOMATATHEORYOFAUTOMATATHEORYOFAUTOMATA.pptx
lect_23.pdf
1. Introduction to __Automata Theory.ppt
Winter 10 Lecture 2 ATM Undecidability - Formal Proof.pptx
practice-final-soln.pdf
re_1743661768147 (2).pptx recursively enumerable languages
Presentation (5).pdf
Natural Language Processing
Types of Language in Theory of Computation
Winter 11 Lecture Reducibility.pptx
Ad

More from Karan Thakkar (7)

PDF
Wt module 2
DOCX
PDF
Working principle of Turing machine
PDF
Turing machine
PPTX
Microcontoller and Embedded System
PPTX
Operating system - Process and its concepts
PPTX
Search Engine Optimization
Wt module 2
Working principle of Turing machine
Turing machine
Microcontoller and Embedded System
Operating system - Process and its concepts
Search Engine Optimization

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
Mechanical Engineering MATERIALS Selection
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Construction Project Organization Group 2.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Welding lecture in detail for understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PPT on Performance Review to get promotions
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Geodesy 1.pptx...............................................
573137875-Attendance-Management-System-original
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Lecture Notes Electrical Wiring System Components
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mechanical Engineering MATERIALS Selection
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Construction Project Organization Group 2.pptx
CH1 Production IntroductoryConcepts.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Embodied AI: Ushering in the Next Era of Intelligent Systems
Welding lecture in detail for understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT on Performance Review to get promotions
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Internet of Things (IOT) - A guide to understanding
Geodesy 1.pptx...............................................

Theory of Computer Science - Post Correspondence Problem

  • 1. Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384] MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 1 Un-decidability  Recursive Languages  A language L over the alphabet is called recursive if it is accepted by some Turing Machine, M that accepts every word in L and reject every word in (i.e. not belonging to L) i.e. Accept (M) =L Reject (M) = Loop (M) = (No output)  Example TM accepting L over that starts with “a” and reject for in all cases. So L is recursive.  For recursive languages we can define algorithm.  The union of two recursive languages is recursive language.  The complements of recursive language is recursive  Recursively Enumerable Languages  A language L over the alphabet is called recursive enumerable languages if it is accepted by some Turing Machine, M that accepts every word in L and either rejects or loops for every word in i.e. Accept (M) =L Reject (M)+ Loop (M) = (No output)  Example A TM accepting language and reject or loops all words not in L. So L is recursive enumerable.  The universal language is recursively enumerable. [Universal Language: this language consists of strings that are interpreted as TM followed by an Input for that TM. The string is in if the TM accepts that input.]  But diagonalisation language is not recursively enumerable. [Diagonalisation Language: this language is the set of strings of 0’s and 1’s that when interpreted as a TM, are in the language of that TM]  For recursive enumerable languages we cannot define algorithm.  The union of two recursive enumerable languages is recursive enumerable language.  Accept Reject L L’  AcceptL L’
  • 2. Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384] MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 2  Difference between Recursive and Recursive Enumerable languages  There is a profound difference between recursive and recursively enumerable language.  If there is a regular language, we always have a FA to accept it.  Now if the string w is given, and we want to know whether w belongs to this languages, w will run it on the FA, and within n number of steps, where , as each state will consume one character, we will get the answer YES if w belongs to L, otherwise NO. This is called effective decision procedure.  With TM accepting the language which is recursively enumerable and if w is executed on TM, we are having a harder time. If then the machine will halt, otherwise we will have to wait, perhaps for a very long time.  In the worst case if w is in loop set for this machine, we shall never get a answer.  A recursive language has the advantage that we shall at least some day get the answer, even though we may not know how long it will take.  An interesting observation is that, not all TM’s that accept a recursive language have no loop set.  A language is recursive if at least one TM accepts it and rejects its complement. Some TM’s which accept the same language but loops on some inputs.  Undesirability and Un-solvability  A problem whose language is recursive is said to be decidable otherwise it is un-decidable (RE languages).  If the problem is un-decidable then there is no algorithm which take the input and find the answer either YES or NO.  The problem “Whether a TM will halt for the given input word” is un-decidable problem  If there is a TM which, when applied to any problem in the class, always eventually terminates with the correct (YES/NO) answer, we call the problem solvable.  If there is a TM which, when applied to any problem in the class, always eventually terminates with the correct answer when the answer is YES and may or may not terminate when the correct answer is NO, we call the problem semi-solvable or partially solvable.  If there is no TM which, when applied to a problem in the class, eventually with the correct answer YES, we call the problem un-solvable.  Rice’s Theorem  Every non-trivial property of the RE (Recursive Enumerable) languages is un-decidable. Proof  Let P be any nontrivial property of the RE languages. That means at least one language has a property and the at least one language does not.
  • 3. Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384] MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 3  Initially we will assume an empty language is not having the property P  Since P is non-trivial, there should be some language L having property P i.e. And therefore there exists a coded TM accepting language L let this TM is  Now to prove construct a Universal Turing Machine that simulate TM, M and  The design of be given in figure, if M does not accept w, and if M accept w. M M L M’Accept AcceptAccept Start x w  Let reduce a universal language to and is un-decidable, so is also un-decidable (by reduction theorem).  The Turing machine can be produced on reduction. For the reduction algorithm the pair (M, w) can be given input.  is a two tape TM.  One tape is used to simulate M on input w. then input is used for designing the transitions of  Second tape is used to simulate on input x. again the pair is used for designing the transitions of  The TM, is constructed to do the following things- 1. Simulate M on input w. note that w is not the input to ; rather writes M and w onto one of its tapes and simulate the Universal Turing Machine on this pair. 2. If M does not accept w, then does nothing else. never accepts its own input, x so . Since we assume is not in property P, that means the code for is not in 3. If M accepts w, then begins simulating on its own input x. Thus, will accept exactly the language L. since L is in P, the code for is in P.  Since constructing from M and w can be carried out by an algorithm. Since this algorithm turns (M, w) into an that is in if and only if (M, w) is in , this reduction of to , and hence proves that the property P is un-decidable.  Now another possibility when is in P.  If so, consider the complements property of P i.e. , the set of RE languages that do not have property P.
  • 4. Math- I, II, III, IV, RSA & TCS by Parmar Sir [9764546384] MU | TCS/FA | Un-decidability | Feb 2014 | Parmar Sir Page 4  By the foregoing, is un-decidable. However, since every TM accepts an RE language, , the set of (codes for) Turing machines that do not accept a languages in P is the same as , the set of TM’s that accepts a language in .  Suppose were decidable, then so would be is decidable. since the complement of a recursive language is recursive.  Post Correspondence Problem  Post’s correspondence Problem (PCP) was first introduced by Emil Post in 1946. Later, the problem was found to have many applications in the theory of formal languages.  PCP is uses to check un-decidability of strings, (another way to check by Turing machine)  PCP define as  “the post’s correspondence problem consists of two lists of strings that are of equal length over the input . The two lists are and then there exists a non empty set of integers such that ”  Another way we can say “The PCP is to determine whether or not there exist , where , such that  To solve the PCP, we try to find all combinations of to find the , then we say that PCP has a solution.  PCP is un-decidable. Example: Does the PCP with two lists and have a solution? Answer: We have to find out such a sequence that strings formed by x and y are identical. Such sequences are 2, 1, 1, and 3. Hence from x and y list equal 2 1 1 3 2 1 1 3 = (combined and see) Which forms thus PCP has a solution. ........................................................................................................................................................ Theorem: It is Un-decidable a CFG is ambiguous. Proof: