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

Undecidability and Reduciblity

Theory of computer science

Uploaded by

rishikumar2809
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)
14 views

Undecidability and Reduciblity

Theory of computer science

Uploaded by

rishikumar2809
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

2/6/2021 Undecidability and Reduciblity

Undecidability and Reducibility in TOC


Difficulty Level : Medium ● Last Updated : 20 Nov, 2019

Decidable Problems

A problem is decidable if we can construct a Turing machine which will halt in finite amount of time for ever y input

and give answer as ‘ yes’ or ‘no’. A decidable problem has an algorithm to determine the answer for a given input.

Examples

Equivalence of two regular languages : Given two regular languages, there is an algorithm and Turing machine

to decide whether two regular languages are equal or not.

Finiteness of regular language : Given a regular language, there is an algorithm and Turing machine to decide

whether regular language is finite or not.

Emptiness of context free language : Given a context free language, there is an algorithm whether CFL is empt y

or not.

Undecidable Problems


A problem is undecidable if there is no Turing machine which will always halt in finite amount of time to give answer

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 1/9
2/6/2021 Undecidability and Reduciblity

as ‘ yes’ or ‘no’. An undecidable problem has no algorithm to determine the answer for a given input.

Examples

Ambiguit y of context-free languages : Given a context-free language, there is no Turing machine which will

always halt in finite amount of time and give answer whether language is ambiguous or not.

Equivalence of two context-free languages : Given two context-free languages, there is no Turing machine

which will always halt in finite amount of time and give answer whether two context free languages are equal or

not.

Ever ything or completeness of CFG : Given a CFG and input alphabet, whether CFG will generate all possible

strings of input alphabet ( ∑*)is undecidable.


Regularit y of CFL, CSL, REC and REC : Given a CFL, CSL, REC or REC, determining whether this language is

regular is undecidable.

Note: Two popular undecidable problems are halting problem of TM and PCP (Post Correspondence Problem).

Semi-decidable Problems

A semi-decidable problem is subset of undecidable problems for which Turing machine will always halt in finite

amount of time for answer as ‘ yes’ and may or may not halt for answer as ‘no’.

Relationship between semi-decidable and decidable problem has been shown in Figure 1 as:

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 2/9
2/6/2021 Undecidability and Reduciblity

Rice’s Theorem

Ever y non-trivial (answer is not known) problem on Recursive Enumerable languages is undecidable.e.g.; If a

language is Recursive Enumerable, it s complement will be recursive enumerable or not is undecidable.

Reducibilit y and Undecidabilit y

L anguage A is reducible to language B (represented as A ≤B) if there exist s a function f which will conver t strings in
A to strings in B as:

w ɛ A <=> f(w) ɛ B

Theorem 1: If A ≤B and B is decidable then A is also decidable.


Theorem 2: If A ≤B and A is undecidable then B is also undecidable.

Question: Which of the following is/are undecidable?

1. G is a CFG. Is L(G)= ɸ? ▲

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 3/9
2/6/2021 Undecidability and Reduciblity

2. G is a CFG. Is L(G)= ∑*?


3. M is a Turing machine. Is L(M) regular?

4. A is a DFA and N is an NFA . Is L(A)=L(N)?

A . 3 only

B. 3 and 4 only

C. 1, 2 and 3 only

D. 2 and 3 only

Explanation:

Option 1 is whether a CFG is empt y or not, this problem is decidable.

Option 2 is whether a CFG will generate all possible strings (ever ything or completeness of CFG), this problem is

undecidable.


Option 3 is whether language generated by TM is regular is undecidable.

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 4/9
2/6/2021 Undecidability and Reduciblity

Option 4 is whether language generated by DFA and NFA are same is decidable. So option D is correct.

Question: Which of the following problems are decidable?

1. Does a given program ever produce an output?

Related Articles
2. If L is context free language then L’ is also context free?
Save for later
3. If L is regular language then L’ is also regular?

4. If L is recursive language then L’ is also recursive?

A . 1,2,3,4

B. 1,2

C. 2,3,4

D. 3,4

Explanation:

A s regular and recursive languages are closed under complementation, option 3 and 4 are decidable problems.

Context free languages are not closed under complementation, option 2 is undecidable.

Option 1 is also undecidable as there is no TM to determine whether a given program will produce an output. So,

option D is correc t.

Question: Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable.

Which one of the following is TRUE?

A . P3 is undecidable if P2 is reducible to P3

B. P3 is decidable if P3 is reducible to P2’s complement

C. P3 is undecidable if P3 is reducible to P2

D. P3 is decidable if P1 is reducible to P3

Explanation:

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 5/9
2/6/2021 Undecidability and Reduciblity

Option A says P2 ≤P3. According to theorem 2 discussed, if P2 is undecidable then P3 is undecidable. It is given
that P2 is undecidable, so P3 will also be undecidable. So option (A) is correc t.

Option C says P3 ≤P2. According to theorem 2 discussed, if P3 is undecidable then P2 is undecidable. But it is not
given in question about undecidabilit y of P3. So option (C) is not correc t.

Option D says P1 ≤P3. According to theorem 1 discussed, if P3 is decidable then P1 is also decidable. But it is not
given in question about decidabilit y of P3. So option (D) is not correc t.

Option (B) says P3 ≤P2’. According to theorem 2 discussed, if P3 is undecidable then P2’ is undecidable. But it is
not given in question about undecidabilit y of P3. So option (B) is not correc t.

Quiz on Undecidabilit y

This ar ticle is contributed by Sonal Tuteja. Please write comment s if you find anything incorrect, or you want to

share more information about the topic discussed above

Attention reader! Don’t stop learning now. Get hold of all the impor tant CS Theor y concept s for SDE inter views with

the CS Theor y Course at a student-friendly price and become industr y ready.

 Like 0

 Previous Next 
Decidable and Undecidable problems in Computable and non-computable
Theory of Computation ▲ problems in TOC
https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 6/9
2/6/2021 Undecidability and Reduciblity

RECOMMENDED ARTICLES Page : 1 2 3

Decidability and Undecidability in TOC Hypothesis (language regularity) and


01 05
10, May 16
algorithm (L-graph to NFA) in TOC
23, Jul 18

Recursive and Recursive Enumerable Computable and non-computable problems


02
Languages in TOC 06
in TOC
08, Apr 16
17, Aug 18

Mealy and Moore Machines in TOC Operator grammar and precedence parser in
07
03 05, Jun 16
TOC
03, May 18

L-graphs and what they represent in TOC Kleene's Theorem in TOC | Part-1
04 23, Jul 18
08 25, Jan 19

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 7/9
2/6/2021 Undecidability and Reduciblity

Ar ticle Contributed By : Vote for di culty

Current di culty : Medium

GeeksforGeeks
Easy Normal Medium Hard Expert

Improved By : Bhumika_Rani, AmritanshuKumar, fahadahmedkhan07


Article Tags : GATE CS , Theory of Computation & Automata

Improve Article Report Issue

Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.

Load Comments

5th Floor, A-118,


Sector-136, Noida,▲Uttar Pradesh - 201305
https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 8/9
2/6/2021 Undecidability and Reduciblity

[email protected]

Company Learn Practice Contribute


About Us Algorithms Courses Write an Article
Careers Data Structures Company-wise Write Interview Experience

Privacy Policy Languages Topic-wise Internships


Contact Us CS Subjects How to begin? Videos
Copyright Policy Video Tutorials

@geeksforgeeks , Some rights reserved

https://www.geeksforgeeks.org/undecidability-and-reducibility-in-toc/ 9/9

You might also like